/** * 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 Batch { namespace Model { /** *

The retry strategy that's associated with a job. For more information, see Automated * job retries in the Batch User Guide.

See Also:

AWS * API Reference

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

The number of times to move a job to the RUNNABLE status. You * can specify between 1 and 10 attempts. If the value of attempts is * greater than one, the job is retried on failure the same number of attempts as * the value.

*/ inline int GetAttempts() const{ return m_attempts; } /** *

The number of times to move a job to the RUNNABLE status. You * can specify between 1 and 10 attempts. If the value of attempts is * greater than one, the job is retried on failure the same number of attempts as * the value.

*/ inline bool AttemptsHasBeenSet() const { return m_attemptsHasBeenSet; } /** *

The number of times to move a job to the RUNNABLE status. You * can specify between 1 and 10 attempts. If the value of attempts is * greater than one, the job is retried on failure the same number of attempts as * the value.

*/ inline void SetAttempts(int value) { m_attemptsHasBeenSet = true; m_attempts = value; } /** *

The number of times to move a job to the RUNNABLE status. You * can specify between 1 and 10 attempts. If the value of attempts is * greater than one, the job is retried on failure the same number of attempts as * the value.

*/ inline RetryStrategy& WithAttempts(int value) { SetAttempts(value); return *this;} /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline const Aws::Vector& GetEvaluateOnExit() const{ return m_evaluateOnExit; } /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline bool EvaluateOnExitHasBeenSet() const { return m_evaluateOnExitHasBeenSet; } /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline void SetEvaluateOnExit(const Aws::Vector& value) { m_evaluateOnExitHasBeenSet = true; m_evaluateOnExit = value; } /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline void SetEvaluateOnExit(Aws::Vector&& value) { m_evaluateOnExitHasBeenSet = true; m_evaluateOnExit = std::move(value); } /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline RetryStrategy& WithEvaluateOnExit(const Aws::Vector& value) { SetEvaluateOnExit(value); return *this;} /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline RetryStrategy& WithEvaluateOnExit(Aws::Vector&& value) { SetEvaluateOnExit(std::move(value)); return *this;} /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline RetryStrategy& AddEvaluateOnExit(const EvaluateOnExit& value) { m_evaluateOnExitHasBeenSet = true; m_evaluateOnExit.push_back(value); return *this; } /** *

Array of up to 5 objects that specify the conditions where jobs are retried * or failed. If this parameter is specified, then the attempts * parameter must also be specified. If none of the listed conditions match, then * the job is retried.

*/ inline RetryStrategy& AddEvaluateOnExit(EvaluateOnExit&& value) { m_evaluateOnExitHasBeenSet = true; m_evaluateOnExit.push_back(std::move(value)); return *this; } private: int m_attempts; bool m_attemptsHasBeenSet = false; Aws::Vector m_evaluateOnExit; bool m_evaluateOnExitHasBeenSet = false; }; } // namespace Model } // namespace Batch } // namespace Aws