AWS SDK for C++

AWS SDK for C++ Version 1.11.929

Loading...
Searching...
No Matches
CreateOtaTaskRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iot-managed-integrations/IoTManagedIntegrationsRequest.h>
12#include <aws/iot-managed-integrations/IoTManagedIntegrations_EXPORTS.h>
13#include <aws/iot-managed-integrations/model/OtaMechanism.h>
14#include <aws/iot-managed-integrations/model/OtaProtocol.h>
15#include <aws/iot-managed-integrations/model/OtaTaskExecutionRetryConfig.h>
16#include <aws/iot-managed-integrations/model/OtaTaskSchedulingConfig.h>
17#include <aws/iot-managed-integrations/model/OtaType.h>
18
19#include <utility>
20
21namespace Aws {
22namespace IoTManagedIntegrations {
23namespace Model {
24
28 public:
29 AWS_IOTMANAGEDINTEGRATIONS_API CreateOtaTaskRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateOtaTask"; }
36
37 AWS_IOTMANAGEDINTEGRATIONS_API Aws::String SerializePayload() const override;
38
40
43 inline const Aws::String& GetDescription() const { return m_description; }
44 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
45 template <typename DescriptionT = Aws::String>
46 void SetDescription(DescriptionT&& value) {
47 m_descriptionHasBeenSet = true;
48 m_description = std::forward<DescriptionT>(value);
49 }
50 template <typename DescriptionT = Aws::String>
51 CreateOtaTaskRequest& WithDescription(DescriptionT&& value) {
52 SetDescription(std::forward<DescriptionT>(value));
53 return *this;
54 }
56
58
62 inline const Aws::String& GetS3Url() const { return m_s3Url; }
63 inline bool S3UrlHasBeenSet() const { return m_s3UrlHasBeenSet; }
64 template <typename S3UrlT = Aws::String>
65 void SetS3Url(S3UrlT&& value) {
66 m_s3UrlHasBeenSet = true;
67 m_s3Url = std::forward<S3UrlT>(value);
68 }
69 template <typename S3UrlT = Aws::String>
71 SetS3Url(std::forward<S3UrlT>(value));
72 return *this;
73 }
75
77
81 inline OtaProtocol GetProtocol() const { return m_protocol; }
82 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
83 inline void SetProtocol(OtaProtocol value) {
84 m_protocolHasBeenSet = true;
85 m_protocol = value;
86 }
88 SetProtocol(value);
89 return *this;
90 }
92
94
97 inline const Aws::Vector<Aws::String>& GetTarget() const { return m_target; }
98 inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; }
99 template <typename TargetT = Aws::Vector<Aws::String>>
100 void SetTarget(TargetT&& value) {
101 m_targetHasBeenSet = true;
102 m_target = std::forward<TargetT>(value);
103 }
104 template <typename TargetT = Aws::Vector<Aws::String>>
106 SetTarget(std::forward<TargetT>(value));
107 return *this;
108 }
109 template <typename TargetT = Aws::String>
110 CreateOtaTaskRequest& AddTarget(TargetT&& value) {
111 m_targetHasBeenSet = true;
112 m_target.emplace_back(std::forward<TargetT>(value));
113 return *this;
114 }
116
118
121 inline const Aws::String& GetTaskConfigurationId() const { return m_taskConfigurationId; }
122 inline bool TaskConfigurationIdHasBeenSet() const { return m_taskConfigurationIdHasBeenSet; }
123 template <typename TaskConfigurationIdT = Aws::String>
124 void SetTaskConfigurationId(TaskConfigurationIdT&& value) {
125 m_taskConfigurationIdHasBeenSet = true;
126 m_taskConfigurationId = std::forward<TaskConfigurationIdT>(value);
127 }
128 template <typename TaskConfigurationIdT = Aws::String>
129 CreateOtaTaskRequest& WithTaskConfigurationId(TaskConfigurationIdT&& value) {
130 SetTaskConfigurationId(std::forward<TaskConfigurationIdT>(value));
131 return *this;
132 }
134
136
139 inline OtaMechanism GetOtaMechanism() const { return m_otaMechanism; }
140 inline bool OtaMechanismHasBeenSet() const { return m_otaMechanismHasBeenSet; }
141 inline void SetOtaMechanism(OtaMechanism value) {
142 m_otaMechanismHasBeenSet = true;
143 m_otaMechanism = value;
144 }
146 SetOtaMechanism(value);
147 return *this;
148 }
150
152
155 inline OtaType GetOtaType() const { return m_otaType; }
156 inline bool OtaTypeHasBeenSet() const { return m_otaTypeHasBeenSet; }
157 inline void SetOtaType(OtaType value) {
158 m_otaTypeHasBeenSet = true;
159 m_otaType = value;
160 }
162 SetOtaType(value);
163 return *this;
164 }
166
168
171 inline const Aws::String& GetOtaTargetQueryString() const { return m_otaTargetQueryString; }
172 inline bool OtaTargetQueryStringHasBeenSet() const { return m_otaTargetQueryStringHasBeenSet; }
173 template <typename OtaTargetQueryStringT = Aws::String>
174 void SetOtaTargetQueryString(OtaTargetQueryStringT&& value) {
175 m_otaTargetQueryStringHasBeenSet = true;
176 m_otaTargetQueryString = std::forward<OtaTargetQueryStringT>(value);
177 }
178 template <typename OtaTargetQueryStringT = Aws::String>
179 CreateOtaTaskRequest& WithOtaTargetQueryString(OtaTargetQueryStringT&& value) {
180 SetOtaTargetQueryString(std::forward<OtaTargetQueryStringT>(value));
181 return *this;
182 }
184
186
191 inline const Aws::String& GetClientToken() const { return m_clientToken; }
192 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
193 template <typename ClientTokenT = Aws::String>
194 void SetClientToken(ClientTokenT&& value) {
195 m_clientTokenHasBeenSet = true;
196 m_clientToken = std::forward<ClientTokenT>(value);
197 }
198 template <typename ClientTokenT = Aws::String>
199 CreateOtaTaskRequest& WithClientToken(ClientTokenT&& value) {
200 SetClientToken(std::forward<ClientTokenT>(value));
201 return *this;
202 }
204
206
207 inline const OtaTaskSchedulingConfig& GetOtaSchedulingConfig() const { return m_otaSchedulingConfig; }
208 inline bool OtaSchedulingConfigHasBeenSet() const { return m_otaSchedulingConfigHasBeenSet; }
209 template <typename OtaSchedulingConfigT = OtaTaskSchedulingConfig>
210 void SetOtaSchedulingConfig(OtaSchedulingConfigT&& value) {
211 m_otaSchedulingConfigHasBeenSet = true;
212 m_otaSchedulingConfig = std::forward<OtaSchedulingConfigT>(value);
213 }
214 template <typename OtaSchedulingConfigT = OtaTaskSchedulingConfig>
215 CreateOtaTaskRequest& WithOtaSchedulingConfig(OtaSchedulingConfigT&& value) {
216 SetOtaSchedulingConfig(std::forward<OtaSchedulingConfigT>(value));
217 return *this;
218 }
220
222
223 inline const OtaTaskExecutionRetryConfig& GetOtaTaskExecutionRetryConfig() const { return m_otaTaskExecutionRetryConfig; }
224 inline bool OtaTaskExecutionRetryConfigHasBeenSet() const { return m_otaTaskExecutionRetryConfigHasBeenSet; }
225 template <typename OtaTaskExecutionRetryConfigT = OtaTaskExecutionRetryConfig>
226 void SetOtaTaskExecutionRetryConfig(OtaTaskExecutionRetryConfigT&& value) {
227 m_otaTaskExecutionRetryConfigHasBeenSet = true;
228 m_otaTaskExecutionRetryConfig = std::forward<OtaTaskExecutionRetryConfigT>(value);
229 }
230 template <typename OtaTaskExecutionRetryConfigT = OtaTaskExecutionRetryConfig>
231 CreateOtaTaskRequest& WithOtaTaskExecutionRetryConfig(OtaTaskExecutionRetryConfigT&& value) {
232 SetOtaTaskExecutionRetryConfig(std::forward<OtaTaskExecutionRetryConfigT>(value));
233 return *this;
234 }
236
238
242 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
243 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
244 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
245 void SetTags(TagsT&& value) {
246 m_tagsHasBeenSet = true;
247 m_tags = std::forward<TagsT>(value);
248 }
249 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
251 SetTags(std::forward<TagsT>(value));
252 return *this;
253 }
254 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
255 CreateOtaTaskRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
256 m_tagsHasBeenSet = true;
257 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
258 return *this;
259 }
261 private:
262 Aws::String m_description;
263
264 Aws::String m_s3Url;
265
267
269
270 Aws::String m_taskConfigurationId;
271
272 OtaMechanism m_otaMechanism{OtaMechanism::NOT_SET};
273
274 OtaType m_otaType{OtaType::NOT_SET};
275
276 Aws::String m_otaTargetQueryString;
277
279
280 OtaTaskSchedulingConfig m_otaSchedulingConfig;
281
282 OtaTaskExecutionRetryConfig m_otaTaskExecutionRetryConfig;
283
285 bool m_descriptionHasBeenSet = false;
286 bool m_s3UrlHasBeenSet = false;
287 bool m_protocolHasBeenSet = false;
288 bool m_targetHasBeenSet = false;
289 bool m_taskConfigurationIdHasBeenSet = false;
290 bool m_otaMechanismHasBeenSet = false;
291 bool m_otaTypeHasBeenSet = false;
292 bool m_otaTargetQueryStringHasBeenSet = false;
293 bool m_clientTokenHasBeenSet = true;
294 bool m_otaSchedulingConfigHasBeenSet = false;
295 bool m_otaTaskExecutionRetryConfigHasBeenSet = false;
296 bool m_tagsHasBeenSet = false;
297};
298
299} // namespace Model
300} // namespace IoTManagedIntegrations
301} // namespace Aws
void SetOtaTaskExecutionRetryConfig(OtaTaskExecutionRetryConfigT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateOtaTaskRequest & WithOtaTargetQueryString(OtaTargetQueryStringT &&value)
CreateOtaTaskRequest & WithProtocol(OtaProtocol value)
AWS_IOTMANAGEDINTEGRATIONS_API CreateOtaTaskRequest()=default
virtual const char * GetServiceRequestName() const override
CreateOtaTaskRequest & WithOtaTaskExecutionRetryConfig(OtaTaskExecutionRetryConfigT &&value)
const Aws::Vector< Aws::String > & GetTarget() const
const OtaTaskSchedulingConfig & GetOtaSchedulingConfig() const
CreateOtaTaskRequest & WithClientToken(ClientTokenT &&value)
CreateOtaTaskRequest & WithOtaMechanism(OtaMechanism value)
AWS_IOTMANAGEDINTEGRATIONS_API Aws::String SerializePayload() const override
CreateOtaTaskRequest & WithDescription(DescriptionT &&value)
CreateOtaTaskRequest & WithOtaSchedulingConfig(OtaSchedulingConfigT &&value)
CreateOtaTaskRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
const OtaTaskExecutionRetryConfig & GetOtaTaskExecutionRetryConfig() const
CreateOtaTaskRequest & WithTaskConfigurationId(TaskConfigurationIdT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector