/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the timestream-write-2018-11-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.TimestreamWrite.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. /// /// public partial class Record { private List _dimensions = new List(); private string _measureName; private string _measureValue; private List _measureValues = new List(); private MeasureValueType _measureValueType; private string _time; private TimeUnit _timeUnit; private long? _version; /// /// Gets and sets the property Dimensions. /// /// Contains the list of dimensions for time-series data points. /// /// [AWSProperty(Max=128)] public List Dimensions { get { return this._dimensions; } set { this._dimensions = value; } } // Check to see if Dimensions property is set internal bool IsSetDimensions() { return this._dimensions != null && this._dimensions.Count > 0; } /// /// Gets and sets the property 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. /// /// [AWSProperty(Min=1)] public string MeasureName { get { return this._measureName; } set { this._measureName = value; } } // Check to see if MeasureName property is set internal bool IsSetMeasureName() { return this._measureName != null; } /// /// Gets and sets the property MeasureValue. /// /// Contains the measure value for the time-series data point. /// /// [AWSProperty(Min=1, Max=2048)] public string MeasureValue { get { return this._measureValue; } set { this._measureValue = value; } } // Check to see if MeasureValue property is set internal bool IsSetMeasureValue() { return this._measureValue != null; } /// /// Gets and sets the property 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. /// /// public List MeasureValues { get { return this._measureValues; } set { this._measureValues = value; } } // Check to see if MeasureValues property is set internal bool IsSetMeasureValues() { return this._measureValues != null && this._measureValues.Count > 0; } /// /// Gets and sets the property 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. /// /// public MeasureValueType MeasureValueType { get { return this._measureValueType; } set { this._measureValueType = value; } } // Check to see if MeasureValueType property is set internal bool IsSetMeasureValueType() { return this._measureValueType != null; } /// /// Gets and sets the property 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. /// /// [AWSProperty(Min=1, Max=256)] public string Time { get { return this._time; } set { this._time = value; } } // Check to see if Time property is set internal bool IsSetTime() { return this._time != null; } /// /// Gets and sets the property 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. /// /// /// public TimeUnit TimeUnit { get { return this._timeUnit; } set { this._timeUnit = value; } } // Check to see if TimeUnit property is set internal bool IsSetTimeUnit() { return this._timeUnit != null; } /// /// Gets and sets the property 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. /// /// /// public long Version { get { return this._version.GetValueOrDefault(); } set { this._version = value; } } // Check to see if Version property is set internal bool IsSetVersion() { return this._version.HasValue; } } }