Class Resource
- java.lang.Object
-
- com.amazonaws.services.ecs.model.Resource
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Resource extends Object implements Serializable, Cloneable
Describes the resources available for a container instance.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Resource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource
clone()
boolean
equals(Object obj)
Double
getDoubleValue()
When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.Integer
getIntegerValue()
When theintegerValue
type is set, the value of the resource must be an integer.Long
getLongValue()
When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.String
getName()
The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.List<String>
getStringSetValue()
When thestringSetValue
type is set, the value of the resource must be a string type.String
getType()
The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.int
hashCode()
void
setDoubleValue(Double doubleValue)
When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.void
setIntegerValue(Integer integerValue)
When theintegerValue
type is set, the value of the resource must be an integer.void
setLongValue(Long longValue)
When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.void
setName(String name)
The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.void
setStringSetValue(Collection<String> stringSetValue)
When thestringSetValue
type is set, the value of the resource must be a string type.void
setType(String type)
The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.String
toString()
Returns a string representation of this object; useful for testing and debugging.Resource
withDoubleValue(Double doubleValue)
When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.Resource
withIntegerValue(Integer integerValue)
When theintegerValue
type is set, the value of the resource must be an integer.Resource
withLongValue(Long longValue)
When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.Resource
withName(String name)
The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.Resource
withStringSetValue(String... stringSetValue)
When thestringSetValue
type is set, the value of the resource must be a string type.Resource
withStringSetValue(Collection<String> stringSetValue)
When thestringSetValue
type is set, the value of the resource must be a string type.Resource
withType(String type)
The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.
-
-
-
Method Detail
-
setName
public void setName(String name)
The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.- Parameters:
name
- The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.
-
getName
public String getName()
The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.- Returns:
- The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.
-
withName
public Resource withName(String name)
The name of the resource, such as
CPU
,MEMORY
,PORTS
, or a user-defined resource.- Parameters:
name
- The name of the resource, such asCPU
,MEMORY
,PORTS
, or a user-defined resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setType
public void setType(String type)
The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Parameters:
type
- The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.
-
getType
public String getType()
The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Returns:
- The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.
-
withType
public Resource withType(String type)
The type of the resource, such as
INTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Parameters:
type
- The type of the resource, such asINTEGER
,DOUBLE
,LONG
, orSTRINGSET
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDoubleValue
public void setDoubleValue(Double doubleValue)
When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue
- When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.
-
getDoubleValue
public Double getDoubleValue()
When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.- Returns:
- When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.
-
withDoubleValue
public Resource withDoubleValue(Double doubleValue)
When the
doubleValue
type is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue
- When thedoubleValue
type is set, the value of the resource must be a double precision floating-point type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLongValue
public void setLongValue(Long longValue)
When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue
- When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.
-
getLongValue
public Long getLongValue()
When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.- Returns:
- When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.
-
withLongValue
public Resource withLongValue(Long longValue)
When the
longValue
type is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue
- When thelongValue
type is set, the value of the resource must be an extended precision floating-point type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIntegerValue
public void setIntegerValue(Integer integerValue)
When the
integerValue
type is set, the value of the resource must be an integer.- Parameters:
integerValue
- When theintegerValue
type is set, the value of the resource must be an integer.
-
getIntegerValue
public Integer getIntegerValue()
When the
integerValue
type is set, the value of the resource must be an integer.- Returns:
- When the
integerValue
type is set, the value of the resource must be an integer.
-
withIntegerValue
public Resource withIntegerValue(Integer integerValue)
When the
integerValue
type is set, the value of the resource must be an integer.- Parameters:
integerValue
- When theintegerValue
type is set, the value of the resource must be an integer.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getStringSetValue
public List<String> getStringSetValue()
When the
stringSetValue
type is set, the value of the resource must be a string type.- Returns:
- When the
stringSetValue
type is set, the value of the resource must be a string type.
-
setStringSetValue
public void setStringSetValue(Collection<String> stringSetValue)
When the
stringSetValue
type is set, the value of the resource must be a string type.- Parameters:
stringSetValue
- When thestringSetValue
type is set, the value of the resource must be a string type.
-
withStringSetValue
public Resource withStringSetValue(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)
orwithStringSetValue(java.util.Collection)
if you want to override the existing values.- Parameters:
stringSetValue
- When thestringSetValue
type is set, the value of the resource must be a string type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withStringSetValue
public Resource withStringSetValue(Collection<String> stringSetValue)
When the
stringSetValue
type is set, the value of the resource must be a string type.- Parameters:
stringSetValue
- When thestringSetValue
type is set, the value of the resource must be a string type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-