Class AttributeValue

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class AttributeValue
    extends Object
    implements Serializable, Cloneable

    Represents the data for an attribute. You can set one, and only one, of the elements.

    Each attribute in an item is a name-value pair. An attribute can be single-valued or multi-valued set. For example, a book item can have title and authors attributes. Each book has one title but can have many authors. The multi-valued attribute is a set; duplicate values are not allowed.

    See Also:
    Serialized Form
    • Constructor Detail

      • AttributeValue

        public AttributeValue()
        Default constructor for AttributeValue object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
      • AttributeValue

        public AttributeValue​(String s)
        Constructs a new AttributeValue object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
        Parameters:
        s - A String data type.
      • AttributeValue

        public AttributeValue​(List<String> sS)
        Constructs a new AttributeValue object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
        Parameters:
        sS - A String Set data type.
    • Method Detail

      • setS

        public void setS​(String s)

        A String data type.

        Parameters:
        s - A String data type.
      • getS

        public String getS()

        A String data type.

        Returns:
        A String data type.
      • withS

        public AttributeValue withS​(String s)

        A String data type.

        Parameters:
        s - A String data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setN

        public void setN​(String n)

        A Number data type.

        Parameters:
        n - A Number data type.
      • getN

        public String getN()

        A Number data type.

        Returns:
        A Number data type.
      • withN

        public AttributeValue withN​(String n)

        A Number data type.

        Parameters:
        n - A Number data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setB

        public void setB​(ByteBuffer b)

        A Binary data type.

        AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.

        Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.

        Parameters:
        b - A Binary data type.
      • getB

        public ByteBuffer getB()

        A Binary data type.

        ByteBuffers are stateful. Calling their get methods changes their position. We recommend using ByteBuffer.asReadOnlyBuffer() to create a read-only view of the buffer with an independent position, and calling get methods on this rather than directly on the returned ByteBuffer. Doing so will ensure that anyone else using the ByteBuffer will not be affected by changes to the position .

        Returns:
        A Binary data type.
      • withB

        public AttributeValue withB​(ByteBuffer b)

        A Binary data type.

        Parameters:
        b - A Binary data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getSS

        public List<String> getSS()

        A String Set data type.

        Returns:
        A String Set data type.
      • setSS

        public void setSS​(Collection<String> sS)

        A String Set data type.

        Parameters:
        sS - A String Set data type.
      • withSS

        public AttributeValue withSS​(String... sS)

        A String Set data type.

        NOTE: This method appends the values to the existing list (if any). Use setSS(java.util.Collection) or withSS(java.util.Collection) if you want to override the existing values.

        Parameters:
        sS - A String Set data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withSS

        public AttributeValue withSS​(Collection<String> sS)

        A String Set data type.

        Parameters:
        sS - A String Set data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getNS

        public List<String> getNS()

        A Number Set data type.

        Returns:
        A Number Set data type.
      • setNS

        public void setNS​(Collection<String> nS)

        A Number Set data type.

        Parameters:
        nS - A Number Set data type.
      • withNS

        public AttributeValue withNS​(String... nS)

        A Number Set data type.

        NOTE: This method appends the values to the existing list (if any). Use setNS(java.util.Collection) or withNS(java.util.Collection) if you want to override the existing values.

        Parameters:
        nS - A Number Set data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withNS

        public AttributeValue withNS​(Collection<String> nS)

        A Number Set data type.

        Parameters:
        nS - A Number Set data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getBS

        public List<ByteBuffer> getBS()

        A Binary Set data type.

        Returns:
        A Binary Set data type.
      • setBS

        public void setBS​(Collection<ByteBuffer> bS)

        A Binary Set data type.

        Parameters:
        bS - A Binary Set data type.
      • withBS

        public AttributeValue withBS​(Collection<ByteBuffer> bS)

        A Binary Set data type.

        Parameters:
        bS - A Binary Set data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getM

        public Map<String,​AttributeValue> getM()

        A Map of attribute values.

        Returns:
        A Map of attribute values.
      • setM

        public void setM​(Map<String,​AttributeValue> m)

        A Map of attribute values.

        Parameters:
        m - A Map of attribute values.
      • withM

        public AttributeValue withM​(Map<String,​AttributeValue> m)

        A Map of attribute values.

        Parameters:
        m - A Map of attribute values.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • clearMEntries

        public AttributeValue clearMEntries()
        Removes all the entries added into M. <p> Returns a reference to this object so that method calls can be chained together.
      • getL

        public List<AttributeValue> getL()

        A List of attribute values.

        Returns:
        A List of attribute values.
      • setL

        public void setL​(Collection<AttributeValue> l)

        A List of attribute values.

        Parameters:
        l - A List of attribute values.
      • withL

        public AttributeValue withL​(Collection<AttributeValue> l)

        A List of attribute values.

        Parameters:
        l - A List of attribute values.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setNULL

        public void setNULL​(Boolean nULLValue)

        A Null data type.

        Parameters:
        nULLValue - A Null data type.
      • getNULL

        public Boolean getNULL()

        A Null data type.

        Returns:
        A Null data type.
      • withNULL

        public AttributeValue withNULL​(Boolean nULLValue)

        A Null data type.

        Parameters:
        nULLValue - A Null data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • isNULL

        public Boolean isNULL()

        A Null data type.

        Returns:
        A Null data type.
      • setBOOL

        public void setBOOL​(Boolean bOOL)

        A Boolean data type.

        Parameters:
        bOOL - A Boolean data type.
      • getBOOL

        public Boolean getBOOL()

        A Boolean data type.

        Returns:
        A Boolean data type.
      • withBOOL

        public AttributeValue withBOOL​(Boolean bOOL)

        A Boolean data type.

        Parameters:
        bOOL - A Boolean data type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • isBOOL

        public Boolean isBOOL()

        A Boolean data type.

        Returns:
        A Boolean data type.
      • 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