All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.dynamodb.model.GetItemRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon DynamoDB module holds the client classes that are used for communicating with Amazon DynamoDB Service

There is a newer version: 2.30.1
Show newest version
/*
 * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.dynamodb.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.CollectionUtils;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents the input of a GetItem operation. *

*/ @Generated("software.amazon.awssdk:codegen") public final class GetItemRequest extends DynamoDbRequest implements ToCopyableBuilder { private static final SdkField TABLE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(GetItemRequest::tableName)).setter(setter(Builder::tableName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TableName").build()).build(); private static final SdkField> KEY_FIELD = SdkField .> builder(MarshallingType.MAP) .getter(getter(GetItemRequest::key)) .setter(setter(Builder::key)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Key").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(AttributeValue::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField> ATTRIBUTES_TO_GET_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(GetItemRequest::attributesToGet)) .setter(setter(Builder::attributesToGet)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AttributesToGet").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CONSISTENT_READ_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(GetItemRequest::consistentRead)).setter(setter(Builder::consistentRead)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ConsistentRead").build()).build(); private static final SdkField RETURN_CONSUMED_CAPACITY_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(GetItemRequest::returnConsumedCapacityAsString)).setter(setter(Builder::returnConsumedCapacity)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ReturnConsumedCapacity").build()) .build(); private static final SdkField PROJECTION_EXPRESSION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(GetItemRequest::projectionExpression)).setter(setter(Builder::projectionExpression)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProjectionExpression").build()) .build(); private static final SdkField> EXPRESSION_ATTRIBUTE_NAMES_FIELD = SdkField .> builder(MarshallingType.MAP) .getter(getter(GetItemRequest::expressionAttributeNames)) .setter(setter(Builder::expressionAttributeNames)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ExpressionAttributeNames").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(TABLE_NAME_FIELD, KEY_FIELD, ATTRIBUTES_TO_GET_FIELD, CONSISTENT_READ_FIELD, RETURN_CONSUMED_CAPACITY_FIELD, PROJECTION_EXPRESSION_FIELD, EXPRESSION_ATTRIBUTE_NAMES_FIELD)); private final String tableName; private final Map key; private final List attributesToGet; private final Boolean consistentRead; private final String returnConsumedCapacity; private final String projectionExpression; private final Map expressionAttributeNames; private GetItemRequest(BuilderImpl builder) { super(builder); this.tableName = builder.tableName; this.key = builder.key; this.attributesToGet = builder.attributesToGet; this.consistentRead = builder.consistentRead; this.returnConsumedCapacity = builder.returnConsumedCapacity; this.projectionExpression = builder.projectionExpression; this.expressionAttributeNames = builder.expressionAttributeNames; } /** *

* The name of the table containing the requested item. *

* * @return The name of the table containing the requested item. */ public String tableName() { return tableName; } /** * Returns true if the Key property was specified by the sender (it may be empty), or false if the sender did not * specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public boolean hasKey() { return key != null && !(key instanceof SdkAutoConstructMap); } /** *

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

*

* For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only * need to provide a value for the partition key. For a composite primary key, you must provide values for both the * partition key and the sort key. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasKey()} to see if a value was sent in this field. *

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

*

* For the primary key, you must provide all of the attributes. For example, with a simple primary key, you * only need to provide a value for the partition key. For a composite primary key, you must provide values * for both the partition key and the sort key. */ public Map key() { return key; } /** * Returns true if the AttributesToGet property was specified by the sender (it may be empty), or false if the * sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS * service. */ public boolean hasAttributesToGet() { return attributesToGet != null && !(attributesToGet instanceof SdkAutoConstructList); } /** *

* This is a legacy parameter. Use ProjectionExpression instead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasAttributesToGet()} to see if a value was sent in this field. *

* * @return This is a legacy parameter. Use ProjectionExpression instead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide. */ public List attributesToGet() { return attributesToGet; } /** *

* Determines the read consistency model: If set to true, then the operation uses strongly consistent * reads; otherwise, the operation uses eventually consistent reads. *

* * @return Determines the read consistency model: If set to true, then the operation uses strongly * consistent reads; otherwise, the operation uses eventually consistent reads. */ public Boolean consistentRead() { return consistentRead; } /** * Returns the value of the ReturnConsumedCapacity property for this object. *

* If the service returns an enum value that is not available in the current SDK version, * {@link #returnConsumedCapacity} will return {@link ReturnConsumedCapacity#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #returnConsumedCapacityAsString}. *

* * @return The value of the ReturnConsumedCapacity property for this object. * @see ReturnConsumedCapacity */ public ReturnConsumedCapacity returnConsumedCapacity() { return ReturnConsumedCapacity.fromValue(returnConsumedCapacity); } /** * Returns the value of the ReturnConsumedCapacity property for this object. *

* If the service returns an enum value that is not available in the current SDK version, * {@link #returnConsumedCapacity} will return {@link ReturnConsumedCapacity#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #returnConsumedCapacityAsString}. *

* * @return The value of the ReturnConsumedCapacity property for this object. * @see ReturnConsumedCapacity */ public String returnConsumedCapacityAsString() { return returnConsumedCapacity; } /** *

* A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, * sets, or elements of a JSON document. The attributes in the expression must be separated by commas. *

*

* If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not * found, they do not appear in the result. *

*

* For more information, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. *

* * @return A string that identifies one or more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by * commas.

*

* If no attribute names are specified, then all attributes are returned. If any of the requested attributes * are not found, they do not appear in the result. *

*

* For more information, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. */ public String projectionExpression() { return projectionExpression; } /** * Returns true if the ExpressionAttributeNames property was specified by the sender (it may be empty), or false if * the sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS * service. */ public boolean hasExpressionAttributeNames() { return expressionAttributeNames != null && !(expressionAttributeNames instanceof SdkAutoConstructMap); } /** *

* One or more substitution tokens for attribute names in an expression. The following are some use cases for using * ExpressionAttributeNames: *

*
    *
  • *

    * To access an attribute whose name conflicts with a DynamoDB reserved word. *

    *
  • *
  • *

    * To create a placeholder for repeating occurrences of an attribute name in an expression. *

    *
  • *
  • *

    * To prevent special characters in an attribute name from being misinterpreted in an expression. *

    *
  • *
*

* Use the # character in an expression to dereference an attribute name. For example, consider the following * attribute name: *

*
    *
  • *

    * Percentile *

    *
  • *
*

* The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For * the complete list of reserved words, see Reserved Words in * the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for * ExpressionAttributeNames: *

*
    *
  • *

    * {"#P":"Percentile"} *

    *
  • *
*

* You could then use this substitution in an expression, as in this example: *

*
    *
  • *

    * #P = :val *

    *
  • *
* *

* Tokens that begin with the : character are expression attribute values, which are placeholders for * the actual value at runtime. *

*
*

* For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasExpressionAttributeNames()} to see if a value was sent in this field. *

* * @return One or more substitution tokens for attribute names in an expression. The following are some use cases * for using ExpressionAttributeNames:

*
    *
  • *

    * To access an attribute whose name conflicts with a DynamoDB reserved word. *

    *
  • *
  • *

    * To create a placeholder for repeating occurrences of an attribute name in an expression. *

    *
  • *
  • *

    * To prevent special characters in an attribute name from being misinterpreted in an expression. *

    *
  • *
*

* Use the # character in an expression to dereference an attribute name. For example, consider the * following attribute name: *

*
    *
  • *

    * Percentile *

    *
  • *
*

* The name of this attribute conflicts with a reserved word, so it cannot be used directly in an * expression. (For the complete list of reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the * following for ExpressionAttributeNames: *

*
    *
  • *

    * {"#P":"Percentile"} *

    *
  • *
*

* You could then use this substitution in an expression, as in this example: *

*
    *
  • *

    * #P = :val *

    *
  • *
* *

* Tokens that begin with the : character are expression attribute values, which are * placeholders for the actual value at runtime. *

*
*

* For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. */ public Map expressionAttributeNames() { return expressionAttributeNames; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(tableName()); hashCode = 31 * hashCode + Objects.hashCode(key()); hashCode = 31 * hashCode + Objects.hashCode(attributesToGet()); hashCode = 31 * hashCode + Objects.hashCode(consistentRead()); hashCode = 31 * hashCode + Objects.hashCode(returnConsumedCapacityAsString()); hashCode = 31 * hashCode + Objects.hashCode(projectionExpression()); hashCode = 31 * hashCode + Objects.hashCode(expressionAttributeNames()); return hashCode; } @Override public boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetItemRequest)) { return false; } GetItemRequest other = (GetItemRequest) obj; return Objects.equals(tableName(), other.tableName()) && Objects.equals(key(), other.key()) && Objects.equals(attributesToGet(), other.attributesToGet()) && Objects.equals(consistentRead(), other.consistentRead()) && Objects.equals(returnConsumedCapacityAsString(), other.returnConsumedCapacityAsString()) && Objects.equals(projectionExpression(), other.projectionExpression()) && Objects.equals(expressionAttributeNames(), other.expressionAttributeNames()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("GetItemRequest").add("TableName", tableName()).add("Key", key()) .add("AttributesToGet", attributesToGet()).add("ConsistentRead", consistentRead()) .add("ReturnConsumedCapacity", returnConsumedCapacityAsString()) .add("ProjectionExpression", projectionExpression()).add("ExpressionAttributeNames", expressionAttributeNames()) .build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "TableName": return Optional.ofNullable(clazz.cast(tableName())); case "Key": return Optional.ofNullable(clazz.cast(key())); case "AttributesToGet": return Optional.ofNullable(clazz.cast(attributesToGet())); case "ConsistentRead": return Optional.ofNullable(clazz.cast(consistentRead())); case "ReturnConsumedCapacity": return Optional.ofNullable(clazz.cast(returnConsumedCapacityAsString())); case "ProjectionExpression": return Optional.ofNullable(clazz.cast(projectionExpression())); case "ExpressionAttributeNames": return Optional.ofNullable(clazz.cast(expressionAttributeNames())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((GetItemRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends DynamoDbRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The name of the table containing the requested item. *

* * @param tableName * The name of the table containing the requested item. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tableName(String tableName); /** *

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

*

* For the primary key, you must provide all of the attributes. For example, with a simple primary key, you only * need to provide a value for the partition key. For a composite primary key, you must provide values for both * the partition key and the sort key. *

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

*

* For the primary key, you must provide all of the attributes. For example, with a simple primary key, * you only need to provide a value for the partition key. For a composite primary key, you must provide * values for both the partition key and the sort key. * @return Returns a reference to this object so that method calls can be chained together. */ Builder key(Map key); /** *

* This is a legacy parameter. Use ProjectionExpression instead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide. *

* * @param attributesToGet * This is a legacy parameter. Use ProjectionExpression instead. For more information, see * AttributesToGet in the Amazon DynamoDB Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attributesToGet(Collection attributesToGet); /** *

* This is a legacy parameter. Use ProjectionExpression instead. For more information, see AttributesToGet in the Amazon DynamoDB Developer Guide. *

* * @param attributesToGet * This is a legacy parameter. Use ProjectionExpression instead. For more information, see * AttributesToGet in the Amazon DynamoDB Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder attributesToGet(String... attributesToGet); /** *

* Determines the read consistency model: If set to true, then the operation uses strongly * consistent reads; otherwise, the operation uses eventually consistent reads. *

* * @param consistentRead * Determines the read consistency model: If set to true, then the operation uses strongly * consistent reads; otherwise, the operation uses eventually consistent reads. * @return Returns a reference to this object so that method calls can be chained together. */ Builder consistentRead(Boolean consistentRead); /** * Sets the value of the ReturnConsumedCapacity property for this object. * * @param returnConsumedCapacity * The new value for the ReturnConsumedCapacity property for this object. * @see ReturnConsumedCapacity * @return Returns a reference to this object so that method calls can be chained together. * @see ReturnConsumedCapacity */ Builder returnConsumedCapacity(String returnConsumedCapacity); /** * Sets the value of the ReturnConsumedCapacity property for this object. * * @param returnConsumedCapacity * The new value for the ReturnConsumedCapacity property for this object. * @see ReturnConsumedCapacity * @return Returns a reference to this object so that method calls can be chained together. * @see ReturnConsumedCapacity */ Builder returnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity); /** *

* A string that identifies one or more attributes to retrieve from the table. These attributes can include * scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas. *

*

* If no attribute names are specified, then all attributes are returned. If any of the requested attributes are * not found, they do not appear in the result. *

*

* For more information, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. *

* * @param projectionExpression * A string that identifies one or more attributes to retrieve from the table. These attributes can * include scalars, sets, or elements of a JSON document. The attributes in the expression must be * separated by commas.

*

* If no attribute names are specified, then all attributes are returned. If any of the requested * attributes are not found, they do not appear in the result. *

*

* For more information, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder projectionExpression(String projectionExpression); /** *

* One or more substitution tokens for attribute names in an expression. The following are some use cases for * using ExpressionAttributeNames: *

*
    *
  • *

    * To access an attribute whose name conflicts with a DynamoDB reserved word. *

    *
  • *
  • *

    * To create a placeholder for repeating occurrences of an attribute name in an expression. *

    *
  • *
  • *

    * To prevent special characters in an attribute name from being misinterpreted in an expression. *

    *
  • *
*

* Use the # character in an expression to dereference an attribute name. For example, consider the * following attribute name: *

*
    *
  • *

    * Percentile *

    *
  • *
*

* The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. * (For the complete list of reserved words, see Reserved Words * in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for * ExpressionAttributeNames: *

*
    *
  • *

    * {"#P":"Percentile"} *

    *
  • *
*

* You could then use this substitution in an expression, as in this example: *

*
    *
  • *

    * #P = :val *

    *
  • *
* *

* Tokens that begin with the : character are expression attribute values, which are placeholders * for the actual value at runtime. *

*
*

* For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. *

* * @param expressionAttributeNames * One or more substitution tokens for attribute names in an expression. The following are some use cases * for using ExpressionAttributeNames:

*
    *
  • *

    * To access an attribute whose name conflicts with a DynamoDB reserved word. *

    *
  • *
  • *

    * To create a placeholder for repeating occurrences of an attribute name in an expression. *

    *
  • *
  • *

    * To prevent special characters in an attribute name from being misinterpreted in an expression. *

    *
  • *
*

* Use the # character in an expression to dereference an attribute name. For example, consider * the following attribute name: *

*
    *
  • *

    * Percentile *

    *
  • *
*

* The name of this attribute conflicts with a reserved word, so it cannot be used directly in an * expression. (For the complete list of reserved words, see Reserved * Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the * following for ExpressionAttributeNames: *

*
    *
  • *

    * {"#P":"Percentile"} *

    *
  • *
*

* You could then use this substitution in an expression, as in this example: *

*
    *
  • *

    * #P = :val *

    *
  • *
* *

* Tokens that begin with the : character are expression attribute values, which are * placeholders for the actual value at runtime. *

*
*

* For more information on expression attribute names, see Specifying Item Attributes in the Amazon DynamoDB Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder expressionAttributeNames(Map expressionAttributeNames); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends DynamoDbRequest.BuilderImpl implements Builder { private String tableName; private Map key = DefaultSdkAutoConstructMap.getInstance(); private List attributesToGet = DefaultSdkAutoConstructList.getInstance(); private Boolean consistentRead; private String returnConsumedCapacity; private String projectionExpression; private Map expressionAttributeNames = DefaultSdkAutoConstructMap.getInstance(); private BuilderImpl() { } private BuilderImpl(GetItemRequest model) { super(model); tableName(model.tableName); key(model.key); attributesToGet(model.attributesToGet); consistentRead(model.consistentRead); returnConsumedCapacity(model.returnConsumedCapacity); projectionExpression(model.projectionExpression); expressionAttributeNames(model.expressionAttributeNames); } public final String getTableName() { return tableName; } @Override public final Builder tableName(String tableName) { this.tableName = tableName; return this; } public final void setTableName(String tableName) { this.tableName = tableName; } public final Map getKey() { return key != null ? CollectionUtils.mapValues(key, AttributeValue::toBuilder) : null; } @Override public final Builder key(Map key) { this.key = KeyCopier.copy(key); return this; } public final void setKey(Map key) { this.key = KeyCopier.copyFromBuilder(key); } public final Collection getAttributesToGet() { return attributesToGet; } @Override public final Builder attributesToGet(Collection attributesToGet) { this.attributesToGet = AttributeNameListCopier.copy(attributesToGet); return this; } @Override @SafeVarargs public final Builder attributesToGet(String... attributesToGet) { attributesToGet(Arrays.asList(attributesToGet)); return this; } public final void setAttributesToGet(Collection attributesToGet) { this.attributesToGet = AttributeNameListCopier.copy(attributesToGet); } public final Boolean getConsistentRead() { return consistentRead; } @Override public final Builder consistentRead(Boolean consistentRead) { this.consistentRead = consistentRead; return this; } public final void setConsistentRead(Boolean consistentRead) { this.consistentRead = consistentRead; } public final String getReturnConsumedCapacityAsString() { return returnConsumedCapacity; } @Override public final Builder returnConsumedCapacity(String returnConsumedCapacity) { this.returnConsumedCapacity = returnConsumedCapacity; return this; } @Override public final Builder returnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity) { this.returnConsumedCapacity(returnConsumedCapacity == null ? null : returnConsumedCapacity.toString()); return this; } public final void setReturnConsumedCapacity(String returnConsumedCapacity) { this.returnConsumedCapacity = returnConsumedCapacity; } public final String getProjectionExpression() { return projectionExpression; } @Override public final Builder projectionExpression(String projectionExpression) { this.projectionExpression = projectionExpression; return this; } public final void setProjectionExpression(String projectionExpression) { this.projectionExpression = projectionExpression; } public final Map getExpressionAttributeNames() { return expressionAttributeNames; } @Override public final Builder expressionAttributeNames(Map expressionAttributeNames) { this.expressionAttributeNames = ExpressionAttributeNameMapCopier.copy(expressionAttributeNames); return this; } public final void setExpressionAttributeNames(Map expressionAttributeNames) { this.expressionAttributeNames = ExpressionAttributeNameMapCopier.copy(expressionAttributeNames); } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public GetItemRequest build() { return new GetItemRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy