/** * 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 CreateFleetMetricRequest : public IoTRequest { public: AWS_IOT_API CreateFleetMetricRequest(); // 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 "CreateFleetMetric"; } AWS_IOT_API Aws::String SerializePayload() const override; /** *

The name of the fleet metric to create.

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

The name of the fleet metric to create.

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

The name of the fleet metric to create.

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

The name of the fleet metric to create.

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

The name of the fleet metric to create.

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

The name of the fleet metric to create.

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

The name of the fleet metric to create.

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

The name of the fleet metric to create.

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

The search query string.

*/ inline const Aws::String& GetQueryString() const{ return m_queryString; } /** *

The search query string.

*/ inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; } /** *

The search query string.

*/ inline void SetQueryString(const Aws::String& value) { m_queryStringHasBeenSet = true; m_queryString = value; } /** *

The search query string.

*/ inline void SetQueryString(Aws::String&& value) { m_queryStringHasBeenSet = true; m_queryString = std::move(value); } /** *

The search query string.

*/ inline void SetQueryString(const char* value) { m_queryStringHasBeenSet = true; m_queryString.assign(value); } /** *

The search query string.

*/ inline CreateFleetMetricRequest& WithQueryString(const Aws::String& value) { SetQueryString(value); return *this;} /** *

The search query string.

*/ inline CreateFleetMetricRequest& WithQueryString(Aws::String&& value) { SetQueryString(std::move(value)); return *this;} /** *

The search query string.

*/ inline CreateFleetMetricRequest& WithQueryString(const char* value) { SetQueryString(value); return *this;} /** *

The type of the aggregation query.

*/ inline const AggregationType& GetAggregationType() const{ return m_aggregationType; } /** *

The type of the aggregation query.

*/ inline bool AggregationTypeHasBeenSet() const { return m_aggregationTypeHasBeenSet; } /** *

The type of the aggregation query.

*/ inline void SetAggregationType(const AggregationType& value) { m_aggregationTypeHasBeenSet = true; m_aggregationType = value; } /** *

The type of the aggregation query.

*/ inline void SetAggregationType(AggregationType&& value) { m_aggregationTypeHasBeenSet = true; m_aggregationType = std::move(value); } /** *

The type of the aggregation query.

*/ inline CreateFleetMetricRequest& WithAggregationType(const AggregationType& value) { SetAggregationType(value); return *this;} /** *

The type of the aggregation query.

*/ inline CreateFleetMetricRequest& WithAggregationType(AggregationType&& value) { SetAggregationType(std::move(value)); return *this;} /** *

The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 * day)] and must be multiple of 60.

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

The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 * day)] and must be multiple of 60.

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

The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 * day)] and must be multiple of 60.

*/ inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; } /** *

The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 * day)] and must be multiple of 60.

*/ inline CreateFleetMetricRequest& WithPeriod(int value) { SetPeriod(value); return *this;} /** *

The field to aggregate.

*/ inline const Aws::String& GetAggregationField() const{ return m_aggregationField; } /** *

The field to aggregate.

*/ inline bool AggregationFieldHasBeenSet() const { return m_aggregationFieldHasBeenSet; } /** *

The field to aggregate.

*/ inline void SetAggregationField(const Aws::String& value) { m_aggregationFieldHasBeenSet = true; m_aggregationField = value; } /** *

The field to aggregate.

*/ inline void SetAggregationField(Aws::String&& value) { m_aggregationFieldHasBeenSet = true; m_aggregationField = std::move(value); } /** *

The field to aggregate.

*/ inline void SetAggregationField(const char* value) { m_aggregationFieldHasBeenSet = true; m_aggregationField.assign(value); } /** *

The field to aggregate.

*/ inline CreateFleetMetricRequest& WithAggregationField(const Aws::String& value) { SetAggregationField(value); return *this;} /** *

The field to aggregate.

*/ inline CreateFleetMetricRequest& WithAggregationField(Aws::String&& value) { SetAggregationField(std::move(value)); return *this;} /** *

The field to aggregate.

*/ inline CreateFleetMetricRequest& WithAggregationField(const char* value) { SetAggregationField(value); return *this;} /** *

The fleet metric description.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The fleet metric description.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The fleet metric description.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The fleet metric description.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The fleet metric description.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The fleet metric description.

*/ inline CreateFleetMetricRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The fleet metric description.

