aws_sdk_iot/operation/update_command/
_update_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 UpdateCommandOutput {
6    /// <p>The unique identifier of the command.</p>
7    pub command_id: ::std::option::Option<::std::string::String>,
8    /// <p>The updated user-friendly display name in the console for the command.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    /// <p>The updated text description of the command.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The boolean that indicates whether the command was deprecated.</p>
13    pub deprecated: ::std::option::Option<bool>,
14    /// <p>The date and time (epoch timestamp in seconds) when the command was last updated.</p>
15    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
16    _request_id: Option<String>,
17}
18impl UpdateCommandOutput {
19    /// <p>The unique identifier of the command.</p>
20    pub fn command_id(&self) -> ::std::option::Option<&str> {
21        self.command_id.as_deref()
22    }
23    /// <p>The updated user-friendly display name in the console for the command.</p>
24    pub fn display_name(&self) -> ::std::option::Option<&str> {
25        self.display_name.as_deref()
26    }
27    /// <p>The updated text description of the command.</p>
28    pub fn description(&self) -> ::std::option::Option<&str> {
29        self.description.as_deref()
30    }
31    /// <p>The boolean that indicates whether the command was deprecated.</p>
32    pub fn deprecated(&self) -> ::std::option::Option<bool> {
33        self.deprecated
34    }
35    /// <p>The date and time (epoch timestamp in seconds) when the command was last updated.</p>
36    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.last_updated_at.as_ref()
38    }
39}
40impl ::aws_types::request_id::RequestId for UpdateCommandOutput {
41    fn request_id(&self) -> Option<&str> {
42        self._request_id.as_deref()
43    }
44}
45impl UpdateCommandOutput {
46    /// Creates a new builder-style object to manufacture [`UpdateCommandOutput`](crate::operation::update_command::UpdateCommandOutput).
47    pub fn builder() -> crate::operation::update_command::builders::UpdateCommandOutputBuilder {
48        crate::operation::update_command::builders::UpdateCommandOutputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateCommandOutput`](crate::operation::update_command::UpdateCommandOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateCommandOutputBuilder {
56    pub(crate) command_id: ::std::option::Option<::std::string::String>,
57    pub(crate) display_name: ::std::option::Option<::std::string::String>,
58    pub(crate) description: ::std::option::Option<::std::string::String>,
59    pub(crate) deprecated: ::std::option::Option<bool>,
60    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
61    _request_id: Option<String>,
62}
63impl UpdateCommandOutputBuilder {
64    /// <p>The unique identifier of the command.</p>
65    pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.command_id = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The unique identifier of the command.</p>
70    pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.command_id = input;
72        self
73    }
74    /// <p>The unique identifier of the command.</p>
75    pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
76        &self.command_id
77    }
78    /// <p>The updated user-friendly display name in the console for the command.</p>
79    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.display_name = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The updated user-friendly display name in the console for the command.</p>
84    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.display_name = input;
86        self
87    }
88    /// <p>The updated user-friendly display name in the console for the command.</p>
89    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
90        &self.display_name
91    }
92    /// <p>The updated text description of the command.</p>
93    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.description = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The updated text description of the command.</p>
98    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.description = input;
100        self
101    }
102    /// <p>The updated text description of the command.</p>
103    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
104        &self.description
105    }
106    /// <p>The boolean that indicates whether the command was deprecated.</p>
107    pub fn deprecated(mut self, input: bool) -> Self {
108        self.deprecated = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>The boolean that indicates whether the command was deprecated.</p>
112    pub fn set_deprecated(mut self, input: ::std::option::Option<bool>) -> Self {
113        self.deprecated = input;
114        self
115    }
116    /// <p>The boolean that indicates whether the command was deprecated.</p>
117    pub fn get_deprecated(&self) -> &::std::option::Option<bool> {
118        &self.deprecated
119    }
120    /// <p>The date and time (epoch timestamp in seconds) when the command was last updated.</p>
121    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
122        self.last_updated_at = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The date and time (epoch timestamp in seconds) when the command was last updated.</p>
126    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
127        self.last_updated_at = input;
128        self
129    }
130    /// <p>The date and time (epoch timestamp in seconds) when the command was last updated.</p>
131    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132        &self.last_updated_at
133    }
134    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135        self._request_id = Some(request_id.into());
136        self
137    }
138
139    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140        self._request_id = request_id;
141        self
142    }
143    /// Consumes the builder and constructs a [`UpdateCommandOutput`](crate::operation::update_command::UpdateCommandOutput).
144    pub fn build(self) -> crate::operation::update_command::UpdateCommandOutput {
145        crate::operation::update_command::UpdateCommandOutput {
146            command_id: self.command_id,
147            display_name: self.display_name,
148            description: self.description,
149            deprecated: self.deprecated,
150            last_updated_at: self.last_updated_at,
151            _request_id: self._request_id,
152        }
153    }
154}