/* * 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 elasticmapreduce-2009-03-31.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.ElasticMapReduce.Model { /// /// The definition of a CloudWatch metric alarm, which determines when an automatic scaling /// activity is triggered. When the defined alarm conditions are satisfied, scaling activity /// begins. /// public partial class CloudWatchAlarmDefinition { private ComparisonOperator _comparisonOperator; private List _dimensions = new List(); private int? _evaluationPeriods; private string _metricName; private string _awsNamespace; private int? _period; private Statistic _statistic; private double? _threshold; private Unit _unit; /// /// Gets and sets the property ComparisonOperator. /// /// Determines how the metric specified by MetricName is compared to the /// value specified by Threshold. /// /// [AWSProperty(Required=true)] 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 Dimensions. /// /// A CloudWatch metric dimension. /// /// public List Dimensions { get { return this._dimensions; } set { this._dimensions = value; } } // Check to see if Dimensions property is set internal bool IsSetDimensions() { return this._dimensions != null && this._dimensions.Count > 0; } /// /// Gets and sets the property EvaluationPeriods. /// /// The number of periods, in five-minute increments, during which the alarm condition /// must exist before the alarm triggers automatic scaling activity. The default value /// is 1. /// /// public int EvaluationPeriods { get { return this._evaluationPeriods.GetValueOrDefault(); } set { this._evaluationPeriods = value; } } // Check to see if EvaluationPeriods property is set internal bool IsSetEvaluationPeriods() { return this._evaluationPeriods.HasValue; } /// /// Gets and sets the property MetricName. /// /// The name of the CloudWatch metric that is watched to determine an alarm condition. /// /// [AWSProperty(Required=true)] public string MetricName { get { return this._metricName; } set { this._metricName = value; } } // Check to see if MetricName property is set internal bool IsSetMetricName() { return this._metricName != null; } /// /// Gets and sets the property Namespace. /// /// The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce. /// /// public string Namespace { get { return this._awsNamespace; } set { this._awsNamespace = value; } } // Check to see if Namespace property is set internal bool IsSetNamespace() { return this._awsNamespace != null; } /// /// Gets and sets the property Period. /// /// The period, in seconds, over which the statistic is applied. CloudWatch metrics for /// Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch /// metric, specify 300. /// /// [AWSProperty(Required=true)] public int Period { get { return this._period.GetValueOrDefault(); } set { this._period = value; } } // Check to see if Period property is set internal bool IsSetPeriod() { return this._period.HasValue; } /// /// Gets and sets the property Statistic. /// /// The statistic to apply to the metric associated with the alarm. The default is AVERAGE. /// /// public Statistic Statistic { get { return this._statistic; } set { this._statistic = value; } } // Check to see if Statistic property is set internal bool IsSetStatistic() { return this._statistic != null; } /// /// Gets and sets the property Threshold. /// /// The value against which the specified statistic is compared. /// /// [AWSProperty(Required=true, Min=0)] public double Threshold { get { return this._threshold.GetValueOrDefault(); } set { this._threshold = value; } } // Check to see if Threshold property is set internal bool IsSetThreshold() { return this._threshold.HasValue; } /// /// Gets and sets the property Unit. /// /// The unit of measure associated with the CloudWatch metric being watched. The value /// specified for Unit must correspond to the units specified in the CloudWatch /// metric. /// /// public Unit Unit { get { return this._unit; } set { this._unit = value; } } // Check to see if Unit property is set internal bool IsSetUnit() { return this._unit != null; } } }