AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ServiceJobRetryStrategy.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/ServiceJobEvaluateOnExit.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
33 public:
34 AWS_BATCH_API ServiceJobRetryStrategy() = default;
37 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
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 }
51 SetAttempts(value);
52 return *this;
53 }
55
57
61 inline const Aws::Vector<ServiceJobEvaluateOnExit>& GetEvaluateOnExit() const { return m_evaluateOnExit; }
62 inline bool EvaluateOnExitHasBeenSet() const { return m_evaluateOnExitHasBeenSet; }
63 template <typename EvaluateOnExitT = Aws::Vector<ServiceJobEvaluateOnExit>>
64 void SetEvaluateOnExit(EvaluateOnExitT&& value) {
65 m_evaluateOnExitHasBeenSet = true;
66 m_evaluateOnExit = std::forward<EvaluateOnExitT>(value);
67 }
68 template <typename EvaluateOnExitT = Aws::Vector<ServiceJobEvaluateOnExit>>
69 ServiceJobRetryStrategy& WithEvaluateOnExit(EvaluateOnExitT&& value) {
70 SetEvaluateOnExit(std::forward<EvaluateOnExitT>(value));
71 return *this;
72 }
73 template <typename EvaluateOnExitT = ServiceJobEvaluateOnExit>
74 ServiceJobRetryStrategy& AddEvaluateOnExit(EvaluateOnExitT&& value) {
75 m_evaluateOnExitHasBeenSet = true;
76 m_evaluateOnExit.emplace_back(std::forward<EvaluateOnExitT>(value));
77 return *this;
78 }
80 private:
81 int m_attempts{0};
82
84 bool m_attemptsHasBeenSet = false;
85 bool m_evaluateOnExitHasBeenSet = false;
86};
87
88} // namespace Model
89} // namespace Batch
90} // namespace Aws
const Aws::Vector< ServiceJobEvaluateOnExit > & GetEvaluateOnExit() const
AWS_BATCH_API ServiceJobRetryStrategy & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BATCH_API ServiceJobRetryStrategy(Aws::Utils::Json::JsonView jsonValue)
ServiceJobRetryStrategy & WithEvaluateOnExit(EvaluateOnExitT &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
ServiceJobRetryStrategy & AddEvaluateOnExit(EvaluateOnExitT &&value)
ServiceJobRetryStrategy & WithAttempts(int value)
AWS_BATCH_API ServiceJobRetryStrategy()=default
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue