/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Athena { namespace Model { /** */ class CreateNamedQueryRequest : public AthenaRequest { public: AWS_ATHENA_API CreateNamedQueryRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateNamedQuery"; } AWS_ATHENA_API Aws::String SerializePayload() const override; AWS_ATHENA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The query name.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The query name.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The query name.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The query name.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The query name.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The query name.

*/ inline CreateNamedQueryRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The query name.

*/ inline CreateNamedQueryRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The query name.

*/ inline CreateNamedQueryRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The query description.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The query description.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The query description.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The query description.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The query description.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The query description.

*/ inline CreateNamedQueryRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The query description.

*/ inline CreateNamedQueryRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The query description.

*/ inline CreateNamedQueryRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The database to which the query belongs.

*/ inline const Aws::String& GetDatabase() const{ return m_database; } /** *

The database to which the query belongs.

*/ inline bool DatabaseHasBeenSet() const { return m_databaseHasBeenSet; } /** *

The database to which the query belongs.

*/ inline void SetDatabase(const Aws::String& value) { m_databaseHasBeenSet = true; m_database = value; } /** *

The database to which the query belongs.

*/ inline void SetDatabase(Aws::String&& value) { m_databaseHasBeenSet = true; m_database = std::move(value); } /** *

The database to which the query belongs.

*/ inline void SetDatabase(const char* value) { m_databaseHasBeenSet = true; m_database.assign(value); } /** *

The database to which the query belongs.

*/ inline CreateNamedQueryRequest& WithDatabase(const Aws::String& value) { SetDatabase(value); return *this;} /** *

The database to which the query belongs.

*/ inline CreateNamedQueryRequest& WithDatabase(Aws::String&& value) { SetDatabase(std::move(value)); return *this;} /** *

The database to which the query belongs.

*/ inline CreateNamedQueryRequest& WithDatabase(const char* value) { SetDatabase(value); return *this;} /** *

The contents of the query with all query statements.

*/ inline const Aws::String& GetQueryString() const{ return m_queryString; } /** *

The contents of the query with all query statements.

*/ inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; } /** *

The contents of the query with all query statements.

*/ inline void SetQueryString(const Aws::String& value) { m_queryStringHasBeenSet = true; m_queryString = value; } /** *

The contents of the query with all query statements.

*/ inline void SetQueryString(Aws::String&& value) { m_queryStringHasBeenSet = true; m_queryString = std::move(value); } /** *

The contents of the query with all query statements.

*/ inline void SetQueryString(const char* value) { m_queryStringHasBeenSet = true; m_queryString.assign(value); } /** *

The contents of the query with all query statements.

*/ inline CreateNamedQueryRequest& WithQueryString(const Aws::String& value) { SetQueryString(value); return *this;} /** *

The contents of the query with all query statements.

*/ inline CreateNamedQueryRequest& WithQueryString(Aws::String&& value) { SetQueryString(std::move(value)); return *this;} /** *

The contents of the query with all query statements.

*/ inline CreateNamedQueryRequest& WithQueryString(const char* value) { SetQueryString(value); 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.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_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.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

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.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

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.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

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.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

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.

*/ inline CreateNamedQueryRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); 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.

*/ inline CreateNamedQueryRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); 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.

*/ inline CreateNamedQueryRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} /** *

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

*/ inline const Aws::String& GetWorkGroup() const{ return m_workGroup; } /** *

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

*/ inline bool WorkGroupHasBeenSet() const { return m_workGroupHasBeenSet; } /** *

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

*/ inline void SetWorkGroup(const Aws::String& value) { m_workGroupHasBeenSet = true; m_workGroup = value; } /** *

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

*/ inline void SetWorkGroup(Aws::String&& value) { m_workGroupHasBeenSet = true; m_workGroup = std::move(value); } /** *

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

*/ inline void SetWorkGroup(const char* value) { m_workGroupHasBeenSet = true; m_workGroup.assign(value); } /** *

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

*/ inline CreateNamedQueryRequest& WithWorkGroup(const Aws::String& value) { SetWorkGroup(value); return *this;} /** *

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

*/ inline CreateNamedQueryRequest& WithWorkGroup(Aws::String&& value) { SetWorkGroup(std::move(value)); return *this;} /** *

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

*/ inline CreateNamedQueryRequest& WithWorkGroup(const char* value) { SetWorkGroup(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_database; bool m_databaseHasBeenSet = false; Aws::String m_queryString; bool m_queryStringHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::String m_workGroup; bool m_workGroupHasBeenSet = false; }; } // namespace Model } // namespace Athena } // namespace Aws