AWS SDK for C++

AWS SDK for C++ Version 1.11.685

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/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace IoT {
20namespace Model {
21
25 public:
26 AWS_IOT_API CreateCommandRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateCommand"; }
33
34 AWS_IOT_API Aws::String SerializePayload() const override;
35
37
41 inline const Aws::String& GetCommandId() const { return m_commandId; }
42 inline bool CommandIdHasBeenSet() const { return m_commandIdHasBeenSet; }
43 template <typename CommandIdT = Aws::String>
44 void SetCommandId(CommandIdT&& value) {
45 m_commandIdHasBeenSet = true;
46 m_commandId = std::forward<CommandIdT>(value);
47 }
48 template <typename CommandIdT = Aws::String>
49 CreateCommandRequest& WithCommandId(CommandIdT&& value) {
50 SetCommandId(std::forward<CommandIdT>(value));
51 return *this;
52 }
54
56
60 inline CommandNamespace GetNamespace() const { return m_namespace; }
61 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
62 inline void SetNamespace(CommandNamespace value) {
63 m_namespaceHasBeenSet = true;
64 m_namespace = value;
65 }
67 SetNamespace(value);
68 return *this;
69 }
71
73
77 inline const Aws::String& GetDisplayName() const { return m_displayName; }
78 inline bool DisplayNameHasBeenSet() const { return m_displayNameHasBeenSet; }
79 template <typename DisplayNameT = Aws::String>
80 void SetDisplayName(DisplayNameT&& value) {
81 m_displayNameHasBeenSet = true;
82 m_displayName = std::forward<DisplayNameT>(value);
83 }
84 template <typename DisplayNameT = Aws::String>
85 CreateCommandRequest& WithDisplayName(DisplayNameT&& value) {
86 SetDisplayName(std::forward<DisplayNameT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::String& GetDescription() const { return m_description; }
96 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
97 template <typename DescriptionT = Aws::String>
98 void SetDescription(DescriptionT&& value) {
99 m_descriptionHasBeenSet = true;
100 m_description = std::forward<DescriptionT>(value);
101 }
102 template <typename DescriptionT = Aws::String>
103 CreateCommandRequest& WithDescription(DescriptionT&& value) {
104 SetDescription(std::forward<DescriptionT>(value));
105 return *this;
106 }
108
110
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
140 inline const Aws::Vector<CommandParameter>& GetMandatoryParameters() const { return m_mandatoryParameters; }
141 inline bool MandatoryParametersHasBeenSet() const { return m_mandatoryParametersHasBeenSet; }
142 template <typename MandatoryParametersT = Aws::Vector<CommandParameter>>
143 void SetMandatoryParameters(MandatoryParametersT&& value) {
144 m_mandatoryParametersHasBeenSet = true;
145 m_mandatoryParameters = std::forward<MandatoryParametersT>(value);
146 }
147 template <typename MandatoryParametersT = Aws::Vector<CommandParameter>>
148 CreateCommandRequest& WithMandatoryParameters(MandatoryParametersT&& value) {
149 SetMandatoryParameters(std::forward<MandatoryParametersT>(value));
150 return *this;
151 }
152 template <typename MandatoryParametersT = CommandParameter>
153 CreateCommandRequest& AddMandatoryParameters(MandatoryParametersT&& value) {
154 m_mandatoryParametersHasBeenSet = true;
155 m_mandatoryParameters.emplace_back(std::forward<MandatoryParametersT>(value));
156 return *this;
157 }
159
161
168 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
169 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
170 template <typename RoleArnT = Aws::String>
171 void SetRoleArn(RoleArnT&& value) {
172 m_roleArnHasBeenSet = true;
173 m_roleArn = std::forward<RoleArnT>(value);
174 }
175 template <typename RoleArnT = Aws::String>
177 SetRoleArn(std::forward<RoleArnT>(value));
178 return *this;
179 }
181
183
186 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
187 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
188 template <typename TagsT = Aws::Vector<Tag>>
189 void SetTags(TagsT&& value) {
190 m_tagsHasBeenSet = true;
191 m_tags = std::forward<TagsT>(value);
192 }
193 template <typename TagsT = Aws::Vector<Tag>>
195 SetTags(std::forward<TagsT>(value));
196 return *this;
197 }
198 template <typename TagsT = Tag>
200 m_tagsHasBeenSet = true;
201 m_tags.emplace_back(std::forward<TagsT>(value));
202 return *this;
203 }
205 private:
206 Aws::String m_commandId;
207 bool m_commandIdHasBeenSet = false;
208
210 bool m_namespaceHasBeenSet = false;
211
212 Aws::String m_displayName;
213 bool m_displayNameHasBeenSet = false;
214
215 Aws::String m_description;
216 bool m_descriptionHasBeenSet = false;
217
218 CommandPayload m_payload;
219 bool m_payloadHasBeenSet = false;
220
221 Aws::Vector<CommandParameter> m_mandatoryParameters;
222 bool m_mandatoryParametersHasBeenSet = false;
223
224 Aws::String m_roleArn;
225 bool m_roleArnHasBeenSet = false;
226
227 Aws::Vector<Tag> m_tags;
228 bool m_tagsHasBeenSet = false;
229};
230
231} // namespace Model
232} // namespace IoT
233} // namespace Aws
void SetMandatoryParameters(MandatoryParametersT &&value)
CreateCommandRequest & WithMandatoryParameters(MandatoryParametersT &&value)
CreateCommandRequest & AddMandatoryParameters(MandatoryParametersT &&value)
const Aws::Vector< Tag > & GetTags() 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 & WithRoleArn(RoleArnT &&value)
CreateCommandRequest & WithNamespace(CommandNamespace 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
CreateCommandRequest & WithCommandId(CommandIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector