public class Resource
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes the resources available for a container instance.
Modifier and Type | Field and Description |
---|---|
private java.lang.Double |
doubleValue
When the
doubleValue type is set, the value of the resource
must be a double precision floating-point type. |
private java.lang.Integer |
integerValue
When the
integerValue type is set, the value of the resource
must be an integer. |
private java.lang.Long |
longValue
When the
longValue type is set, the value of the resource
must be an extended precision floating-point type. |
private java.lang.String |
name
The name of the resource, such as
CPU , MEMORY ,
PORTS , or a user-defined resource. |
private SdkInternalList<java.lang.String> |
stringSetValue
When the
stringSetValue type is set, the value of the
resource must be a string type. |
private java.lang.String |
type
The type of the resource, such as
INTEGER ,
DOUBLE , LONG , or STRINGSET . |
Constructor and Description |
---|
Resource() |
Modifier and Type | Method and Description |
---|---|
Resource |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Double |
getDoubleValue()
When the
doubleValue type is set, the value of the resource
must be a double precision floating-point type. |
java.lang.Integer |
getIntegerValue()
When the
integerValue type is set, the value of the resource
must be an integer. |
java.lang.Long |
getLongValue()
When the
longValue type is set, the value of the resource
must be an extended precision floating-point type. |
java.lang.String |
getName()
The name of the resource, such as
CPU , MEMORY ,
PORTS , or a user-defined resource. |
java.util.List<java.lang.String> |
getStringSetValue()
When the
stringSetValue type is set, the value of the
resource must be a string type. |
java.lang.String |
getType()
The type of the resource, such as
INTEGER ,
DOUBLE , LONG , or STRINGSET . |
int |
hashCode() |
void |
setDoubleValue(java.lang.Double doubleValue)
When the
doubleValue type is set, the value of the resource
must be a double precision floating-point type. |
void |
setIntegerValue(java.lang.Integer integerValue)
When the
integerValue type is set, the value of the resource
must be an integer. |
void |
setLongValue(java.lang.Long longValue)
When the
longValue type is set, the value of the resource
must be an extended precision floating-point type. |
void |
setName(java.lang.String name)
The name of the resource, such as
CPU , MEMORY ,
PORTS , or a user-defined resource. |
void |
setStringSetValue(java.util.Collection<java.lang.String> stringSetValue)
When the
stringSetValue type is set, the value of the
resource must be a string type. |
void |
setType(java.lang.String type)
The type of the resource, such as
INTEGER ,
DOUBLE , LONG , or STRINGSET . |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Resource |
withDoubleValue(java.lang.Double doubleValue)
When the
doubleValue type is set, the value of the resource
must be a double precision floating-point type. |
Resource |
withIntegerValue(java.lang.Integer integerValue)
When the
integerValue type is set, the value of the resource
must be an integer. |
Resource |
withLongValue(java.lang.Long longValue)
When the
longValue type is set, the value of the resource
must be an extended precision floating-point type. |
Resource |
withName(java.lang.String name)
The name of the resource, such as
CPU , MEMORY ,
PORTS , or a user-defined resource. |
Resource |
withStringSetValue(java.util.Collection<java.lang.String> stringSetValue)
When the
stringSetValue type is set, the value of the
resource must be a string type. |
Resource |
withStringSetValue(java.lang.String... stringSetValue)
When the
stringSetValue type is set, the value of the
resource must be a string type. |
Resource |
withType(java.lang.String type)
The type of the resource, such as
INTEGER ,
DOUBLE , LONG , or STRINGSET . |
private java.lang.String name
The name of the resource, such as CPU
, MEMORY
,
PORTS
, or a user-defined resource.
private java.lang.String type
The type of the resource, such as INTEGER
,
DOUBLE
, LONG
, or STRINGSET
.
private java.lang.Double doubleValue
When the doubleValue
type is set, the value of the resource
must be a double precision floating-point type.
private java.lang.Long longValue
When the longValue
type is set, the value of the resource
must be an extended precision floating-point type.
private java.lang.Integer integerValue
When the integerValue
type is set, the value of the resource
must be an integer.
private SdkInternalList<java.lang.String> stringSetValue
When the stringSetValue
type is set, the value of the
resource must be a string type.
public void setName(java.lang.String name)
The name of the resource, such as CPU
, MEMORY
,
PORTS
, or a user-defined resource.
name
- The name of the resource, such as CPU
,
MEMORY
, PORTS
, or a user-defined
resource.public java.lang.String getName()
The name of the resource, such as CPU
, MEMORY
,
PORTS
, or a user-defined resource.
CPU
,
MEMORY
, PORTS
, or a user-defined
resource.public Resource withName(java.lang.String name)
The name of the resource, such as CPU
, MEMORY
,
PORTS
, or a user-defined resource.
name
- The name of the resource, such as CPU
,
MEMORY
, PORTS
, or a user-defined
resource.public void setType(java.lang.String type)
The type of the resource, such as INTEGER
,
DOUBLE
, LONG
, or STRINGSET
.
type
- The type of the resource, such as INTEGER
,
DOUBLE
, LONG
, or STRINGSET
.public java.lang.String getType()
The type of the resource, such as INTEGER
,
DOUBLE
, LONG
, or STRINGSET
.
INTEGER
,
DOUBLE
, LONG
, or STRINGSET
.public Resource withType(java.lang.String type)
The type of the resource, such as INTEGER
,
DOUBLE
, LONG
, or STRINGSET
.
type
- The type of the resource, such as INTEGER
,
DOUBLE
, LONG
, or STRINGSET
.public void setDoubleValue(java.lang.Double doubleValue)
When the doubleValue
type is set, the value of the resource
must be a double precision floating-point type.
doubleValue
- When the doubleValue
type is set, the value of the
resource must be a double precision floating-point type.public java.lang.Double getDoubleValue()
When the doubleValue
type is set, the value of the resource
must be a double precision floating-point type.
doubleValue
type is set, the value of the
resource must be a double precision floating-point type.public Resource withDoubleValue(java.lang.Double doubleValue)
When the doubleValue
type is set, the value of the resource
must be a double precision floating-point type.
doubleValue
- When the doubleValue
type is set, the value of the
resource must be a double precision floating-point type.public void setLongValue(java.lang.Long longValue)
When the longValue
type is set, the value of the resource
must be an extended precision floating-point type.
longValue
- When the longValue
type is set, the value of the
resource must be an extended precision floating-point type.public java.lang.Long getLongValue()
When the longValue
type is set, the value of the resource
must be an extended precision floating-point type.
longValue
type is set, the value of the
resource must be an extended precision floating-point type.public Resource withLongValue(java.lang.Long longValue)
When the longValue
type is set, the value of the resource
must be an extended precision floating-point type.
longValue
- When the longValue
type is set, the value of the
resource must be an extended precision floating-point type.public void setIntegerValue(java.lang.Integer integerValue)
When the integerValue
type is set, the value of the resource
must be an integer.
integerValue
- When the integerValue
type is set, the value of the
resource must be an integer.public java.lang.Integer getIntegerValue()
When the integerValue
type is set, the value of the resource
must be an integer.
integerValue
type is set, the value of the
resource must be an integer.public Resource withIntegerValue(java.lang.Integer integerValue)
When the integerValue
type is set, the value of the resource
must be an integer.
integerValue
- When the integerValue
type is set, the value of the
resource must be an integer.public java.util.List<java.lang.String> getStringSetValue()
When the stringSetValue
type is set, the value of the
resource must be a string type.
stringSetValue
type is set, the value of
the resource must be a string type.public void setStringSetValue(java.util.Collection<java.lang.String> stringSetValue)
When the stringSetValue
type is set, the value of the
resource must be a string type.
stringSetValue
- When the stringSetValue
type is set, the value of the
resource must be a string type.public Resource withStringSetValue(java.lang.String... stringSetValue)
When the stringSetValue
type is set, the value of the
resource must be a string type.
NOTE: This method appends the values to the existing list (if
any). Use setStringSetValue(java.util.Collection)
or
withStringSetValue(java.util.Collection)
if you want to override
the existing values.
stringSetValue
- When the stringSetValue
type is set, the value of the
resource must be a string type.public Resource withStringSetValue(java.util.Collection<java.lang.String> stringSetValue)
When the stringSetValue
type is set, the value of the
resource must be a string type.
stringSetValue
- When the stringSetValue
type is set, the value of the
resource must be a string type.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Resource clone()
clone
in class java.lang.Object