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

com.amazonaws.services.redshiftdataapi.model.BatchExecuteStatementRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Redshift Data API module holds the client classes that are used for communicating with Redshift Data API Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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.redshiftdataapi.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 BatchExecuteStatementRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

*/ private String clientToken; /** *

* The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either * Secrets Manager or temporary credentials. *

*/ private String clusterIdentifier; /** *

* The name of the database. This parameter is required when authenticating using either Secrets Manager or * temporary credentials. *

*/ private String database; /** *

* The database user name. This parameter is required when connecting to a cluster as a database user and * authenticating using temporary credentials. *

*/ private String dbUser; /** *

* The name or ARN of the secret that enables access to the database. This parameter is required when authenticating * using Secrets Manager. *

*/ private String secretArn; /** *

* One or more SQL statements to run. * *

     *  The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     * 
*/ private java.util.List sqls; /** *

* The name of the SQL statements. You can name the SQL statements when you create them to identify the query. *

*/ private String statementName; /** *

* A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run. *

*/ private Boolean withEvent; /** *

* The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a * serverless workgroup and authenticating using either Secrets Manager or temporary credentials. *

*/ private String workgroupName; /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

* * @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public String getClientToken() { return this.clientToken; } /** *

* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *

* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either * Secrets Manager or temporary credentials. *

* * @param clusterIdentifier * The cluster identifier. This parameter is required when connecting to a cluster and authenticating using * either Secrets Manager or temporary credentials. */ public void setClusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; } /** *

* The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either * Secrets Manager or temporary credentials. *

* * @return The cluster identifier. This parameter is required when connecting to a cluster and authenticating using * either Secrets Manager or temporary credentials. */ public String getClusterIdentifier() { return this.clusterIdentifier; } /** *

* The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either * Secrets Manager or temporary credentials. *

* * @param clusterIdentifier * The cluster identifier. This parameter is required when connecting to a cluster and authenticating using * either Secrets Manager or temporary credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withClusterIdentifier(String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; } /** *

* The name of the database. This parameter is required when authenticating using either Secrets Manager or * temporary credentials. *

* * @param database * The name of the database. This parameter is required when authenticating using either Secrets Manager or * temporary credentials. */ public void setDatabase(String database) { this.database = database; } /** *

* The name of the database. This parameter is required when authenticating using either Secrets Manager or * temporary credentials. *

* * @return The name of the database. This parameter is required when authenticating using either Secrets Manager or * temporary credentials. */ public String getDatabase() { return this.database; } /** *

* The name of the database. This parameter is required when authenticating using either Secrets Manager or * temporary credentials. *

* * @param database * The name of the database. This parameter is required when authenticating using either Secrets Manager or * temporary credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withDatabase(String database) { setDatabase(database); return this; } /** *

* The database user name. This parameter is required when connecting to a cluster as a database user and * authenticating using temporary credentials. *

* * @param dbUser * The database user name. This parameter is required when connecting to a cluster as a database user and * authenticating using temporary credentials. */ public void setDbUser(String dbUser) { this.dbUser = dbUser; } /** *

* The database user name. This parameter is required when connecting to a cluster as a database user and * authenticating using temporary credentials. *

* * @return The database user name. This parameter is required when connecting to a cluster as a database user and * authenticating using temporary credentials. */ public String getDbUser() { return this.dbUser; } /** *

* The database user name. This parameter is required when connecting to a cluster as a database user and * authenticating using temporary credentials. *

* * @param dbUser * The database user name. This parameter is required when connecting to a cluster as a database user and * authenticating using temporary credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withDbUser(String dbUser) { setDbUser(dbUser); return this; } /** *

* The name or ARN of the secret that enables access to the database. This parameter is required when authenticating * using Secrets Manager. *

* * @param secretArn * The name or ARN of the secret that enables access to the database. This parameter is required when * authenticating using Secrets Manager. */ public void setSecretArn(String secretArn) { this.secretArn = secretArn; } /** *

* The name or ARN of the secret that enables access to the database. This parameter is required when authenticating * using Secrets Manager. *

* * @return The name or ARN of the secret that enables access to the database. This parameter is required when * authenticating using Secrets Manager. */ public String getSecretArn() { return this.secretArn; } /** *

* The name or ARN of the secret that enables access to the database. This parameter is required when authenticating * using Secrets Manager. *

* * @param secretArn * The name or ARN of the secret that enables access to the database. This parameter is required when * authenticating using Secrets Manager. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withSecretArn(String secretArn) { setSecretArn(secretArn); return this; } /** *

* One or more SQL statements to run. * *

     *  The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     * 
* * @return One or more SQL statements to run. * *
     * 
     *          The SQL statements are run as a single transaction. They run serially in the order of the array.
     *         Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL
     *         statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     */

    public java.util.List getSqls() {
        return sqls;
    }

    /**
     * 

* One or more SQL statements to run. * *

     *  The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     * 
* * @param sqls * One or more SQL statements to run. * *
     * 
     *         The SQL statements are run as a single transaction. They run serially in the order of the array.
     *        Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL
     *        statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     */

    public void setSqls(java.util.Collection sqls) {
        if (sqls == null) {
            this.sqls = null;
            return;
        }

        this.sqls = new java.util.ArrayList(sqls);
    }

    /**
     * 

* One or more SQL statements to run. * *

     *  The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     * 
*

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

* * @param sqls * One or more SQL statements to run. * *
     *  The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public BatchExecuteStatementRequest withSqls(String... sqls) {
        if (this.sqls == null) {
            setSqls(new java.util.ArrayList(sqls.length));
        }
        for (String ele : sqls) {
            this.sqls.add(ele);
        }
        return this;
    }

    /**
     * 

* One or more SQL statements to run. * *

     *  The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     * 
* * @param sqls * One or more SQL statements to run. * *
     * 
     *         The SQL statements are run as a single transaction. They run serially in the order of the array.
     *        Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL
     *        statement fails, then because they are run as one transaction, all work is rolled back.</p> 
     *        @return Returns a reference to this object so that method calls can be chained together.
     */

    public BatchExecuteStatementRequest withSqls(java.util.Collection sqls) {
        setSqls(sqls);
        return this;
    }

    /**
     * 

* The name of the SQL statements. You can name the SQL statements when you create them to identify the query. *

* * @param statementName * The name of the SQL statements. You can name the SQL statements when you create them to identify the * query. */ public void setStatementName(String statementName) { this.statementName = statementName; } /** *

* The name of the SQL statements. You can name the SQL statements when you create them to identify the query. *

* * @return The name of the SQL statements. You can name the SQL statements when you create them to identify the * query. */ public String getStatementName() { return this.statementName; } /** *

* The name of the SQL statements. You can name the SQL statements when you create them to identify the query. *

* * @param statementName * The name of the SQL statements. You can name the SQL statements when you create them to identify the * query. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withStatementName(String statementName) { setStatementName(statementName); return this; } /** *

* A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run. *

* * @param withEvent * A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL * statements run. */ public void setWithEvent(Boolean withEvent) { this.withEvent = withEvent; } /** *

* A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run. *

* * @return A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL * statements run. */ public Boolean getWithEvent() { return this.withEvent; } /** *

* A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run. *

* * @param withEvent * A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL * statements run. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withWithEvent(Boolean withEvent) { setWithEvent(withEvent); return this; } /** *

* A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run. *

* * @return A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL * statements run. */ public Boolean isWithEvent() { return this.withEvent; } /** *

* The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a * serverless workgroup and authenticating using either Secrets Manager or temporary credentials. *

* * @param workgroupName * The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to * a serverless workgroup and authenticating using either Secrets Manager or temporary credentials. */ public void setWorkgroupName(String workgroupName) { this.workgroupName = workgroupName; } /** *

* The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a * serverless workgroup and authenticating using either Secrets Manager or temporary credentials. *

* * @return The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting * to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials. */ public String getWorkgroupName() { return this.workgroupName; } /** *

* The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a * serverless workgroup and authenticating using either Secrets Manager or temporary credentials. *

* * @param workgroupName * The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to * a serverless workgroup and authenticating using either Secrets Manager or temporary credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchExecuteStatementRequest withWorkgroupName(String workgroupName) { setWorkgroupName(workgroupName); 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 (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getClusterIdentifier() != null) sb.append("ClusterIdentifier: ").append(getClusterIdentifier()).append(","); if (getDatabase() != null) sb.append("Database: ").append(getDatabase()).append(","); if (getDbUser() != null) sb.append("DbUser: ").append(getDbUser()).append(","); if (getSecretArn() != null) sb.append("SecretArn: ").append(getSecretArn()).append(","); if (getSqls() != null) sb.append("Sqls: ").append(getSqls()).append(","); if (getStatementName() != null) sb.append("StatementName: ").append(getStatementName()).append(","); if (getWithEvent() != null) sb.append("WithEvent: ").append(getWithEvent()).append(","); if (getWorkgroupName() != null) sb.append("WorkgroupName: ").append(getWorkgroupName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchExecuteStatementRequest == false) return false; BatchExecuteStatementRequest other = (BatchExecuteStatementRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == null) return false; if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == false) return false; if (other.getDatabase() == null ^ this.getDatabase() == null) return false; if (other.getDatabase() != null && other.getDatabase().equals(this.getDatabase()) == false) return false; if (other.getDbUser() == null ^ this.getDbUser() == null) return false; if (other.getDbUser() != null && other.getDbUser().equals(this.getDbUser()) == false) return false; if (other.getSecretArn() == null ^ this.getSecretArn() == null) return false; if (other.getSecretArn() != null && other.getSecretArn().equals(this.getSecretArn()) == false) return false; if (other.getSqls() == null ^ this.getSqls() == null) return false; if (other.getSqls() != null && other.getSqls().equals(this.getSqls()) == false) return false; if (other.getStatementName() == null ^ this.getStatementName() == null) return false; if (other.getStatementName() != null && other.getStatementName().equals(this.getStatementName()) == false) return false; if (other.getWithEvent() == null ^ this.getWithEvent() == null) return false; if (other.getWithEvent() != null && other.getWithEvent().equals(this.getWithEvent()) == false) return false; if (other.getWorkgroupName() == null ^ this.getWorkgroupName() == null) return false; if (other.getWorkgroupName() != null && other.getWorkgroupName().equals(this.getWorkgroupName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getDatabase() == null) ? 0 : getDatabase().hashCode()); hashCode = prime * hashCode + ((getDbUser() == null) ? 0 : getDbUser().hashCode()); hashCode = prime * hashCode + ((getSecretArn() == null) ? 0 : getSecretArn().hashCode()); hashCode = prime * hashCode + ((getSqls() == null) ? 0 : getSqls().hashCode()); hashCode = prime * hashCode + ((getStatementName() == null) ? 0 : getStatementName().hashCode()); hashCode = prime * hashCode + ((getWithEvent() == null) ? 0 : getWithEvent().hashCode()); hashCode = prime * hashCode + ((getWorkgroupName() == null) ? 0 : getWorkgroupName().hashCode()); return hashCode; } @Override public BatchExecuteStatementRequest clone() { return (BatchExecuteStatementRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy