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 GetItemEnhancedRequestbuild()GetItemEnhancedRequest.BuilderconsistentRead(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.Builderkey(Consumer<Key.Builder> keyConsumer)Sets the primaryKeythat will be used to match the item to retrieve by accepting a consumer ofKey.Builder.GetItemEnhancedRequest.Builderkey(Key key)Sets the primaryKeythat will be used to match the item to retrieve.GetItemEnhancedRequest.BuilderreturnConsumedCapacity(String returnConsumedCapacity)Whether to return the capacity consumed by this operation.GetItemEnhancedRequest.BuilderreturnConsumedCapacity(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 primaryKeythat 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 primaryKeythat 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()
-
-