/* * 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 greengrassv2-2020-11-30.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.GreengrassV2.Model { /// /// Contains criteria that define when and how to cancel a job. /// /// /// /// The deployment stops if the following conditions are true: /// ///
  1. /// /// The number of things that receive the deployment exceeds the minNumberOfExecutedThings. /// ///
  2. /// /// The percentage of failures with type failureType exceeds the thresholdPercentage. /// ///
///
public partial class IoTJobAbortCriteria { private IoTJobAbortAction _action; private IoTJobExecutionFailureType _failureType; private int? _minNumberOfExecutedThings; private double? _thresholdPercentage; /// /// Gets and sets the property Action. /// /// The action to perform when the criteria are met. /// /// [AWSProperty(Required=true)] public IoTJobAbortAction Action { get { return this._action; } set { this._action = value; } } // Check to see if Action property is set internal bool IsSetAction() { return this._action != null; } /// /// Gets and sets the property FailureType. /// /// The type of job deployment failure that can cancel a job. /// /// [AWSProperty(Required=true)] public IoTJobExecutionFailureType FailureType { get { return this._failureType; } set { this._failureType = value; } } // Check to see if FailureType property is set internal bool IsSetFailureType() { return this._failureType != null; } /// /// Gets and sets the property MinNumberOfExecutedThings. /// /// The minimum number of things that receive the configuration before the job can cancel. /// /// [AWSProperty(Required=true, Min=1)] public int MinNumberOfExecutedThings { get { return this._minNumberOfExecutedThings.GetValueOrDefault(); } set { this._minNumberOfExecutedThings = value; } } // Check to see if MinNumberOfExecutedThings property is set internal bool IsSetMinNumberOfExecutedThings() { return this._minNumberOfExecutedThings.HasValue; } /// /// Gets and sets the property ThresholdPercentage. /// /// The minimum percentage of failureType failures that occur before the /// job can cancel. /// /// /// /// This parameter supports up to two digits after the decimal (for example, you can specify /// 10.9 or 10.99, but not 10.999). /// /// [AWSProperty(Required=true, Max=100)] public double ThresholdPercentage { get { return this._thresholdPercentage.GetValueOrDefault(); } set { this._thresholdPercentage = value; } } // Check to see if ThresholdPercentage property is set internal bool IsSetThresholdPercentage() { return this._thresholdPercentage.HasValue; } } }