AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
GrpcRetryPolicy.h
1
6#pragma once
7#include <aws/appmesh/AppMesh_EXPORTS.h>
8#include <aws/appmesh/model/Duration.h>
9#include <aws/appmesh/model/GrpcRetryPolicyEvent.h>
10#include <aws/appmesh/model/TcpRetryPolicyEvent.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace AppMesh {
24namespace Model {
25
39 public:
40 AWS_APPMESH_API GrpcRetryPolicy() = default;
41 AWS_APPMESH_API GrpcRetryPolicy(Aws::Utils::Json::JsonView jsonValue);
43 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
44
46
49 inline const Aws::Vector<GrpcRetryPolicyEvent>& GetGrpcRetryEvents() const { return m_grpcRetryEvents; }
50 inline bool GrpcRetryEventsHasBeenSet() const { return m_grpcRetryEventsHasBeenSet; }
51 template <typename GrpcRetryEventsT = Aws::Vector<GrpcRetryPolicyEvent>>
52 void SetGrpcRetryEvents(GrpcRetryEventsT&& value) {
53 m_grpcRetryEventsHasBeenSet = true;
54 m_grpcRetryEvents = std::forward<GrpcRetryEventsT>(value);
55 }
56 template <typename GrpcRetryEventsT = Aws::Vector<GrpcRetryPolicyEvent>>
57 GrpcRetryPolicy& WithGrpcRetryEvents(GrpcRetryEventsT&& value) {
58 SetGrpcRetryEvents(std::forward<GrpcRetryEventsT>(value));
59 return *this;
60 }
62 m_grpcRetryEventsHasBeenSet = true;
63 m_grpcRetryEvents.push_back(value);
64 return *this;
65 }
67
69
77 inline const Aws::Vector<Aws::String>& GetHttpRetryEvents() const { return m_httpRetryEvents; }
78 inline bool HttpRetryEventsHasBeenSet() const { return m_httpRetryEventsHasBeenSet; }
79 template <typename HttpRetryEventsT = Aws::Vector<Aws::String>>
80 void SetHttpRetryEvents(HttpRetryEventsT&& value) {
81 m_httpRetryEventsHasBeenSet = true;
82 m_httpRetryEvents = std::forward<HttpRetryEventsT>(value);
83 }
84 template <typename HttpRetryEventsT = Aws::Vector<Aws::String>>
85 GrpcRetryPolicy& WithHttpRetryEvents(HttpRetryEventsT&& value) {
86 SetHttpRetryEvents(std::forward<HttpRetryEventsT>(value));
87 return *this;
88 }
89 template <typename HttpRetryEventsT = Aws::String>
90 GrpcRetryPolicy& AddHttpRetryEvents(HttpRetryEventsT&& value) {
91 m_httpRetryEventsHasBeenSet = true;
92 m_httpRetryEvents.emplace_back(std::forward<HttpRetryEventsT>(value));
93 return *this;
94 }
96
98
101 inline long long GetMaxRetries() const { return m_maxRetries; }
102 inline bool MaxRetriesHasBeenSet() const { return m_maxRetriesHasBeenSet; }
103 inline void SetMaxRetries(long long value) {
104 m_maxRetriesHasBeenSet = true;
105 m_maxRetries = value;
106 }
107 inline GrpcRetryPolicy& WithMaxRetries(long long value) {
108 SetMaxRetries(value);
109 return *this;
110 }
112
114
117 inline const Duration& GetPerRetryTimeout() const { return m_perRetryTimeout; }
118 inline bool PerRetryTimeoutHasBeenSet() const { return m_perRetryTimeoutHasBeenSet; }
119 template <typename PerRetryTimeoutT = Duration>
120 void SetPerRetryTimeout(PerRetryTimeoutT&& value) {
121 m_perRetryTimeoutHasBeenSet = true;
122 m_perRetryTimeout = std::forward<PerRetryTimeoutT>(value);
123 }
124 template <typename PerRetryTimeoutT = Duration>
125 GrpcRetryPolicy& WithPerRetryTimeout(PerRetryTimeoutT&& value) {
126 SetPerRetryTimeout(std::forward<PerRetryTimeoutT>(value));
127 return *this;
128 }
130
132
137 inline const Aws::Vector<TcpRetryPolicyEvent>& GetTcpRetryEvents() const { return m_tcpRetryEvents; }
138 inline bool TcpRetryEventsHasBeenSet() const { return m_tcpRetryEventsHasBeenSet; }
139 template <typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
140 void SetTcpRetryEvents(TcpRetryEventsT&& value) {
141 m_tcpRetryEventsHasBeenSet = true;
142 m_tcpRetryEvents = std::forward<TcpRetryEventsT>(value);
143 }
144 template <typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
145 GrpcRetryPolicy& WithTcpRetryEvents(TcpRetryEventsT&& value) {
146 SetTcpRetryEvents(std::forward<TcpRetryEventsT>(value));
147 return *this;
148 }
150 m_tcpRetryEventsHasBeenSet = true;
151 m_tcpRetryEvents.push_back(value);
152 return *this;
153 }
155 private:
156 Aws::Vector<GrpcRetryPolicyEvent> m_grpcRetryEvents;
157
158 Aws::Vector<Aws::String> m_httpRetryEvents;
159
160 long long m_maxRetries{0};
161
162 Duration m_perRetryTimeout;
163
164 Aws::Vector<TcpRetryPolicyEvent> m_tcpRetryEvents;
165 bool m_grpcRetryEventsHasBeenSet = false;
166 bool m_httpRetryEventsHasBeenSet = false;
167 bool m_maxRetriesHasBeenSet = false;
168 bool m_perRetryTimeoutHasBeenSet = false;
169 bool m_tcpRetryEventsHasBeenSet = false;
170};
171
172} // namespace Model
173} // namespace AppMesh
174} // namespace Aws
GrpcRetryPolicy & AddHttpRetryEvents(HttpRetryEventsT &&value)
void SetTcpRetryEvents(TcpRetryEventsT &&value)
GrpcRetryPolicy & WithGrpcRetryEvents(GrpcRetryEventsT &&value)
void SetHttpRetryEvents(HttpRetryEventsT &&value)
AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const
GrpcRetryPolicy & WithHttpRetryEvents(HttpRetryEventsT &&value)
const Aws::Vector< TcpRetryPolicyEvent > & GetTcpRetryEvents() const
AWS_APPMESH_API GrpcRetryPolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
const Duration & GetPerRetryTimeout() const
AWS_APPMESH_API GrpcRetryPolicy()=default
void SetGrpcRetryEvents(GrpcRetryEventsT &&value)
void SetPerRetryTimeout(PerRetryTimeoutT &&value)
const Aws::Vector< Aws::String > & GetHttpRetryEvents() const
GrpcRetryPolicy & WithPerRetryTimeout(PerRetryTimeoutT &&value)
GrpcRetryPolicy & AddGrpcRetryEvents(GrpcRetryPolicyEvent value)
GrpcRetryPolicy & AddTcpRetryEvents(TcpRetryPolicyEvent value)
GrpcRetryPolicy & WithTcpRetryEvents(TcpRetryEventsT &&value)
const Aws::Vector< GrpcRetryPolicyEvent > & GetGrpcRetryEvents() const
AWS_APPMESH_API GrpcRetryPolicy(Aws::Utils::Json::JsonView jsonValue)
GrpcRetryPolicy & WithMaxRetries(long long value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue