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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    When the doubleValue type is set, the value of the resource must be a double precision floating-point type.
    When the integerValue type is set, the value of the resource must be an integer.
    When the longValue type is set, the value of the resource must be an extended precision floating-point type.
    The name of the resource, such as CPU, MEMORY, PORTS, or a user-defined resource.
    When the stringSetValue type is set, the value of the resource must be a string type.
    The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.
    int
     
    void
    setDoubleValue(Double doubleValue)
    When the doubleValue type is set, the value of the resource must be a double precision floating-point type.
    void
    setIntegerValue(Integer integerValue)
    When the integerValue type is set, the value of the resource must be an integer.
    void
    setLongValue(Long longValue)
    When the longValue type is set, the value of the resource must be an extended precision floating-point type.
    void
    The name of the resource, such as CPU, MEMORY, PORTS, or a user-defined resource.
    void
    When the stringSetValue type is set, the value of the resource must be a string type.
    void
    The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.
    Returns a string representation of this object; useful for testing and debugging.
    withDoubleValue(Double doubleValue)
    When the doubleValue type is set, the value of the resource must be a double precision floating-point type.
    withIntegerValue(Integer integerValue)
    When the integerValue type is set, the value of the resource must be an integer.
    withLongValue(Long longValue)
    When the longValue type is set, the value of the resource must be an extended precision floating-point type.
    The name of the resource, such as CPU, MEMORY, PORTS, or a user-defined resource.
    withStringSetValue(String... stringSetValue)
    When the stringSetValue type is set, the value of the resource must be a string type.
    When the stringSetValue type is set, the value of the resource must be a string type.
    The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Resource

      public Resource()
  • Method Details

    • 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 as CPU, 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 as CPU, 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, or STRINGSET.

      Parameters:
      type - The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.
    • getType

      public String getType()

      The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.

      Returns:
      The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET .
    • withType

      public Resource withType(String type)

      The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.

      Parameters:
      type - The type of the resource, such as INTEGER, DOUBLE, LONG, or STRINGSET.
      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 the doubleValue 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 the doubleValue 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 the longValue 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 the longValue 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 the integerValue 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 the integerValue 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 the stringSetValue 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) or withStringSetValue(java.util.Collection) if you want to override the existing values.

      Parameters:
      stringSetValue - When the stringSetValue 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 the stringSetValue 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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Resource clone()
      Overrides:
      clone in class Object