AWS SDK for C++

AWS SDK for C++ Version 1.11.764

Loading...
Searching...
No Matches
HttpAction.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/iot/IoT_EXPORTS.h>
10#include <aws/iot/model/BatchConfig.h>
11#include <aws/iot/model/HttpActionHeader.h>
12#include <aws/iot/model/HttpAuthorization.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace IoT {
24namespace Model {
25
32 public:
33 AWS_IOT_API HttpAction() = default;
34 AWS_IOT_API HttpAction(Aws::Utils::Json::JsonView jsonValue);
37
39
44 inline const Aws::String& GetUrl() const { return m_url; }
45 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
46 template <typename UrlT = Aws::String>
47 void SetUrl(UrlT&& value) {
48 m_urlHasBeenSet = true;
49 m_url = std::forward<UrlT>(value);
50 }
51 template <typename UrlT = Aws::String>
52 HttpAction& WithUrl(UrlT&& value) {
53 SetUrl(std::forward<UrlT>(value));
54 return *this;
55 }
57
59
67 inline const Aws::String& GetConfirmationUrl() const { return m_confirmationUrl; }
68 inline bool ConfirmationUrlHasBeenSet() const { return m_confirmationUrlHasBeenSet; }
69 template <typename ConfirmationUrlT = Aws::String>
70 void SetConfirmationUrl(ConfirmationUrlT&& value) {
71 m_confirmationUrlHasBeenSet = true;
72 m_confirmationUrl = std::forward<ConfirmationUrlT>(value);
73 }
74 template <typename ConfirmationUrlT = Aws::String>
75 HttpAction& WithConfirmationUrl(ConfirmationUrlT&& value) {
76 SetConfirmationUrl(std::forward<ConfirmationUrlT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::Vector<HttpActionHeader>& GetHeaders() const { return m_headers; }
86 inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; }
87 template <typename HeadersT = Aws::Vector<HttpActionHeader>>
88 void SetHeaders(HeadersT&& value) {
89 m_headersHasBeenSet = true;
90 m_headers = std::forward<HeadersT>(value);
91 }
92 template <typename HeadersT = Aws::Vector<HttpActionHeader>>
93 HttpAction& WithHeaders(HeadersT&& value) {
94 SetHeaders(std::forward<HeadersT>(value));
95 return *this;
96 }
97 template <typename HeadersT = HttpActionHeader>
98 HttpAction& AddHeaders(HeadersT&& value) {
99 m_headersHasBeenSet = true;
100 m_headers.emplace_back(std::forward<HeadersT>(value));
101 return *this;
102 }
104
106
109 inline const HttpAuthorization& GetAuth() const { return m_auth; }
110 inline bool AuthHasBeenSet() const { return m_authHasBeenSet; }
111 template <typename AuthT = HttpAuthorization>
112 void SetAuth(AuthT&& value) {
113 m_authHasBeenSet = true;
114 m_auth = std::forward<AuthT>(value);
115 }
116 template <typename AuthT = HttpAuthorization>
117 HttpAction& WithAuth(AuthT&& value) {
118 SetAuth(std::forward<AuthT>(value));
119 return *this;
120 }
122
124
128 inline bool GetEnableBatching() const { return m_enableBatching; }
129 inline bool EnableBatchingHasBeenSet() const { return m_enableBatchingHasBeenSet; }
130 inline void SetEnableBatching(bool value) {
131 m_enableBatchingHasBeenSet = true;
132 m_enableBatching = value;
133 }
134 inline HttpAction& WithEnableBatching(bool value) {
135 SetEnableBatching(value);
136 return *this;
137 }
139
141
146 inline const BatchConfig& GetBatchConfig() const { return m_batchConfig; }
147 inline bool BatchConfigHasBeenSet() const { return m_batchConfigHasBeenSet; }
148 template <typename BatchConfigT = BatchConfig>
149 void SetBatchConfig(BatchConfigT&& value) {
150 m_batchConfigHasBeenSet = true;
151 m_batchConfig = std::forward<BatchConfigT>(value);
152 }
153 template <typename BatchConfigT = BatchConfig>
154 HttpAction& WithBatchConfig(BatchConfigT&& value) {
155 SetBatchConfig(std::forward<BatchConfigT>(value));
156 return *this;
157 }
159 private:
160 Aws::String m_url;
161
162 Aws::String m_confirmationUrl;
163
165
166 HttpAuthorization m_auth;
167
168 bool m_enableBatching{false};
169
170 BatchConfig m_batchConfig;
171 bool m_urlHasBeenSet = false;
172 bool m_confirmationUrlHasBeenSet = false;
173 bool m_headersHasBeenSet = false;
174 bool m_authHasBeenSet = false;
175 bool m_enableBatchingHasBeenSet = false;
176 bool m_batchConfigHasBeenSet = false;
177};
178
179} // namespace Model
180} // namespace IoT
181} // namespace Aws
const Aws::Vector< HttpActionHeader > & GetHeaders() const
Definition HttpAction.h:85
void SetUrl(UrlT &&value)
Definition HttpAction.h:47
HttpAction & WithHeaders(HeadersT &&value)
Definition HttpAction.h:93
HttpAction & WithConfirmationUrl(ConfirmationUrlT &&value)
Definition HttpAction.h:75
AWS_IOT_API HttpAction & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetConfirmationUrl() const
Definition HttpAction.h:67
const BatchConfig & GetBatchConfig() const
Definition HttpAction.h:146
HttpAction & WithAuth(AuthT &&value)
Definition HttpAction.h:117
bool BatchConfigHasBeenSet() const
Definition HttpAction.h:147
void SetBatchConfig(BatchConfigT &&value)
Definition HttpAction.h:149
HttpAction & AddHeaders(HeadersT &&value)
Definition HttpAction.h:98
AWS_IOT_API HttpAction()=default
const HttpAuthorization & GetAuth() const
Definition HttpAction.h:109
bool ConfirmationUrlHasBeenSet() const
Definition HttpAction.h:68
bool HeadersHasBeenSet() const
Definition HttpAction.h:86
void SetConfirmationUrl(ConfirmationUrlT &&value)
Definition HttpAction.h:70
HttpAction & WithBatchConfig(BatchConfigT &&value)
Definition HttpAction.h:154
void SetAuth(AuthT &&value)
Definition HttpAction.h:112
void SetEnableBatching(bool value)
Definition HttpAction.h:130
bool EnableBatchingHasBeenSet() const
Definition HttpAction.h:129
AWS_IOT_API HttpAction(Aws::Utils::Json::JsonView jsonValue)
void SetHeaders(HeadersT &&value)
Definition HttpAction.h:88
HttpAction & WithEnableBatching(bool value)
Definition HttpAction.h:134
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetUrl() const
Definition HttpAction.h:44
HttpAction & WithUrl(UrlT &&value)
Definition HttpAction.h:52
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue