AWS SDK for C++

AWS SDK for C++ Version 1.11.745

Loading...
Searching...
No Matches
HttpRouteMatch.h
1
6#pragma once
7#include <aws/appmesh/AppMesh_EXPORTS.h>
8#include <aws/appmesh/model/HttpMethod.h>
9#include <aws/appmesh/model/HttpPathMatch.h>
10#include <aws/appmesh/model/HttpQueryParameter.h>
11#include <aws/appmesh/model/HttpRouteHeader.h>
12#include <aws/appmesh/model/HttpScheme.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace AppMesh {
26namespace Model {
27
35 public:
36 AWS_APPMESH_API HttpRouteMatch() = default;
37 AWS_APPMESH_API HttpRouteMatch(Aws::Utils::Json::JsonView jsonValue);
39 AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::Vector<HttpRouteHeader>& GetHeaders() const { return m_headers; }
46 inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; }
47 template <typename HeadersT = Aws::Vector<HttpRouteHeader>>
48 void SetHeaders(HeadersT&& value) {
49 m_headersHasBeenSet = true;
50 m_headers = std::forward<HeadersT>(value);
51 }
52 template <typename HeadersT = Aws::Vector<HttpRouteHeader>>
53 HttpRouteMatch& WithHeaders(HeadersT&& value) {
54 SetHeaders(std::forward<HeadersT>(value));
55 return *this;
56 }
57 template <typename HeadersT = HttpRouteHeader>
58 HttpRouteMatch& AddHeaders(HeadersT&& value) {
59 m_headersHasBeenSet = true;
60 m_headers.emplace_back(std::forward<HeadersT>(value));
61 return *this;
62 }
64
66
69 inline HttpMethod GetMethod() const { return m_method; }
70 inline bool MethodHasBeenSet() const { return m_methodHasBeenSet; }
71 inline void SetMethod(HttpMethod value) {
72 m_methodHasBeenSet = true;
73 m_method = value;
74 }
76 SetMethod(value);
77 return *this;
78 }
80
82
85 inline const HttpPathMatch& GetPath() const { return m_path; }
86 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
87 template <typename PathT = HttpPathMatch>
88 void SetPath(PathT&& value) {
89 m_pathHasBeenSet = true;
90 m_path = std::forward<PathT>(value);
91 }
92 template <typename PathT = HttpPathMatch>
93 HttpRouteMatch& WithPath(PathT&& value) {
94 SetPath(std::forward<PathT>(value));
95 return *this;
96 }
98
100
103 inline int GetPort() const { return m_port; }
104 inline bool PortHasBeenSet() const { return m_portHasBeenSet; }
105 inline void SetPort(int value) {
106 m_portHasBeenSet = true;
107 m_port = value;
108 }
109 inline HttpRouteMatch& WithPort(int value) {
110 SetPort(value);
111 return *this;
112 }
114
116
124 inline const Aws::String& GetPrefix() const { return m_prefix; }
125 inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
126 template <typename PrefixT = Aws::String>
127 void SetPrefix(PrefixT&& value) {
128 m_prefixHasBeenSet = true;
129 m_prefix = std::forward<PrefixT>(value);
130 }
131 template <typename PrefixT = Aws::String>
132 HttpRouteMatch& WithPrefix(PrefixT&& value) {
133 SetPrefix(std::forward<PrefixT>(value));
134 return *this;
135 }
137
139
142 inline const Aws::Vector<HttpQueryParameter>& GetQueryParameters() const { return m_queryParameters; }
143 inline bool QueryParametersHasBeenSet() const { return m_queryParametersHasBeenSet; }
144 template <typename QueryParametersT = Aws::Vector<HttpQueryParameter>>
145 void SetQueryParameters(QueryParametersT&& value) {
146 m_queryParametersHasBeenSet = true;
147 m_queryParameters = std::forward<QueryParametersT>(value);
148 }
149 template <typename QueryParametersT = Aws::Vector<HttpQueryParameter>>
150 HttpRouteMatch& WithQueryParameters(QueryParametersT&& value) {
151 SetQueryParameters(std::forward<QueryParametersT>(value));
152 return *this;
153 }
154 template <typename QueryParametersT = HttpQueryParameter>
155 HttpRouteMatch& AddQueryParameters(QueryParametersT&& value) {
156 m_queryParametersHasBeenSet = true;
157 m_queryParameters.emplace_back(std::forward<QueryParametersT>(value));
158 return *this;
159 }
161
163
167 inline HttpScheme GetScheme() const { return m_scheme; }
168 inline bool SchemeHasBeenSet() const { return m_schemeHasBeenSet; }
169 inline void SetScheme(HttpScheme value) {
170 m_schemeHasBeenSet = true;
171 m_scheme = value;
172 }
174 SetScheme(value);
175 return *this;
176 }
178 private:
180
182
183 HttpPathMatch m_path;
184
185 int m_port{0};
186
187 Aws::String m_prefix;
188
189 Aws::Vector<HttpQueryParameter> m_queryParameters;
190
192 bool m_headersHasBeenSet = false;
193 bool m_methodHasBeenSet = false;
194 bool m_pathHasBeenSet = false;
195 bool m_portHasBeenSet = false;
196 bool m_prefixHasBeenSet = false;
197 bool m_queryParametersHasBeenSet = false;
198 bool m_schemeHasBeenSet = false;
199};
200
201} // namespace Model
202} // namespace AppMesh
203} // namespace Aws
HttpRouteMatch & AddQueryParameters(QueryParametersT &&value)
void SetHeaders(HeadersT &&value)
HttpRouteMatch & WithScheme(HttpScheme value)
HttpRouteMatch & WithHeaders(HeadersT &&value)
const HttpPathMatch & GetPath() const
const Aws::Vector< HttpQueryParameter > & GetQueryParameters() const
AWS_APPMESH_API HttpRouteMatch & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< HttpRouteHeader > & GetHeaders() const
HttpRouteMatch & WithPath(PathT &&value)
AWS_APPMESH_API HttpRouteMatch()=default
HttpRouteMatch & WithQueryParameters(QueryParametersT &&value)
const Aws::String & GetPrefix() const
AWS_APPMESH_API Aws::Utils::Json::JsonValue Jsonize() const
HttpRouteMatch & WithPrefix(PrefixT &&value)
AWS_APPMESH_API HttpRouteMatch(Aws::Utils::Json::JsonView jsonValue)
HttpRouteMatch & WithMethod(HttpMethod value)
HttpRouteMatch & WithPort(int value)
HttpRouteMatch & AddHeaders(HeadersT &&value)
void SetQueryParameters(QueryParametersT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue