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

Describes the metric data point.

See Also:

AWS * API Reference

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

The average.

*/ inline double GetAverage() const{ return m_average; } /** *

The average.

*/ inline bool AverageHasBeenSet() const { return m_averageHasBeenSet; } /** *

The average.

*/ inline void SetAverage(double value) { m_averageHasBeenSet = true; m_average = value; } /** *

The average.

*/ inline MetricDatapoint& WithAverage(double value) { SetAverage(value); return *this;} /** *

The maximum.

*/ inline double GetMaximum() const{ return m_maximum; } /** *

The maximum.

*/ inline bool MaximumHasBeenSet() const { return m_maximumHasBeenSet; } /** *

The maximum.

*/ inline void SetMaximum(double value) { m_maximumHasBeenSet = true; m_maximum = value; } /** *

The maximum.

*/ inline MetricDatapoint& WithMaximum(double value) { SetMaximum(value); return *this;} /** *

The minimum.

*/ inline double GetMinimum() const{ return m_minimum; } /** *

The minimum.

*/ inline bool MinimumHasBeenSet() const { return m_minimumHasBeenSet; } /** *

The minimum.

*/ inline void SetMinimum(double value) { m_minimumHasBeenSet = true; m_minimum = value; } /** *

The minimum.

*/ inline MetricDatapoint& WithMinimum(double value) { SetMinimum(value); return *this;} /** *

The sample count.

*/ inline double GetSampleCount() const{ return m_sampleCount; } /** *

The sample count.

*/ inline bool SampleCountHasBeenSet() const { return m_sampleCountHasBeenSet; } /** *

The sample count.

*/ inline void SetSampleCount(double value) { m_sampleCountHasBeenSet = true; m_sampleCount = value; } /** *

The sample count.

*/ inline MetricDatapoint& WithSampleCount(double value) { SetSampleCount(value); return *this;} /** *

The sum.

*/ inline double GetSum() const{ return m_sum; } /** *

The sum.

*/ inline bool SumHasBeenSet() const { return m_sumHasBeenSet; } /** *

The sum.

*/ inline void SetSum(double value) { m_sumHasBeenSet = true; m_sum = value; } /** *

The sum.

*/ inline MetricDatapoint& WithSum(double value) { SetSum(value); return *this;} /** *

The timestamp (e.g., 1479816991.349).

*/ inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; } /** *

The timestamp (e.g., 1479816991.349).

*/ inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } /** *

The timestamp (e.g., 1479816991.349).

*/ inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; } /** *

The timestamp (e.g., 1479816991.349).

*/ inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); } /** *

The timestamp (e.g., 1479816991.349).

*/ inline MetricDatapoint& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;} /** *

The timestamp (e.g., 1479816991.349).

*/ inline MetricDatapoint& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;} /** *

The unit.

*/ inline const MetricUnit& GetUnit() const{ return m_unit; } /** *

The unit.

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

The unit.

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

The unit.

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

The unit.

*/ inline MetricDatapoint& WithUnit(const MetricUnit& value) { SetUnit(value); return *this;} /** *

The unit.

*/ inline MetricDatapoint& WithUnit(MetricUnit&& value) { SetUnit(std::move(value)); return *this;} private: double m_average; bool m_averageHasBeenSet = false; double m_maximum; bool m_maximumHasBeenSet = false; double m_minimum; bool m_minimumHasBeenSet = false; double m_sampleCount; bool m_sampleCountHasBeenSet = false; double m_sum; bool m_sumHasBeenSet = false; Aws::Utils::DateTime m_timestamp; bool m_timestampHasBeenSet = false; MetricUnit m_unit; bool m_unitHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws