com.amazonaws.services.ec2.model

## クラス Tag

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

- すべての実装されたインタフェース:
    java.io.Serializable

      public class Tag
      extends java.lang.Object
      implements java.io.Serializable

  Represents metadata to associate with Amazon EC2 resources. Each tag consists of a user-defined key and value. Use tags to categorize EC2 resources, such as by purpose, owner, or environment.

  関連項目:
    直列化された形式

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `Tag()` Default constructor for a new Tag object.
    `Tag(java.lang.String key)` Constructs a new Tag object.
    `Tag(java.lang.String key, java.lang.String value)` Constructs a new Tag object.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getKey()` The tag's key.
    `java.lang.String` | `getValue()` The tag's value.
    `int` | `hashCode()`
    `void` | `setKey(java.lang.String key)` The tag's key.
    `void` | `setValue(java.lang.String value)` The tag's value.
    `java.lang.String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
    `Tag` | `withKey(java.lang.String key)` The tag's key.
    `Tag` | `withValue(java.lang.String value)` The tag's value.

    - ### クラスから継承されたメソッド java.lang.Object

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

- - ### コンストラクタの詳細

    - #### Tag

          public Tag()

      Default constructor for a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.

    - #### Tag

          public Tag(java.lang.String key,
             java.lang.String value)

      Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      パラメータ:
        `key` - The tag's key.
        `value` - The tag's value.

    - #### Tag

          public Tag(java.lang.String key)

      Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      パラメータ:
        `key` - The tag's key.

  - ### メソッドの詳細

    - #### getKey

          public java.lang.String getKey()

      The tag's key.
      戻り値:
        The tag's key.

    - #### setKey

          public void setKey(java.lang.String key)

      The tag's key.
      パラメータ:
        `key` - The tag's key.

    - #### withKey

          public Tag withKey(java.lang.String key)

      The tag's key.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `key` - The tag's key.

    - #### getValue

          public java.lang.String getValue()

      The tag's value.
      戻り値:
        The tag's value.

    - #### setValue

          public void setValue(java.lang.String value)

      The tag's value.
      パラメータ:
        `value` - The tag's value.

    - #### withValue

          public Tag withValue(java.lang.String value)

      The tag's value.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `value` - The tag's value.

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object; useful for testing and debugging.
      オーバーライド:
        `toString` クラス内 `java.lang.Object`
      戻り値:
        A string representation of this object.
      関連項目:
        `Object.toString()`

    - #### hashCode

          public int hashCode()

      オーバーライド:
        `hashCode` クラス内 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      オーバーライド:
        `equals` クラス内 `java.lang.Object`