aws_sdk_chime/operation/create_bot/
_create_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)]
5pub struct CreateBotInput {
6    /// <p>The Amazon Chime account ID.</p>
7    pub account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The bot display name.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    /// <p>The domain of the Amazon Chime Enterprise account.</p>
11    pub domain: ::std::option::Option<::std::string::String>,
12}
13impl CreateBotInput {
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 display name.</p>
19    pub fn display_name(&self) -> ::std::option::Option<&str> {
20        self.display_name.as_deref()
21    }
22    /// <p>The domain of the Amazon Chime Enterprise account.</p>
23    pub fn domain(&self) -> ::std::option::Option<&str> {
24        self.domain.as_deref()
25    }
26}
27impl ::std::fmt::Debug for CreateBotInput {
28    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29        let mut formatter = f.debug_struct("CreateBotInput");
30        formatter.field("account_id", &self.account_id);
31        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
32        formatter.field("domain", &self.domain);
33        formatter.finish()
34    }
35}
36impl CreateBotInput {
37    /// Creates a new builder-style object to manufacture [`CreateBotInput`](crate::operation::create_bot::CreateBotInput).
38    pub fn builder() -> crate::operation::create_bot::builders::CreateBotInputBuilder {
39        crate::operation::create_bot::builders::CreateBotInputBuilder::default()
40    }
41}
42
43/// A builder for [`CreateBotInput`](crate::operation::create_bot::CreateBotInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct CreateBotInputBuilder {
47    pub(crate) account_id: ::std::option::Option<::std::string::String>,
48    pub(crate) display_name: ::std::option::Option<::std::string::String>,
49    pub(crate) domain: ::std::option::Option<::std::string::String>,
50}
51impl CreateBotInputBuilder {
52    /// <p>The Amazon Chime account ID.</p>
53    /// This field is required.
54    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.account_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The Amazon Chime account ID.</p>
59    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.account_id = input;
61        self
62    }
63    /// <p>The Amazon Chime account ID.</p>
64    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.account_id
66    }
67    /// <p>The bot display name.</p>
68    /// This field is required.
69    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.display_name = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The bot display name.</p>
74    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.display_name = input;
76        self
77    }
78    /// <p>The bot display name.</p>
79    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
80        &self.display_name
81    }
82    /// <p>The domain of the Amazon Chime Enterprise account.</p>
83    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.domain = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The domain of the Amazon Chime Enterprise account.</p>
88    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.domain = input;
90        self
91    }
92    /// <p>The domain of the Amazon Chime Enterprise account.</p>
93    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
94        &self.domain
95    }
96    /// Consumes the builder and constructs a [`CreateBotInput`](crate::operation::create_bot::CreateBotInput).
97    pub fn build(self) -> ::std::result::Result<crate::operation::create_bot::CreateBotInput, ::aws_smithy_types::error::operation::BuildError> {
98        ::std::result::Result::Ok(crate::operation::create_bot::CreateBotInput {
99            account_id: self.account_id,
100            display_name: self.display_name,
101            domain: self.domain,
102        })
103    }
104}
105impl ::std::fmt::Debug for CreateBotInputBuilder {
106    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
107        let mut formatter = f.debug_struct("CreateBotInputBuilder");
108        formatter.field("account_id", &self.account_id);
109        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
110        formatter.field("domain", &self.domain);
111        formatter.finish()
112    }
113}