aws_sdk_iot/operation/update_command/
_update_command_input.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 UpdateCommandInput {
6    /// <p>The unique identifier of the command to be updated.</p>
7    pub command_id: ::std::option::Option<::std::string::String>,
8    /// <p>The new user-friendly name to use in the console for the command.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    /// <p>A short text description of the command.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>A boolean that you can use to specify whether to deprecate a command.</p>
13    pub deprecated: ::std::option::Option<bool>,
14}
15impl UpdateCommandInput {
16    /// <p>The unique identifier of the command to be updated.</p>
17    pub fn command_id(&self) -> ::std::option::Option<&str> {
18        self.command_id.as_deref()
19    }
20    /// <p>The new user-friendly name to use in the console for the command.</p>
21    pub fn display_name(&self) -> ::std::option::Option<&str> {
22        self.display_name.as_deref()
23    }
24    /// <p>A short text description of the command.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>A boolean that you can use to specify whether to deprecate a command.</p>
29    pub fn deprecated(&self) -> ::std::option::Option<bool> {
30        self.deprecated
31    }
32}
33impl UpdateCommandInput {
34    /// Creates a new builder-style object to manufacture [`UpdateCommandInput`](crate::operation::update_command::UpdateCommandInput).
35    pub fn builder() -> crate::operation::update_command::builders::UpdateCommandInputBuilder {
36        crate::operation::update_command::builders::UpdateCommandInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateCommandInput`](crate::operation::update_command::UpdateCommandInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateCommandInputBuilder {
44    pub(crate) command_id: ::std::option::Option<::std::string::String>,
45    pub(crate) display_name: ::std::option::Option<::std::string::String>,
46    pub(crate) description: ::std::option::Option<::std::string::String>,
47    pub(crate) deprecated: ::std::option::Option<bool>,
48}
49impl UpdateCommandInputBuilder {
50    /// <p>The unique identifier of the command to be updated.</p>
51    /// This field is required.
52    pub fn command_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.command_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The unique identifier of the command to be updated.</p>
57    pub fn set_command_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.command_id = input;
59        self
60    }
61    /// <p>The unique identifier of the command to be updated.</p>
62    pub fn get_command_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.command_id
64    }
65    /// <p>The new user-friendly name to use in the console for the command.</p>
66    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.display_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The new user-friendly name to use in the console for the command.</p>
71    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.display_name = input;
73        self
74    }
75    /// <p>The new user-friendly name to use in the console for the command.</p>
76    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.display_name
78    }
79    /// <p>A short text description of the command.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A short text description of the command.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>A short text description of the command.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>A boolean that you can use to specify whether to deprecate a command.</p>
94    pub fn deprecated(mut self, input: bool) -> Self {
95        self.deprecated = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>A boolean that you can use to specify whether to deprecate a command.</p>
99    pub fn set_deprecated(mut self, input: ::std::option::Option<bool>) -> Self {
100        self.deprecated = input;
101        self
102    }
103    /// <p>A boolean that you can use to specify whether to deprecate a command.</p>
104    pub fn get_deprecated(&self) -> &::std::option::Option<bool> {
105        &self.deprecated
106    }
107    /// Consumes the builder and constructs a [`UpdateCommandInput`](crate::operation::update_command::UpdateCommandInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::update_command::UpdateCommandInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::update_command::UpdateCommandInput {
112            command_id: self.command_id,
113            display_name: self.display_name,
114            description: self.description,
115            deprecated: self.deprecated,
116        })
117    }
118}