/** * 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 { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace TimestreamQuery { namespace Model { class Row; class TimeSeriesDataPoint; /** *

Datum represents a single data point in a query result.

See * Also:

AWS * API Reference

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

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline const Aws::String& GetScalarValue() const{ return m_scalarValue; } /** *

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline bool ScalarValueHasBeenSet() const { return m_scalarValueHasBeenSet; } /** *

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline void SetScalarValue(const Aws::String& value) { m_scalarValueHasBeenSet = true; m_scalarValue = value; } /** *

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline void SetScalarValue(Aws::String&& value) { m_scalarValueHasBeenSet = true; m_scalarValue = std::move(value); } /** *

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline void SetScalarValue(const char* value) { m_scalarValueHasBeenSet = true; m_scalarValue.assign(value); } /** *

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline Datum& WithScalarValue(const Aws::String& value) { SetScalarValue(value); return *this;} /** *

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline Datum& WithScalarValue(Aws::String&& value) { SetScalarValue(std::move(value)); return *this;} /** *

Indicates if the data point is a scalar value such as integer, string, * double, or Boolean.

*/ inline Datum& WithScalarValue(const char* value) { SetScalarValue(value); return *this;} /** *

Indicates if the data point is a timeseries data type.

*/ inline const Aws::Vector& GetTimeSeriesValue() const{ return m_timeSeriesValue; } /** *

Indicates if the data point is a timeseries data type.

*/ inline bool TimeSeriesValueHasBeenSet() const { return m_timeSeriesValueHasBeenSet; } /** *

Indicates if the data point is a timeseries data type.

*/ inline void SetTimeSeriesValue(const Aws::Vector& value) { m_timeSeriesValueHasBeenSet = true; m_timeSeriesValue = value; } /** *

Indicates if the data point is a timeseries data type.

*/ inline void SetTimeSeriesValue(Aws::Vector&& value) { m_timeSeriesValueHasBeenSet = true; m_timeSeriesValue = std::move(value); } /** *

Indicates if the data point is a timeseries data type.

*/ inline Datum& WithTimeSeriesValue(const Aws::Vector& value) { SetTimeSeriesValue(value); return *this;} /** *

Indicates if the data point is a timeseries data type.

*/ inline Datum& WithTimeSeriesValue(Aws::Vector&& value) { SetTimeSeriesValue(std::move(value)); return *this;} /** *

Indicates if the data point is a timeseries data type.

*/ inline Datum& AddTimeSeriesValue(const TimeSeriesDataPoint& value) { m_timeSeriesValueHasBeenSet = true; m_timeSeriesValue.push_back(value); return *this; } /** *

Indicates if the data point is a timeseries data type.

*/ inline Datum& AddTimeSeriesValue(TimeSeriesDataPoint&& value) { m_timeSeriesValueHasBeenSet = true; m_timeSeriesValue.push_back(std::move(value)); return *this; } /** *

Indicates if the data point is an array.

*/ inline const Aws::Vector& GetArrayValue() const{ return m_arrayValue; } /** *

Indicates if the data point is an array.

*/ inline bool ArrayValueHasBeenSet() const { return m_arrayValueHasBeenSet; } /** *

Indicates if the data point is an array.

*/ inline void SetArrayValue(const Aws::Vector& value) { m_arrayValueHasBeenSet = true; m_arrayValue = value; } /** *

Indicates if the data point is an array.

*/ inline void SetArrayValue(Aws::Vector&& value) { m_arrayValueHasBeenSet = true; m_arrayValue = std::move(value); } /** *

Indicates if the data point is an array.

*/ inline Datum& WithArrayValue(const Aws::Vector& value) { SetArrayValue(value); return *this;} /** *

Indicates if the data point is an array.

*/ inline Datum& WithArrayValue(Aws::Vector&& value) { SetArrayValue(std::move(value)); return *this;} /** *

Indicates if the data point is an array.

*/ inline Datum& AddArrayValue(const Datum& value) { m_arrayValueHasBeenSet = true; m_arrayValue.push_back(value); return *this; } /** *

Indicates if the data point is an array.

*/ inline Datum& AddArrayValue(Datum&& value) { m_arrayValueHasBeenSet = true; m_arrayValue.push_back(std::move(value)); return *this; } /** *

Indicates if the data point is a row.

*/ AWS_TIMESTREAMQUERY_API const Row& GetRowValue() const; /** *

Indicates if the data point is a row.

*/ AWS_TIMESTREAMQUERY_API bool RowValueHasBeenSet() const; /** *

Indicates if the data point is a row.

*/ AWS_TIMESTREAMQUERY_API void SetRowValue(const Row& value); /** *

Indicates if the data point is a row.

*/ AWS_TIMESTREAMQUERY_API void SetRowValue(Row&& value); /** *

Indicates if the data point is a row.

*/ AWS_TIMESTREAMQUERY_API Datum& WithRowValue(const Row& value); /** *

Indicates if the data point is a row.

*/ AWS_TIMESTREAMQUERY_API Datum& WithRowValue(Row&& value); /** *

Indicates if the data point is null.

*/ inline bool GetNullValue() const{ return m_nullValue; } /** *

Indicates if the data point is null.

*/ inline bool NullValueHasBeenSet() const { return m_nullValueHasBeenSet; } /** *

Indicates if the data point is null.

*/ inline void SetNullValue(bool value) { m_nullValueHasBeenSet = true; m_nullValue = value; } /** *

Indicates if the data point is null.

*/ inline Datum& WithNullValue(bool value) { SetNullValue(value); return *this;} private: Aws::String m_scalarValue; bool m_scalarValueHasBeenSet = false; Aws::Vector m_timeSeriesValue; bool m_timeSeriesValueHasBeenSet = false; Aws::Vector m_arrayValue; bool m_arrayValueHasBeenSet = false; std::shared_ptr m_rowValue; bool m_rowValueHasBeenSet = false; bool m_nullValue; bool m_nullValueHasBeenSet = false; }; } // namespace Model } // namespace TimestreamQuery } // namespace Aws