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

Describes how to interpret an application-defined timestamp value from an * MQTT message payload and the precision of that value.

See Also:

* AWS * API Reference

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

An expression that returns a long epoch time value.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

An expression that returns a long epoch time value.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

An expression that returns a long epoch time value.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

An expression that returns a long epoch time value.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

An expression that returns a long epoch time value.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

An expression that returns a long epoch time value.

*/ inline TimestreamTimestamp& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

An expression that returns a long epoch time value.

*/ inline TimestreamTimestamp& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

An expression that returns a long epoch time value.

*/ inline TimestreamTimestamp& WithValue(const char* value) { SetValue(value); return *this;} /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline const Aws::String& GetUnit() const{ return m_unit; } /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; } /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline void SetUnit(const Aws::String& value) { m_unitHasBeenSet = true; m_unit = value; } /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline void SetUnit(Aws::String&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); } /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline void SetUnit(const char* value) { m_unitHasBeenSet = true; m_unit.assign(value); } /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline TimestreamTimestamp& WithUnit(const Aws::String& value) { SetUnit(value); return *this;} /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline TimestreamTimestamp& WithUnit(Aws::String&& value) { SetUnit(std::move(value)); return *this;} /** *

The precision of the timestamp value that results from the expression * described in value.

Valid values: SECONDS | * MILLISECONDS | MICROSECONDS | * NANOSECONDS. The default is MILLISECONDS.

*/ inline TimestreamTimestamp& WithUnit(const char* value) { SetUnit(value); return *this;} private: Aws::String m_value; bool m_valueHasBeenSet = false; Aws::String m_unit; bool m_unitHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws