/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace RDSDataService { namespace Model { /** *

The response elements represent the output of a request to run a SQL * statement against a database.

See Also:

AWS * API Reference

*/ class ExecuteStatementResult { public: AWS_RDSDATASERVICE_API ExecuteStatementResult(); AWS_RDSDATASERVICE_API ExecuteStatementResult(const Aws::AmazonWebServiceResult& result); AWS_RDSDATASERVICE_API ExecuteStatementResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The records returned by the SQL statement. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline const Aws::Vector>& GetRecords() const{ return m_records; } /** *

The records returned by the SQL statement. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline void SetRecords(const Aws::Vector>& value) { m_records = value; } /** *

The records returned by the SQL statement. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline void SetRecords(Aws::Vector>&& value) { m_records = std::move(value); } /** *

The records returned by the SQL statement. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& WithRecords(const Aws::Vector>& value) { SetRecords(value); return *this;} /** *

The records returned by the SQL statement. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& WithRecords(Aws::Vector>&& value) { SetRecords(std::move(value)); return *this;} /** *

The records returned by the SQL statement. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& AddRecords(const Aws::Vector& value) { m_records.push_back(value); return *this; } /** *

The records returned by the SQL statement. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& AddRecords(Aws::Vector&& value) { m_records.push_back(std::move(value)); return *this; } /** *

Metadata for the columns included in the results. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline const Aws::Vector& GetColumnMetadata() const{ return m_columnMetadata; } /** *

Metadata for the columns included in the results. This field is blank if the * formatRecordsAs parameter is set to JSON.

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

Metadata for the columns included in the results. This field is blank if the * formatRecordsAs parameter is set to JSON.

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

Metadata for the columns included in the results. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& WithColumnMetadata(const Aws::Vector& value) { SetColumnMetadata(value); return *this;} /** *

Metadata for the columns included in the results. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& WithColumnMetadata(Aws::Vector&& value) { SetColumnMetadata(std::move(value)); return *this;} /** *

Metadata for the columns included in the results. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& AddColumnMetadata(const ColumnMetadata& value) { m_columnMetadata.push_back(value); return *this; } /** *

Metadata for the columns included in the results. This field is blank if the * formatRecordsAs parameter is set to JSON.

*/ inline ExecuteStatementResult& AddColumnMetadata(ColumnMetadata&& value) { m_columnMetadata.push_back(std::move(value)); return *this; } /** *

The number of records updated by the request.

*/ inline long long GetNumberOfRecordsUpdated() const{ return m_numberOfRecordsUpdated; } /** *

The number of records updated by the request.

*/ inline void SetNumberOfRecordsUpdated(long long value) { m_numberOfRecordsUpdated = value; } /** *

The number of records updated by the request.

*/ inline ExecuteStatementResult& WithNumberOfRecordsUpdated(long long value) { SetNumberOfRecordsUpdated(value); return *this;} /** *

Values for fields generated during a DML request.


     * <note> <p>The <code>generatedFields</code> data isn't
     * supported by Aurora PostgreSQL. To get the values of generated fields, use the
     * <code>RETURNING</code> clause. For more information, see <a
     * href="https://www.postgresql.org/docs/10/dml-returning.html">Returning
     * Data From Modified Rows</a> in the PostgreSQL documentation.</p>
     * </note> 
*/ inline const Aws::Vector& GetGeneratedFields() const{ return m_generatedFields; } /** *

Values for fields generated during a DML request.


     * <note> <p>The <code>generatedFields</code> data isn't
     * supported by Aurora PostgreSQL. To get the values of generated fields, use the
     * <code>RETURNING</code> clause. For more information, see <a
     * href="https://www.postgresql.org/docs/10/dml-returning.html">Returning
     * Data From Modified Rows</a> in the PostgreSQL documentation.</p>
     * </note> 
*/ inline void SetGeneratedFields(const Aws::Vector& value) { m_generatedFields = value; } /** *

Values for fields generated during a DML request.


     * <note> <p>The <code>generatedFields</code> data isn't
     * supported by Aurora PostgreSQL. To get the values of generated fields, use the
     * <code>RETURNING</code> clause. For more information, see <a
     * href="https://www.postgresql.org/docs/10/dml-returning.html">Returning
     * Data From Modified Rows</a> in the PostgreSQL documentation.</p>
     * </note> 
*/ inline void SetGeneratedFields(Aws::Vector&& value) { m_generatedFields = std::move(value); } /** *

Values for fields generated during a DML request.


     * <note> <p>The <code>generatedFields</code> data isn't
     * supported by Aurora PostgreSQL. To get the values of generated fields, use the
     * <code>RETURNING</code> clause. For more information, see <a
     * href="https://www.postgresql.org/docs/10/dml-returning.html">Returning
     * Data From Modified Rows</a> in the PostgreSQL documentation.</p>
     * </note> 
*/ inline ExecuteStatementResult& WithGeneratedFields(const Aws::Vector& value) { SetGeneratedFields(value); return *this;} /** *

Values for fields generated during a DML request.


     * <note> <p>The <code>generatedFields</code> data isn't
     * supported by Aurora PostgreSQL. To get the values of generated fields, use the
     * <code>RETURNING</code> clause. For more information, see <a
     * href="https://www.postgresql.org/docs/10/dml-returning.html">Returning
     * Data From Modified Rows</a> in the PostgreSQL documentation.</p>
     * </note> 
*/ inline ExecuteStatementResult& WithGeneratedFields(Aws::Vector&& value) { SetGeneratedFields(std::move(value)); return *this;} /** *

Values for fields generated during a DML request.


     * <note> <p>The <code>generatedFields</code> data isn't
     * supported by Aurora PostgreSQL. To get the values of generated fields, use the
     * <code>RETURNING</code> clause. For more information, see <a
     * href="https://www.postgresql.org/docs/10/dml-returning.html">Returning
     * Data From Modified Rows</a> in the PostgreSQL documentation.</p>
     * </note> 
*/ inline ExecuteStatementResult& AddGeneratedFields(const Field& value) { m_generatedFields.push_back(value); return *this; } /** *

Values for fields generated during a DML request.


     * <note> <p>The <code>generatedFields</code> data isn't
     * supported by Aurora PostgreSQL. To get the values of generated fields, use the
     * <code>RETURNING</code> clause. For more information, see <a
     * href="https://www.postgresql.org/docs/10/dml-returning.html">Returning
     * Data From Modified Rows</a> in the PostgreSQL documentation.</p>
     * </note> 
*/ inline ExecuteStatementResult& AddGeneratedFields(Field&& value) { m_generatedFields.push_back(std::move(value)); return *this; } /** *

A string value that represents the result set of a SELECT * statement in JSON format. This value is only present when the * formatRecordsAs parameter is set to JSON.

The * size limit for this field is currently 10 MB. If the JSON-formatted string * representing the result set requires more than 10 MB, the call returns an * error.

*/ inline const Aws::String& GetFormattedRecords() const{ return m_formattedRecords; } /** *

A string value that represents the result set of a SELECT * statement in JSON format. This value is only present when the * formatRecordsAs parameter is set to JSON.

The * size limit for this field is currently 10 MB. If the JSON-formatted string * representing the result set requires more than 10 MB, the call returns an * error.

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

A string value that represents the result set of a SELECT * statement in JSON format. This value is only present when the * formatRecordsAs parameter is set to JSON.

The * size limit for this field is currently 10 MB. If the JSON-formatted string * representing the result set requires more than 10 MB, the call returns an * error.

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

A string value that represents the result set of a SELECT * statement in JSON format. This value is only present when the * formatRecordsAs parameter is set to JSON.

The * size limit for this field is currently 10 MB. If the JSON-formatted string * representing the result set requires more than 10 MB, the call returns an * error.

*/ inline void SetFormattedRecords(const char* value) { m_formattedRecords.assign(value); } /** *

A string value that represents the result set of a SELECT * statement in JSON format. This value is only present when the * formatRecordsAs parameter is set to JSON.

The * size limit for this field is currently 10 MB. If the JSON-formatted string * representing the result set requires more than 10 MB, the call returns an * error.

*/ inline ExecuteStatementResult& WithFormattedRecords(const Aws::String& value) { SetFormattedRecords(value); return *this;} /** *

A string value that represents the result set of a SELECT * statement in JSON format. This value is only present when the * formatRecordsAs parameter is set to JSON.

The * size limit for this field is currently 10 MB. If the JSON-formatted string * representing the result set requires more than 10 MB, the call returns an * error.

*/ inline ExecuteStatementResult& WithFormattedRecords(Aws::String&& value) { SetFormattedRecords(std::move(value)); return *this;} /** *

A string value that represents the result set of a SELECT * statement in JSON format. This value is only present when the * formatRecordsAs parameter is set to JSON.

The * size limit for this field is currently 10 MB. If the JSON-formatted string * representing the result set requires more than 10 MB, the call returns an * error.

*/ inline ExecuteStatementResult& WithFormattedRecords(const char* value) { SetFormattedRecords(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 ExecuteStatementResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline ExecuteStatementResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline ExecuteStatementResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Vector> m_records; Aws::Vector m_columnMetadata; long long m_numberOfRecordsUpdated; Aws::Vector m_generatedFields; Aws::String m_formattedRecords; Aws::String m_requestId; }; } // namespace Model } // namespace RDSDataService } // namespace Aws