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

Represents a time-series data point being written into Timestream. Each * record contains an array of dimensions. Dimensions represent the metadata * attributes of a time-series data point, such as the instance name or * Availability Zone of an EC2 instance. A record also contains the measure name, * which is the name of the measure being collected (for example, the CPU * utilization of an EC2 instance). Additionally, a record contains the measure * value and the value type, which is the data type of the measure value. Also, the * record contains the timestamp of when the measure was collected and the * timestamp unit, which represents the granularity of the timestamp.

* Records have a Version field, which is a 64-bit long * that you can use for updating data points. Writes of a duplicate record with the * same dimension, timestamp, and measure name but different measure value will * only succeed if the Version attribute of the record in the write * request is higher than that of the existing record. Timestream defaults to a * Version of 1 for records without the * Version field.

See Also:

AWS * API Reference

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

Contains the list of dimensions for time-series data points.

*/ inline const Aws::Vector& GetDimensions() const{ return m_dimensions; } /** *

Contains the list of dimensions for time-series data points.

*/ inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; } /** *

Contains the list of dimensions for time-series data points.

*/ inline void SetDimensions(const Aws::Vector& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; } /** *

Contains the list of dimensions for time-series data points.

*/ inline void SetDimensions(Aws::Vector&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); } /** *

Contains the list of dimensions for time-series data points.

*/ inline Record& WithDimensions(const Aws::Vector& value) { SetDimensions(value); return *this;} /** *

Contains the list of dimensions for time-series data points.

*/ inline Record& WithDimensions(Aws::Vector&& value) { SetDimensions(std::move(value)); return *this;} /** *

Contains the list of dimensions for time-series data points.

*/ inline Record& AddDimensions(const Dimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; } /** *

Contains the list of dimensions for time-series data points.

*/ inline Record& AddDimensions(Dimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; } /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline const Aws::String& GetMeasureName() const{ return m_measureName; } /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline bool MeasureNameHasBeenSet() const { return m_measureNameHasBeenSet; } /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline void SetMeasureName(const Aws::String& value) { m_measureNameHasBeenSet = true; m_measureName = value; } /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline void SetMeasureName(Aws::String&& value) { m_measureNameHasBeenSet = true; m_measureName = std::move(value); } /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline void SetMeasureName(const char* value) { m_measureNameHasBeenSet = true; m_measureName.assign(value); } /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline Record& WithMeasureName(const Aws::String& value) { SetMeasureName(value); return *this;} /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline Record& WithMeasureName(Aws::String&& value) { SetMeasureName(std::move(value)); return *this;} /** *

Measure represents the data attribute of the time series. For example, the * CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. *

*/ inline Record& WithMeasureName(const char* value) { SetMeasureName(value); return *this;} /** *

Contains the measure value for the time-series data point.

*/ inline const Aws::String& GetMeasureValue() const{ return m_measureValue; } /** *

Contains the measure value for the time-series data point.

*/ inline bool MeasureValueHasBeenSet() const { return m_measureValueHasBeenSet; } /** *

Contains the measure value for the time-series data point.

*/ inline void SetMeasureValue(const Aws::String& value) { m_measureValueHasBeenSet = true; m_measureValue = value; } /** *

Contains the measure value for the time-series data point.

*/ inline void SetMeasureValue(Aws::String&& value) { m_measureValueHasBeenSet = true; m_measureValue = std::move(value); } /** *

Contains the measure value for the time-series data point.

*/ inline void SetMeasureValue(const char* value) { m_measureValueHasBeenSet = true; m_measureValue.assign(value); } /** *

Contains the measure value for the time-series data point.

*/ inline Record& WithMeasureValue(const Aws::String& value) { SetMeasureValue(value); return *this;} /** *

Contains the measure value for the time-series data point.

*/ inline Record& WithMeasureValue(Aws::String&& value) { SetMeasureValue(std::move(value)); return *this;} /** *

Contains the measure value for the time-series data point.

*/ inline Record& WithMeasureValue(const char* value) { SetMeasureValue(value); return *this;} /** *

Contains the data type of the measure value for the time-series data point. * Default type is DOUBLE. For more information, see Data * types.

*/ inline const MeasureValueType& GetMeasureValueType() const{ return m_measureValueType; } /** *

Contains the data type of the measure value for the time-series data point. * Default type is DOUBLE. For more information, see Data * types.

*/ inline bool MeasureValueTypeHasBeenSet() const { return m_measureValueTypeHasBeenSet; } /** *

Contains the data type of the measure value for the time-series data point. * Default type is DOUBLE. For more information, see Data * types.

*/ inline void SetMeasureValueType(const MeasureValueType& value) { m_measureValueTypeHasBeenSet = true; m_measureValueType = value; } /** *

Contains the data type of the measure value for the time-series data point. * Default type is DOUBLE. For more information, see Data * types.

*/ inline void SetMeasureValueType(MeasureValueType&& value) { m_measureValueTypeHasBeenSet = true; m_measureValueType = std::move(value); } /** *

Contains the data type of the measure value for the time-series data point. * Default type is DOUBLE. For more information, see Data * types.

*/ inline Record& WithMeasureValueType(const MeasureValueType& value) { SetMeasureValueType(value); return *this;} /** *

Contains the data type of the measure value for the time-series data point. * Default type is DOUBLE. For more information, see Data * types.

*/ inline Record& WithMeasureValueType(MeasureValueType&& value) { SetMeasureValueType(std::move(value)); return *this;} /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline const Aws::String& GetTime() const{ return m_time; } /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline bool TimeHasBeenSet() const { return m_timeHasBeenSet; } /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline void SetTime(const Aws::String& value) { m_timeHasBeenSet = true; m_time = value; } /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline void SetTime(Aws::String&& value) { m_timeHasBeenSet = true; m_time = std::move(value); } /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline void SetTime(const char* value) { m_timeHasBeenSet = true; m_time.assign(value); } /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline Record& WithTime(const Aws::String& value) { SetTime(value); return *this;} /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline Record& WithTime(Aws::String&& value) { SetTime(std::move(value)); return *this;} /** *

Contains the time at which the measure value for the data point was * collected. The time value plus the unit provides the time elapsed since the * epoch. For example, if the time value is 12345 and the unit is * ms, then 12345 ms have elapsed since the epoch.

*/ inline Record& WithTime(const char* value) { SetTime(value); return *this;} /** *

The granularity of the timestamp unit. It indicates if the time value is in * seconds, milliseconds, nanoseconds, or other supported values. Default is * MILLISECONDS.

*/ inline const TimeUnit& GetTimeUnit() const{ return m_timeUnit; } /** *

The granularity of the timestamp unit. It indicates if the time value is in * seconds, milliseconds, nanoseconds, or other supported values. Default is * MILLISECONDS.

*/ inline bool TimeUnitHasBeenSet() const { return m_timeUnitHasBeenSet; } /** *

The granularity of the timestamp unit. It indicates if the time value is in * seconds, milliseconds, nanoseconds, or other supported values. Default is * MILLISECONDS.

*/ inline void SetTimeUnit(const TimeUnit& value) { m_timeUnitHasBeenSet = true; m_timeUnit = value; } /** *

The granularity of the timestamp unit. It indicates if the time value is in * seconds, milliseconds, nanoseconds, or other supported values. Default is * MILLISECONDS.

*/ inline void SetTimeUnit(TimeUnit&& value) { m_timeUnitHasBeenSet = true; m_timeUnit = std::move(value); } /** *

The granularity of the timestamp unit. It indicates if the time value is in * seconds, milliseconds, nanoseconds, or other supported values. Default is * MILLISECONDS.

*/ inline Record& WithTimeUnit(const TimeUnit& value) { SetTimeUnit(value); return *this;} /** *

The granularity of the timestamp unit. It indicates if the time value is in * seconds, milliseconds, nanoseconds, or other supported values. Default is * MILLISECONDS.

*/ inline Record& WithTimeUnit(TimeUnit&& value) { SetTimeUnit(std::move(value)); return *this;} /** *

64-bit attribute used for record updates. Write requests for duplicate data * with a higher version number will update the existing measure value and version. * In cases where the measure value is the same, Version will still be * updated. Default value is 1.

Version * must be 1 or greater, or you will receive a * ValidationException error.

*/ inline long long GetVersion() const{ return m_version; } /** *

64-bit attribute used for record updates. Write requests for duplicate data * with a higher version number will update the existing measure value and version. * In cases where the measure value is the same, Version will still be * updated. Default value is 1.

Version * must be 1 or greater, or you will receive a * ValidationException error.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

64-bit attribute used for record updates. Write requests for duplicate data * with a higher version number will update the existing measure value and version. * In cases where the measure value is the same, Version will still be * updated. Default value is 1.

Version * must be 1 or greater, or you will receive a * ValidationException error.

*/ inline void SetVersion(long long value) { m_versionHasBeenSet = true; m_version = value; } /** *

64-bit attribute used for record updates. Write requests for duplicate data * with a higher version number will update the existing measure value and version. * In cases where the measure value is the same, Version will still be * updated. Default value is 1.

Version * must be 1 or greater, or you will receive a * ValidationException error.

*/ inline Record& WithVersion(long long value) { SetVersion(value); return *this;} /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline const Aws::Vector& GetMeasureValues() const{ return m_measureValues; } /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline bool MeasureValuesHasBeenSet() const { return m_measureValuesHasBeenSet; } /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline void SetMeasureValues(const Aws::Vector& value) { m_measureValuesHasBeenSet = true; m_measureValues = value; } /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline void SetMeasureValues(Aws::Vector&& value) { m_measureValuesHasBeenSet = true; m_measureValues = std::move(value); } /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline Record& WithMeasureValues(const Aws::Vector& value) { SetMeasureValues(value); return *this;} /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline Record& WithMeasureValues(Aws::Vector&& value) { SetMeasureValues(std::move(value)); return *this;} /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline Record& AddMeasureValues(const MeasureValue& value) { m_measureValuesHasBeenSet = true; m_measureValues.push_back(value); return *this; } /** *

Contains the list of MeasureValue for time-series data points.

This * is only allowed for type MULTI. For scalar values, use * MeasureValue attribute of the record directly.

*/ inline Record& AddMeasureValues(MeasureValue&& value) { m_measureValuesHasBeenSet = true; m_measureValues.push_back(std::move(value)); return *this; } private: Aws::Vector m_dimensions; bool m_dimensionsHasBeenSet = false; Aws::String m_measureName; bool m_measureNameHasBeenSet = false; Aws::String m_measureValue; bool m_measureValueHasBeenSet = false; MeasureValueType m_measureValueType; bool m_measureValueTypeHasBeenSet = false; Aws::String m_time; bool m_timeHasBeenSet = false; TimeUnit m_timeUnit; bool m_timeUnitHasBeenSet = false; long long m_version; bool m_versionHasBeenSet = false; Aws::Vector m_measureValues; bool m_measureValuesHasBeenSet = false; }; } // namespace Model } // namespace TimestreamWrite } // namespace Aws