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

com.amazonaws.services.athena.model.StartQueryExecutionRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
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.athena.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 StartQueryExecutionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The SQL query statements to be executed. *

*/ private String queryString; /** *

* A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). * If another StartQueryExecution request is received, the same response is returned and another query * is not created. An error is returned if a parameter, such as QueryString, has changed. A call to * StartQueryExecution that uses a previous client request token returns the same * QueryExecutionId even if the requester doesn't have permission on the tables specified in * QueryString. *

* *

* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *

*
*/ private String clientRequestToken; /** *

* The database within which the query executes. *

*/ private QueryExecutionContext queryExecutionContext; /** *

* Specifies information about where and how to save the results of the query execution. If the query runs in a * workgroup, then workgroup's settings may override query settings. This affects the query results location. The * workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the * WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. *

*/ private ResultConfiguration resultConfiguration; /** *

* The name of the workgroup in which the query is being started. *

*/ private String workGroup; /** *

* A list of values for the parameters in a query. The values are applied sequentially to the parameters in the * query in the order in which the parameters occur. *

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

* Specifies the query result reuse behavior for the query. *

*/ private ResultReuseConfiguration resultReuseConfiguration; /** *

* The SQL query statements to be executed. *

* * @param queryString * The SQL query statements to be executed. */ public void setQueryString(String queryString) { this.queryString = queryString; } /** *

* The SQL query statements to be executed. *

* * @return The SQL query statements to be executed. */ public String getQueryString() { return this.queryString; } /** *

* The SQL query statements to be executed. *

* * @param queryString * The SQL query statements to be executed. * @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withQueryString(String queryString) { setQueryString(queryString); return this; } /** *

* A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). * If another StartQueryExecution request is received, the same response is returned and another query * is not created. An error is returned if a parameter, such as QueryString, has changed. A call to * StartQueryExecution that uses a previous client request token returns the same * QueryExecutionId even if the requester doesn't have permission on the tables specified in * QueryString. *

* *

* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *

*
* * @param clientRequestToken * A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only * once). If another StartQueryExecution request is received, the same response is returned and * another query is not created. An error is returned if a parameter, such as QueryString, has * changed. A call to StartQueryExecution that uses a previous client request token returns the * same QueryExecutionId even if the requester doesn't have permission on the tables specified * in QueryString.

*

* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services * SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the * Amazon Web Services CLI, you must provide this token or the action will fail. *

*/ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

* A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). * If another StartQueryExecution request is received, the same response is returned and another query * is not created. An error is returned if a parameter, such as QueryString, has changed. A call to * StartQueryExecution that uses a previous client request token returns the same * QueryExecutionId even if the requester doesn't have permission on the tables specified in * QueryString. *

* *

* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *

*
* * @return A unique case-sensitive string used to ensure the request to create the query is idempotent (executes * only once). If another StartQueryExecution request is received, the same response is * returned and another query is not created. An error is returned if a parameter, such as * QueryString, has changed. A call to StartQueryExecution that uses a previous * client request token returns the same QueryExecutionId even if the requester doesn't have * permission on the tables specified in QueryString.

*

* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web * Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services * SDK or the Amazon Web Services CLI, you must provide this token or the action will fail. *

