AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
HttpRetryPolicy.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/core/utils/memory/stl/AWSString.h>
11#include <aws/appmesh/model/TcpRetryPolicyEvent.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace AppMesh
25{
26namespace Model
27{
28
42 {
43 public:
44 AWS_APPMESH_API HttpRetryPolicy() = default;
45 AWS_APPMESH_API HttpRetryPolicy(Aws::Utils::Json::JsonView jsonValue);
47 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
48
49
51
59 inline const Aws::Vector<Aws::String>& GetHttpRetryEvents() const { return m_httpRetryEvents; }
60 inline bool HttpRetryEventsHasBeenSet() const { return m_httpRetryEventsHasBeenSet; }
61 template<typename HttpRetryEventsT = Aws::Vector<Aws::String>>
62 void SetHttpRetryEvents(HttpRetryEventsT&& value) { m_httpRetryEventsHasBeenSet = true; m_httpRetryEvents = std::forward<HttpRetryEventsT>(value); }
63 template<typename HttpRetryEventsT = Aws::Vector<Aws::String>>
64 HttpRetryPolicy& WithHttpRetryEvents(HttpRetryEventsT&& value) { SetHttpRetryEvents(std::forward<HttpRetryEventsT>(value)); return *this;}
65 template<typename HttpRetryEventsT = Aws::String>
66 HttpRetryPolicy& AddHttpRetryEvents(HttpRetryEventsT&& value) { m_httpRetryEventsHasBeenSet = true; m_httpRetryEvents.emplace_back(std::forward<HttpRetryEventsT>(value)); return *this; }
68
70
73 inline long long GetMaxRetries() const { return m_maxRetries; }
74 inline bool MaxRetriesHasBeenSet() const { return m_maxRetriesHasBeenSet; }
75 inline void SetMaxRetries(long long value) { m_maxRetriesHasBeenSet = true; m_maxRetries = value; }
76 inline HttpRetryPolicy& WithMaxRetries(long long value) { SetMaxRetries(value); return *this;}
78
80
83 inline const Duration& GetPerRetryTimeout() const { return m_perRetryTimeout; }
84 inline bool PerRetryTimeoutHasBeenSet() const { return m_perRetryTimeoutHasBeenSet; }
85 template<typename PerRetryTimeoutT = Duration>
86 void SetPerRetryTimeout(PerRetryTimeoutT&& value) { m_perRetryTimeoutHasBeenSet = true; m_perRetryTimeout = std::forward<PerRetryTimeoutT>(value); }
87 template<typename PerRetryTimeoutT = Duration>
88 HttpRetryPolicy& WithPerRetryTimeout(PerRetryTimeoutT&& value) { SetPerRetryTimeout(std::forward<PerRetryTimeoutT>(value)); return *this;}
90
92
97 inline const Aws::Vector<TcpRetryPolicyEvent>& GetTcpRetryEvents() const { return m_tcpRetryEvents; }
98 inline bool TcpRetryEventsHasBeenSet() const { return m_tcpRetryEventsHasBeenSet; }
99 template<typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
100 void SetTcpRetryEvents(TcpRetryEventsT&& value) { m_tcpRetryEventsHasBeenSet = true; m_tcpRetryEvents = std::forward<TcpRetryEventsT>(value); }
101 template<typename TcpRetryEventsT = Aws::Vector<TcpRetryPolicyEvent>>
102 HttpRetryPolicy& WithTcpRetryEvents(TcpRetryEventsT&& value) { SetTcpRetryEvents(std::forward<TcpRetryEventsT>(value)); return *this;}
103 inline HttpRetryPolicy& AddTcpRetryEvents(TcpRetryPolicyEvent value) { m_tcpRetryEventsHasBeenSet = true; m_tcpRetryEvents.push_back(value); return *this; }
105 private:
106
107 Aws::Vector<Aws::String> m_httpRetryEvents;
108 bool m_httpRetryEventsHasBeenSet = false;
109
110 long long m_maxRetries{0};
111 bool m_maxRetriesHasBeenSet = false;
112
113 Duration m_perRetryTimeout;
114 bool m_perRetryTimeoutHasBeenSet = false;
115
116 Aws::Vector<TcpRetryPolicyEvent> m_tcpRetryEvents;
117 bool m_tcpRetryEventsHasBeenSet = false;
118 };
119
120} // namespace Model
121} // namespace AppMesh
122} // 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