/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the iot-2015-05-28.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.IoT.Model
{
///
/// The criteria by which the behavior is determined to be normal.
///
public partial class BehaviorCriteria
{
private ComparisonOperator _comparisonOperator;
private int? _consecutiveDatapointsToAlarm;
private int? _consecutiveDatapointsToClear;
private int? _durationSeconds;
private MachineLearningDetectionConfig _mlDetectionConfig;
private StatisticalThreshold _statisticalThreshold;
private MetricValue _value;
///
/// Gets and sets the property 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
///
///
///
public ComparisonOperator ComparisonOperator
{
get { return this._comparisonOperator; }
set { this._comparisonOperator = value; }
}
// Check to see if ComparisonOperator property is set
internal bool IsSetComparisonOperator()
{
return this._comparisonOperator != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=10)]
public int ConsecutiveDatapointsToAlarm
{
get { return this._consecutiveDatapointsToAlarm.GetValueOrDefault(); }
set { this._consecutiveDatapointsToAlarm = value; }
}
// Check to see if ConsecutiveDatapointsToAlarm property is set
internal bool IsSetConsecutiveDatapointsToAlarm()
{
return this._consecutiveDatapointsToAlarm.HasValue;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=10)]
public int ConsecutiveDatapointsToClear
{
get { return this._consecutiveDatapointsToClear.GetValueOrDefault(); }
set { this._consecutiveDatapointsToClear = value; }
}
// Check to see if ConsecutiveDatapointsToClear property is set
internal bool IsSetConsecutiveDatapointsToClear()
{
return this._consecutiveDatapointsToClear.HasValue;
}
///
/// Gets and sets the property 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.
///
///
public int DurationSeconds
{
get { return this._durationSeconds.GetValueOrDefault(); }
set { this._durationSeconds = value; }
}
// Check to see if DurationSeconds property is set
internal bool IsSetDurationSeconds()
{
return this._durationSeconds.HasValue;
}
///
/// Gets and sets the property MlDetectionConfig.
///
/// The configuration of an ML Detect
///
///
public MachineLearningDetectionConfig MlDetectionConfig
{
get { return this._mlDetectionConfig; }
set { this._mlDetectionConfig = value; }
}
// Check to see if MlDetectionConfig property is set
internal bool IsSetMlDetectionConfig()
{
return this._mlDetectionConfig != null;
}
///
/// Gets and sets the property 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.
///
///
public StatisticalThreshold StatisticalThreshold
{
get { return this._statisticalThreshold; }
set { this._statisticalThreshold = value; }
}
// Check to see if StatisticalThreshold property is set
internal bool IsSetStatisticalThreshold()
{
return this._statisticalThreshold != null;
}
///
/// Gets and sets the property Value.
///
/// The value to be compared with the metric
.
///
///
public MetricValue Value
{
get { return this._value; }
set { this._value = value; }
}
// Check to see if Value property is set
internal bool IsSetValue()
{
return this._value != null;
}
}
}