Class TransactPutItemEnhancedRequest<T>

java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.model.TransactPutItemEnhancedRequest<T>
Type Parameters:
T - The type of the modelled object.

@ThreadSafe public final class TransactPutItemEnhancedRequest<T> extends Object
Defines parameters used to write an item to a DynamoDb table using DynamoDbEnhancedClient.transactWriteItems(TransactWriteItemsEnhancedRequest) and DynamoDbEnhancedAsyncClient.transactWriteItems(TransactWriteItemsEnhancedRequest).

A valid request object must contain the item that should be written to the table.

  • Method Details

    • builder

      public static <T> TransactPutItemEnhancedRequest.Builder<T> builder(Class<? extends T> itemClass)
      Creates a newly initialized builder for the request object.
      Type Parameters:
      T - The type of the modelled object, corresponding to itemClass
      Parameters:
      itemClass - the class that items in this table map to
      Returns:
      a PutItemEnhancedRequest builder
    • toBuilder

      Returns a builder initialized with all existing values on the request object.
    • item

      public T item()
      Returns the item for this put operation request.
    • conditionExpression

      public Expression conditionExpression()
      Returns the condition Expression set on this request object, or null if it doesn't exist.
    • returnValuesOnConditionCheckFailure

      public ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure()
      Returns what values to return if the condition check fails.

      If the service returns an enum value that is not available in the current SDK version, returnValuesOnConditionCheckFailure will return ReturnValuesOnConditionCheckFailure.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from returnValuesOnConditionCheckFailureAsString().

      Returns:
      What values to return on condition check failure.
    • returnValuesOnConditionCheckFailureAsString

      public String returnValuesOnConditionCheckFailureAsString()
      Returns what values to return if the condition check fails.

      If the service returns an enum value that is not available in the current SDK version, returnValuesOnConditionCheckFailure will return ReturnValuesOnConditionCheckFailure.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from returnValuesOnConditionCheckFailureAsString().

      Returns:
      What values to return on condition check failure.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object