AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
GrpcRetryPolicy.h
1
6#pragma once
7#include <aws/appmesh/AppMesh_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/appmesh/model/Duration.h>
10#include <aws/appmesh/model/GrpcRetryPolicyEvent.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/appmesh/model/TcpRetryPolicyEvent.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace AppMesh
26{
27namespace Model
28{
29
43 {
44 public:
45 AWS_APPMESH_API GrpcRetryPolicy() = default;
46 AWS_APPMESH_API GrpcRetryPolicy(Aws::Utils::Json::JsonView jsonValue);
48 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
49
50
52
55 inline const Aws::Vector<GrpcRetryPolicyEvent>& GetGrpcRetryEvents() const { return m_grpcRetryEvents; }
56 inline bool GrpcRetryEventsHasBeenSet() const { return m_grpcRetryEventsHasBeenSet; }
57 template<typename GrpcRetryEventsT = Aws::Vector<GrpcRetryPolicyEvent>>
58 void SetGrpcRetryEvents(GrpcRetryEventsT&& value) { m_grpcRetryEventsHasBeenSet = true; m_grpcRetryEvents = std::forward<GrpcRetryEventsT>(value); }
59 template<typename GrpcRetryEventsT = Aws::Vector<GrpcRetryPolicyEvent>>
60 GrpcRetryPolicy& WithGrpcRetryEvents(GrpcRetryEventsT&& value) { SetGrpcRetryEvents(std::forward<GrpcRetryEventsT>(value)); return *this;}
61 inline GrpcRetryPolicy& AddGrpcRetryEvents(GrpcRetryPolicyEvent value) { m_grpcRetryEventsHasBeenSet = true; m_grpcRetryEvents.push_back(value); return *this; }
63
65
73 inline const Aws::Vector<Aws::String>& GetHttpRetryEvents() const { return m_httpRetryEvents; }
74 inline bool HttpRetryEventsHasBeenSet() const { return m_httpRetryEventsHasBeenSet; }
75 template<typename HttpRetryEventsT = Aws::Vector<Aws::String>>
76 void SetHttpRetryEvents(HttpRetryEventsT&& value) { m_httpRetryEventsHasBeenSet = true; m_httpRetryEvents = std::forward<HttpRetryEventsT>(value); }
77 template<typename HttpRetryEventsT = Aws::Vector<Aws::String>>
78 GrpcRetryPolicy& WithHttpRetryEvents(HttpRetryEventsT&& value) { SetHttpRetryEvents(std::forward<HttpRetryEventsT>(value)); return *this;}
79 template<typename HttpRetryEventsT = Aws::String>
80 GrpcRetryPolicy& AddHttpRetryEvents(HttpRetryEventsT&& value) { m_httpRetryEventsHasBeenSet = true; m_httpRetryEvents.emplace_back(std::forward<HttpRetryEventsT>(value)); return *this; }
82
84
87 inline long long GetMaxRetries() const { return m_maxRetries; }
88 inline bool MaxRetriesHasBeenSet() const { return m_maxRetriesHasBeenSet; }
89 inline void SetMaxRetries(long long value) { m_maxRetriesHasBeenSet = true; m_maxRetries = value; }
90 inline GrpcRetryPolicy& WithMaxRetries(long long value) { SetMaxRetries(value); return *this;}
92
94
97 inline const Duration& GetPerRetryTimeout() const { return m_perRetryTimeout; }
98 inline bool PerRetryTimeoutHasBeenSet() const { return m_perRetryTimeoutHasBeenSet; }
99 template<typename PerRetryTimeoutT = Duration>
100 void SetPerRetryTimeout(PerRetryTimeoutT&& value) { m_perRetryTimeoutHasBeenSet = true; m_perRetryTimeout = std::forward<PerRetryTimeoutT>(value); }
101 template<typename PerRetryTimeoutT = Duration>
102 GrpcRetryPolicy& WithPerRetryTimeout(PerRetryTimeoutT&& value) { SetPerRetryTimeout(std::forward<PerRetryTimeoutT>(value)); return *this;}
104
106
111 inline const Aws::Vector<TcpRetryPolicyEvent>& GetTcpRetryEvents() const { return m_tcpRetryEvents; }
112 inline bool TcpRetryEventsHasBeenSet() const { return m_tcpRetryEventsHasBeenSet; }
113 template<typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
114 void SetTcpRetryEvents(TcpRetryEventsT&& value) { m_tcpRetryEventsHasBeenSet = true; m_tcpRetryEvents = std::forward<TcpRetryEventsT>(value); }
115 template<typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
116 GrpcRetryPolicy& WithTcpRetryEvents(TcpRetryEventsT&& value) { SetTcpRetryEvents(std::forward<TcpRetryEventsT>(value)); return *this;}
117 inline GrpcRetryPolicy& AddTcpRetryEvents(TcpRetryPolicyEvent value) { m_tcpRetryEventsHasBeenSet = true; m_tcpRetryEvents.push_back(value); return *this; }
119 private:
120
121 Aws::Vector<GrpcRetryPolicyEvent> m_grpcRetryEvents;
122 bool m_grpcRetryEventsHasBeenSet = false;
123
124 Aws::Vector<Aws::String> m_httpRetryEvents;
125 bool m_httpRetryEventsHasBeenSet = false;
126
127 long long m_maxRetries{0};
128 bool m_maxRetriesHasBeenSet = false;
129
130 Duration m_perRetryTimeout;
131 bool m_perRetryTimeoutHasBeenSet = false;
132
133 Aws::Vector<TcpRetryPolicyEvent> m_tcpRetryEvents;
134 bool m_tcpRetryEventsHasBeenSet = false;
135 };
136
137} // namespace Model
138} // namespace AppMesh
139} // 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