/* * Copyright 2018-2023 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.eventbridge.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* These are custom parameters to be used when the target is a Amazon Redshift cluster or Redshift Serverless workgroup * to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RedshiftDataParameters implements Serializable, Cloneable, StructuredPojo { /** ** The name or ARN of the secret that enables access to the database. Required when authenticating using Amazon Web * Services Secrets Manager. *
*/ private String secretManagerArn; /** ** The name of the database. Required when authenticating using temporary credentials. *
*/ private String database; /** ** The database user name. Required when authenticating using temporary credentials. *
** Do not provide this parameter when connecting to a Redshift Serverless workgroup. *
*/ private String dbUser; /** ** The SQL statement text to run. *
*/ private String sql; /** ** The name of the SQL statement. You can name the SQL statement when you create it to identify the query. *
*/ private String statementName; /** ** Indicates whether to send an event back to EventBridge after the SQL statement runs. *
*/ private Boolean withEvent; private java.util.List* The name or ARN of the secret that enables access to the database. Required when authenticating using Amazon Web * Services Secrets Manager. *
* * @param secretManagerArn * The name or ARN of the secret that enables access to the database. Required when authenticating using * Amazon Web Services Secrets Manager. */ public void setSecretManagerArn(String secretManagerArn) { this.secretManagerArn = secretManagerArn; } /** ** The name or ARN of the secret that enables access to the database. Required when authenticating using Amazon Web * Services Secrets Manager. *
* * @return The name or ARN of the secret that enables access to the database. Required when authenticating using * Amazon Web Services Secrets Manager. */ public String getSecretManagerArn() { return this.secretManagerArn; } /** ** The name or ARN of the secret that enables access to the database. Required when authenticating using Amazon Web * Services Secrets Manager. *
* * @param secretManagerArn * The name or ARN of the secret that enables access to the database. Required when authenticating using * Amazon Web Services Secrets Manager. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataParameters withSecretManagerArn(String secretManagerArn) { setSecretManagerArn(secretManagerArn); return this; } /** ** The name of the database. Required when authenticating using temporary credentials. *
* * @param database * The name of the database. Required when authenticating using temporary credentials. */ public void setDatabase(String database) { this.database = database; } /** ** The name of the database. Required when authenticating using temporary credentials. *
* * @return The name of the database. Required when authenticating using temporary credentials. */ public String getDatabase() { return this.database; } /** ** The name of the database. Required when authenticating using temporary credentials. *
* * @param database * The name of the database. Required when authenticating using temporary credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataParameters withDatabase(String database) { setDatabase(database); return this; } /** ** The database user name. Required when authenticating using temporary credentials. *
** Do not provide this parameter when connecting to a Redshift Serverless workgroup. *
* * @param dbUser * The database user name. Required when authenticating using temporary credentials. ** Do not provide this parameter when connecting to a Redshift Serverless workgroup. */ public void setDbUser(String dbUser) { this.dbUser = dbUser; } /** *
* The database user name. Required when authenticating using temporary credentials. *
** Do not provide this parameter when connecting to a Redshift Serverless workgroup. *
* * @return The database user name. Required when authenticating using temporary credentials. ** Do not provide this parameter when connecting to a Redshift Serverless workgroup. */ public String getDbUser() { return this.dbUser; } /** *
* The database user name. Required when authenticating using temporary credentials. *
** Do not provide this parameter when connecting to a Redshift Serverless workgroup. *
* * @param dbUser * The database user name. Required when authenticating using temporary credentials. ** Do not provide this parameter when connecting to a Redshift Serverless workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataParameters withDbUser(String dbUser) { setDbUser(dbUser); return this; } /** *
* The SQL statement text to run. *
* * @param sql * The SQL statement text to run. */ public void setSql(String sql) { this.sql = sql; } /** ** The SQL statement text to run. *
* * @return The SQL statement text to run. */ public String getSql() { return this.sql; } /** ** The SQL statement text to run. *
* * @param sql * The SQL statement text to run. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataParameters withSql(String sql) { setSql(sql); return this; } /** ** The name of the SQL statement. You can name the SQL statement when you create it to identify the query. *
* * @param statementName * The name of the SQL statement. You can name the SQL statement when you create it to identify the query. */ public void setStatementName(String statementName) { this.statementName = statementName; } /** ** The name of the SQL statement. You can name the SQL statement when you create it to identify the query. *
* * @return The name of the SQL statement. You can name the SQL statement when you create it to identify the query. */ public String getStatementName() { return this.statementName; } /** ** The name of the SQL statement. You can name the SQL statement when you create it to identify the query. *
* * @param statementName * The name of the SQL statement. You can name the SQL statement when you create it to identify the query. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataParameters withStatementName(String statementName) { setStatementName(statementName); return this; } /** ** Indicates whether to send an event back to EventBridge after the SQL statement runs. *
* * @param withEvent * Indicates whether to send an event back to EventBridge after the SQL statement runs. */ public void setWithEvent(Boolean withEvent) { this.withEvent = withEvent; } /** ** Indicates whether to send an event back to EventBridge after the SQL statement runs. *
* * @return Indicates whether to send an event back to EventBridge after the SQL statement runs. */ public Boolean getWithEvent() { return this.withEvent; } /** ** Indicates whether to send an event back to EventBridge after the SQL statement runs. *
* * @param withEvent * Indicates whether to send an event back to EventBridge after the SQL statement runs. * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataParameters withWithEvent(Boolean withEvent) { setWithEvent(withEvent); return this; } /** ** Indicates whether to send an event back to EventBridge after the SQL statement runs. *
* * @return Indicates whether to send an event back to EventBridge after the SQL statement runs. */ public Boolean isWithEvent() { return this.withEvent; } /** * @return */ public java.util.List* 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 * @return Returns a reference to this object so that method calls can be chained together. */ public RedshiftDataParameters withSqls(String... sqls) { if (this.sqls == null) { setSqls(new java.util.ArrayList