/** * 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 #include namespace Aws { namespace IoT { namespace Model { /** */ class CreateCustomMetricRequest : public IoTRequest { public: AWS_IOT_API CreateCustomMetricRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateCustomMetric"; } AWS_IOT_API Aws::String SerializePayload() const override; /** *

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The name of the custom metric. This will be used in the metric report * submitted from the device/thing. The name can't begin with aws:. * You can't change the name after you define it.

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

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline const Aws::String& GetDisplayName() const{ return m_displayName; } /** *

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline bool DisplayNameHasBeenSet() const { return m_displayNameHasBeenSet; } /** *

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline void SetDisplayName(const Aws::String& value) { m_displayNameHasBeenSet = true; m_displayName = value; } /** *

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline void SetDisplayName(Aws::String&& value) { m_displayNameHasBeenSet = true; m_displayName = std::move(value); } /** *

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline void SetDisplayName(const char* value) { m_displayNameHasBeenSet = true; m_displayName.assign(value); } /** *

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline CreateCustomMetricRequest& WithDisplayName(const Aws::String& value) { SetDisplayName(value); return *this;} /** *

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline CreateCustomMetricRequest& WithDisplayName(Aws::String&& value) { SetDisplayName(std::move(value)); return *this;} /** *

The friendly name in the console for the custom metric. This name doesn't * have to be unique. Don't use this name as the metric identifier in the device * metric report. You can update the friendly name after you define it.

*/ inline CreateCustomMetricRequest& WithDisplayName(const char* value) { SetDisplayName(value); return *this;} /** *

The type of the custom metric.

The type * number only takes a single metric value as an input, but when you * submit the metrics value in the DeviceMetrics report, you must pass it as an * array with a single value.

*/ inline const CustomMetricType& GetMetricType() const{ return m_metricType; } /** *

The type of the custom metric.

The type * number only takes a single metric value as an input, but when you * submit the metrics value in the DeviceMetrics report, you must pass it as an * array with a single value.

*/ inline bool MetricTypeHasBeenSet() const { return m_metricTypeHasBeenSet; } /** *

The type of the custom metric.

The type * number only takes a single metric value as an input, but when you * submit the metrics value in the DeviceMetrics report, you must pass it as an * array with a single value.

*/ inline void SetMetricType(const CustomMetricType& value) { m_metricTypeHasBeenSet = true; m_metricType = value; } /** *

The type of the custom metric.

The type * number only takes a single metric value as an input, but when you * submit the metrics value in the DeviceMetrics report, you must pass it as an * array with a single value.

*/ inline void SetMetricType(CustomMetricType&& value) { m_metricTypeHasBeenSet = true; m_metricType = std::move(value); } /** *

The type of the custom metric.

The type * number only takes a single metric value as an input, but when you * submit the metrics value in the DeviceMetrics report, you must pass it as an * array with a single value.

*/ inline CreateCustomMetricRequest& WithMetricType(const CustomMetricType& value) { SetMetricType(value); return *this;} /** *

The type of the custom metric.

The type * number only takes a single metric value as an input, but when you * submit the metrics value in the DeviceMetrics report, you must pass it as an * array with a single value.

*/ inline CreateCustomMetricRequest& WithMetricType(CustomMetricType&& value) { SetMetricType(std::move(value)); return *this;} /** *

Metadata that can be used to manage the custom metric.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Metadata that can be used to manage the custom metric.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Metadata that can be used to manage the custom metric.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Metadata that can be used to manage the custom metric.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Metadata that can be used to manage the custom metric.

*/ inline CreateCustomMetricRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Metadata that can be used to manage the custom metric.

*/ inline CreateCustomMetricRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Metadata that can be used to manage the custom metric.

*/ inline CreateCustomMetricRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Metadata that can be used to manage the custom metric.

*/ inline CreateCustomMetricRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline CreateCustomMetricRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline CreateCustomMetricRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} /** *

Each custom metric must have a unique client request token. If you try to * create a new custom metric that already exists with a different token, an * exception occurs. If you omit this value, Amazon Web Services SDKs will * automatically generate a unique client request.

*/ inline CreateCustomMetricRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} private: Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_displayName; bool m_displayNameHasBeenSet = false; CustomMetricType m_metricType; bool m_metricTypeHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws