/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace RedshiftDataAPIService { namespace Model { class DescribeStatementResult { public: AWS_REDSHIFTDATAAPISERVICE_API DescribeStatementResult(); AWS_REDSHIFTDATAAPISERVICE_API DescribeStatementResult(const Aws::AmazonWebServiceResult& result); AWS_REDSHIFTDATAAPISERVICE_API DescribeStatementResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The cluster identifier.

*/ inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; } /** *

The cluster identifier.

*/ inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifier = value; } /** *

The cluster identifier.

*/ inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifier = std::move(value); } /** *

The cluster identifier.

*/ inline void SetClusterIdentifier(const char* value) { m_clusterIdentifier.assign(value); } /** *

The cluster identifier.

*/ inline DescribeStatementResult& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;} /** *

The cluster identifier.

*/ inline DescribeStatementResult& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;} /** *

The cluster identifier.

*/ inline DescribeStatementResult& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;} /** *

The date and time (UTC) when the SQL statement was submitted to run.

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The date and time (UTC) when the SQL statement was submitted to run.

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAt = value; } /** *

The date and time (UTC) when the SQL statement was submitted to run.

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAt = std::move(value); } /** *

The date and time (UTC) when the SQL statement was submitted to run.

*/ inline DescribeStatementResult& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The date and time (UTC) when the SQL statement was submitted to run.

*/ inline DescribeStatementResult& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

The name of the database.

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

The name of the database.

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

The name of the database.

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

The name of the database.

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

The name of the database.

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

The name of the database.

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

The name of the database.

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

The database user name.

*/ inline const Aws::String& GetDbUser() const{ return m_dbUser; } /** *

The database user name.

*/ inline void SetDbUser(const Aws::String& value) { m_dbUser = value; } /** *

The database user name.

*/ inline void SetDbUser(Aws::String&& value) { m_dbUser = std::move(value); } /** *

The database user name.

*/ inline void SetDbUser(const char* value) { m_dbUser.assign(value); } /** *

The database user name.

*/ inline DescribeStatementResult& WithDbUser(const Aws::String& value) { SetDbUser(value); return *this;} /** *

The database user name.

*/ inline DescribeStatementResult& WithDbUser(Aws::String&& value) { SetDbUser(std::move(value)); return *this;} /** *

The database user name.

*/ inline DescribeStatementResult& WithDbUser(const char* value) { SetDbUser(value); return *this;} /** *

The amount of time in nanoseconds that the statement ran.

*/ inline long long GetDuration() const{ return m_duration; } /** *

The amount of time in nanoseconds that the statement ran.

*/ inline void SetDuration(long long value) { m_duration = value; } /** *

The amount of time in nanoseconds that the statement ran.

*/ inline DescribeStatementResult& WithDuration(long long value) { SetDuration(value); return *this;} /** *

The error message from the cluster if the SQL statement encountered an error * while running.

*/ inline const Aws::String& GetError() const{ return m_error; } /** *

The error message from the cluster if the SQL statement encountered an error * while running.

*/ inline void SetError(const Aws::String& value) { m_error = value; } /** *

The error message from the cluster if the SQL statement encountered an error * while running.

*/ inline void SetError(Aws::String&& value) { m_error = std::move(value); } /** *

The error message from the cluster if the SQL statement encountered an error * while running.

*/ inline void SetError(const char* value) { m_error.assign(value); } /** *

The error message from the cluster if the SQL statement encountered an error * while running.

*/ inline DescribeStatementResult& WithError(const Aws::String& value) { SetError(value); return *this;} /** *

The error message from the cluster if the SQL statement encountered an error * while running.

*/ inline DescribeStatementResult& WithError(Aws::String&& value) { SetError(std::move(value)); return *this;} /** *

The error message from the cluster if the SQL statement encountered an error * while running.

*/ inline DescribeStatementResult& WithError(const char* value) { SetError(value); return *this;} /** *

A value that indicates whether the statement has a result set. The result set * can be empty. The value is true for an empty result set. The value is true if * any substatement returns a result set.

*/ inline bool GetHasResultSet() const{ return m_hasResultSet; } /** *

A value that indicates whether the statement has a result set. The result set * can be empty. The value is true for an empty result set. The value is true if * any substatement returns a result set.

*/ inline void SetHasResultSet(bool value) { m_hasResultSet = value; } /** *

A value that indicates whether the statement has a result set. The result set * can be empty. The value is true for an empty result set. The value is true if * any substatement returns a result set.

*/ inline DescribeStatementResult& WithHasResultSet(bool value) { SetHasResultSet(value); return *this;} /** *

The identifier of the SQL statement described. This value is a universally * unique identifier (UUID) generated by Amazon Redshift Data API.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The identifier of the SQL statement described. This value is a universally * unique identifier (UUID) generated by Amazon Redshift Data API.

*/ inline void SetId(const Aws::String& value) { m_id = value; } /** *

The identifier of the SQL statement described. This value is a universally * unique identifier (UUID) generated by Amazon Redshift Data API.

*/ inline void SetId(Aws::String&& value) { m_id = std::move(value); } /** *

The identifier of the SQL statement described. This value is a universally * unique identifier (UUID) generated by Amazon Redshift Data API.

*/ inline void SetId(const char* value) { m_id.assign(value); } /** *

The identifier of the SQL statement described. This value is a universally * unique identifier (UUID) generated by Amazon Redshift Data API.

*/ inline DescribeStatementResult& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The identifier of the SQL statement described. This value is a universally * unique identifier (UUID) generated by Amazon Redshift Data API.

