AWS SDK for C++

AWS SDK for C++ Version 1.11.753

Loading...
Searching...
No Matches
CreateCommandRequest.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/IoTRequest.h>
10#include <aws/iot/IoT_EXPORTS.h>
11#include <aws/iot/model/CommandNamespace.h>
12#include <aws/iot/model/CommandParameter.h>
13#include <aws/iot/model/CommandPayload.h>
14#include <aws/iot/model/CommandPreprocessor.h>
15#include <aws/iot/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace IoT {
21namespace Model {
22
26 public:
27 AWS_IOT_API CreateCommandRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateCommand"; }
34
35 AWS_IOT_API Aws::String SerializePayload() const override;
36
38
42 inline const Aws::String& GetCommandId() const { return m_commandId; }
43 inline bool CommandIdHasBeenSet() const { return m_commandIdHasBeenSet; }
44 template <typename CommandIdT = Aws::String>
45 void SetCommandId(CommandIdT&& value) {
46 m_commandIdHasBeenSet = true;
47 m_commandId = std::forward<CommandIdT>(value);
48 }
49 template <typename CommandIdT = Aws::String>
50 CreateCommandRequest& WithCommandId(CommandIdT&& value) {
51 SetCommandId(std::forward<CommandIdT>(value));
52 return *this;
53 }
55
57
61 inline CommandNamespace GetNamespace() const { return m_namespace; }
62 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
63 inline void SetNamespace(CommandNamespace value) {
64 m_namespaceHasBeenSet = true;
65 m_namespace = value;
66 }
68 SetNamespace(value);
69 return *this;
70 }
72
74
78 inline const Aws::String& GetDisplayName() const { return m_displayName; }
79 inline bool DisplayNameHasBeenSet() const { return m_displayNameHasBeenSet; }
80 template <typename DisplayNameT = Aws::String>
81 void SetDisplayName(DisplayNameT&& value) {
82 m_displayNameHasBeenSet = true;
83 m_displayName = std::forward<DisplayNameT>(value);
84 }
85 template <typename DisplayNameT = Aws::String>
86 CreateCommandRequest& WithDisplayName(DisplayNameT&& value) {
87 SetDisplayName(std::forward<DisplayNameT>(value));
88 return *this;
89 }
91
93
96 inline const Aws::String& GetDescription() const { return m_description; }
97 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
98 template <typename DescriptionT = Aws::String>
99 void SetDescription(DescriptionT&& value) {
100 m_descriptionHasBeenSet = true;
101 m_description = std::forward<DescriptionT>(value);
102 }
103 template <typename DescriptionT = Aws::String>
104 CreateCommandRequest& WithDescription(DescriptionT&& value) {
105 SetDescription(std::forward<DescriptionT>(value));
106 return *this;
107 }
109
111
118 inline const CommandPayload& GetPayload() const { return m_payload; }
119 inline bool PayloadHasBeenSet() const { return m_payloadHasBeenSet; }
120 template <typename PayloadT = CommandPayload>
121 void SetPayload(PayloadT&& value) {
122 m_payloadHasBeenSet = true;
123 m_payload = std::forward<PayloadT>(value);
124 }
125 template <typename PayloadT = CommandPayload>
127 SetPayload(std::forward<PayloadT>(value));
128 return *this;
129 }
131
133
139 inline const Aws::String& GetPayloadTemplate() const { return m_payloadTemplate; }
140 inline bool PayloadTemplateHasBeenSet() const { return m_payloadTemplateHasBeenSet; }
141 template <typename PayloadTemplateT = Aws::String>
142 void SetPayloadTemplate(PayloadTemplateT&& value) {
143 m_payloadTemplateHasBeenSet = true;
144 m_payloadTemplate = std::forward<PayloadTemplateT>(value);
145 }
146 template <typename PayloadTemplateT = Aws::String>
147 CreateCommandRequest& WithPayloadTemplate(PayloadTemplateT&& value) {
148 SetPayloadTemplate(std::forward<PayloadTemplateT>(value));
149 return *this;
150 }
152
154
160 inline const CommandPreprocessor& GetPreprocessor() const { return m_preprocessor; }
161 inline bool PreprocessorHasBeenSet() const { return m_preprocessorHasBeenSet; }
162 template <typename PreprocessorT = CommandPreprocessor>
163 void SetPreprocessor(PreprocessorT&& value) {
164 m_preprocessorHasBeenSet = true;
165 m_preprocessor = std::forward<PreprocessorT>(value);
166 }
167 template <typename PreprocessorT = CommandPreprocessor>
168 CreateCommandRequest& WithPreprocessor(PreprocessorT&& value) {
169 SetPreprocessor(std::forward<PreprocessorT>(value));
170 return *this;
171 }
173
175
179 inline const Aws::Vector<CommandParameter>& GetMandatoryParameters() const { return m_mandatoryParameters; }
180 inline bool MandatoryParametersHasBeenSet() const { return m_mandatoryParametersHasBeenSet; }
181 template <typename MandatoryParametersT = Aws::Vector<CommandParameter>>
182 void SetMandatoryParameters(MandatoryParametersT&& value) {
183 m_mandatoryParametersHasBeenSet = true;
184 m_mandatoryParameters = std::forward<MandatoryParametersT>(value);
185 }
186 template <typename MandatoryParametersT = Aws::Vector<CommandParameter>>
187 CreateCommandRequest& WithMandatoryParameters(MandatoryParametersT&& value) {
188 SetMandatoryParameters(std::forward<MandatoryParametersT>(value));
189 return *this;
190 }
191 template <typename MandatoryParametersT = CommandParameter>
192 CreateCommandRequest& AddMandatoryParameters(MandatoryParametersT&& value) {
193 m_mandatoryParametersHasBeenSet = true;
194 m_mandatoryParameters.emplace_back(std::forward<MandatoryParametersT>(value));
195 return *this;
196 }
198
200
207 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
208 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
209 template <typename RoleArnT = Aws::String>
210 void SetRoleArn(RoleArnT&& value) {
211 m_roleArnHasBeenSet = true;
212 m_roleArn = std::forward<RoleArnT>(value);
213 }
214 template <typename RoleArnT = Aws::String>
216 SetRoleArn(std::forward<RoleArnT>(value));
217 return *this;
218 }
220
222
225 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
226 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
227 template <typename TagsT = Aws::Vector<Tag>>
228 void SetTags(TagsT&& value) {
229 m_tagsHasBeenSet = true;
230 m_tags = std::forward<TagsT>(value);
231 }
232 template <typename TagsT = Aws::Vector<Tag>>
234 SetTags(std::forward<TagsT>(value));
235 return *this;
236 }
237 template <typename TagsT = Tag>
239 m_tagsHasBeenSet = true;
240 m_tags.emplace_back(std::forward<TagsT>(value));
241 return *this;
242 }
244 private:
245 Aws::String m_commandId;
246
248
249 Aws::String m_displayName;
250
251 Aws::String m_description;
252
253 CommandPayload m_payload;
254
255 Aws::String m_payloadTemplate;
256
257 CommandPreprocessor m_preprocessor;
258
259 Aws::Vector<CommandParameter> m_mandatoryParameters;
260
261 Aws::String m_roleArn;
262
263 Aws::Vector<Tag> m_tags;
264 bool m_commandIdHasBeenSet = false;
265 bool m_namespaceHasBeenSet = false;
266 bool m_displayNameHasBeenSet = false;
267 bool m_descriptionHasBeenSet = false;
268 bool m_payloadHasBeenSet = false;
269 bool m_payloadTemplateHasBeenSet = false;
270 bool m_preprocessorHasBeenSet = false;
271 bool m_mandatoryParametersHasBeenSet = false;
272 bool m_roleArnHasBeenSet = false;
273 bool m_tagsHasBeenSet = false;
274};
275
276} // namespace Model
277} // namespace IoT
278} // namespace Aws
void SetMandatoryParameters(MandatoryParametersT &&value)
CreateCommandRequest & WithMandatoryParameters(MandatoryParametersT &&value)
CreateCommandRequest & AddMandatoryParameters(MandatoryParametersT &&value)
const Aws::Vector< Tag > & GetTags() const
const Aws::String & GetPayloadTemplate() const
CreateCommandRequest & WithDescription(DescriptionT &&value)
const Aws::String & GetDisplayName() const
const Aws::Vector< CommandParameter > & GetMandatoryParameters() const
const CommandPayload & GetPayload() const
void SetDisplayName(DisplayNameT &&value)
const Aws::String & GetDescription() const
void SetDescription(DescriptionT &&value)
CreateCommandRequest & WithDisplayName(DisplayNameT &&value)
CreateCommandRequest & WithPreprocessor(PreprocessorT &&value)
CreateCommandRequest & WithRoleArn(RoleArnT &&value)
CreateCommandRequest & WithNamespace(CommandNamespace value)
void SetPayloadTemplate(PayloadTemplateT &&value)
CreateCommandRequest & WithPayloadTemplate(PayloadTemplateT &&value)
void SetNamespace(CommandNamespace value)
CreateCommandRequest & WithPayload(PayloadT &&value)
CreateCommandRequest & WithTags(TagsT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetCommandId() const
CreateCommandRequest & AddTags(TagsT &&value)
AWS_IOT_API Aws::String SerializePayload() const override
AWS_IOT_API CreateCommandRequest()=default
void SetPreprocessor(PreprocessorT &&value)
const CommandPreprocessor & GetPreprocessor() const
CreateCommandRequest & WithCommandId(CommandIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector