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

Describes an action that captures a CloudWatch metric.

See * Also:

AWS * API Reference

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

The IAM role that allows access to the CloudWatch metric.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The IAM role that allows access to the CloudWatch metric.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The IAM role that allows access to the CloudWatch metric.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The IAM role that allows access to the CloudWatch metric.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The IAM role that allows access to the CloudWatch metric.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The IAM role that allows access to the CloudWatch metric.

*/ inline CloudwatchMetricAction& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The IAM role that allows access to the CloudWatch metric.

*/ inline CloudwatchMetricAction& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The IAM role that allows access to the CloudWatch metric.

*/ inline CloudwatchMetricAction& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

The CloudWatch metric namespace name.

*/ inline const Aws::String& GetMetricNamespace() const{ return m_metricNamespace; } /** *

The CloudWatch metric namespace name.

*/ inline bool MetricNamespaceHasBeenSet() const { return m_metricNamespaceHasBeenSet; } /** *

The CloudWatch metric namespace name.

*/ inline void SetMetricNamespace(const Aws::String& value) { m_metricNamespaceHasBeenSet = true; m_metricNamespace = value; } /** *

The CloudWatch metric namespace name.

*/ inline void SetMetricNamespace(Aws::String&& value) { m_metricNamespaceHasBeenSet = true; m_metricNamespace = std::move(value); } /** *

The CloudWatch metric namespace name.

*/ inline void SetMetricNamespace(const char* value) { m_metricNamespaceHasBeenSet = true; m_metricNamespace.assign(value); } /** *

The CloudWatch metric namespace name.

*/ inline CloudwatchMetricAction& WithMetricNamespace(const Aws::String& value) { SetMetricNamespace(value); return *this;} /** *

The CloudWatch metric namespace name.

*/ inline CloudwatchMetricAction& WithMetricNamespace(Aws::String&& value) { SetMetricNamespace(std::move(value)); return *this;} /** *

The CloudWatch metric namespace name.

*/ inline CloudwatchMetricAction& WithMetricNamespace(const char* value) { SetMetricNamespace(value); return *this;} /** *

The CloudWatch metric name.

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

The CloudWatch metric name.

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

The CloudWatch metric name.

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

The CloudWatch metric name.

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

The CloudWatch metric name.

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

The CloudWatch metric name.

*/ inline CloudwatchMetricAction& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

The CloudWatch metric name.

*/ inline CloudwatchMetricAction& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

The CloudWatch metric name.

*/ inline CloudwatchMetricAction& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *

The CloudWatch metric value.

*/ inline const Aws::String& GetMetricValue() const{ return m_metricValue; } /** *

The CloudWatch metric value.

*/ inline bool MetricValueHasBeenSet() const { return m_metricValueHasBeenSet; } /** *

The CloudWatch metric value.

*/ inline void SetMetricValue(const Aws::String& value) { m_metricValueHasBeenSet = true; m_metricValue = value; } /** *

The CloudWatch metric value.

*/ inline void SetMetricValue(Aws::String&& value) { m_metricValueHasBeenSet = true; m_metricValue = std::move(value); } /** *

The CloudWatch metric value.

*/ inline void SetMetricValue(const char* value) { m_metricValueHasBeenSet = true; m_metricValue.assign(value); } /** *

The CloudWatch metric value.

*/ inline CloudwatchMetricAction& WithMetricValue(const Aws::String& value) { SetMetricValue(value); return *this;} /** *

The CloudWatch metric value.

*/ inline CloudwatchMetricAction& WithMetricValue(Aws::String&& value) { SetMetricValue(std::move(value)); return *this;} /** *

The CloudWatch metric value.

*/ inline CloudwatchMetricAction& WithMetricValue(const char* value) { SetMetricValue(value); return *this;} /** *

The metric * unit supported by CloudWatch.

*/ inline const Aws::String& GetMetricUnit() const{ return m_metricUnit; } /** *

The metric * unit supported by CloudWatch.

*/ inline bool MetricUnitHasBeenSet() const { return m_metricUnitHasBeenSet; } /** *

The metric * unit supported by CloudWatch.

*/ inline void SetMetricUnit(const Aws::String& value) { m_metricUnitHasBeenSet = true; m_metricUnit = value; } /** *

The metric * unit supported by CloudWatch.

*/ inline void SetMetricUnit(Aws::String&& value) { m_metricUnitHasBeenSet = true; m_metricUnit = std::move(value); } /** *

The metric * unit supported by CloudWatch.

*/ inline void SetMetricUnit(const char* value) { m_metricUnitHasBeenSet = true; m_metricUnit.assign(value); } /** *

The metric * unit supported by CloudWatch.

*/ inline CloudwatchMetricAction& WithMetricUnit(const Aws::String& value) { SetMetricUnit(value); return *this;} /** *

The metric * unit supported by CloudWatch.

*/ inline CloudwatchMetricAction& WithMetricUnit(Aws::String&& value) { SetMetricUnit(std::move(value)); return *this;} /** *

The metric * unit supported by CloudWatch.

*/ inline CloudwatchMetricAction& WithMetricUnit(const char* value) { SetMetricUnit(value); return *this;} /** *

An optional Unix * timestamp.

*/ inline const Aws::String& GetMetricTimestamp() const{ return m_metricTimestamp; } /** *

An optional Unix * timestamp.

*/ inline bool MetricTimestampHasBeenSet() const { return m_metricTimestampHasBeenSet; } /** *

An optional Unix * timestamp.

*/ inline void SetMetricTimestamp(const Aws::String& value) { m_metricTimestampHasBeenSet = true; m_metricTimestamp = value; } /** *

An optional Unix * timestamp.

*/ inline void SetMetricTimestamp(Aws::String&& value) { m_metricTimestampHasBeenSet = true; m_metricTimestamp = std::move(value); } /** *

An optional Unix * timestamp.

*/ inline void SetMetricTimestamp(const char* value) { m_metricTimestampHasBeenSet = true; m_metricTimestamp.assign(value); } /** *

An optional Unix * timestamp.

*/ inline CloudwatchMetricAction& WithMetricTimestamp(const Aws::String& value) { SetMetricTimestamp(value); return *this;} /** *

An optional Unix * timestamp.

*/ inline CloudwatchMetricAction& WithMetricTimestamp(Aws::String&& value) { SetMetricTimestamp(std::move(value)); return *this;} /** *

An optional Unix * timestamp.

*/ inline CloudwatchMetricAction& WithMetricTimestamp(const char* value) { SetMetricTimestamp(value); return *this;} private: Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::String m_metricNamespace; bool m_metricNamespaceHasBeenSet = false; Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_metricValue; bool m_metricValueHasBeenSet = false; Aws::String m_metricUnit; bool m_metricUnitHasBeenSet = false; Aws::String m_metricTimestamp; bool m_metricTimestampHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws