@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Record extends Object implements Serializable, Cloneable, StructuredPojo
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.
| Constructor and Description |
|---|
Record() |
| Modifier and Type | Method and Description |
|---|---|
Record |
clone() |
boolean |
equals(Object obj) |
List<Dimension> |
getDimensions()
Contains the list of dimensions for time-series data points.
|
String |
getMeasureName()
Measure represents the data attribute of the time series.
|
String |
getMeasureValue()
Contains the measure value for the time-series data point.
|
List<MeasureValue> |
getMeasureValues()
Contains the list of MeasureValue for time-series data points.
|
String |
getMeasureValueType()
Contains the data type of the measure value for the time-series data point.
|
String |
getTime()
Contains the time at which the measure value for the data point was collected.
|
String |
getTimeUnit()
The granularity of the timestamp unit.
|
Long |
getVersion()
64-bit attribute used for record updates.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setDimensions(Collection<Dimension> dimensions)
Contains the list of dimensions for time-series data points.
|
void |
setMeasureName(String measureName)
Measure represents the data attribute of the time series.
|
void |
setMeasureValue(String measureValue)
Contains the measure value for the time-series data point.
|
void |
setMeasureValues(Collection<MeasureValue> measureValues)
Contains the list of MeasureValue for time-series data points.
|
void |
setMeasureValueType(String measureValueType)
Contains the data type of the measure value for the time-series data point.
|
void |
setTime(String time)
Contains the time at which the measure value for the data point was collected.
|
void |
setTimeUnit(String timeUnit)
The granularity of the timestamp unit.
|
void |
setVersion(Long version)
64-bit attribute used for record updates.
|
String |
toString()
Returns a string representation of this object.
|
Record |
withDimensions(Collection<Dimension> dimensions)
Contains the list of dimensions for time-series data points.
|
Record |
withDimensions(Dimension... dimensions)
Contains the list of dimensions for time-series data points.
|
Record |
withMeasureName(String measureName)
Measure represents the data attribute of the time series.
|
Record |
withMeasureValue(String measureValue)
Contains the measure value for the time-series data point.
|
Record |
withMeasureValues(Collection<MeasureValue> measureValues)
Contains the list of MeasureValue for time-series data points.
|
Record |
withMeasureValues(MeasureValue... measureValues)
Contains the list of MeasureValue for time-series data points.
|
Record |
withMeasureValueType(MeasureValueType measureValueType)
Contains the data type of the measure value for the time-series data point.
|
Record |
withMeasureValueType(String measureValueType)
Contains the data type of the measure value for the time-series data point.
|
Record |
withTime(String time)
Contains the time at which the measure value for the data point was collected.
|
Record |
withTimeUnit(String timeUnit)
The granularity of the timestamp unit.
|
Record |
withTimeUnit(TimeUnit timeUnit)
The granularity of the timestamp unit.
|
Record |
withVersion(Long version)
64-bit attribute used for record updates.
|
public List<Dimension> getDimensions()
Contains the list of dimensions for time-series data points.
public void setDimensions(Collection<Dimension> dimensions)
Contains the list of dimensions for time-series data points.
dimensions - Contains the list of dimensions for time-series data points.public Record withDimensions(Dimension... dimensions)
Contains the list of dimensions for time-series data points.
NOTE: This method appends the values to the existing list (if any). Use
setDimensions(java.util.Collection) or withDimensions(java.util.Collection) if you want to
override the existing values.
dimensions - Contains the list of dimensions for time-series data points.public Record withDimensions(Collection<Dimension> dimensions)
Contains the list of dimensions for time-series data points.
dimensions - Contains the list of dimensions for time-series data points.public void setMeasureName(String 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.
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.public String getMeasureName()
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.
public Record withMeasureName(String 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.
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.public void setMeasureValue(String measureValue)
Contains the measure value for the time-series data point.
measureValue - Contains the measure value for the time-series data point.public String getMeasureValue()
Contains the measure value for the time-series data point.
public Record withMeasureValue(String measureValue)
Contains the measure value for the time-series data point.
measureValue - Contains the measure value for the time-series data point.public void setMeasureValueType(String 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.
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.MeasureValueTypepublic String getMeasureValueType()
Contains the data type of the measure value for the time-series data point. Default type is DOUBLE.
For more information, see Data types.
DOUBLE. For more information, see Data
types.MeasureValueTypepublic Record withMeasureValueType(String 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.
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.MeasureValueTypepublic Record withMeasureValueType(MeasureValueType 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.
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.MeasureValueTypepublic void setTime(String 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.
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.public String getTime()
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.
12345 and
the unit is ms, then 12345 ms have elapsed since the epoch.public Record withTime(String 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.
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.public void setTimeUnit(String 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.
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.TimeUnitpublic String getTimeUnit()
The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds,
or other supported values. Default is MILLISECONDS.
MILLISECONDS.TimeUnitpublic Record withTimeUnit(String 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.
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.TimeUnitpublic Record withTimeUnit(TimeUnit 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.
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.TimeUnitpublic void setVersion(Long 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.
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 getVersion()
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.
Version will still be updated. Default value is 1.
Version must be 1 or greater, or you will receive a
ValidationException error.
public Record withVersion(Long 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.
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 List<MeasureValue> getMeasureValues()
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.
This is only allowed for type MULTI. For scalar values, use MeasureValue
attribute of the record directly.
public void setMeasureValues(Collection<MeasureValue> 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.
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 Record withMeasureValues(MeasureValue... 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.
NOTE: This method appends the values to the existing list (if any). Use
setMeasureValues(java.util.Collection) or withMeasureValues(java.util.Collection) if you want
to override the existing values.
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 Record withMeasureValues(Collection<MeasureValue> 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.
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 String toString()
toString in class ObjectObject.toString()public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.