*/ public String getClientRequestToken() { return this.clientRequestToken; } /** *

* A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). * If another StartQueryExecution request is received, the same response is returned and another query * is not created. An error is returned if a parameter, such as QueryString, has changed. A call to * StartQueryExecution that uses a previous client request token returns the same * QueryExecutionId even if the requester doesn't have permission on the tables specified in * QueryString. *

* *

* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *

*
* * @param clientRequestToken * A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only * once). If another StartQueryExecution request is received, the same response is returned and * another query is not created. An error is returned if a parameter, such as QueryString, has * changed. A call to StartQueryExecution that uses a previous client request token returns the * same QueryExecutionId even if the requester doesn't have permission on the tables specified * in QueryString.

*

* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services * SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the * Amazon Web Services CLI, you must provide this token or the action will fail. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

* The database within which the query executes. *

* * @param queryExecutionContext * The database within which the query executes. */ public void setQueryExecutionContext(QueryExecutionContext queryExecutionContext) { this.queryExecutionContext = queryExecutionContext; } /** *

* The database within which the query executes. *

* * @return The database within which the query executes. */ public QueryExecutionContext getQueryExecutionContext() { return this.queryExecutionContext; } /** *

* The database within which the query executes. *

* * @param queryExecutionContext * The database within which the query executes. * @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withQueryExecutionContext(QueryExecutionContext queryExecutionContext) { setQueryExecutionContext(queryExecutionContext); return this; } /** *

* Specifies information about where and how to save the results of the query execution. If the query runs in a * workgroup, then workgroup's settings may override query settings. This affects the query results location. The * workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the * WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. *

* * @param resultConfiguration * Specifies information about where and how to save the results of the query execution. If the query runs in * a workgroup, then workgroup's settings may override query settings. This affects the query results * location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in * the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. */ public void setResultConfiguration(ResultConfiguration resultConfiguration) { this.resultConfiguration = resultConfiguration; } /** *

* Specifies information about where and how to save the results of the query execution. If the query runs in a * workgroup, then workgroup's settings may override query settings. This affects the query results location. The * workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the * WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. *

* * @return Specifies information about where and how to save the results of the query execution. If the query runs * in a workgroup, then workgroup's settings may override query settings. This affects the query results * location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in * the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. */ public ResultConfiguration getResultConfiguration() { return this.resultConfiguration; } /** *

* Specifies information about where and how to save the results of the query execution. If the query runs in a * workgroup, then workgroup's settings may override query settings. This affects the query results location. The * workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the * WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. *

* * @param resultConfiguration * Specifies information about where and how to save the results of the query execution. If the query runs in * a workgroup, then workgroup's settings may override query settings. This affects the query results * location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in * the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. * @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withResultConfiguration(ResultConfiguration resultConfiguration) { setResultConfiguration(resultConfiguration); return this; } /** *

* The name of the workgroup in which the query is being started. *

* * @param workGroup * The name of the workgroup in which the query is being started. */ public void setWorkGroup(String workGroup) { this.workGroup = workGroup; } /** *

* The name of the workgroup in which the query is being started. *

* * @return The name of the workgroup in which the query is being started. */ public String getWorkGroup() { return this.workGroup; } /** *

* The name of the workgroup in which the query is being started. *

* * @param workGroup * The name of the workgroup in which the query is being started. * @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withWorkGroup(String workGroup) { setWorkGroup(workGroup); return this; } /** *

* A list of values for the parameters in a query. The values are applied sequentially to the parameters in the * query in the order in which the parameters occur. *

* * @return A list of values for the parameters in a query. The values are applied sequentially to the parameters in * the query in the order in which the parameters occur. */ public java.util.List getExecutionParameters() { return executionParameters; } /** *

* A list of values for the parameters in a query. The values are applied sequentially to the parameters in the * query in the order in which the parameters occur. *

* * @param executionParameters * A list of values for the parameters in a query. The values are applied sequentially to the parameters in * the query in the order in which the parameters occur. */ public void setExecutionParameters(java.util.Collection executionParameters) { if (executionParameters == null) { this.executionParameters = null; return; } this.executionParameters = new java.util.ArrayList(executionParameters); } /** *

* A list of values for the parameters in a query. The values are applied sequentially to the parameters in the * query in the order in which the parameters occur. *

*

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

* * @param executionParameters * A list of values for the parameters in a query. The values are applied sequentially to the parameters in * the query in the order in which the parameters occur. * @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withExecutionParameters(String... executionParameters) { if (this.executionParameters == null) { setExecutionParameters(new java.util.ArrayList(executionParameters.length)); } for (String ele : executionParameters) { this.executionParameters.add(ele); } return this; } /** *

* A list of values for the parameters in a query. The values are applied sequentially to the parameters in the * query in the order in which the parameters occur. *

* * @param executionParameters * A list of values for the parameters in a query. The values are applied sequentially to the parameters in * the query in the order in which the parameters occur. * @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withExecutionParameters(java.util.Collection executionParameters) { setExecutionParameters(executionParameters); return this; } /** *

* Specifies the query result reuse behavior for the query. *

* * @param resultReuseConfiguration * Specifies the query result reuse behavior for the query. */ public void setResultReuseConfiguration(ResultReuseConfiguration resultReuseConfiguration) { this.resultReuseConfiguration = resultReuseConfiguration; } /** *

* Specifies the query result reuse behavior for the query. *

* * @return Specifies the query result reuse behavior for the query. */ public ResultReuseConfiguration getResultReuseConfiguration() { return this.resultReuseConfiguration; } /** *

* Specifies the query result reuse behavior for the query. *

* * @param resultReuseConfiguration * Specifies the query result reuse behavior for the query. * @return Returns a reference to this object so that method calls can be chained together. */ public StartQueryExecutionRequest withResultReuseConfiguration(ResultReuseConfiguration resultReuseConfiguration) { setResultReuseConfiguration(resultReuseConfiguration); 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 (getQueryString() != null) sb.append("QueryString: ").append(getQueryString()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getQueryExecutionContext() != null) sb.append("QueryExecutionContext: ").append(getQueryExecutionContext()).append(","); if (getResultConfiguration() != null) sb.append("ResultConfiguration: ").append(getResultConfiguration()).append(","); if (getWorkGroup() != null) sb.append("WorkGroup: ").append(getWorkGroup()).append(","); if (getExecutionParameters() != null) sb.append("ExecutionParameters: ").append(getExecutionParameters()).append(","); if (getResultReuseConfiguration() != null) sb.append("ResultReuseConfiguration: ").append(getResultReuseConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartQueryExecutionRequest == false) return false; StartQueryExecutionRequest other = (StartQueryExecutionRequest) obj; if (other.getQueryString() == null ^ this.getQueryString() == null) return false; if (other.getQueryString() != null && other.getQueryString().equals(this.getQueryString()) == 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.getQueryExecutionContext() == null ^ this.getQueryExecutionContext() == null) return false; if (other.getQueryExecutionContext() != null && other.getQueryExecutionContext().equals(this.getQueryExecutionContext()) == false) return false; if (other.getResultConfiguration() == null ^ this.getResultConfiguration() == null) return false; if (other.getResultConfiguration() != null && other.getResultConfiguration().equals(this.getResultConfiguration()) == false) return false; if (other.getWorkGroup() == null ^ this.getWorkGroup() == null) return false; if (other.getWorkGroup() != null && other.getWorkGroup().equals(this.getWorkGroup()) == false) return false; if (other.getExecutionParameters() == null ^ this.getExecutionParameters() == null) return false; if (other.getExecutionParameters() != null && other.getExecutionParameters().equals(this.getExecutionParameters()) == false) return false; if (other.getResultReuseConfiguration() == null ^ this.getResultReuseConfiguration() == null) return false; if (other.getResultReuseConfiguration() != null && other.getResultReuseConfiguration().equals(this.getResultReuseConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getQueryString() == null) ? 0 : getQueryString().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getQueryExecutionContext() == null) ? 0 : getQueryExecutionContext().hashCode()); hashCode = prime * hashCode + ((getResultConfiguration() == null) ? 0 : getResultConfiguration().hashCode()); hashCode = prime * hashCode + ((getWorkGroup() == null) ? 0 : getWorkGroup().hashCode()); hashCode = prime * hashCode + ((getExecutionParameters() == null) ? 0 : getExecutionParameters().hashCode()); hashCode = prime * hashCode + ((getResultReuseConfiguration() == null) ? 0 : getResultReuseConfiguration().hashCode()); return hashCode; } @Override public StartQueryExecutionRequest clone() { return (StartQueryExecutionRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy