com.amazonaws.services.machinelearning.model

## Class Tag

- java.lang.Object
- - com.amazonaws.services.machinelearning.model.Tag

All Implemented Interfaces:
  Serializable, Cloneable

    public class Tag
    extends Object
    implements Serializable, Cloneable

A custom key-value pair associated with an ML object, such as an ML model.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`Tag()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Tag` `clone()`
`boolean` `equals(Object obj)`
`String` `getKey()` A unique identifier for the tag.
`String` `getValue()` An optional string, typically used to describe or define the tag.
`int` `hashCode()`
`void` `setKey(String key)` A unique identifier for the tag.
`void` `setValue(String value)` An optional string, typically used to describe or define the tag.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`Tag` `withKey(String key)` A unique identifier for the tag.
`Tag` `withValue(String value)` An optional string, typically used to describe or define the tag.

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Tag

    public Tag()

### Method Detail

#### setKey

    public void setKey(String key)

A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

Parameters:
  `key` - A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

#### getKey

    public String getKey()

A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

Returns:
  A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

#### withKey

    public Tag withKey(String key)

A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

Parameters:
  `key` - A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setValue

    public void setValue(String value)

An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

Parameters:
  `value` - An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

#### getValue

    public String getValue()

An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

Returns:
  An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

#### withValue

    public Tag withValue(String value)

An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

Parameters:
  `value` - An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.
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()`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### clone

    public Tag clone()

Overrides:
  `clone` in class `Object`