*/ inline DescribeStatementResult& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The identifier of the SQL statement described. This value is a universally * unique identifier (UUID) generated by Amazon Redshift Data API.

*/ inline DescribeStatementResult& WithId(const char* value) { SetId(value); return *this;} /** *

The parameters for the SQL statement.

*/ inline const Aws::Vector& GetQueryParameters() const{ return m_queryParameters; } /** *

The parameters for the SQL statement.

*/ inline void SetQueryParameters(const Aws::Vector& value) { m_queryParameters = value; } /** *

The parameters for the SQL statement.

*/ inline void SetQueryParameters(Aws::Vector&& value) { m_queryParameters = std::move(value); } /** *

The parameters for the SQL statement.

*/ inline DescribeStatementResult& WithQueryParameters(const Aws::Vector& value) { SetQueryParameters(value); return *this;} /** *

The parameters for the SQL statement.

*/ inline DescribeStatementResult& WithQueryParameters(Aws::Vector&& value) { SetQueryParameters(std::move(value)); return *this;} /** *

The parameters for the SQL statement.

*/ inline DescribeStatementResult& AddQueryParameters(const SqlParameter& value) { m_queryParameters.push_back(value); return *this; } /** *

The parameters for the SQL statement.

*/ inline DescribeStatementResult& AddQueryParameters(SqlParameter&& value) { m_queryParameters.push_back(std::move(value)); return *this; } /** *

The SQL statement text.

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

The SQL statement text.

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

The SQL statement text.

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

The SQL statement text.

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

The SQL statement text.

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

The SQL statement text.

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

The SQL statement text.

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

The process identifier from Amazon Redshift.

*/ inline long long GetRedshiftPid() const{ return m_redshiftPid; } /** *

The process identifier from Amazon Redshift.

*/ inline void SetRedshiftPid(long long value) { m_redshiftPid = value; } /** *

The process identifier from Amazon Redshift.

*/ inline DescribeStatementResult& WithRedshiftPid(long long value) { SetRedshiftPid(value); return *this;} /** *

The identifier of the query generated by Amazon Redshift. These identifiers * are also available in the query column of the * STL_QUERY system view.

*/ inline long long GetRedshiftQueryId() const{ return m_redshiftQueryId; } /** *

The identifier of the query generated by Amazon Redshift. These identifiers * are also available in the query column of the * STL_QUERY system view.

*/ inline void SetRedshiftQueryId(long long value) { m_redshiftQueryId = value; } /** *

The identifier of the query generated by Amazon Redshift. These identifiers * are also available in the query column of the * STL_QUERY system view.

*/ inline DescribeStatementResult& WithRedshiftQueryId(long long value) { SetRedshiftQueryId(value); return *this;} /** *

Either the number of rows returned from the SQL statement or the number of * rows affected. If result size is greater than zero, the result rows can be the * number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, * and others. A -1 indicates the value is null.

*/ inline long long GetResultRows() const{ return m_resultRows; } /** *

Either the number of rows returned from the SQL statement or the number of * rows affected. If result size is greater than zero, the result rows can be the * number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, * and others. A -1 indicates the value is null.

*/ inline void SetResultRows(long long value) { m_resultRows = value; } /** *

Either the number of rows returned from the SQL statement or the number of * rows affected. If result size is greater than zero, the result rows can be the * number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, * and others. A -1 indicates the value is null.

*/ inline DescribeStatementResult& WithResultRows(long long value) { SetResultRows(value); return *this;} /** *

The size in bytes of the returned results. A -1 indicates the * value is null.

*/ inline long long GetResultSize() const{ return m_resultSize; } /** *

The size in bytes of the returned results. A -1 indicates the * value is null.

*/ inline void SetResultSize(long long value) { m_resultSize = value; } /** *

The size in bytes of the returned results. A -1 indicates the * value is null.

*/ inline DescribeStatementResult& WithResultSize(long long value) { SetResultSize(value); return *this;} /** *

The name or Amazon Resource Name (ARN) of the secret that enables access to * the database.

*/ inline const Aws::String& GetSecretArn() const{ return m_secretArn; } /** *

The name or Amazon Resource Name (ARN) of the secret that enables access to * the database.

*/ inline void SetSecretArn(const Aws::String& value) { m_secretArn = value; } /** *

The name or Amazon Resource Name (ARN) of the secret that enables access to * the database.

*/ inline void SetSecretArn(Aws::String&& value) { m_secretArn = std::move(value); } /** *

The name or Amazon Resource Name (ARN) of the secret that enables access to * the database.

*/ inline void SetSecretArn(const char* value) { m_secretArn.assign(value); } /** *

The name or Amazon Resource Name (ARN) of the secret that enables access to * the database.

*/ inline DescribeStatementResult& WithSecretArn(const Aws::String& value) { SetSecretArn(value); return *this;} /** *

The name or Amazon Resource Name (ARN) of the secret that enables access to * the database.

*/ inline DescribeStatementResult& WithSecretArn(Aws::String&& value) { SetSecretArn(std::move(value)); return *this;} /** *

The name or Amazon Resource Name (ARN) of the secret that enables access to * the database.

*/ inline DescribeStatementResult& WithSecretArn(const char* value) { SetSecretArn(value); return *this;} /** *

The status of the SQL statement being described. Status values are defined as * follows:

  • ABORTED - The query run was stopped by the user.

    *
  • ALL - A status value that includes all query statuses. This value * can be used to filter results.

  • FAILED - The query run failed. *

  • FINISHED - The query has finished running.

  • *

    PICKED - The query has been chosen to be run.

  • STARTED - * The query run has started.

  • SUBMITTED - The query was * submitted, but not yet processed.

*/ inline const StatusString& GetStatus() const{ return m_status; } /** *

The status of the SQL statement being described. Status values are defined as * follows:

  • ABORTED - The query run was stopped by the user.

    *
  • ALL - A status value that includes all query statuses. This value * can be used to filter results.

  • FAILED - The query run failed. *

  • FINISHED - The query has finished running.

  • *

    PICKED - The query has been chosen to be run.

  • STARTED - * The query run has started.

  • SUBMITTED - The query was * submitted, but not yet processed.

*/ inline void SetStatus(const StatusString& value) { m_status = value; } /** *

The status of the SQL statement being described. Status values are defined as * follows:

  • ABORTED - The query run was stopped by the user.

    *
  • ALL - A status value that includes all query statuses. This value * can be used to filter results.

  • FAILED - The query run failed. *

  • FINISHED - The query has finished running.

  • *

    PICKED - The query has been chosen to be run.

  • STARTED - * The query run has started.

  • SUBMITTED - The query was * submitted, but not yet processed.

*/ inline void SetStatus(StatusString&& value) { m_status = std::move(value); } /** *

The status of the SQL statement being described. Status values are defined as * follows:

  • ABORTED - The query run was stopped by the user.

    *
  • ALL - A status value that includes all query statuses. This value * can be used to filter results.

  • FAILED - The query run failed. *

  • FINISHED - The query has finished running.

  • *

    PICKED - The query has been chosen to be run.

  • STARTED - * The query run has started.

  • SUBMITTED - The query was * submitted, but not yet processed.

*/ inline DescribeStatementResult& WithStatus(const StatusString& value) { SetStatus(value); return *this;} /** *

The status of the SQL statement being described. Status values are defined as * follows:

  • ABORTED - The query run was stopped by the user.

    *
  • ALL - A status value that includes all query statuses. This value * can be used to filter results.

  • FAILED - The query run failed. *

  • FINISHED - The query has finished running.

  • *

    PICKED - The query has been chosen to be run.

  • STARTED - * The query run has started.

  • SUBMITTED - The query was * submitted, but not yet processed.

*/ inline DescribeStatementResult& WithStatus(StatusString&& value) { SetStatus(std::move(value)); return *this;} /** *

The SQL statements from a multiple statement run.

*/ inline const Aws::Vector& GetSubStatements() const{ return m_subStatements; } /** *

The SQL statements from a multiple statement run.

*/ inline void SetSubStatements(const Aws::Vector& value) { m_subStatements = value; } /** *

The SQL statements from a multiple statement run.

*/ inline void SetSubStatements(Aws::Vector&& value) { m_subStatements = std::move(value); } /** *

The SQL statements from a multiple statement run.

*/ inline DescribeStatementResult& WithSubStatements(const Aws::Vector& value) { SetSubStatements(value); return *this;} /** *

The SQL statements from a multiple statement run.

*/ inline DescribeStatementResult& WithSubStatements(Aws::Vector&& value) { SetSubStatements(std::move(value)); return *this;} /** *

The SQL statements from a multiple statement run.

*/ inline DescribeStatementResult& AddSubStatements(const SubStatementData& value) { m_subStatements.push_back(value); return *this; } /** *

The SQL statements from a multiple statement run.

*/ inline DescribeStatementResult& AddSubStatements(SubStatementData&& value) { m_subStatements.push_back(std::move(value)); return *this; } /** *

The date and time (UTC) that the metadata for the SQL statement was last * updated. An example is the time the status last changed.

*/ inline const Aws::Utils::DateTime& GetUpdatedAt() const{ return m_updatedAt; } /** *

The date and time (UTC) that the metadata for the SQL statement was last * updated. An example is the time the status last changed.

*/ inline void SetUpdatedAt(const Aws::Utils::DateTime& value) { m_updatedAt = value; } /** *

The date and time (UTC) that the metadata for the SQL statement was last * updated. An example is the time the status last changed.

*/ inline void SetUpdatedAt(Aws::Utils::DateTime&& value) { m_updatedAt = std::move(value); } /** *

The date and time (UTC) that the metadata for the SQL statement was last * updated. An example is the time the status last changed.

*/ inline DescribeStatementResult& WithUpdatedAt(const Aws::Utils::DateTime& value) { SetUpdatedAt(value); return *this;} /** *

The date and time (UTC) that the metadata for the SQL statement was last * updated. An example is the time the status last changed.

*/ inline DescribeStatementResult& WithUpdatedAt(Aws::Utils::DateTime&& value) { SetUpdatedAt(std::move(value)); return *this;} /** *

The serverless workgroup name or Amazon Resource Name (ARN).

*/ inline const Aws::String& GetWorkgroupName() const{ return m_workgroupName; } /** *

The serverless workgroup name or Amazon Resource Name (ARN).

*/ inline void SetWorkgroupName(const Aws::String& value) { m_workgroupName = value; } /** *

The serverless workgroup name or Amazon Resource Name (ARN).

*/ inline void SetWorkgroupName(Aws::String&& value) { m_workgroupName = std::move(value); } /** *

The serverless workgroup name or Amazon Resource Name (ARN).

*/ inline void SetWorkgroupName(const char* value) { m_workgroupName.assign(value); } /** *

The serverless workgroup name or Amazon Resource Name (ARN).

*/ inline DescribeStatementResult& WithWorkgroupName(const Aws::String& value) { SetWorkgroupName(value); return *this;} /** *

The serverless workgroup name or Amazon Resource Name (ARN).

*/ inline DescribeStatementResult& WithWorkgroupName(Aws::String&& value) { SetWorkgroupName(std::move(value)); return *this;} /** *

The serverless workgroup name or Amazon Resource Name (ARN).

*/ inline DescribeStatementResult& WithWorkgroupName(const char* value) { SetWorkgroupName(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline DescribeStatementResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline DescribeStatementResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline DescribeStatementResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_clusterIdentifier; Aws::Utils::DateTime m_createdAt; Aws::String m_database; Aws::String m_dbUser; long long m_duration; Aws::String m_error; bool m_hasResultSet; Aws::String m_id; Aws::Vector m_queryParameters; Aws::String m_queryString; long long m_redshiftPid; long long m_redshiftQueryId; long long m_resultRows; long long m_resultSize; Aws::String m_secretArn; StatusString m_status; Aws::Vector m_subStatements; Aws::Utils::DateTime m_updatedAt; Aws::String m_workgroupName; Aws::String m_requestId; }; } // namespace Model } // namespace RedshiftDataAPIService } // namespace Aws