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

The retry strategy to use for failed jobs, if the target is an Batch job. If * you specify a retry strategy here, it overrides the retry strategy defined in * the job definition.

See Also:

AWS * API Reference

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

The number of times to attempt to retry, if the job fails. Valid values are * 1–10.

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

The number of times to attempt to retry, if the job fails. Valid values are * 1–10.

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

The number of times to attempt to retry, if the job fails. Valid values are * 1–10.

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

The number of times to attempt to retry, if the job fails. Valid values are * 1–10.

*/ inline BatchRetryStrategy& WithAttempts(int value) { SetAttempts(value); return *this;} private: int m_attempts; bool m_attemptsHasBeenSet = false; }; } // namespace Model } // namespace EventBridge } // namespace Aws