*/ inline CreateFleetMetricRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The fleet metric description.

*/ inline CreateFleetMetricRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The query version.

*/ inline const Aws::String& GetQueryVersion() const{ return m_queryVersion; } /** *

The query version.

*/ inline bool QueryVersionHasBeenSet() const { return m_queryVersionHasBeenSet; } /** *

The query version.

*/ inline void SetQueryVersion(const Aws::String& value) { m_queryVersionHasBeenSet = true; m_queryVersion = value; } /** *

The query version.

*/ inline void SetQueryVersion(Aws::String&& value) { m_queryVersionHasBeenSet = true; m_queryVersion = std::move(value); } /** *

The query version.

*/ inline void SetQueryVersion(const char* value) { m_queryVersionHasBeenSet = true; m_queryVersion.assign(value); } /** *

The query version.

*/ inline CreateFleetMetricRequest& WithQueryVersion(const Aws::String& value) { SetQueryVersion(value); return *this;} /** *

The query version.

*/ inline CreateFleetMetricRequest& WithQueryVersion(Aws::String&& value) { SetQueryVersion(std::move(value)); return *this;} /** *

The query version.

*/ inline CreateFleetMetricRequest& WithQueryVersion(const char* value) { SetQueryVersion(value); return *this;} /** *

The name of the index to search.

*/ inline const Aws::String& GetIndexName() const{ return m_indexName; } /** *

The name of the index to search.

*/ inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; } /** *

The name of the index to search.

*/ inline void SetIndexName(const Aws::String& value) { m_indexNameHasBeenSet = true; m_indexName = value; } /** *

The name of the index to search.

*/ inline void SetIndexName(Aws::String&& value) { m_indexNameHasBeenSet = true; m_indexName = std::move(value); } /** *

The name of the index to search.

*/ inline void SetIndexName(const char* value) { m_indexNameHasBeenSet = true; m_indexName.assign(value); } /** *

The name of the index to search.

*/ inline CreateFleetMetricRequest& WithIndexName(const Aws::String& value) { SetIndexName(value); return *this;} /** *

The name of the index to search.

*/ inline CreateFleetMetricRequest& WithIndexName(Aws::String&& value) { SetIndexName(std::move(value)); return *this;} /** *

The name of the index to search.

*/ inline CreateFleetMetricRequest& WithIndexName(const char* value) { SetIndexName(value); return *this;} /** *

Used to support unit transformation such as milliseconds to seconds. The unit * must be supported by CW * metric. Default to null.

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

Used to support unit transformation such as milliseconds to seconds. The unit * must be supported by CW * metric. Default to null.

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

Used to support unit transformation such as milliseconds to seconds. The unit * must be supported by CW * metric. Default to null.

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

Used to support unit transformation such as milliseconds to seconds. The unit * must be supported by CW * metric. Default to null.

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

Used to support unit transformation such as milliseconds to seconds. The unit * must be supported by CW * metric. Default to null.

*/ inline CreateFleetMetricRequest& WithUnit(const FleetMetricUnit& value) { SetUnit(value); return *this;} /** *

Used to support unit transformation such as milliseconds to seconds. The unit * must be supported by CW * metric. Default to null.

*/ inline CreateFleetMetricRequest& WithUnit(FleetMetricUnit&& value) { SetUnit(std::move(value)); return *this;} /** *

Metadata, which can be used to manage the fleet metric.

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

Metadata, which can be used to manage the fleet metric.

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

Metadata, which can be used to manage the fleet metric.

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

Metadata, which can be used to manage the fleet metric.

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

Metadata, which can be used to manage the fleet metric.

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

Metadata, which can be used to manage the fleet metric.

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

Metadata, which can be used to manage the fleet metric.

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

Metadata, which can be used to manage the fleet metric.

*/ inline CreateFleetMetricRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_queryString; bool m_queryStringHasBeenSet = false; AggregationType m_aggregationType; bool m_aggregationTypeHasBeenSet = false; int m_period; bool m_periodHasBeenSet = false; Aws::String m_aggregationField; bool m_aggregationFieldHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_queryVersion; bool m_queryVersionHasBeenSet = false; Aws::String m_indexName; bool m_indexNameHasBeenSet = false; FleetMetricUnit m_unit; bool m_unitHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws