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

The criteria that determine when and how a job abort takes * place.

See Also:

AWS * API Reference

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

The type of job execution failures that can initiate a job abort.

*/ inline const AwsJobAbortCriteriaFailureType& GetFailureType() const{ return m_failureType; } /** *

The type of job execution failures that can initiate a job abort.

*/ inline bool FailureTypeHasBeenSet() const { return m_failureTypeHasBeenSet; } /** *

The type of job execution failures that can initiate a job abort.

*/ inline void SetFailureType(const AwsJobAbortCriteriaFailureType& value) { m_failureTypeHasBeenSet = true; m_failureType = value; } /** *

The type of job execution failures that can initiate a job abort.

*/ inline void SetFailureType(AwsJobAbortCriteriaFailureType&& value) { m_failureTypeHasBeenSet = true; m_failureType = std::move(value); } /** *

The type of job execution failures that can initiate a job abort.

*/ inline AwsJobAbortCriteria& WithFailureType(const AwsJobAbortCriteriaFailureType& value) { SetFailureType(value); return *this;} /** *

The type of job execution failures that can initiate a job abort.

*/ inline AwsJobAbortCriteria& WithFailureType(AwsJobAbortCriteriaFailureType&& value) { SetFailureType(std::move(value)); return *this;} /** *

The type of job action to take to initiate the job abort.

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

The type of job action to take to initiate the job abort.

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

The type of job action to take to initiate the job abort.

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

The type of job action to take to initiate the job abort.

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

The type of job action to take to initiate the job abort.

*/ inline AwsJobAbortCriteria& WithAction(const AwsJobAbortCriteriaAbortAction& value) { SetAction(value); return *this;} /** *

The type of job action to take to initiate the job abort.

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

The minimum percentage of job execution failures that must occur to initiate * the job abort.

Amazon Web Services IoT Core supports up to two digits * after the decimal (for example, 10.9 and 10.99, but not 10.999).

*/ inline double GetThresholdPercentage() const{ return m_thresholdPercentage; } /** *

The minimum percentage of job execution failures that must occur to initiate * the job abort.

Amazon Web Services IoT Core supports up to two digits * after the decimal (for example, 10.9 and 10.99, but not 10.999).

*/ inline bool ThresholdPercentageHasBeenSet() const { return m_thresholdPercentageHasBeenSet; } /** *

The minimum percentage of job execution failures that must occur to initiate * the job abort.

Amazon Web Services IoT Core supports up to two digits * after the decimal (for example, 10.9 and 10.99, but not 10.999).

*/ inline void SetThresholdPercentage(double value) { m_thresholdPercentageHasBeenSet = true; m_thresholdPercentage = value; } /** *

The minimum percentage of job execution failures that must occur to initiate * the job abort.

Amazon Web Services IoT Core supports up to two digits * after the decimal (for example, 10.9 and 10.99, but not 10.999).

*/ inline AwsJobAbortCriteria& WithThresholdPercentage(double value) { SetThresholdPercentage(value); return *this;} /** *

The minimum number of things which must receive job execution notifications * before the job can be aborted.

*/ inline int GetMinNumberOfExecutedThings() const{ return m_minNumberOfExecutedThings; } /** *

The minimum number of things which must receive job execution notifications * before the job can be aborted.

*/ inline bool MinNumberOfExecutedThingsHasBeenSet() const { return m_minNumberOfExecutedThingsHasBeenSet; } /** *

The minimum number of things which must receive job execution notifications * before the job can be aborted.

*/ inline void SetMinNumberOfExecutedThings(int value) { m_minNumberOfExecutedThingsHasBeenSet = true; m_minNumberOfExecutedThings = value; } /** *

The minimum number of things which must receive job execution notifications * before the job can be aborted.

*/ inline AwsJobAbortCriteria& WithMinNumberOfExecutedThings(int value) { SetMinNumberOfExecutedThings(value); return *this;} private: AwsJobAbortCriteriaFailureType m_failureType; bool m_failureTypeHasBeenSet = false; AwsJobAbortCriteriaAbortAction m_action; bool m_actionHasBeenSet = false; double m_thresholdPercentage; bool m_thresholdPercentageHasBeenSet = false; int m_minNumberOfExecutedThings; bool m_minNumberOfExecutedThingsHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws