Class Resource

    • Constructor Summary

      Constructors 
      Constructor Description
      Resource()  
    • Constructor Detail

      • Resource

        public Resource()
    • 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 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:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object