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

Options that control how the result set is returned.

See Also:

* AWS * API Reference

*/ class ResultSetOptions { public: AWS_RDSDATASERVICE_API ResultSetOptions(); AWS_RDSDATASERVICE_API ResultSetOptions(Aws::Utils::Json::JsonView jsonValue); AWS_RDSDATASERVICE_API ResultSetOptions& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_RDSDATASERVICE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A value that indicates how a field of DECIMAL type is * represented in the response. The value of STRING, the default, * specifies that it is converted to a String value. The value of * DOUBLE_OR_LONG specifies that it is converted to a Long value if * its scale is 0, or to a Double value otherwise.

Conversion to * Double or Long can result in roundoff errors due to precision loss. We recommend * converting to String, especially when working with currency values.

*/ inline const DecimalReturnType& GetDecimalReturnType() const{ return m_decimalReturnType; } /** *

A value that indicates how a field of DECIMAL type is * represented in the response. The value of STRING, the default, * specifies that it is converted to a String value. The value of * DOUBLE_OR_LONG specifies that it is converted to a Long value if * its scale is 0, or to a Double value otherwise.

Conversion to * Double or Long can result in roundoff errors due to precision loss. We recommend * converting to String, especially when working with currency values.

*/ inline bool DecimalReturnTypeHasBeenSet() const { return m_decimalReturnTypeHasBeenSet; } /** *

A value that indicates how a field of DECIMAL type is * represented in the response. The value of STRING, the default, * specifies that it is converted to a String value. The value of * DOUBLE_OR_LONG specifies that it is converted to a Long value if * its scale is 0, or to a Double value otherwise.

Conversion to * Double or Long can result in roundoff errors due to precision loss. We recommend * converting to String, especially when working with currency values.

*/ inline void SetDecimalReturnType(const DecimalReturnType& value) { m_decimalReturnTypeHasBeenSet = true; m_decimalReturnType = value; } /** *

A value that indicates how a field of DECIMAL type is * represented in the response. The value of STRING, the default, * specifies that it is converted to a String value. The value of * DOUBLE_OR_LONG specifies that it is converted to a Long value if * its scale is 0, or to a Double value otherwise.

Conversion to * Double or Long can result in roundoff errors due to precision loss. We recommend * converting to String, especially when working with currency values.

*/ inline void SetDecimalReturnType(DecimalReturnType&& value) { m_decimalReturnTypeHasBeenSet = true; m_decimalReturnType = std::move(value); } /** *

A value that indicates how a field of DECIMAL type is * represented in the response. The value of STRING, the default, * specifies that it is converted to a String value. The value of * DOUBLE_OR_LONG specifies that it is converted to a Long value if * its scale is 0, or to a Double value otherwise.

Conversion to * Double or Long can result in roundoff errors due to precision loss. We recommend * converting to String, especially when working with currency values.

*/ inline ResultSetOptions& WithDecimalReturnType(const DecimalReturnType& value) { SetDecimalReturnType(value); return *this;} /** *

A value that indicates how a field of DECIMAL type is * represented in the response. The value of STRING, the default, * specifies that it is converted to a String value. The value of * DOUBLE_OR_LONG specifies that it is converted to a Long value if * its scale is 0, or to a Double value otherwise.

Conversion to * Double or Long can result in roundoff errors due to precision loss. We recommend * converting to String, especially when working with currency values.

*/ inline ResultSetOptions& WithDecimalReturnType(DecimalReturnType&& value) { SetDecimalReturnType(std::move(value)); return *this;} /** *

A value that indicates how a field of LONG type is represented. * Allowed values are LONG and STRING. The default is * LONG. Specify STRING if the length or precision of * numeric values might cause truncation or rounding errors.

*/ inline const LongReturnType& GetLongReturnType() const{ return m_longReturnType; } /** *

A value that indicates how a field of LONG type is represented. * Allowed values are LONG and STRING. The default is * LONG. Specify STRING if the length or precision of * numeric values might cause truncation or rounding errors.

*/ inline bool LongReturnTypeHasBeenSet() const { return m_longReturnTypeHasBeenSet; } /** *

A value that indicates how a field of LONG type is represented. * Allowed values are LONG and STRING. The default is * LONG. Specify STRING if the length or precision of * numeric values might cause truncation or rounding errors.

*/ inline void SetLongReturnType(const LongReturnType& value) { m_longReturnTypeHasBeenSet = true; m_longReturnType = value; } /** *

A value that indicates how a field of LONG type is represented. * Allowed values are LONG and STRING. The default is * LONG. Specify STRING if the length or precision of * numeric values might cause truncation or rounding errors.

*/ inline void SetLongReturnType(LongReturnType&& value) { m_longReturnTypeHasBeenSet = true; m_longReturnType = std::move(value); } /** *

A value that indicates how a field of LONG type is represented. * Allowed values are LONG and STRING. The default is * LONG. Specify STRING if the length or precision of * numeric values might cause truncation or rounding errors.

*/ inline ResultSetOptions& WithLongReturnType(const LongReturnType& value) { SetLongReturnType(value); return *this;} /** *

A value that indicates how a field of LONG type is represented. * Allowed values are LONG and STRING. The default is * LONG. Specify STRING if the length or precision of * numeric values might cause truncation or rounding errors.

*/ inline ResultSetOptions& WithLongReturnType(LongReturnType&& value) { SetLongReturnType(std::move(value)); return *this;} private: DecimalReturnType m_decimalReturnType; bool m_decimalReturnTypeHasBeenSet = false; LongReturnType m_longReturnType; bool m_longReturnTypeHasBeenSet = false; }; } // namespace Model } // namespace RDSDataService } // namespace Aws