AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
HttpRetryPolicy.h
1
6#pragma once
7#include <aws/appmesh/AppMesh_EXPORTS.h>
8#include <aws/appmesh/model/Duration.h>
9#include <aws/appmesh/model/TcpRetryPolicyEvent.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace AppMesh {
23namespace Model {
24
38 public:
39 AWS_APPMESH_API HttpRetryPolicy() = default;
40 AWS_APPMESH_API HttpRetryPolicy(Aws::Utils::Json::JsonView jsonValue);
42 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
53 inline const Aws::Vector<Aws::String>& GetHttpRetryEvents() const { return m_httpRetryEvents; }
54 inline bool HttpRetryEventsHasBeenSet() const { return m_httpRetryEventsHasBeenSet; }
55 template <typename HttpRetryEventsT = Aws::Vector<Aws::String>>
56 void SetHttpRetryEvents(HttpRetryEventsT&& value) {
57 m_httpRetryEventsHasBeenSet = true;
58 m_httpRetryEvents = std::forward<HttpRetryEventsT>(value);
59 }
60 template <typename HttpRetryEventsT = Aws::Vector<Aws::String>>
61 HttpRetryPolicy& WithHttpRetryEvents(HttpRetryEventsT&& value) {
62 SetHttpRetryEvents(std::forward<HttpRetryEventsT>(value));
63 return *this;
64 }
65 template <typename HttpRetryEventsT = Aws::String>
66 HttpRetryPolicy& AddHttpRetryEvents(HttpRetryEventsT&& value) {
67 m_httpRetryEventsHasBeenSet = true;
68 m_httpRetryEvents.emplace_back(std::forward<HttpRetryEventsT>(value));
69 return *this;
70 }
72
74
77 inline long long GetMaxRetries() const { return m_maxRetries; }
78 inline bool MaxRetriesHasBeenSet() const { return m_maxRetriesHasBeenSet; }
79 inline void SetMaxRetries(long long value) {
80 m_maxRetriesHasBeenSet = true;
81 m_maxRetries = value;
82 }
83 inline HttpRetryPolicy& WithMaxRetries(long long value) {
84 SetMaxRetries(value);
85 return *this;
86 }
88
90
93 inline const Duration& GetPerRetryTimeout() const { return m_perRetryTimeout; }
94 inline bool PerRetryTimeoutHasBeenSet() const { return m_perRetryTimeoutHasBeenSet; }
95 template <typename PerRetryTimeoutT = Duration>
96 void SetPerRetryTimeout(PerRetryTimeoutT&& value) {
97 m_perRetryTimeoutHasBeenSet = true;
98 m_perRetryTimeout = std::forward<PerRetryTimeoutT>(value);
99 }
100 template <typename PerRetryTimeoutT = Duration>
101 HttpRetryPolicy& WithPerRetryTimeout(PerRetryTimeoutT&& value) {
102 SetPerRetryTimeout(std::forward<PerRetryTimeoutT>(value));
103 return *this;
104 }
106
108
113 inline const Aws::Vector<TcpRetryPolicyEvent>& GetTcpRetryEvents() const { return m_tcpRetryEvents; }
114 inline bool TcpRetryEventsHasBeenSet() const { return m_tcpRetryEventsHasBeenSet; }
115 template <typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
116 void SetTcpRetryEvents(TcpRetryEventsT&& value) {
117 m_tcpRetryEventsHasBeenSet = true;
118 m_tcpRetryEvents = std::forward<TcpRetryEventsT>(value);
119 }
120 template <typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
121 HttpRetryPolicy& WithTcpRetryEvents(TcpRetryEventsT&& value) {
122 SetTcpRetryEvents(std::forward<TcpRetryEventsT>(value));
123 return *this;
124 }
126 m_tcpRetryEventsHasBeenSet = true;
127 m_tcpRetryEvents.push_back(value);
128 return *this;
129 }
131 private:
132 Aws::Vector<Aws::String> m_httpRetryEvents;
133
134 long long m_maxRetries{0};
135
136 Duration m_perRetryTimeout;
137
138 Aws::Vector<TcpRetryPolicyEvent> m_tcpRetryEvents;
139 bool m_httpRetryEventsHasBeenSet = false;
140 bool m_maxRetriesHasBeenSet = false;
141 bool m_perRetryTimeoutHasBeenSet = false;
142 bool m_tcpRetryEventsHasBeenSet = false;
143};
144
145} // namespace Model
146} // namespace AppMesh
147} // namespace Aws
HttpRetryPolicy & AddHttpRetryEvents(HttpRetryEventsT &&value)
const Aws::Vector< Aws::String > & GetHttpRetryEvents() const
AWS_APPMESH_API HttpRetryPolicy(Aws::Utils::Json::JsonView jsonValue)
void SetPerRetryTimeout(PerRetryTimeoutT &&value)
void SetTcpRetryEvents(TcpRetryEventsT &&value)
AWS_APPMESH_API HttpRetryPolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
HttpRetryPolicy & WithTcpRetryEvents(TcpRetryEventsT &&value)
AWS_APPMESH_API HttpRetryPolicy()=default
HttpRetryPolicy & WithMaxRetries(long long value)
void SetHttpRetryEvents(HttpRetryEventsT &&value)
const Duration & GetPerRetryTimeout() const
const Aws::Vector< TcpRetryPolicyEvent > & GetTcpRetryEvents() const
HttpRetryPolicy & WithHttpRetryEvents(HttpRetryEventsT &&value)
HttpRetryPolicy & AddTcpRetryEvents(TcpRetryPolicyEvent value)
HttpRetryPolicy & WithPerRetryTimeout(PerRetryTimeoutT &&value)
AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue