com.amazonaws.services.dynamodbv2.model

## クラス GetItemRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.dynamodbv2.model.GetItemRequest

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

      public class GetItemRequest
      extends AmazonWebServiceRequest
      implements java.io.Serializable

  Container for the parameters to the `GetItem operation`.

  The GetItem operation returns a set of attributes for the item with the given primary key. If there is no matching item, GetItem does not return any data.

  GetItem provides an eventually consistent read by default. If your application requires a strongly consistent read, set ConsistentRead to `true` . Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.

  関連項目:
    `AmazonDynamoDB.getItem(GetItemRequest)`, 直列化された形式

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

    コンストラクタ
    コンストラクタと説明
    `GetItemRequest()` Default constructor for a new GetItemRequest object.
    `GetItemRequest(java.lang.String tableName, java.util.Map<java.lang.String,AttributeValue> key)` Constructs a new GetItemRequest object.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `GetItemRequest` | `addKeyEntry(java.lang.String key, AttributeValue value)` A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
    `GetItemRequest` | `clearKeyEntries()` Removes all the entries added into Key.
    `boolean` | `equals(java.lang.Object obj)`
    `java.util.List<java.lang.String>` | `getAttributesToGet()` The names of one or more attributes to retrieve.
    `java.lang.Boolean` | `getConsistentRead()` If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.
    `java.util.Map<java.lang.String,AttributeValue>` | `getKey()` A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
    `java.lang.String` | `getReturnConsumedCapacity()` If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
    `java.lang.String` | `getTableName()` The name of the table containing the requested item.
    `int` | `hashCode()`
    `java.lang.Boolean` | `isConsistentRead()` If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.
    `void` | `setAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)` The names of one or more attributes to retrieve.
    `void` | `setConsistentRead(java.lang.Boolean consistentRead)` If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.
    `void` | `setKey(java.util.Map.Entry<java.lang.String,AttributeValue> hashKey, java.util.Map.Entry<java.lang.String,AttributeValue> rangeKey)` A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
    `void` | `setKey(java.util.Map<java.lang.String,AttributeValue> key)` A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
    `void` | `setReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)` If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
    `void` | `setReturnConsumedCapacity(java.lang.String returnConsumedCapacity)` If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
    `void` | `setTableName(java.lang.String tableName)` The name of the table containing the requested item.
    `java.lang.String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
    `GetItemRequest` | `withAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)` The names of one or more attributes to retrieve.
    `GetItemRequest` | `withAttributesToGet(java.lang.String... attributesToGet)` The names of one or more attributes to retrieve.
    `GetItemRequest` | `withConsistentRead(java.lang.Boolean consistentRead)` If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.
    `GetItemRequest` | `withKey(java.util.Map.Entry<java.lang.String,AttributeValue> hashKey, java.util.Map.Entry<java.lang.String,AttributeValue> rangeKey)` A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
    `GetItemRequest` | `withKey(java.util.Map<java.lang.String,AttributeValue> key)` A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
    `GetItemRequest` | `withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)` If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
    `GetItemRequest` | `withReturnConsumedCapacity(java.lang.String returnConsumedCapacity)` If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
    `GetItemRequest` | `withTableName(java.lang.String tableName)` The name of the table containing the requested item.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

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

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

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

    - #### GetItemRequest

          public GetItemRequest()

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

    - #### GetItemRequest

          public GetItemRequest(java.lang.String tableName,
                        java.util.Map<java.lang.String,AttributeValue> key)

      Constructs a new GetItemRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      パラメータ:
        `tableName` - The name of the table containing the requested item.
        `key` - A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

  - ### メソッドの詳細

    - #### getTableName

          public java.lang.String getTableName()

      The name of the table containing the requested item.

      Constraints:
      Length: 3 - 255
      Pattern: [a-zA-Z0-9_.-]+

      戻り値:
        The name of the table containing the requested item.

    - #### setTableName

          public void setTableName(java.lang.String tableName)

      The name of the table containing the requested item.

      Constraints:
      Length: 3 - 255
      Pattern: [a-zA-Z0-9_.-]+

      パラメータ:
        `tableName` - The name of the table containing the requested item.

    - #### withTableName

          public GetItemRequest withTableName(java.lang.String tableName)

      The name of the table containing the requested item.

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

      Constraints:
      Length: 3 - 255
      Pattern: [a-zA-Z0-9_.-]+

      パラメータ:
        `tableName` - The name of the table containing the requested item.

    - #### getKey

          public java.util.Map<java.lang.String,AttributeValue> getKey()

      A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
      戻り値:
        A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

    - #### setKey

          public void setKey(java.util.Map<java.lang.String,AttributeValue> key)

      A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.
      パラメータ:
        `key` - A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

    - #### withKey

          public GetItemRequest withKey(java.util.Map<java.lang.String,AttributeValue> key)

      A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

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

      パラメータ:
        `key` - A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

    - #### setKey

          public void setKey(java.util.Map.Entry<java.lang.String,AttributeValue> hashKey,
                    java.util.Map.Entry<java.lang.String,AttributeValue> rangeKey)
                      throws java.lang.IllegalArgumentException

      A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

      This method accepts the hashKey, rangeKey of Key as java.util.Map.Entry objects.

      パラメータ:
        `hashKey` - Primary hash key.
        `rangeKey` - Primary range key. (null if it a hash-only table)
      例外:
        `java.lang.IllegalArgumentException`

    - #### withKey

          public GetItemRequest withKey(java.util.Map.Entry<java.lang.String,AttributeValue> hashKey,
                               java.util.Map.Entry<java.lang.String,AttributeValue> rangeKey)
                                 throws java.lang.IllegalArgumentException

      A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

      This method accepts the hashKey, rangeKey of Key as java.util.Map.Entry objects.

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

      パラメータ:
        `hashKey` - Primary hash key.
        `rangeKey` - Primary range key. (null if it a hash-only table)
      例外:
        `java.lang.IllegalArgumentException`

    - #### addKeyEntry

          public GetItemRequest addKeyEntry(java.lang.String key,
                                   AttributeValue value)

      A map of attribute names to AttributeValue objects, representing the primary key of the item to retrieve.

      The method adds a new key-value pair into Key parameter, and returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `key` - The key of the entry to be added into Key.
        `value` - The corresponding value of the entry to be added into Key.

    - #### clearKeyEntries

          public GetItemRequest clearKeyEntries()

      Removes all the entries added into Key.

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

    - #### getAttributesToGet

          public java.util.List<java.lang.String> getAttributesToGet()

      The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      Constraints:
      Length: 1 -

      戻り値:
        The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

    - #### setAttributesToGet

          public void setAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)

      The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      Constraints:
      Length: 1 -

      パラメータ:
        `attributesToGet` - The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

    - #### withAttributesToGet

          public GetItemRequest withAttributesToGet(java.lang.String... attributesToGet)

      The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

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

      Constraints:
      Length: 1 -

      パラメータ:
        `attributesToGet` - The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

    - #### withAttributesToGet

          public GetItemRequest withAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)

      The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

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

      Constraints:
      Length: 1 -

      パラメータ:
        `attributesToGet` - The names of one or more attributes to retrieve. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

    - #### isConsistentRead

          public java.lang.Boolean isConsistentRead()

      If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.
      戻り値:
        If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.

    - #### setConsistentRead

          public void setConsistentRead(java.lang.Boolean consistentRead)

      If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.
      パラメータ:
        `consistentRead` - If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.

    - #### withConsistentRead

          public GetItemRequest withConsistentRead(java.lang.Boolean consistentRead)

      If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.

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

      パラメータ:
        `consistentRead` - If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.

    - #### getConsistentRead

          public java.lang.Boolean getConsistentRead()

      If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.
      戻り値:
        If set to `true`, then the operation uses strongly consistent reads; otherwise, eventually consistent reads are used.

    - #### getReturnConsumedCapacity

          public java.lang.String getReturnConsumedCapacity()

      If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.

      Constraints:
      Allowed Values: TOTAL, NONE

      戻り値:
        If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
      関連項目:
        `ReturnConsumedCapacity`

    - #### setReturnConsumedCapacity

          public void setReturnConsumedCapacity(java.lang.String returnConsumedCapacity)

      If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.

      Constraints:
      Allowed Values: TOTAL, NONE

      パラメータ:
        `returnConsumedCapacity` - If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
      関連項目:
        `ReturnConsumedCapacity`

    - #### withReturnConsumedCapacity

          public GetItemRequest withReturnConsumedCapacity(java.lang.String returnConsumedCapacity)

      If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.

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

      Constraints:
      Allowed Values: TOTAL, NONE

      パラメータ:
        `returnConsumedCapacity` - If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
      関連項目:
        `ReturnConsumedCapacity`

    - #### setReturnConsumedCapacity

          public void setReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)

      If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.

      Constraints:
      Allowed Values: TOTAL, NONE

      パラメータ:
        `returnConsumedCapacity` - If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
      関連項目:
        `ReturnConsumedCapacity`

    - #### withReturnConsumedCapacity

          public GetItemRequest withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)

      If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.

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

      Constraints:
      Allowed Values: TOTAL, NONE

      パラメータ:
        `returnConsumedCapacity` - If set to `TOTAL`, ConsumedCapacity is included in the response; if set to `NONE` (the default), ConsumedCapacity is not included.
      関連項目:
        `ReturnConsumedCapacity`

    - #### 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`