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

The value to be compared with the metric.

See * Also:

AWS API * Reference

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

If the comparisonOperator calls for a numeric value, use this to * specify that numeric value to be compared with the metric.

*/ inline long long GetCount() const{ return m_count; } /** *

If the comparisonOperator calls for a numeric value, use this to * specify that numeric value to be compared with the metric.

*/ inline bool CountHasBeenSet() const { return m_countHasBeenSet; } /** *

If the comparisonOperator calls for a numeric value, use this to * specify that numeric value to be compared with the metric.

*/ inline void SetCount(long long value) { m_countHasBeenSet = true; m_count = value; } /** *

If the comparisonOperator calls for a numeric value, use this to * specify that numeric value to be compared with the metric.

*/ inline MetricValue& WithCount(long long value) { SetCount(value); return *this;} /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline const Aws::Vector& GetCidrs() const{ return m_cidrs; } /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline bool CidrsHasBeenSet() const { return m_cidrsHasBeenSet; } /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline void SetCidrs(const Aws::Vector& value) { m_cidrsHasBeenSet = true; m_cidrs = value; } /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline void SetCidrs(Aws::Vector&& value) { m_cidrsHasBeenSet = true; m_cidrs = std::move(value); } /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& WithCidrs(const Aws::Vector& value) { SetCidrs(value); return *this;} /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& WithCidrs(Aws::Vector&& value) { SetCidrs(std::move(value)); return *this;} /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& AddCidrs(const Aws::String& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; } /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& AddCidrs(Aws::String&& value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(std::move(value)); return *this; } /** *

If the comparisonOperator calls for a set of CIDRs, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& AddCidrs(const char* value) { m_cidrsHasBeenSet = true; m_cidrs.push_back(value); return *this; } /** *

If the comparisonOperator calls for a set of ports, use this to * specify that set to be compared with the metric.

*/ inline const Aws::Vector& GetPorts() const{ return m_ports; } /** *

If the comparisonOperator calls for a set of ports, use this to * specify that set to be compared with the metric.

*/ inline bool PortsHasBeenSet() const { return m_portsHasBeenSet; } /** *

If the comparisonOperator calls for a set of ports, use this to * specify that set to be compared with the metric.

*/ inline void SetPorts(const Aws::Vector& value) { m_portsHasBeenSet = true; m_ports = value; } /** *

If the comparisonOperator calls for a set of ports, use this to * specify that set to be compared with the metric.

*/ inline void SetPorts(Aws::Vector&& value) { m_portsHasBeenSet = true; m_ports = std::move(value); } /** *

If the comparisonOperator calls for a set of ports, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& WithPorts(const Aws::Vector& value) { SetPorts(value); return *this;} /** *

If the comparisonOperator calls for a set of ports, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& WithPorts(Aws::Vector&& value) { SetPorts(std::move(value)); return *this;} /** *

If the comparisonOperator calls for a set of ports, use this to * specify that set to be compared with the metric.

*/ inline MetricValue& AddPorts(int value) { m_portsHasBeenSet = true; m_ports.push_back(value); return *this; } /** *

The numeral value of a metric.

*/ inline double GetNumber() const{ return m_number; } /** *

The numeral value of a metric.

*/ inline bool NumberHasBeenSet() const { return m_numberHasBeenSet; } /** *

The numeral value of a metric.

*/ inline void SetNumber(double value) { m_numberHasBeenSet = true; m_number = value; } /** *

The numeral value of a metric.

*/ inline MetricValue& WithNumber(double value) { SetNumber(value); return *this;} /** *

The numeral values of a metric.

*/ inline const Aws::Vector& GetNumbers() const{ return m_numbers; } /** *

The numeral values of a metric.

*/ inline bool NumbersHasBeenSet() const { return m_numbersHasBeenSet; } /** *

The numeral values of a metric.

*/ inline void SetNumbers(const Aws::Vector& value) { m_numbersHasBeenSet = true; m_numbers = value; } /** *

The numeral values of a metric.

*/ inline void SetNumbers(Aws::Vector&& value) { m_numbersHasBeenSet = true; m_numbers = std::move(value); } /** *

The numeral values of a metric.

*/ inline MetricValue& WithNumbers(const Aws::Vector& value) { SetNumbers(value); return *this;} /** *

The numeral values of a metric.

*/ inline MetricValue& WithNumbers(Aws::Vector&& value) { SetNumbers(std::move(value)); return *this;} /** *

The numeral values of a metric.

*/ inline MetricValue& AddNumbers(double value) { m_numbersHasBeenSet = true; m_numbers.push_back(value); return *this; } /** *

The string values of a metric.

*/ inline const Aws::Vector& GetStrings() const{ return m_strings; } /** *

The string values of a metric.

*/ inline bool StringsHasBeenSet() const { return m_stringsHasBeenSet; } /** *

The string values of a metric.

*/ inline void SetStrings(const Aws::Vector& value) { m_stringsHasBeenSet = true; m_strings = value; } /** *

The string values of a metric.

*/ inline void SetStrings(Aws::Vector&& value) { m_stringsHasBeenSet = true; m_strings = std::move(value); } /** *

The string values of a metric.

*/ inline MetricValue& WithStrings(const Aws::Vector& value) { SetStrings(value); return *this;} /** *

The string values of a metric.

*/ inline MetricValue& WithStrings(Aws::Vector&& value) { SetStrings(std::move(value)); return *this;} /** *

The string values of a metric.

*/ inline MetricValue& AddStrings(const Aws::String& value) { m_stringsHasBeenSet = true; m_strings.push_back(value); return *this; } /** *

The string values of a metric.

*/ inline MetricValue& AddStrings(Aws::String&& value) { m_stringsHasBeenSet = true; m_strings.push_back(std::move(value)); return *this; } /** *

The string values of a metric.

*/ inline MetricValue& AddStrings(const char* value) { m_stringsHasBeenSet = true; m_strings.push_back(value); return *this; } private: long long m_count; bool m_countHasBeenSet = false; Aws::Vector m_cidrs; bool m_cidrsHasBeenSet = false; Aws::Vector m_ports; bool m_portsHasBeenSet = false; double m_number; bool m_numberHasBeenSet = false; Aws::Vector m_numbers; bool m_numbersHasBeenSet = false; Aws::Vector m_strings; bool m_stringsHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws