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

The retry strategy associated with a job.

See Also:

AWS * API Reference

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

The number of times to move a job to the RUNNABLE status. You * may 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 * may 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 * may 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 * may 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;} private: int m_attempts; bool m_attemptsHasBeenSet; }; } // namespace Model } // namespace Batch } // namespace Aws