AWS SDK for C++

AWS SDK for C++ Version 1.11.745

Loading...
Searching...
No Matches
GrpcRoute.h
1
6#pragma once
7#include <aws/appmesh/AppMesh_EXPORTS.h>
8#include <aws/appmesh/model/GrpcRetryPolicy.h>
9#include <aws/appmesh/model/GrpcRouteAction.h>
10#include <aws/appmesh/model/GrpcRouteMatch.h>
11#include <aws/appmesh/model/GrpcTimeout.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
30class GrpcRoute {
31 public:
32 AWS_APPMESH_API GrpcRoute() = default;
33 AWS_APPMESH_API GrpcRoute(Aws::Utils::Json::JsonView jsonValue);
34 AWS_APPMESH_API GrpcRoute& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const GrpcRouteAction& GetAction() const { return m_action; }
42 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
43 template <typename ActionT = GrpcRouteAction>
44 void SetAction(ActionT&& value) {
45 m_actionHasBeenSet = true;
46 m_action = std::forward<ActionT>(value);
47 }
48 template <typename ActionT = GrpcRouteAction>
49 GrpcRoute& WithAction(ActionT&& value) {
50 SetAction(std::forward<ActionT>(value));
51 return *this;
52 }
54
56
59 inline const GrpcRouteMatch& GetMatch() const { return m_match; }
60 inline bool MatchHasBeenSet() const { return m_matchHasBeenSet; }
61 template <typename MatchT = GrpcRouteMatch>
62 void SetMatch(MatchT&& value) {
63 m_matchHasBeenSet = true;
64 m_match = std::forward<MatchT>(value);
65 }
66 template <typename MatchT = GrpcRouteMatch>
67 GrpcRoute& WithMatch(MatchT&& value) {
68 SetMatch(std::forward<MatchT>(value));
69 return *this;
70 }
72
74
77 inline const GrpcRetryPolicy& GetRetryPolicy() const { return m_retryPolicy; }
78 inline bool RetryPolicyHasBeenSet() const { return m_retryPolicyHasBeenSet; }
79 template <typename RetryPolicyT = GrpcRetryPolicy>
80 void SetRetryPolicy(RetryPolicyT&& value) {
81 m_retryPolicyHasBeenSet = true;
82 m_retryPolicy = std::forward<RetryPolicyT>(value);
83 }
84 template <typename RetryPolicyT = GrpcRetryPolicy>
85 GrpcRoute& WithRetryPolicy(RetryPolicyT&& value) {
86 SetRetryPolicy(std::forward<RetryPolicyT>(value));
87 return *this;
88 }
90
92
95 inline const GrpcTimeout& GetTimeout() const { return m_timeout; }
96 inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; }
97 template <typename TimeoutT = GrpcTimeout>
98 void SetTimeout(TimeoutT&& value) {
99 m_timeoutHasBeenSet = true;
100 m_timeout = std::forward<TimeoutT>(value);
101 }
102 template <typename TimeoutT = GrpcTimeout>
103 GrpcRoute& WithTimeout(TimeoutT&& value) {
104 SetTimeout(std::forward<TimeoutT>(value));
105 return *this;
106 }
108 private:
109 GrpcRouteAction m_action;
110
111 GrpcRouteMatch m_match;
112
113 GrpcRetryPolicy m_retryPolicy;
114
115 GrpcTimeout m_timeout;
116 bool m_actionHasBeenSet = false;
117 bool m_matchHasBeenSet = false;
118 bool m_retryPolicyHasBeenSet = false;
119 bool m_timeoutHasBeenSet = false;
120};
121
122} // namespace Model
123} // namespace AppMesh
124} // namespace Aws
void SetRetryPolicy(RetryPolicyT &&value)
Definition GrpcRoute.h:80
GrpcRoute & WithAction(ActionT &&value)
Definition GrpcRoute.h:49
void SetMatch(MatchT &&value)
Definition GrpcRoute.h:62
void SetAction(ActionT &&value)
Definition GrpcRoute.h:44
const GrpcRetryPolicy & GetRetryPolicy() const
Definition GrpcRoute.h:77
GrpcRoute & WithMatch(MatchT &&value)
Definition GrpcRoute.h:67
GrpcRoute & WithTimeout(TimeoutT &&value)
Definition GrpcRoute.h:103
AWS_APPMESH_API GrpcRoute()=default
AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_APPMESH_API GrpcRoute(Aws::Utils::Json::JsonView jsonValue)
bool RetryPolicyHasBeenSet() const
Definition GrpcRoute.h:78
const GrpcRouteMatch & GetMatch() const
Definition GrpcRoute.h:59
GrpcRoute & WithRetryPolicy(RetryPolicyT &&value)
Definition GrpcRoute.h:85
void SetTimeout(TimeoutT &&value)
Definition GrpcRoute.h:98
const GrpcTimeout & GetTimeout() const
Definition GrpcRoute.h:95
AWS_APPMESH_API GrpcRoute & operator=(Aws::Utils::Json::JsonView jsonValue)
const GrpcRouteAction & GetAction() const
Definition GrpcRoute.h:41
Aws::Utils::Json::JsonValue JsonValue