Class GetItemEnhancedRequest.Builder
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.model.GetItemEnhancedRequest.Builder
-
- Enclosing class:
- GetItemEnhancedRequest
@NotThreadSafe public static final class GetItemEnhancedRequest.Builder extends Object
A builder that is used to create a request with the desired parameters.Note: A valid request builder must define a
Key
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetItemEnhancedRequest
build()
GetItemEnhancedRequest.Builder
consistentRead(Boolean consistentRead)
Determines the read consistency model: If set to true, the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.GetItemEnhancedRequest.Builder
key(Consumer<Key.Builder> keyConsumer)
Sets the primaryKey
that will be used to match the item to retrieve by accepting a consumer ofKey.Builder
.GetItemEnhancedRequest.Builder
key(Key key)
Sets the primaryKey
that will be used to match the item to retrieve.GetItemEnhancedRequest.Builder
returnConsumedCapacity(String returnConsumedCapacity)
Whether to return the capacity consumed by this operation.GetItemEnhancedRequest.Builder
returnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
Whether to return the capacity consumed by this operation.
-
-
-
Method Detail
-
consistentRead
public GetItemEnhancedRequest.Builder consistentRead(Boolean consistentRead)
Determines the read consistency model: If set to true, the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.By default, the value of this property is set to false.
- Parameters:
consistentRead
- sets consistency model of the operation to use strong consistency- Returns:
- a builder of this type
-
key
public GetItemEnhancedRequest.Builder key(Key key)
Sets the primaryKey
that will be used to match the item to retrieve.- Parameters:
key
- the primary key to use in the request.- Returns:
- a builder of this type
-
key
public GetItemEnhancedRequest.Builder key(Consumer<Key.Builder> keyConsumer)
Sets the primaryKey
that will be used to match the item to retrieve by accepting a consumer ofKey.Builder
.
-
returnConsumedCapacity
public GetItemEnhancedRequest.Builder returnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
Whether to return the capacity consumed by this operation.
-
returnConsumedCapacity
public GetItemEnhancedRequest.Builder returnConsumedCapacity(String returnConsumedCapacity)
Whether to return the capacity consumed by this operation.
-
build
public GetItemEnhancedRequest build()
-
-