/** * 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 IoTEvents { namespace Model { /** *

A structure that contains an asset property value. For more information, see * Variant * in the AWS IoT SiteWise API Reference.

You must use expressions * for all parameters in AssetPropertyVariant. The expressions accept * literals, operators, functions, references, and substitution templates.

Examples

  • For literal values, the * expressions must contain single quotes. For example, the value for the * integerValue parameter can be '100'.

  • *

    For references, you must specify either variables or parameters. For example, * the value for the booleanValue parameter can be * $variable.offline.

  • For a substitution template, * you must use ${}, and the template must be in single quotes. A * substitution template can also contain a combination of literals, operators, * functions, references, and substitution templates.

    In the following * example, the value for the doubleValue parameter uses a * substitution template.

    * '${$input.TemperatureInput.sensorData.temperature * 6 / 5 + 32}' *

For more information, see Expressions * in the AWS IoT Events Developer Guide.

You must specify one of the * following value types, depending on the dataType of the specified * asset property. For more information, see AssetProperty * in the AWS IoT SiteWise API Reference.

See Also:

AWS * API Reference

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

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline const Aws::String& GetStringValue() const{ return m_stringValue; } /** *

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline bool StringValueHasBeenSet() const { return m_stringValueHasBeenSet; } /** *

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline void SetStringValue(const Aws::String& value) { m_stringValueHasBeenSet = true; m_stringValue = value; } /** *

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline void SetStringValue(Aws::String&& value) { m_stringValueHasBeenSet = true; m_stringValue = std::move(value); } /** *

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline void SetStringValue(const char* value) { m_stringValueHasBeenSet = true; m_stringValue.assign(value); } /** *

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline AssetPropertyVariant& WithStringValue(const Aws::String& value) { SetStringValue(value); return *this;} /** *

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline AssetPropertyVariant& WithStringValue(Aws::String&& value) { SetStringValue(std::move(value)); return *this;} /** *

The asset property value is a string. You must use an expression, and the * evaluated result should be a string.

*/ inline AssetPropertyVariant& WithStringValue(const char* value) { SetStringValue(value); return *this;} /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline const Aws::String& GetIntegerValue() const{ return m_integerValue; } /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline bool IntegerValueHasBeenSet() const { return m_integerValueHasBeenSet; } /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline void SetIntegerValue(const Aws::String& value) { m_integerValueHasBeenSet = true; m_integerValue = value; } /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline void SetIntegerValue(Aws::String&& value) { m_integerValueHasBeenSet = true; m_integerValue = std::move(value); } /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline void SetIntegerValue(const char* value) { m_integerValueHasBeenSet = true; m_integerValue.assign(value); } /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline AssetPropertyVariant& WithIntegerValue(const Aws::String& value) { SetIntegerValue(value); return *this;} /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline AssetPropertyVariant& WithIntegerValue(Aws::String&& value) { SetIntegerValue(std::move(value)); return *this;} /** *

The asset property value is an integer. You must use an expression, and the * evaluated result should be an integer.

*/ inline AssetPropertyVariant& WithIntegerValue(const char* value) { SetIntegerValue(value); return *this;} /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline const Aws::String& GetDoubleValue() const{ return m_doubleValue; } /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline bool DoubleValueHasBeenSet() const { return m_doubleValueHasBeenSet; } /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline void SetDoubleValue(const Aws::String& value) { m_doubleValueHasBeenSet = true; m_doubleValue = value; } /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline void SetDoubleValue(Aws::String&& value) { m_doubleValueHasBeenSet = true; m_doubleValue = std::move(value); } /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline void SetDoubleValue(const char* value) { m_doubleValueHasBeenSet = true; m_doubleValue.assign(value); } /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline AssetPropertyVariant& WithDoubleValue(const Aws::String& value) { SetDoubleValue(value); return *this;} /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline AssetPropertyVariant& WithDoubleValue(Aws::String&& value) { SetDoubleValue(std::move(value)); return *this;} /** *

The asset property value is a double. You must use an expression, and the * evaluated result should be a double.

*/ inline AssetPropertyVariant& WithDoubleValue(const char* value) { SetDoubleValue(value); return *this;} /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline const Aws::String& GetBooleanValue() const{ return m_booleanValue; } /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline bool BooleanValueHasBeenSet() const { return m_booleanValueHasBeenSet; } /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline void SetBooleanValue(const Aws::String& value) { m_booleanValueHasBeenSet = true; m_booleanValue = value; } /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline void SetBooleanValue(Aws::String&& value) { m_booleanValueHasBeenSet = true; m_booleanValue = std::move(value); } /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline void SetBooleanValue(const char* value) { m_booleanValueHasBeenSet = true; m_booleanValue.assign(value); } /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline AssetPropertyVariant& WithBooleanValue(const Aws::String& value) { SetBooleanValue(value); return *this;} /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline AssetPropertyVariant& WithBooleanValue(Aws::String&& value) { SetBooleanValue(std::move(value)); return *this;} /** *

The asset property value is a Boolean value that must be 'TRUE' * or 'FALSE'. You must use an expression, and the evaluated result * should be a Boolean value.

*/ inline AssetPropertyVariant& WithBooleanValue(const char* value) { SetBooleanValue(value); return *this;} private: Aws::String m_stringValue; bool m_stringValueHasBeenSet = false; Aws::String m_integerValue; bool m_integerValueHasBeenSet = false; Aws::String m_doubleValue; bool m_doubleValueHasBeenSet = false; Aws::String m_booleanValue; bool m_booleanValueHasBeenSet = false; }; } // namespace Model } // namespace IoTEvents } // namespace Aws