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

The value assigned to a feature variation. This structure must contain * exactly one field. It can be boolValue, doubleValue, * longValue, or stringValue.

See Also:

* AWS * API Reference

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

If this feature uses the Boolean variation type, this field contains the * Boolean value of this variation.

*/ inline bool GetBoolValue() const{ return m_boolValue; } /** *

If this feature uses the Boolean variation type, this field contains the * Boolean value of this variation.

*/ inline bool BoolValueHasBeenSet() const { return m_boolValueHasBeenSet; } /** *

If this feature uses the Boolean variation type, this field contains the * Boolean value of this variation.

*/ inline void SetBoolValue(bool value) { m_boolValueHasBeenSet = true; m_boolValue = value; } /** *

If this feature uses the Boolean variation type, this field contains the * Boolean value of this variation.

*/ inline VariableValue& WithBoolValue(bool value) { SetBoolValue(value); return *this;} /** *

If this feature uses the double integer variation type, this field contains * the double integer value of this variation.

*/ inline double GetDoubleValue() const{ return m_doubleValue; } /** *

If this feature uses the double integer variation type, this field contains * the double integer value of this variation.

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

If this feature uses the double integer variation type, this field contains * the double integer value of this variation.

*/ inline void SetDoubleValue(double value) { m_doubleValueHasBeenSet = true; m_doubleValue = value; } /** *

If this feature uses the double integer variation type, this field contains * the double integer value of this variation.

*/ inline VariableValue& WithDoubleValue(double value) { SetDoubleValue(value); return *this;} /** *

If this feature uses the long variation type, this field contains the long * value of this variation.

*/ inline long long GetLongValue() const{ return m_longValue; } /** *

If this feature uses the long variation type, this field contains the long * value of this variation.

*/ inline bool LongValueHasBeenSet() const { return m_longValueHasBeenSet; } /** *

If this feature uses the long variation type, this field contains the long * value of this variation.

*/ inline void SetLongValue(long long value) { m_longValueHasBeenSet = true; m_longValue = value; } /** *

If this feature uses the long variation type, this field contains the long * value of this variation.

*/ inline VariableValue& WithLongValue(long long value) { SetLongValue(value); return *this;} /** *

If this feature uses the string variation type, this field contains the * string value of this variation.

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

If this feature uses the string variation type, this field contains the * string value of this variation.

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

If this feature uses the string variation type, this field contains the * string value of this variation.

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

If this feature uses the string variation type, this field contains the * string value of this variation.

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

If this feature uses the string variation type, this field contains the * string value of this variation.

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

If this feature uses the string variation type, this field contains the * string value of this variation.

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

If this feature uses the string variation type, this field contains the * string value of this variation.

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

If this feature uses the string variation type, this field contains the * string value of this variation.

*/ inline VariableValue& WithStringValue(const char* value) { SetStringValue(value); return *this;} private: bool m_boolValue; bool m_boolValueHasBeenSet = false; double m_doubleValue; bool m_doubleValueHasBeenSet = false; long long m_longValue; bool m_longValueHasBeenSet = false; Aws::String m_stringValue; bool m_stringValueHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchEvidently } // namespace Aws