/** * 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 TimestreamQuery { namespace Model { /** */ class QueryRequest : public TimestreamQueryRequest { public: AWS_TIMESTREAMQUERY_API QueryRequest(); // 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 "Query"; } AWS_TIMESTREAMQUERY_API Aws::String SerializePayload() const override; AWS_TIMESTREAMQUERY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The query to be run by Timestream.

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

The query to be run by Timestream.

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

The query to be run by Timestream.

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

The query to be run by Timestream.

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

The query to be run by Timestream.

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

The query to be run by Timestream.

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

The query to be run by Timestream.

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

The query to be run by Timestream.

*/ inline QueryRequest& WithQueryString(const char* value) { SetQueryString(value); return *this;} /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline QueryRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline QueryRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Unique, case-sensitive string of up to 64 ASCII characters specified when a * Query request is made. Providing a ClientToken makes * the call to Query idempotent. This means that running the * same query repeatedly will produce the same result. In other words, making * multiple identical Query requests has the same effect as making a * single request. When using ClientToken in a query, note the * following:

  • If the Query API is instantiated without a * ClientToken, the Query SDK generates a ClientToken on * your behalf.

  • If the Query invocation only * contains the ClientToken but does not include a * NextToken, that invocation of Query is assumed to be a * new query run.

  • If the invocation contains * NextToken, that particular invocation is assumed to be a subsequent * invocation of a prior call to the Query API, and a result set is returned.

    *
  • After 4 hours, any request with the same ClientToken * is treated as a new request.

*/ inline QueryRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline QueryRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline QueryRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

A pagination token used to return a set of results. When the * Query API is invoked using NextToken, that particular * invocation is assumed to be a subsequent invocation of a prior call to * Query, and a result set is returned. However, if the * Query invocation only contains the ClientToken, that * invocation of Query is assumed to be a new query run.

Note * the following when using NextToken in a query:

  • A pagination * token can be used for up to five Query invocations, OR for a * duration of up to 1 hour – whichever comes first.

  • Using the * same NextToken will return the same set of records. To keep * paginating through the result set, you must to use the most recent * nextToken.

  • Suppose a Query * invocation returns two NextToken values, TokenA and * TokenB. If TokenB is used in a subsequent * Query invocation, then TokenA is invalidated and * cannot be reused.

  • To request a previous result set from a * query after pagination has begun, you must re-invoke the Query API.

  • *
  • The latest NextToken should be used to paginate until * null is returned, at which point a new NextToken * should be used.

  • If the IAM principal of the query initiator * and the result reader are not the same and/or the query initiator and the result * reader do not have the same query string in the query requests, the query will * fail with an Invalid pagination token error.

*/ inline QueryRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

The total number of rows to be returned in the Query output. * The initial run of Query with a MaxRows value * specified will return the result set of the query in two cases:

  • *

    The size of the result is less than 1MB.

  • The * number of rows in the result set is less than the value of * maxRows.

Otherwise, the initial invocation of * Query only returns a NextToken, which can then be used * in subsequent calls to fetch the result set. To resume pagination, provide the * NextToken value in the subsequent command.

If the row size * is large (e.g. a row has many columns), Timestream may return fewer rows to keep * the response size from exceeding the 1 MB limit. If MaxRows is not * provided, Timestream will send the necessary number of rows to meet the 1 MB * limit.

*/ inline int GetMaxRows() const{ return m_maxRows; } /** *

The total number of rows to be returned in the Query output. * The initial run of Query with a MaxRows value * specified will return the result set of the query in two cases:

  • *

    The size of the result is less than 1MB.

  • The * number of rows in the result set is less than the value of * maxRows.

Otherwise, the initial invocation of * Query only returns a NextToken, which can then be used * in subsequent calls to fetch the result set. To resume pagination, provide the * NextToken value in the subsequent command.

If the row size * is large (e.g. a row has many columns), Timestream may return fewer rows to keep * the response size from exceeding the 1 MB limit. If MaxRows is not * provided, Timestream will send the necessary number of rows to meet the 1 MB * limit.

*/ inline bool MaxRowsHasBeenSet() const { return m_maxRowsHasBeenSet; } /** *

The total number of rows to be returned in the Query output. * The initial run of Query with a MaxRows value * specified will return the result set of the query in two cases:

  • *

    The size of the result is less than 1MB.

  • The * number of rows in the result set is less than the value of * maxRows.

Otherwise, the initial invocation of * Query only returns a NextToken, which can then be used * in subsequent calls to fetch the result set. To resume pagination, provide the * NextToken value in the subsequent command.

If the row size * is large (e.g. a row has many columns), Timestream may return fewer rows to keep * the response size from exceeding the 1 MB limit. If MaxRows is not * provided, Timestream will send the necessary number of rows to meet the 1 MB * limit.

*/ inline void SetMaxRows(int value) { m_maxRowsHasBeenSet = true; m_maxRows = value; } /** *

The total number of rows to be returned in the Query output. * The initial run of Query with a MaxRows value * specified will return the result set of the query in two cases:

  • *

    The size of the result is less than 1MB.

  • The * number of rows in the result set is less than the value of * maxRows.

Otherwise, the initial invocation of * Query only returns a NextToken, which can then be used * in subsequent calls to fetch the result set. To resume pagination, provide the * NextToken value in the subsequent command.

If the row size * is large (e.g. a row has many columns), Timestream may return fewer rows to keep * the response size from exceeding the 1 MB limit. If MaxRows is not * provided, Timestream will send the necessary number of rows to meet the 1 MB * limit.

*/ inline QueryRequest& WithMaxRows(int value) { SetMaxRows(value); return *this;} private: Aws::String m_queryString; bool m_queryStringHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; int m_maxRows; bool m_maxRowsHasBeenSet = false; }; } // namespace Model } // namespace TimestreamQuery } // namespace Aws