aws_sdk_iot/operation/get_command/
_get_command_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetCommandOutput {
6 pub command_id: ::std::option::Option<::std::string::String>,
8 pub command_arn: ::std::option::Option<::std::string::String>,
16 pub namespace: ::std::option::Option<crate::types::CommandNamespace>,
18 pub display_name: ::std::option::Option<::std::string::String>,
20 pub description: ::std::option::Option<::std::string::String>,
22 pub mandatory_parameters: ::std::option::Option<::std::vec::Vec<crate::types::CommandParameter>>,
24 pub payload: ::std::option::Option<crate::types::CommandPayload>,
26 pub payload_template: ::std::option::Option<::std::string::String>,
28 pub preprocessor: ::std::option::Option<crate::types::CommandPreprocessor>,
30 pub role_arn: ::std::option::Option<::std::string::String>,
32 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
34 pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
36 pub deprecated: ::std::option::Option<bool>,
38 pub pending_deletion: ::std::option::Option<bool>,
40 _request_id: Option<String>,
41}
42impl GetCommandOutput {
43 pub fn command_id(&self) -> ::std::option::Option<&str> {
45 self.command_id.as_deref()
46 }
47 pub fn command_arn(&self) -> ::std::option::Option<&str> {
55 self.command_arn.as_deref()
56 }
57 pub fn namespace(&self) -> ::std::option::Option<&crate::types::CommandNamespace> {
59 self.namespace.as_ref()
60 }
61 pub fn display_name(&self) -> ::std::option::Option<&str> {
63 self.display_name.as_deref()
64 }
65 pub fn description(&self) -> ::std::option::Option<&str> {
67 self.description.as_deref()
68 }
69 pub fn mandatory_parameters(&self) -> &[crate::types::CommandParameter] {
73 self.mandatory_parameters.as_deref().unwrap_or_default()
74 }
75 pub fn payload(&self) -> ::std::option::Option<&crate::types::CommandPayload> {
77 self.payload.as_ref()
78 }
79 pub fn payload_template(&self) -> ::std::option::Option<&str> {
81 self.payload_template.as_deref()
82 }
83 pub fn preprocessor(&self) -> ::std::option::Option<&crate::types::CommandPreprocessor> {
85 self.preprocessor.as_ref()
86 }
87 pub fn role_arn(&self) -> ::std::option::Option<&str> {
89 self.role_arn.as_deref()
90 }
91 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
93 self.created_at.as_ref()
94 }
95 pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
97 self.last_updated_at.as_ref()
98 }
99 pub fn deprecated(&self) -> ::std::option::Option<bool> {
101 self.deprecated
102 }
103 pub fn pending_deletion(&self) -> ::std::option::Option<bool> {
105 self.pending_deletion
106 }
107}
108impl ::aws_types::request_id::RequestId for GetCommandOutput {
109 fn request_id(&self) -> Option<&str> {
110 self._request_id.as_deref()
111 }
112}
113impl GetCommandOutput {
114 pub fn builder() -> crate::operation::get_command::builders::GetCommandOutputBuilder {
116 crate::operation::get_command::builders::GetCommandOutputBuilder::default()
117 }
118}
119
120#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
122#[non_exhaustive]
123pub struct GetCommandOutputBuilder {
124 pub(crate) command_id: ::std::option::Option<::std::string::String>,
125 pub(crate) command_arn: ::std::option::Option<::std::string::String>,
126 pub(crate) namespace: ::std::option::Option<crate::types::CommandNamespace>,
127 pub(crate) display_name: ::std::option::Option<::std::string::String>,
128 pub(crate) description: ::std::option::Option<::std::string::String>,
129 pub(crate) mandatory_parameters: ::std::option::Option<::std::vec::Vec<crate::types::CommandParameter>>,
130 pub(crate) payload: ::std::option::Option<crate::types::CommandPayload>,
131 pub(crate) payload_template: ::std::option::Option<::std::string::String>,
132 pub(crate) preprocessor: ::std::option::Option<crate::types::CommandPreprocessor>,
133 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
134 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
135 pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
136 pub(crate) deprecated: ::std::option::Option<bool>,
137 pub(crate) pending_deletion: ::std::option::Option<bool>,
138 _request_id: Option<String>,
139}
140impl GetCommandOutputBuilder {
141 pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.command_id = ::std::option::Option::Some(input.into());
144 self
145 }
146 pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.command_id = input;
149 self
150 }
151 pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
153 &self.command_id
154 }
155 pub fn command_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163 self.command_arn = ::std::option::Option::Some(input.into());
164 self
165 }
166 pub fn set_command_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174 self.command_arn = input;
175 self
176 }
177 pub fn get_command_arn(&self) -> &::std::option::Option<::std::string::String> {
185 &self.command_arn
186 }
187 pub fn namespace(mut self, input: crate::types::CommandNamespace) -> Self {
189 self.namespace = ::std::option::Option::Some(input);
190 self
191 }
192 pub fn set_namespace(mut self, input: ::std::option::Option<crate::types::CommandNamespace>) -> Self {
194 self.namespace = input;
195 self
196 }
197 pub fn get_namespace(&self) -> &::std::option::Option<crate::types::CommandNamespace> {
199 &self.namespace
200 }
201 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203 self.display_name = ::std::option::Option::Some(input.into());
204 self
205 }
206 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208 self.display_name = input;
209 self
210 }
211 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
213 &self.display_name
214 }
215 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217 self.description = ::std::option::Option::Some(input.into());
218 self
219 }
220 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222 self.description = input;
223 self
224 }
225 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
227 &self.description
228 }
229 pub fn mandatory_parameters(mut self, input: crate::types::CommandParameter) -> Self {
235 let mut v = self.mandatory_parameters.unwrap_or_default();
236 v.push(input);
237 self.mandatory_parameters = ::std::option::Option::Some(v);
238 self
239 }
240 pub fn set_mandatory_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CommandParameter>>) -> Self {
242 self.mandatory_parameters = input;
243 self
244 }
245 pub fn get_mandatory_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CommandParameter>> {
247 &self.mandatory_parameters
248 }
249 pub fn payload(mut self, input: crate::types::CommandPayload) -> Self {
251 self.payload = ::std::option::Option::Some(input);
252 self
253 }
254 pub fn set_payload(mut self, input: ::std::option::Option<crate::types::CommandPayload>) -> Self {
256 self.payload = input;
257 self
258 }
259 pub fn get_payload(&self) -> &::std::option::Option<crate::types::CommandPayload> {
261 &self.payload
262 }
263 pub fn payload_template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265 self.payload_template = ::std::option::Option::Some(input.into());
266 self
267 }
268 pub fn set_payload_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
270 self.payload_template = input;
271 self
272 }
273 pub fn get_payload_template(&self) -> &::std::option::Option<::std::string::String> {
275 &self.payload_template
276 }
277 pub fn preprocessor(mut self, input: crate::types::CommandPreprocessor) -> Self {
279 self.preprocessor = ::std::option::Option::Some(input);
280 self
281 }
282 pub fn set_preprocessor(mut self, input: ::std::option::Option<crate::types::CommandPreprocessor>) -> Self {
284 self.preprocessor = input;
285 self
286 }
287 pub fn get_preprocessor(&self) -> &::std::option::Option<crate::types::CommandPreprocessor> {
289 &self.preprocessor
290 }
291 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
293 self.role_arn = ::std::option::Option::Some(input.into());
294 self
295 }
296 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
298 self.role_arn = input;
299 self
300 }
301 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
303 &self.role_arn
304 }
305 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
307 self.created_at = ::std::option::Option::Some(input);
308 self
309 }
310 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
312 self.created_at = input;
313 self
314 }
315 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
317 &self.created_at
318 }
319 pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
321 self.last_updated_at = ::std::option::Option::Some(input);
322 self
323 }
324 pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
326 self.last_updated_at = input;
327 self
328 }
329 pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
331 &self.last_updated_at
332 }
333 pub fn deprecated(mut self, input: bool) -> Self {
335 self.deprecated = ::std::option::Option::Some(input);
336 self
337 }
338 pub fn set_deprecated(mut self, input: ::std::option::Option<bool>) -> Self {
340 self.deprecated = input;
341 self
342 }
343 pub fn get_deprecated(&self) -> &::std::option::Option<bool> {
345 &self.deprecated
346 }
347 pub fn pending_deletion(mut self, input: bool) -> Self {
349 self.pending_deletion = ::std::option::Option::Some(input);
350 self
351 }
352 pub fn set_pending_deletion(mut self, input: ::std::option::Option<bool>) -> Self {
354 self.pending_deletion = input;
355 self
356 }
357 pub fn get_pending_deletion(&self) -> &::std::option::Option<bool> {
359 &self.pending_deletion
360 }
361 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
362 self._request_id = Some(request_id.into());
363 self
364 }
365
366 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
367 self._request_id = request_id;
368 self
369 }
370 pub fn build(self) -> crate::operation::get_command::GetCommandOutput {
372 crate::operation::get_command::GetCommandOutput {
373 command_id: self.command_id,
374 command_arn: self.command_arn,
375 namespace: self.namespace,
376 display_name: self.display_name,
377 description: self.description,
378 mandatory_parameters: self.mandatory_parameters,
379 payload: self.payload,
380 payload_template: self.payload_template,
381 preprocessor: self.preprocessor,
382 role_arn: self.role_arn,
383 created_at: self.created_at,
384 last_updated_at: self.last_updated_at,
385 deprecated: self.deprecated,
386 pending_deletion: self.pending_deletion,
387 _request_id: self._request_id,
388 }
389 }
390}