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

com.amazonaws.services.athena.model.CreateNamedQueryRequest 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 CreateNamedQueryRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The query name. *

*/ private String name; /** *

* The query description. *

*/ private String description; /** *

* The database to which the query belongs. *

*/ private String database; /** *

* The contents of the query with all query statements. *

*/ private String queryString; /** *

* A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). * If another CreateNamedQuery request is received, the same response is returned and another query is * not created. If a parameter has changed, for example, the QueryString, an error is returned. *

* *

* 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 name of the workgroup in which the named query is being created. *

*/ private String workGroup; /** *

* The query name. *

* * @param name * The query name. */ public void setName(String name) { this.name = name; } /** *

* The query name. *

* * @return The query name. */ public String getName() { return this.name; } /** *

* The query name. *

* * @param name * The query name. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamedQueryRequest withName(String name) { setName(name); return this; } /** *

* The query description. *

* * @param description * The query description. */ public void setDescription(String description) { this.description = description; } /** *

* The query description. *

* * @return The query description. */ public String getDescription() { return this.description; } /** *

* The query description. *

* * @param description * The query description. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamedQueryRequest withDescription(String description) { setDescription(description); return this; } /** *

* The database to which the query belongs. *

* * @param database * The database to which the query belongs. */ public void setDatabase(String database) { this.database = database; } /** *

* The database to which the query belongs. *

* * @return The database to which the query belongs. */ public String getDatabase() { return this.database; } /** *

* The database to which the query belongs. *

* * @param database * The database to which the query belongs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamedQueryRequest withDatabase(String database) { setDatabase(database); return this; } /** *

* The contents of the query with all query statements. *

* * @param queryString * The contents of the query with all query statements. */ public void setQueryString(String queryString) { this.queryString = queryString; } /** *

* The contents of the query with all query statements. *

* * @return The contents of the query with all query statements. */ public String getQueryString() { return this.queryString; } /** *

* The contents of the query with all query statements. *

* * @param queryString * The contents of the query with all query statements. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamedQueryRequest 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 CreateNamedQuery request is received, the same response is returned and another query is * not created. If a parameter has changed, for example, the QueryString, an error is returned. *

* *

* 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 CreateNamedQuery request is received, the same response is returned and * another query is not created. If a parameter has changed, for example, the QueryString, an * error is returned.

*

* 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 CreateNamedQuery request is received, the same response is returned and another query is * not created. If a parameter has changed, for example, the QueryString, an error is returned. *

* *

* 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 CreateNamedQuery request is received, the same response is returned * and another query is not created. If a parameter has changed, for example, the QueryString, * an error is returned.

*

* 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 CreateNamedQuery request is received, the same response is returned and another query is * not created. If a parameter has changed, for example, the QueryString, an error is returned. *

* *

* 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 CreateNamedQuery request is received, the same response is returned and * another query is not created. If a parameter has changed, for example, the QueryString, an * error is returned.

*

* 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 CreateNamedQueryRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

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

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

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

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

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

* * @param workGroup * The name of the workgroup in which the named query is being created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamedQueryRequest withWorkGroup(String workGroup) { setWorkGroup(workGroup); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getDatabase() != null) sb.append("Database: ").append(getDatabase()).append(","); if (getQueryString() != null) sb.append("QueryString: ").append(getQueryString()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getWorkGroup() != null) sb.append("WorkGroup: ").append(getWorkGroup()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateNamedQueryRequest == false) return false; CreateNamedQueryRequest other = (CreateNamedQueryRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.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.getWorkGroup() == null ^ this.getWorkGroup() == null) return false; if (other.getWorkGroup() != null && other.getWorkGroup().equals(this.getWorkGroup()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDatabase() == null) ? 0 : getDatabase().hashCode()); hashCode = prime * hashCode + ((getQueryString() == null) ? 0 : getQueryString().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getWorkGroup() == null) ? 0 : getWorkGroup().hashCode()); return hashCode; } @Override public CreateNamedQueryRequest clone() { return (CreateNamedQueryRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy