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

Describes an Infrastructure Performance subscription.

See * Also:

AWS * API Reference

*/ class Subscription { public: AWS_EC2_API Subscription(); AWS_EC2_API Subscription(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API Subscription& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline const Aws::String& GetSource() const{ return m_source; } /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; } /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline void SetSource(const Aws::String& value) { m_sourceHasBeenSet = true; m_source = value; } /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline void SetSource(Aws::String&& value) { m_sourceHasBeenSet = true; m_source = std::move(value); } /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline void SetSource(const char* value) { m_sourceHasBeenSet = true; m_source.assign(value); } /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline Subscription& WithSource(const Aws::String& value) { SetSource(value); return *this;} /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline Subscription& WithSource(Aws::String&& value) { SetSource(std::move(value)); return *this;} /** *

The Region or Availability Zone that's the source for the subscription. For * example, us-east-1.

*/ inline Subscription& WithSource(const char* value) { SetSource(value); return *this;} /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline const Aws::String& GetDestination() const{ return m_destination; } /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline bool DestinationHasBeenSet() const { return m_destinationHasBeenSet; } /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline void SetDestination(const Aws::String& value) { m_destinationHasBeenSet = true; m_destination = value; } /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline void SetDestination(Aws::String&& value) { m_destinationHasBeenSet = true; m_destination = std::move(value); } /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline void SetDestination(const char* value) { m_destinationHasBeenSet = true; m_destination.assign(value); } /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline Subscription& WithDestination(const Aws::String& value) { SetDestination(value); return *this;} /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline Subscription& WithDestination(Aws::String&& value) { SetDestination(std::move(value)); return *this;} /** *

The Region or Availability Zone that's the target for the subscription. For * example, eu-west-1.

*/ inline Subscription& WithDestination(const char* value) { SetDestination(value); return *this;} /** *

The metric used for the subscription.

*/ inline const MetricType& GetMetric() const{ return m_metric; } /** *

The metric used for the subscription.

*/ inline bool MetricHasBeenSet() const { return m_metricHasBeenSet; } /** *

The metric used for the subscription.

*/ inline void SetMetric(const MetricType& value) { m_metricHasBeenSet = true; m_metric = value; } /** *

The metric used for the subscription.

*/ inline void SetMetric(MetricType&& value) { m_metricHasBeenSet = true; m_metric = std::move(value); } /** *

The metric used for the subscription.

*/ inline Subscription& WithMetric(const MetricType& value) { SetMetric(value); return *this;} /** *

The metric used for the subscription.

*/ inline Subscription& WithMetric(MetricType&& value) { SetMetric(std::move(value)); return *this;} /** *

The statistic used for the subscription.

*/ inline const StatisticType& GetStatistic() const{ return m_statistic; } /** *

The statistic used for the subscription.

*/ inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; } /** *

The statistic used for the subscription.

*/ inline void SetStatistic(const StatisticType& value) { m_statisticHasBeenSet = true; m_statistic = value; } /** *

The statistic used for the subscription.

*/ inline void SetStatistic(StatisticType&& value) { m_statisticHasBeenSet = true; m_statistic = std::move(value); } /** *

The statistic used for the subscription.

*/ inline Subscription& WithStatistic(const StatisticType& value) { SetStatistic(value); return *this;} /** *

The statistic used for the subscription.

*/ inline Subscription& WithStatistic(StatisticType&& value) { SetStatistic(std::move(value)); return *this;} /** *

The data aggregation time for the subscription.

*/ inline const PeriodType& GetPeriod() const{ return m_period; } /** *

The data aggregation time for the subscription.

*/ inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; } /** *

The data aggregation time for the subscription.

*/ inline void SetPeriod(const PeriodType& value) { m_periodHasBeenSet = true; m_period = value; } /** *

The data aggregation time for the subscription.

*/ inline void SetPeriod(PeriodType&& value) { m_periodHasBeenSet = true; m_period = std::move(value); } /** *

The data aggregation time for the subscription.

*/ inline Subscription& WithPeriod(const PeriodType& value) { SetPeriod(value); return *this;} /** *

The data aggregation time for the subscription.

*/ inline Subscription& WithPeriod(PeriodType&& value) { SetPeriod(std::move(value)); return *this;} private: Aws::String m_source; bool m_sourceHasBeenSet = false; Aws::String m_destination; bool m_destinationHasBeenSet = false; MetricType m_metric; bool m_metricHasBeenSet = false; StatisticType m_statistic; bool m_statisticHasBeenSet = false; PeriodType m_period; bool m_periodHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws