AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateOTAUpdateRequest.h
1
6#pragma once
7#include <aws/iot/IoT_EXPORTS.h>
8#include <aws/iot/IoTRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iot/model/TargetSelection.h>
12#include <aws/iot/model/AwsJobExecutionsRolloutConfig.h>
13#include <aws/iot/model/AwsJobPresignedUrlConfig.h>
14#include <aws/iot/model/AwsJobAbortConfig.h>
15#include <aws/iot/model/AwsJobTimeoutConfig.h>
16#include <aws/core/utils/memory/stl/AWSMap.h>
17#include <aws/iot/model/Protocol.h>
18#include <aws/iot/model/OTAUpdateFile.h>
19#include <aws/iot/model/Tag.h>
20#include <utility>
21
22namespace Aws
23{
24namespace IoT
25{
26namespace Model
27{
28
32 {
33 public:
34 AWS_IOT_API CreateOTAUpdateRequest() = default;
35
36 // Service request name is the Operation name which will send this request out,
37 // each operation should has unique request name, so that we can get operation's name from this request.
38 // Note: this is not true for response, multiple operations may have the same response name,
39 // so we can not get operation's name from response.
40 inline virtual const char* GetServiceRequestName() const override { return "CreateOTAUpdate"; }
41
42 AWS_IOT_API Aws::String SerializePayload() const override;
43
44
46
49 inline const Aws::String& GetOtaUpdateId() const { return m_otaUpdateId; }
50 inline bool OtaUpdateIdHasBeenSet() const { return m_otaUpdateIdHasBeenSet; }
51 template<typename OtaUpdateIdT = Aws::String>
52 void SetOtaUpdateId(OtaUpdateIdT&& value) { m_otaUpdateIdHasBeenSet = true; m_otaUpdateId = std::forward<OtaUpdateIdT>(value); }
53 template<typename OtaUpdateIdT = Aws::String>
54 CreateOTAUpdateRequest& WithOtaUpdateId(OtaUpdateIdT&& value) { SetOtaUpdateId(std::forward<OtaUpdateIdT>(value)); return *this;}
56
58
61 inline const Aws::String& GetDescription() const { return m_description; }
62 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
63 template<typename DescriptionT = Aws::String>
64 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
65 template<typename DescriptionT = Aws::String>
66 CreateOTAUpdateRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
68
70
73 inline const Aws::Vector<Aws::String>& GetTargets() const { return m_targets; }
74 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
75 template<typename TargetsT = Aws::Vector<Aws::String>>
76 void SetTargets(TargetsT&& value) { m_targetsHasBeenSet = true; m_targets = std::forward<TargetsT>(value); }
77 template<typename TargetsT = Aws::Vector<Aws::String>>
78 CreateOTAUpdateRequest& WithTargets(TargetsT&& value) { SetTargets(std::forward<TargetsT>(value)); return *this;}
79 template<typename TargetsT = Aws::String>
80 CreateOTAUpdateRequest& AddTargets(TargetsT&& value) { m_targetsHasBeenSet = true; m_targets.emplace_back(std::forward<TargetsT>(value)); return *this; }
82
84
89 inline const Aws::Vector<Protocol>& GetProtocols() const { return m_protocols; }
90 inline bool ProtocolsHasBeenSet() const { return m_protocolsHasBeenSet; }
91 template<typename ProtocolsT = Aws::Vector<Protocol>>
92 void SetProtocols(ProtocolsT&& value) { m_protocolsHasBeenSet = true; m_protocols = std::forward<ProtocolsT>(value); }
93 template<typename ProtocolsT = Aws::Vector<Protocol>>
94 CreateOTAUpdateRequest& WithProtocols(ProtocolsT&& value) { SetProtocols(std::forward<ProtocolsT>(value)); return *this;}
95 inline CreateOTAUpdateRequest& AddProtocols(Protocol value) { m_protocolsHasBeenSet = true; m_protocols.push_back(value); return *this; }
97
99
107 inline TargetSelection GetTargetSelection() const { return m_targetSelection; }
108 inline bool TargetSelectionHasBeenSet() const { return m_targetSelectionHasBeenSet; }
109 inline void SetTargetSelection(TargetSelection value) { m_targetSelectionHasBeenSet = true; m_targetSelection = value; }
112
114
117 inline const AwsJobExecutionsRolloutConfig& GetAwsJobExecutionsRolloutConfig() const { return m_awsJobExecutionsRolloutConfig; }
118 inline bool AwsJobExecutionsRolloutConfigHasBeenSet() const { return m_awsJobExecutionsRolloutConfigHasBeenSet; }
119 template<typename AwsJobExecutionsRolloutConfigT = AwsJobExecutionsRolloutConfig>
120 void SetAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT&& value) { m_awsJobExecutionsRolloutConfigHasBeenSet = true; m_awsJobExecutionsRolloutConfig = std::forward<AwsJobExecutionsRolloutConfigT>(value); }
121 template<typename AwsJobExecutionsRolloutConfigT = AwsJobExecutionsRolloutConfig>
122 CreateOTAUpdateRequest& WithAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT&& value) { SetAwsJobExecutionsRolloutConfig(std::forward<AwsJobExecutionsRolloutConfigT>(value)); return *this;}
124
126
129 inline const AwsJobPresignedUrlConfig& GetAwsJobPresignedUrlConfig() const { return m_awsJobPresignedUrlConfig; }
130 inline bool AwsJobPresignedUrlConfigHasBeenSet() const { return m_awsJobPresignedUrlConfigHasBeenSet; }
131 template<typename AwsJobPresignedUrlConfigT = AwsJobPresignedUrlConfig>
132 void SetAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT&& value) { m_awsJobPresignedUrlConfigHasBeenSet = true; m_awsJobPresignedUrlConfig = std::forward<AwsJobPresignedUrlConfigT>(value); }
133 template<typename AwsJobPresignedUrlConfigT = AwsJobPresignedUrlConfig>
134 CreateOTAUpdateRequest& WithAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT&& value) { SetAwsJobPresignedUrlConfig(std::forward<AwsJobPresignedUrlConfigT>(value)); return *this;}
136
138
141 inline const AwsJobAbortConfig& GetAwsJobAbortConfig() const { return m_awsJobAbortConfig; }
142 inline bool AwsJobAbortConfigHasBeenSet() const { return m_awsJobAbortConfigHasBeenSet; }
143 template<typename AwsJobAbortConfigT = AwsJobAbortConfig>
144 void SetAwsJobAbortConfig(AwsJobAbortConfigT&& value) { m_awsJobAbortConfigHasBeenSet = true; m_awsJobAbortConfig = std::forward<AwsJobAbortConfigT>(value); }
145 template<typename AwsJobAbortConfigT = AwsJobAbortConfig>
146 CreateOTAUpdateRequest& WithAwsJobAbortConfig(AwsJobAbortConfigT&& value) { SetAwsJobAbortConfig(std::forward<AwsJobAbortConfigT>(value)); return *this;}
148
150
157 inline const AwsJobTimeoutConfig& GetAwsJobTimeoutConfig() const { return m_awsJobTimeoutConfig; }
158 inline bool AwsJobTimeoutConfigHasBeenSet() const { return m_awsJobTimeoutConfigHasBeenSet; }
159 template<typename AwsJobTimeoutConfigT = AwsJobTimeoutConfig>
160 void SetAwsJobTimeoutConfig(AwsJobTimeoutConfigT&& value) { m_awsJobTimeoutConfigHasBeenSet = true; m_awsJobTimeoutConfig = std::forward<AwsJobTimeoutConfigT>(value); }
161 template<typename AwsJobTimeoutConfigT = AwsJobTimeoutConfig>
162 CreateOTAUpdateRequest& WithAwsJobTimeoutConfig(AwsJobTimeoutConfigT&& value) { SetAwsJobTimeoutConfig(std::forward<AwsJobTimeoutConfigT>(value)); return *this;}
164
166
169 inline const Aws::Vector<OTAUpdateFile>& GetFiles() const { return m_files; }
170 inline bool FilesHasBeenSet() const { return m_filesHasBeenSet; }
171 template<typename FilesT = Aws::Vector<OTAUpdateFile>>
172 void SetFiles(FilesT&& value) { m_filesHasBeenSet = true; m_files = std::forward<FilesT>(value); }
173 template<typename FilesT = Aws::Vector<OTAUpdateFile>>
174 CreateOTAUpdateRequest& WithFiles(FilesT&& value) { SetFiles(std::forward<FilesT>(value)); return *this;}
175 template<typename FilesT = OTAUpdateFile>
176 CreateOTAUpdateRequest& AddFiles(FilesT&& value) { m_filesHasBeenSet = true; m_files.emplace_back(std::forward<FilesT>(value)); return *this; }
178
180
185 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
186 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
187 template<typename RoleArnT = Aws::String>
188 void SetRoleArn(RoleArnT&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::forward<RoleArnT>(value); }
189 template<typename RoleArnT = Aws::String>
190 CreateOTAUpdateRequest& WithRoleArn(RoleArnT&& value) { SetRoleArn(std::forward<RoleArnT>(value)); return *this;}
192
194
198 inline const Aws::Map<Aws::String, Aws::String>& GetAdditionalParameters() const { return m_additionalParameters; }
199 inline bool AdditionalParametersHasBeenSet() const { return m_additionalParametersHasBeenSet; }
200 template<typename AdditionalParametersT = Aws::Map<Aws::String, Aws::String>>
201 void SetAdditionalParameters(AdditionalParametersT&& value) { m_additionalParametersHasBeenSet = true; m_additionalParameters = std::forward<AdditionalParametersT>(value); }
202 template<typename AdditionalParametersT = Aws::Map<Aws::String, Aws::String>>
203 CreateOTAUpdateRequest& WithAdditionalParameters(AdditionalParametersT&& value) { SetAdditionalParameters(std::forward<AdditionalParametersT>(value)); return *this;}
204 template<typename AdditionalParametersKeyT = Aws::String, typename AdditionalParametersValueT = Aws::String>
205 CreateOTAUpdateRequest& AddAdditionalParameters(AdditionalParametersKeyT&& key, AdditionalParametersValueT&& value) {
206 m_additionalParametersHasBeenSet = true; m_additionalParameters.emplace(std::forward<AdditionalParametersKeyT>(key), std::forward<AdditionalParametersValueT>(value)); return *this;
207 }
209
211
214 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
215 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
216 template<typename TagsT = Aws::Vector<Tag>>
217 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
218 template<typename TagsT = Aws::Vector<Tag>>
219 CreateOTAUpdateRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
220 template<typename TagsT = Tag>
221 CreateOTAUpdateRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
223 private:
224
225 Aws::String m_otaUpdateId;
226 bool m_otaUpdateIdHasBeenSet = false;
227
228 Aws::String m_description;
229 bool m_descriptionHasBeenSet = false;
230
231 Aws::Vector<Aws::String> m_targets;
232 bool m_targetsHasBeenSet = false;
233
234 Aws::Vector<Protocol> m_protocols;
235 bool m_protocolsHasBeenSet = false;
236
237 TargetSelection m_targetSelection{TargetSelection::NOT_SET};
238 bool m_targetSelectionHasBeenSet = false;
239
240 AwsJobExecutionsRolloutConfig m_awsJobExecutionsRolloutConfig;
241 bool m_awsJobExecutionsRolloutConfigHasBeenSet = false;
242
243 AwsJobPresignedUrlConfig m_awsJobPresignedUrlConfig;
244 bool m_awsJobPresignedUrlConfigHasBeenSet = false;
245
246 AwsJobAbortConfig m_awsJobAbortConfig;
247 bool m_awsJobAbortConfigHasBeenSet = false;
248
249 AwsJobTimeoutConfig m_awsJobTimeoutConfig;
250 bool m_awsJobTimeoutConfigHasBeenSet = false;
251
253 bool m_filesHasBeenSet = false;
254
255 Aws::String m_roleArn;
256 bool m_roleArnHasBeenSet = false;
257
258 Aws::Map<Aws::String, Aws::String> m_additionalParameters;
259 bool m_additionalParametersHasBeenSet = false;
260
261 Aws::Vector<Tag> m_tags;
262 bool m_tagsHasBeenSet = false;
263 };
264
265} // namespace Model
266} // namespace IoT
267} // namespace Aws
CreateOTAUpdateRequest & WithProtocols(ProtocolsT &&value)
AWS_IOT_API CreateOTAUpdateRequest()=default
CreateOTAUpdateRequest & AddProtocols(Protocol value)
const AwsJobExecutionsRolloutConfig & GetAwsJobExecutionsRolloutConfig() const
AWS_IOT_API Aws::String SerializePayload() const override
CreateOTAUpdateRequest & WithAwsJobAbortConfig(AwsJobAbortConfigT &&value)
const Aws::Vector< Protocol > & GetProtocols() const
CreateOTAUpdateRequest & WithAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT &&value)
void SetAwsJobExecutionsRolloutConfig(AwsJobExecutionsRolloutConfigT &&value)
CreateOTAUpdateRequest & WithOtaUpdateId(OtaUpdateIdT &&value)
const AwsJobTimeoutConfig & GetAwsJobTimeoutConfig() const
CreateOTAUpdateRequest & WithAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT &&value)
CreateOTAUpdateRequest & AddTags(TagsT &&value)
void SetAwsJobAbortConfig(AwsJobAbortConfigT &&value)
CreateOTAUpdateRequest & AddTargets(TargetsT &&value)
void SetAwsJobPresignedUrlConfig(AwsJobPresignedUrlConfigT &&value)
void SetAdditionalParameters(AdditionalParametersT &&value)
CreateOTAUpdateRequest & WithAwsJobTimeoutConfig(AwsJobTimeoutConfigT &&value)
virtual const char * GetServiceRequestName() const override
CreateOTAUpdateRequest & WithTags(TagsT &&value)
CreateOTAUpdateRequest & WithRoleArn(RoleArnT &&value)
CreateOTAUpdateRequest & WithTargetSelection(TargetSelection value)
void SetAwsJobTimeoutConfig(AwsJobTimeoutConfigT &&value)
const Aws::Map< Aws::String, Aws::String > & GetAdditionalParameters() const
CreateOTAUpdateRequest & AddFiles(FilesT &&value)
CreateOTAUpdateRequest & WithTargets(TargetsT &&value)
CreateOTAUpdateRequest & WithFiles(FilesT &&value)
CreateOTAUpdateRequest & WithDescription(DescriptionT &&value)
const Aws::Vector< Tag > & GetTags() const
const Aws::Vector< OTAUpdateFile > & GetFiles() const
const AwsJobPresignedUrlConfig & GetAwsJobPresignedUrlConfig() const
CreateOTAUpdateRequest & AddAdditionalParameters(AdditionalParametersKeyT &&key, AdditionalParametersValueT &&value)
const AwsJobAbortConfig & GetAwsJobAbortConfig() const
CreateOTAUpdateRequest & WithAdditionalParameters(AdditionalParametersT &&value)
const Aws::Vector< Aws::String > & GetTargets() const
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