/** * 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 LookoutMetrics { namespace Model { /** */ class CreateAlertRequest : public LookoutMetricsRequest { public: AWS_LOOKOUTMETRICS_API CreateAlertRequest(); // 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 "CreateAlert"; } AWS_LOOKOUTMETRICS_API Aws::String SerializePayload() const override; /** *

The name of the alert.

*/ inline const Aws::String& GetAlertName() const{ return m_alertName; } /** *

The name of the alert.

*/ inline bool AlertNameHasBeenSet() const { return m_alertNameHasBeenSet; } /** *

The name of the alert.

*/ inline void SetAlertName(const Aws::String& value) { m_alertNameHasBeenSet = true; m_alertName = value; } /** *

The name of the alert.

*/ inline void SetAlertName(Aws::String&& value) { m_alertNameHasBeenSet = true; m_alertName = std::move(value); } /** *

The name of the alert.

*/ inline void SetAlertName(const char* value) { m_alertNameHasBeenSet = true; m_alertName.assign(value); } /** *

The name of the alert.

*/ inline CreateAlertRequest& WithAlertName(const Aws::String& value) { SetAlertName(value); return *this;} /** *

The name of the alert.

*/ inline CreateAlertRequest& WithAlertName(Aws::String&& value) { SetAlertName(std::move(value)); return *this;} /** *

The name of the alert.

*/ inline CreateAlertRequest& WithAlertName(const char* value) { SetAlertName(value); return *this;} /** *

An integer from 0 to 100 specifying the alert sensitivity threshold.

*/ inline int GetAlertSensitivityThreshold() const{ return m_alertSensitivityThreshold; } /** *

An integer from 0 to 100 specifying the alert sensitivity threshold.

*/ inline bool AlertSensitivityThresholdHasBeenSet() const { return m_alertSensitivityThresholdHasBeenSet; } /** *

An integer from 0 to 100 specifying the alert sensitivity threshold.

*/ inline void SetAlertSensitivityThreshold(int value) { m_alertSensitivityThresholdHasBeenSet = true; m_alertSensitivityThreshold = value; } /** *

An integer from 0 to 100 specifying the alert sensitivity threshold.

*/ inline CreateAlertRequest& WithAlertSensitivityThreshold(int value) { SetAlertSensitivityThreshold(value); return *this;} /** *

A description of the alert.

*/ inline const Aws::String& GetAlertDescription() const{ return m_alertDescription; } /** *

A description of the alert.

*/ inline bool AlertDescriptionHasBeenSet() const { return m_alertDescriptionHasBeenSet; } /** *

A description of the alert.

*/ inline void SetAlertDescription(const Aws::String& value) { m_alertDescriptionHasBeenSet = true; m_alertDescription = value; } /** *

A description of the alert.

*/ inline void SetAlertDescription(Aws::String&& value) { m_alertDescriptionHasBeenSet = true; m_alertDescription = std::move(value); } /** *

A description of the alert.

*/ inline void SetAlertDescription(const char* value) { m_alertDescriptionHasBeenSet = true; m_alertDescription.assign(value); } /** *

A description of the alert.

*/ inline CreateAlertRequest& WithAlertDescription(const Aws::String& value) { SetAlertDescription(value); return *this;} /** *

A description of the alert.

*/ inline CreateAlertRequest& WithAlertDescription(Aws::String&& value) { SetAlertDescription(std::move(value)); return *this;} /** *

A description of the alert.

*/ inline CreateAlertRequest& WithAlertDescription(const char* value) { SetAlertDescription(value); return *this;} /** *

The ARN of the detector to which the alert is attached.

*/ inline const Aws::String& GetAnomalyDetectorArn() const{ return m_anomalyDetectorArn; } /** *

The ARN of the detector to which the alert is attached.

*/ inline bool AnomalyDetectorArnHasBeenSet() const { return m_anomalyDetectorArnHasBeenSet; } /** *

The ARN of the detector to which the alert is attached.

*/ inline void SetAnomalyDetectorArn(const Aws::String& value) { m_anomalyDetectorArnHasBeenSet = true; m_anomalyDetectorArn = value; } /** *

The ARN of the detector to which the alert is attached.

*/ inline void SetAnomalyDetectorArn(Aws::String&& value) { m_anomalyDetectorArnHasBeenSet = true; m_anomalyDetectorArn = std::move(value); } /** *

The ARN of the detector to which the alert is attached.

*/ inline void SetAnomalyDetectorArn(const char* value) { m_anomalyDetectorArnHasBeenSet = true; m_anomalyDetectorArn.assign(value); } /** *

The ARN of the detector to which the alert is attached.

*/ inline CreateAlertRequest& WithAnomalyDetectorArn(const Aws::String& value) { SetAnomalyDetectorArn(value); return *this;} /** *

The ARN of the detector to which the alert is attached.

*/ inline CreateAlertRequest& WithAnomalyDetectorArn(Aws::String&& value) { SetAnomalyDetectorArn(std::move(value)); return *this;} /** *

The ARN of the detector to which the alert is attached.

*/ inline CreateAlertRequest& WithAnomalyDetectorArn(const char* value) { SetAnomalyDetectorArn(value); return *this;} /** *

Action that will be triggered when there is an alert.

*/ inline const Action& GetAction() const{ return m_action; } /** *

Action that will be triggered when there is an alert.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

Action that will be triggered when there is an alert.

*/ inline void SetAction(const Action& value) { m_actionHasBeenSet = true; m_action = value; } /** *

Action that will be triggered when there is an alert.

*/ inline void SetAction(Action&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

Action that will be triggered when there is an alert.

*/ inline CreateAlertRequest& WithAction(const Action& value) { SetAction(value); return *this;} /** *

Action that will be triggered when there is an alert.

*/ inline CreateAlertRequest& WithAction(Action&& value) { SetAction(std::move(value)); return *this;} /** *

A list of tags * to apply to the alert.

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

A list of tags * to apply to the alert.

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

A list of tags * to apply to the alert.

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

A list of tags * to apply to the alert.

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

A list of tags * to apply to the alert.

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

A list of tags * to apply to the alert.

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

A list of tags * to apply to the alert.

*/ inline CreateAlertRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

A list of tags * to apply to the alert.

*/ inline CreateAlertRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

A list of tags * to apply to the alert.

*/ inline CreateAlertRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

A list of tags * to apply to the alert.

*/ inline CreateAlertRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

A list of tags * to apply to the alert.

*/ inline CreateAlertRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

A list of tags * to apply to the alert.

*/ inline CreateAlertRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

A list of tags * to apply to the alert.

*/ inline CreateAlertRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The configuration of the alert filters, containing MetricList and * DimensionFilterList.

*/ inline const AlertFilters& GetAlertFilters() const{ return m_alertFilters; } /** *

The configuration of the alert filters, containing MetricList and * DimensionFilterList.

*/ inline bool AlertFiltersHasBeenSet() const { return m_alertFiltersHasBeenSet; } /** *

The configuration of the alert filters, containing MetricList and * DimensionFilterList.

*/ inline void SetAlertFilters(const AlertFilters& value) { m_alertFiltersHasBeenSet = true; m_alertFilters = value; } /** *

The configuration of the alert filters, containing MetricList and * DimensionFilterList.

*/ inline void SetAlertFilters(AlertFilters&& value) { m_alertFiltersHasBeenSet = true; m_alertFilters = std::move(value); } /** *

The configuration of the alert filters, containing MetricList and * DimensionFilterList.

*/ inline CreateAlertRequest& WithAlertFilters(const AlertFilters& value) { SetAlertFilters(value); return *this;} /** *

The configuration of the alert filters, containing MetricList and * DimensionFilterList.

*/ inline CreateAlertRequest& WithAlertFilters(AlertFilters&& value) { SetAlertFilters(std::move(value)); return *this;} private: Aws::String m_alertName; bool m_alertNameHasBeenSet = false; int m_alertSensitivityThreshold; bool m_alertSensitivityThresholdHasBeenSet = false; Aws::String m_alertDescription; bool m_alertDescriptionHasBeenSet = false; Aws::String m_anomalyDetectorArn; bool m_anomalyDetectorArnHasBeenSet = false; Action m_action; bool m_actionHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; AlertFilters m_alertFilters; bool m_alertFiltersHasBeenSet = false; }; } // namespace Model } // namespace LookoutMetrics } // namespace Aws