AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
RetryStrategy.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/EvaluateOnExit.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace Batch {
21namespace Model {
22
31 public:
32 AWS_BATCH_API RetryStrategy() = default;
33 AWS_BATCH_API RetryStrategy(Aws::Utils::Json::JsonView jsonValue);
35 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
44 inline int GetAttempts() const { return m_attempts; }
45 inline bool AttemptsHasBeenSet() const { return m_attemptsHasBeenSet; }
46 inline void SetAttempts(int value) {
47 m_attemptsHasBeenSet = true;
48 m_attempts = value;
49 }
50 inline RetryStrategy& WithAttempts(int value) {
51 SetAttempts(value);
52 return *this;
53 }
55
57
63 inline const Aws::Vector<EvaluateOnExit>& GetEvaluateOnExit() const { return m_evaluateOnExit; }
64 inline bool EvaluateOnExitHasBeenSet() const { return m_evaluateOnExitHasBeenSet; }
65 template <typename EvaluateOnExitT = Aws::Vector<EvaluateOnExit>>
66 void SetEvaluateOnExit(EvaluateOnExitT&& value) {
67 m_evaluateOnExitHasBeenSet = true;
68 m_evaluateOnExit = std::forward<EvaluateOnExitT>(value);
69 }
70 template <typename EvaluateOnExitT = Aws::Vector<EvaluateOnExit>>
71 RetryStrategy& WithEvaluateOnExit(EvaluateOnExitT&& value) {
72 SetEvaluateOnExit(std::forward<EvaluateOnExitT>(value));
73 return *this;
74 }
75 template <typename EvaluateOnExitT = EvaluateOnExit>
76 RetryStrategy& AddEvaluateOnExit(EvaluateOnExitT&& value) {
77 m_evaluateOnExitHasBeenSet = true;
78 m_evaluateOnExit.emplace_back(std::forward<EvaluateOnExitT>(value));
79 return *this;
80 }
82 private:
83 int m_attempts{0};
84
85 Aws::Vector<EvaluateOnExit> m_evaluateOnExit;
86 bool m_attemptsHasBeenSet = false;
87 bool m_evaluateOnExitHasBeenSet = false;
88};
89
90} // namespace Model
91} // namespace Batch
92} // namespace Aws
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
RetryStrategy & AddEvaluateOnExit(EvaluateOnExitT &&value)
RetryStrategy & WithEvaluateOnExit(EvaluateOnExitT &&value)
const Aws::Vector< EvaluateOnExit > & GetEvaluateOnExit() const
void SetEvaluateOnExit(EvaluateOnExitT &&value)
AWS_BATCH_API RetryStrategy()=default
AWS_BATCH_API RetryStrategy(Aws::Utils::Json::JsonView jsonValue)
AWS_BATCH_API RetryStrategy & operator=(Aws::Utils::Json::JsonView jsonValue)
RetryStrategy & WithAttempts(int value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue