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 Resourceclone()booleanequals(Object obj)DoublegetDoubleValue()When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.IntegergetIntegerValue()When theintegerValuetype is set, the value of the resource must be an integer.LonggetLongValue()When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.StringgetName()The name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.List<String>getStringSetValue()When thestringSetValuetype is set, the value of the resource must be a string type.StringgetType()The type of the resource, such asINTEGER,DOUBLE,LONG, orSTRINGSET.inthashCode()voidsetDoubleValue(Double doubleValue)When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.voidsetIntegerValue(Integer integerValue)When theintegerValuetype is set, the value of the resource must be an integer.voidsetLongValue(Long longValue)When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.voidsetName(String name)The name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.voidsetStringSetValue(Collection<String> stringSetValue)When thestringSetValuetype is set, the value of the resource must be a string type.voidsetType(String type)The type of the resource, such asINTEGER,DOUBLE,LONG, orSTRINGSET.StringtoString()Returns a string representation of this object; useful for testing and debugging.ResourcewithDoubleValue(Double doubleValue)When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.ResourcewithIntegerValue(Integer integerValue)When theintegerValuetype is set, the value of the resource must be an integer.ResourcewithLongValue(Long longValue)When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.ResourcewithName(String name)The name of the resource, such asCPU,MEMORY,PORTS, or a user-defined resource.ResourcewithStringSetValue(String... stringSetValue)When thestringSetValuetype is set, the value of the resource must be a string type.ResourcewithStringSetValue(Collection<String> stringSetValue)When thestringSetValuetype is set, the value of the resource must be a string type.ResourcewithType(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
doubleValuetype is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue- When thedoubleValuetype is set, the value of the resource must be a double precision floating-point type.
-
getDoubleValue
public Double getDoubleValue()
When the
doubleValuetype is set, the value of the resource must be a double precision floating-point type.- Returns:
- When the
doubleValuetype is set, the value of the resource must be a double precision floating-point type.
-
withDoubleValue
public Resource withDoubleValue(Double doubleValue)
When the
doubleValuetype is set, the value of the resource must be a double precision floating-point type.- Parameters:
doubleValue- When thedoubleValuetype 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
longValuetype is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue- When thelongValuetype is set, the value of the resource must be an extended precision floating-point type.
-
getLongValue
public Long getLongValue()
When the
longValuetype is set, the value of the resource must be an extended precision floating-point type.- Returns:
- When the
longValuetype is set, the value of the resource must be an extended precision floating-point type.
-
withLongValue
public Resource withLongValue(Long longValue)
When the
longValuetype is set, the value of the resource must be an extended precision floating-point type.- Parameters:
longValue- When thelongValuetype 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
integerValuetype is set, the value of the resource must be an integer.- Parameters:
integerValue- When theintegerValuetype is set, the value of the resource must be an integer.
-
getIntegerValue
public Integer getIntegerValue()
When the
integerValuetype is set, the value of the resource must be an integer.- Returns:
- When the
integerValuetype is set, the value of the resource must be an integer.
-
withIntegerValue
public Resource withIntegerValue(Integer integerValue)
When the
integerValuetype is set, the value of the resource must be an integer.- Parameters:
integerValue- When theintegerValuetype 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
stringSetValuetype is set, the value of the resource must be a string type.- Returns:
- When the
stringSetValuetype is set, the value of the resource must be a string type.
-
setStringSetValue
public void setStringSetValue(Collection<String> stringSetValue)
When the
stringSetValuetype is set, the value of the resource must be a string type.- Parameters:
stringSetValue- When thestringSetValuetype is set, the value of the resource must be a string type.
-
withStringSetValue
public Resource withStringSetValue(String... stringSetValue)
When the
stringSetValuetype 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 thestringSetValuetype 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
stringSetValuetype is set, the value of the resource must be a string type.- Parameters:
stringSetValue- When thestringSetValuetype 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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-