aws_sdk_iot/operation/create_command/
_create_command_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateCommandOutput {
6    /// <p>The unique identifier for the command.</p>
7    pub command_id: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Number (ARN) of the command. For example, <code>arn:aws:iot:<region>
9    /// :
10    /// <accountid>
11    /// :command/
12    /// <commandid></commandid>
13    /// </accountid>
14    /// </region></code></p>
15    pub command_arn: ::std::option::Option<::std::string::String>,
16    _request_id: Option<String>,
17}
18impl CreateCommandOutput {
19    /// <p>The unique identifier for the command.</p>
20    pub fn command_id(&self) -> ::std::option::Option<&str> {
21        self.command_id.as_deref()
22    }
23    /// <p>The Amazon Resource Number (ARN) of the command. For example, <code>arn:aws:iot:<region>
24    /// :
25    /// <accountid>
26    /// :command/
27    /// <commandid></commandid>
28    /// </accountid>
29    /// </region></code></p>
30    pub fn command_arn(&self) -> ::std::option::Option<&str> {
31        self.command_arn.as_deref()
32    }
33}
34impl ::aws_types::request_id::RequestId for CreateCommandOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl CreateCommandOutput {
40    /// Creates a new builder-style object to manufacture [`CreateCommandOutput`](crate::operation::create_command::CreateCommandOutput).
41    pub fn builder() -> crate::operation::create_command::builders::CreateCommandOutputBuilder {
42        crate::operation::create_command::builders::CreateCommandOutputBuilder::default()
43    }
44}
45
46/// A builder for [`CreateCommandOutput`](crate::operation::create_command::CreateCommandOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateCommandOutputBuilder {
50    pub(crate) command_id: ::std::option::Option<::std::string::String>,
51    pub(crate) command_arn: ::std::option::Option<::std::string::String>,
52    _request_id: Option<String>,
53}
54impl CreateCommandOutputBuilder {
55    /// <p>The unique identifier for the command.</p>
56    pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57        self.command_id = ::std::option::Option::Some(input.into());
58        self
59    }
60    /// <p>The unique identifier for the command.</p>
61    pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62        self.command_id = input;
63        self
64    }
65    /// <p>The unique identifier for the command.</p>
66    pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
67        &self.command_id
68    }
69    /// <p>The Amazon Resource Number (ARN) of the command. For example, <code>arn:aws:iot:<region>
70    /// :
71    /// <accountid>
72    /// :command/
73    /// <commandid></commandid>
74    /// </accountid>
75    /// </region></code></p>
76    pub fn command_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77        self.command_arn = ::std::option::Option::Some(input.into());
78        self
79    }
80    /// <p>The Amazon Resource Number (ARN) of the command. For example, <code>arn:aws:iot:<region>
81    /// :
82    /// <accountid>
83    /// :command/
84    /// <commandid></commandid>
85    /// </accountid>
86    /// </region></code></p>
87    pub fn set_command_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.command_arn = input;
89        self
90    }
91    /// <p>The Amazon Resource Number (ARN) of the command. For example, <code>arn:aws:iot:<region>
92    /// :
93    /// <accountid>
94    /// :command/
95    /// <commandid></commandid>
96    /// </accountid>
97    /// </region></code></p>
98    pub fn get_command_arn(&self) -> &::std::option::Option<::std::string::String> {
99        &self.command_arn
100    }
101    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
102        self._request_id = Some(request_id.into());
103        self
104    }
105
106    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
107        self._request_id = request_id;
108        self
109    }
110    /// Consumes the builder and constructs a [`CreateCommandOutput`](crate::operation::create_command::CreateCommandOutput).
111    pub fn build(self) -> crate::operation::create_command::CreateCommandOutput {
112        crate::operation::create_command::CreateCommandOutput {
113            command_id: self.command_id,
114            command_arn: self.command_arn,
115            _request_id: self._request_id,
116        }
117    }
118}