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

com.amazonaws.services.dynamodbv2.model.ExecuteTransactionRequest 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: 1.12.772
Show newest version
/*
 * Copyright 2017-2022 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 com.amazonaws.services.dynamodbv2.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ExecuteTransactionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The list of PartiQL statements representing the transaction to run. *

*/ private java.util.List transactStatements; /** *

* Set this value to get remaining results, if NextToken was returned in the statement response. *

*/ private String clientRequestToken; /** *

* Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in * the response. For more information, see TransactGetItems and TransactWriteItems. *

*/ private String returnConsumedCapacity; /** *

* The list of PartiQL statements representing the transaction to run. *

* * @return The list of PartiQL statements representing the transaction to run. */ public java.util.List getTransactStatements() { return transactStatements; } /** *

* The list of PartiQL statements representing the transaction to run. *

* * @param transactStatements * The list of PartiQL statements representing the transaction to run. */ public void setTransactStatements(java.util.Collection transactStatements) { if (transactStatements == null) { this.transactStatements = null; return; } this.transactStatements = new java.util.ArrayList(transactStatements); } /** *

* The list of PartiQL statements representing the transaction to run. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTransactStatements(java.util.Collection)} or {@link #withTransactStatements(java.util.Collection)} if * you want to override the existing values. *

* * @param transactStatements * The list of PartiQL statements representing the transaction to run. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteTransactionRequest withTransactStatements(ParameterizedStatement... transactStatements) { if (this.transactStatements == null) { setTransactStatements(new java.util.ArrayList(transactStatements.length)); } for (ParameterizedStatement ele : transactStatements) { this.transactStatements.add(ele); } return this; } /** *

* The list of PartiQL statements representing the transaction to run. *

* * @param transactStatements * The list of PartiQL statements representing the transaction to run. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteTransactionRequest withTransactStatements(java.util.Collection transactStatements) { setTransactStatements(transactStatements); return this; } /** *

* Set this value to get remaining results, if NextToken was returned in the statement response. *

* * @param clientRequestToken * Set this value to get remaining results, if NextToken was returned in the statement response. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

* Set this value to get remaining results, if NextToken was returned in the statement response. *

* * @return Set this value to get remaining results, if NextToken was returned in the statement * response. */ public String getClientRequestToken() { return this.clientRequestToken; } /** *

* Set this value to get remaining results, if NextToken was returned in the statement response. *

* * @param clientRequestToken * Set this value to get remaining results, if NextToken was returned in the statement response. * @return Returns a reference to this object so that method calls can be chained together. */ public ExecuteTransactionRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

* Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in * the response. For more information, see TransactGetItems and TransactWriteItems. *

* * @param returnConsumedCapacity * Determines the level of detail about either provisioned or on-demand throughput consumption that is * returned in the response. For more information, see TransactGetItems and TransactWriteItems. * @see ReturnConsumedCapacity */ public void setReturnConsumedCapacity(String returnConsumedCapacity) { this.returnConsumedCapacity = returnConsumedCapacity; } /** *

* Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in * the response. For more information, see TransactGetItems and TransactWriteItems. *

* * @return Determines the level of detail about either provisioned or on-demand throughput consumption that is * returned in the response. For more information, see TransactGetItems and TransactWriteItems. * @see ReturnConsumedCapacity */ public String getReturnConsumedCapacity() { return this.returnConsumedCapacity; } /** *

* Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in * the response. For more information, see TransactGetItems and TransactWriteItems. *

* * @param returnConsumedCapacity * Determines the level of detail about either provisioned or on-demand throughput consumption that is * returned in the response. For more information, see TransactGetItems and TransactWriteItems. * @return Returns a reference to this object so that method calls can be chained together. * @see ReturnConsumedCapacity */ public ExecuteTransactionRequest withReturnConsumedCapacity(String returnConsumedCapacity) { setReturnConsumedCapacity(returnConsumedCapacity); return this; } /** *

* Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in * the response. For more information, see TransactGetItems and TransactWriteItems. *

* * @param returnConsumedCapacity * Determines the level of detail about either provisioned or on-demand throughput consumption that is * returned in the response. For more information, see TransactGetItems and TransactWriteItems. * @return Returns a reference to this object so that method calls can be chained together. * @see ReturnConsumedCapacity */ public ExecuteTransactionRequest withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity) { this.returnConsumedCapacity = returnConsumedCapacity.toString(); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTransactStatements() != null) sb.append("TransactStatements: ").append(getTransactStatements()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getReturnConsumedCapacity() != null) sb.append("ReturnConsumedCapacity: ").append(getReturnConsumedCapacity()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ExecuteTransactionRequest == false) return false; ExecuteTransactionRequest other = (ExecuteTransactionRequest) obj; if (other.getTransactStatements() == null ^ this.getTransactStatements() == null) return false; if (other.getTransactStatements() != null && other.getTransactStatements().equals(this.getTransactStatements()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getReturnConsumedCapacity() == null ^ this.getReturnConsumedCapacity() == null) return false; if (other.getReturnConsumedCapacity() != null && other.getReturnConsumedCapacity().equals(this.getReturnConsumedCapacity()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTransactStatements() == null) ? 0 : getTransactStatements().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getReturnConsumedCapacity() == null) ? 0 : getReturnConsumedCapacity().hashCode()); return hashCode; } @Override public ExecuteTransactionRequest clone() { return (ExecuteTransactionRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy