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

The criteria by which the behavior is determined to be normal.

See * Also:

AWS * API Reference

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

The operator that relates the thing measured (metric) to the * criteria (containing a value or statisticalThreshold). * Valid operators include:

  • string-list: * in-set and not-in-set

  • * number-list: in-set and not-in-set

    *
  • ip-address-list: in-cidr-set and * not-in-cidr-set

  • number: * less-than, less-than-equals, * greater-than, and greater-than-equals

*/ inline const ComparisonOperator& GetComparisonOperator() const{ return m_comparisonOperator; } /** *

The operator that relates the thing measured (metric) to the * criteria (containing a value or statisticalThreshold). * Valid operators include:

  • string-list: * in-set and not-in-set

  • * number-list: in-set and not-in-set

    *
  • ip-address-list: in-cidr-set and * not-in-cidr-set

  • number: * less-than, less-than-equals, * greater-than, and greater-than-equals

*/ inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; } /** *

The operator that relates the thing measured (metric) to the * criteria (containing a value or statisticalThreshold). * Valid operators include:

  • string-list: * in-set and not-in-set

  • * number-list: in-set and not-in-set

    *
  • ip-address-list: in-cidr-set and * not-in-cidr-set

  • number: * less-than, less-than-equals, * greater-than, and greater-than-equals

*/ inline void SetComparisonOperator(const ComparisonOperator& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; } /** *

The operator that relates the thing measured (metric) to the * criteria (containing a value or statisticalThreshold). * Valid operators include:

  • string-list: * in-set and not-in-set

  • * number-list: in-set and not-in-set

    *
  • ip-address-list: in-cidr-set and * not-in-cidr-set

  • number: * less-than, less-than-equals, * greater-than, and greater-than-equals

*/ inline void SetComparisonOperator(ComparisonOperator&& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = std::move(value); } /** *

The operator that relates the thing measured (metric) to the * criteria (containing a value or statisticalThreshold). * Valid operators include:

  • string-list: * in-set and not-in-set

  • * number-list: in-set and not-in-set

    *
  • ip-address-list: in-cidr-set and * not-in-cidr-set

  • number: * less-than, less-than-equals, * greater-than, and greater-than-equals

*/ inline BehaviorCriteria& WithComparisonOperator(const ComparisonOperator& value) { SetComparisonOperator(value); return *this;} /** *

The operator that relates the thing measured (metric) to the * criteria (containing a value or statisticalThreshold). * Valid operators include:

  • string-list: * in-set and not-in-set

  • * number-list: in-set and not-in-set

    *
  • ip-address-list: in-cidr-set and * not-in-cidr-set

  • number: * less-than, less-than-equals, * greater-than, and greater-than-equals

*/ inline BehaviorCriteria& WithComparisonOperator(ComparisonOperator&& value) { SetComparisonOperator(std::move(value)); return *this;} /** *

The value to be compared with the metric.

*/ inline const MetricValue& GetValue() const{ return m_value; } /** *

The value to be compared with the metric.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The value to be compared with the metric.

*/ inline void SetValue(const MetricValue& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The value to be compared with the metric.

*/ inline void SetValue(MetricValue&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The value to be compared with the metric.

*/ inline BehaviorCriteria& WithValue(const MetricValue& value) { SetValue(value); return *this;} /** *

The value to be compared with the metric.

*/ inline BehaviorCriteria& WithValue(MetricValue&& value) { SetValue(std::move(value)); return *this;} /** *

Use this to specify the time duration over which the behavior is evaluated, * for those criteria that have a time dimension (for example, * NUM_MESSAGES_SENT). For a statisticalThreshhold metric * comparison, measurements from all devices are accumulated over this time * duration before being used to calculate percentiles, and later, measurements * from an individual device are also accumulated over this time duration before * being given a percentile rank. Cannot be used with list-based metric * datatypes.

*/ inline int GetDurationSeconds() const{ return m_durationSeconds; } /** *

Use this to specify the time duration over which the behavior is evaluated, * for those criteria that have a time dimension (for example, * NUM_MESSAGES_SENT). For a statisticalThreshhold metric * comparison, measurements from all devices are accumulated over this time * duration before being used to calculate percentiles, and later, measurements * from an individual device are also accumulated over this time duration before * being given a percentile rank. Cannot be used with list-based metric * datatypes.

*/ inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; } /** *

Use this to specify the time duration over which the behavior is evaluated, * for those criteria that have a time dimension (for example, * NUM_MESSAGES_SENT). For a statisticalThreshhold metric * comparison, measurements from all devices are accumulated over this time * duration before being used to calculate percentiles, and later, measurements * from an individual device are also accumulated over this time duration before * being given a percentile rank. Cannot be used with list-based metric * datatypes.

*/ inline void SetDurationSeconds(int value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; } /** *

Use this to specify the time duration over which the behavior is evaluated, * for those criteria that have a time dimension (for example, * NUM_MESSAGES_SENT). For a statisticalThreshhold metric * comparison, measurements from all devices are accumulated over this time * duration before being used to calculate percentiles, and later, measurements * from an individual device are also accumulated over this time duration before * being given a percentile rank. Cannot be used with list-based metric * datatypes.

*/ inline BehaviorCriteria& WithDurationSeconds(int value) { SetDurationSeconds(value); return *this;} /** *

If a device is in violation of the behavior for the specified number of * consecutive datapoints, an alarm occurs. If not specified, the default is 1.

*/ inline int GetConsecutiveDatapointsToAlarm() const{ return m_consecutiveDatapointsToAlarm; } /** *

If a device is in violation of the behavior for the specified number of * consecutive datapoints, an alarm occurs. If not specified, the default is 1.

*/ inline bool ConsecutiveDatapointsToAlarmHasBeenSet() const { return m_consecutiveDatapointsToAlarmHasBeenSet; } /** *

If a device is in violation of the behavior for the specified number of * consecutive datapoints, an alarm occurs. If not specified, the default is 1.

*/ inline void SetConsecutiveDatapointsToAlarm(int value) { m_consecutiveDatapointsToAlarmHasBeenSet = true; m_consecutiveDatapointsToAlarm = value; } /** *

If a device is in violation of the behavior for the specified number of * consecutive datapoints, an alarm occurs. If not specified, the default is 1.

*/ inline BehaviorCriteria& WithConsecutiveDatapointsToAlarm(int value) { SetConsecutiveDatapointsToAlarm(value); return *this;} /** *

If an alarm has occurred and the offending device is no longer in violation * of the behavior for the specified number of consecutive datapoints, the alarm is * cleared. If not specified, the default is 1.

*/ inline int GetConsecutiveDatapointsToClear() const{ return m_consecutiveDatapointsToClear; } /** *

If an alarm has occurred and the offending device is no longer in violation * of the behavior for the specified number of consecutive datapoints, the alarm is * cleared. If not specified, the default is 1.

*/ inline bool ConsecutiveDatapointsToClearHasBeenSet() const { return m_consecutiveDatapointsToClearHasBeenSet; } /** *

If an alarm has occurred and the offending device is no longer in violation * of the behavior for the specified number of consecutive datapoints, the alarm is * cleared. If not specified, the default is 1.

*/ inline void SetConsecutiveDatapointsToClear(int value) { m_consecutiveDatapointsToClearHasBeenSet = true; m_consecutiveDatapointsToClear = value; } /** *

If an alarm has occurred and the offending device is no longer in violation * of the behavior for the specified number of consecutive datapoints, the alarm is * cleared. If not specified, the default is 1.

*/ inline BehaviorCriteria& WithConsecutiveDatapointsToClear(int value) { SetConsecutiveDatapointsToClear(value); return *this;} /** *

A statistical ranking (percentile)that indicates a threshold value by which a * behavior is determined to be in compliance or in violation of the behavior.

*/ inline const StatisticalThreshold& GetStatisticalThreshold() const{ return m_statisticalThreshold; } /** *

A statistical ranking (percentile)that indicates a threshold value by which a * behavior is determined to be in compliance or in violation of the behavior.

*/ inline bool StatisticalThresholdHasBeenSet() const { return m_statisticalThresholdHasBeenSet; } /** *

A statistical ranking (percentile)that indicates a threshold value by which a * behavior is determined to be in compliance or in violation of the behavior.

*/ inline void SetStatisticalThreshold(const StatisticalThreshold& value) { m_statisticalThresholdHasBeenSet = true; m_statisticalThreshold = value; } /** *

A statistical ranking (percentile)that indicates a threshold value by which a * behavior is determined to be in compliance or in violation of the behavior.

*/ inline void SetStatisticalThreshold(StatisticalThreshold&& value) { m_statisticalThresholdHasBeenSet = true; m_statisticalThreshold = std::move(value); } /** *

A statistical ranking (percentile)that indicates a threshold value by which a * behavior is determined to be in compliance or in violation of the behavior.

*/ inline BehaviorCriteria& WithStatisticalThreshold(const StatisticalThreshold& value) { SetStatisticalThreshold(value); return *this;} /** *

A statistical ranking (percentile)that indicates a threshold value by which a * behavior is determined to be in compliance or in violation of the behavior.

*/ inline BehaviorCriteria& WithStatisticalThreshold(StatisticalThreshold&& value) { SetStatisticalThreshold(std::move(value)); return *this;} /** *

The configuration of an ML Detect

*/ inline const MachineLearningDetectionConfig& GetMlDetectionConfig() const{ return m_mlDetectionConfig; } /** *

The configuration of an ML Detect

*/ inline bool MlDetectionConfigHasBeenSet() const { return m_mlDetectionConfigHasBeenSet; } /** *

The configuration of an ML Detect

*/ inline void SetMlDetectionConfig(const MachineLearningDetectionConfig& value) { m_mlDetectionConfigHasBeenSet = true; m_mlDetectionConfig = value; } /** *

The configuration of an ML Detect

*/ inline void SetMlDetectionConfig(MachineLearningDetectionConfig&& value) { m_mlDetectionConfigHasBeenSet = true; m_mlDetectionConfig = std::move(value); } /** *

The configuration of an ML Detect

*/ inline BehaviorCriteria& WithMlDetectionConfig(const MachineLearningDetectionConfig& value) { SetMlDetectionConfig(value); return *this;} /** *

The configuration of an ML Detect

*/ inline BehaviorCriteria& WithMlDetectionConfig(MachineLearningDetectionConfig&& value) { SetMlDetectionConfig(std::move(value)); return *this;} private: ComparisonOperator m_comparisonOperator; bool m_comparisonOperatorHasBeenSet = false; MetricValue m_value; bool m_valueHasBeenSet = false; int m_durationSeconds; bool m_durationSecondsHasBeenSet = false; int m_consecutiveDatapointsToAlarm; bool m_consecutiveDatapointsToAlarmHasBeenSet = false; int m_consecutiveDatapointsToClear; bool m_consecutiveDatapointsToClearHasBeenSet = false; StatisticalThreshold m_statisticalThreshold; bool m_statisticalThresholdHasBeenSet = false; MachineLearningDetectionConfig m_mlDetectionConfig; bool m_mlDetectionConfigHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws