aws_sdk_chime/operation/update_bot/
_update_bot_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 UpdateBotInput {
6    /// <p>The Amazon Chime account ID.</p>
7    pub account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The bot ID.</p>
9    pub bot_id: ::std::option::Option<::std::string::String>,
10    /// <p>When true, stops the specified bot from running in your account.</p>
11    pub disabled: ::std::option::Option<bool>,
12}
13impl UpdateBotInput {
14    /// <p>The Amazon Chime account ID.</p>
15    pub fn account_id(&self) -> ::std::option::Option<&str> {
16        self.account_id.as_deref()
17    }
18    /// <p>The bot ID.</p>
19    pub fn bot_id(&self) -> ::std::option::Option<&str> {
20        self.bot_id.as_deref()
21    }
22    /// <p>When true, stops the specified bot from running in your account.</p>
23    pub fn disabled(&self) -> ::std::option::Option<bool> {
24        self.disabled
25    }
26}
27impl UpdateBotInput {
28    /// Creates a new builder-style object to manufacture [`UpdateBotInput`](crate::operation::update_bot::UpdateBotInput).
29    pub fn builder() -> crate::operation::update_bot::builders::UpdateBotInputBuilder {
30        crate::operation::update_bot::builders::UpdateBotInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateBotInput`](crate::operation::update_bot::UpdateBotInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateBotInputBuilder {
38    pub(crate) account_id: ::std::option::Option<::std::string::String>,
39    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
40    pub(crate) disabled: ::std::option::Option<bool>,
41}
42impl UpdateBotInputBuilder {
43    /// <p>The Amazon Chime account ID.</p>
44    /// This field is required.
45    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.account_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The Amazon Chime account ID.</p>
50    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.account_id = input;
52        self
53    }
54    /// <p>The Amazon Chime account ID.</p>
55    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.account_id
57    }
58    /// <p>The bot ID.</p>
59    /// This field is required.
60    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.bot_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The bot ID.</p>
65    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.bot_id = input;
67        self
68    }
69    /// <p>The bot ID.</p>
70    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.bot_id
72    }
73    /// <p>When true, stops the specified bot from running in your account.</p>
74    pub fn disabled(mut self, input: bool) -> Self {
75        self.disabled = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>When true, stops the specified bot from running in your account.</p>
79    pub fn set_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
80        self.disabled = input;
81        self
82    }
83    /// <p>When true, stops the specified bot from running in your account.</p>
84    pub fn get_disabled(&self) -> &::std::option::Option<bool> {
85        &self.disabled
86    }
87    /// Consumes the builder and constructs a [`UpdateBotInput`](crate::operation::update_bot::UpdateBotInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::update_bot::UpdateBotInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::update_bot::UpdateBotInput {
90            account_id: self.account_id,
91            bot_id: self.bot_id,
92            disabled: self.disabled,
93        })
94    }
95}