aws-sdk-chime 1.99.0

AWS SDK for Amazon Chime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A resource that allows Enterprise account administrators to configure an interface to receive events from Amazon Chime.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Bot {
    /// <p>The bot ID.</p>
    pub bot_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique ID for the bot user.</p>
    pub user_id: ::std::option::Option<::std::string::String>,
    /// <p>The bot display name.</p>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>The bot type.</p>
    pub bot_type: ::std::option::Option<crate::types::BotType>,
    /// <p>When true, the bot is stopped from running in your account.</p>
    pub disabled: ::std::option::Option<bool>,
    /// <p>The bot creation timestamp, in ISO 8601 format.</p>
    pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The updated bot timestamp, in ISO 8601 format.</p>
    pub updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The bot email address.</p>
    pub bot_email: ::std::option::Option<::std::string::String>,
    /// <p>The security token used to authenticate Amazon Chime with the outgoing event endpoint.</p>
    pub security_token: ::std::option::Option<::std::string::String>,
}
impl Bot {
    /// <p>The bot ID.</p>
    pub fn bot_id(&self) -> ::std::option::Option<&str> {
        self.bot_id.as_deref()
    }
    /// <p>The unique ID for the bot user.</p>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The bot display name.</p>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>The bot type.</p>
    pub fn bot_type(&self) -> ::std::option::Option<&crate::types::BotType> {
        self.bot_type.as_ref()
    }
    /// <p>When true, the bot is stopped from running in your account.</p>
    pub fn disabled(&self) -> ::std::option::Option<bool> {
        self.disabled
    }
    /// <p>The bot creation timestamp, in ISO 8601 format.</p>
    pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_timestamp.as_ref()
    }
    /// <p>The updated bot timestamp, in ISO 8601 format.</p>
    pub fn updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_timestamp.as_ref()
    }
    /// <p>The bot email address.</p>
    pub fn bot_email(&self) -> ::std::option::Option<&str> {
        self.bot_email.as_deref()
    }
    /// <p>The security token used to authenticate Amazon Chime with the outgoing event endpoint.</p>
    pub fn security_token(&self) -> ::std::option::Option<&str> {
        self.security_token.as_deref()
    }
}
impl ::std::fmt::Debug for Bot {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Bot");
        formatter.field("bot_id", &self.bot_id);
        formatter.field("user_id", &self.user_id);
        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
        formatter.field("bot_type", &self.bot_type);
        formatter.field("disabled", &self.disabled);
        formatter.field("created_timestamp", &self.created_timestamp);
        formatter.field("updated_timestamp", &self.updated_timestamp);
        formatter.field("bot_email", &"*** Sensitive Data Redacted ***");
        formatter.field("security_token", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Bot {
    /// Creates a new builder-style object to manufacture [`Bot`](crate::types::Bot).
    pub fn builder() -> crate::types::builders::BotBuilder {
        crate::types::builders::BotBuilder::default()
    }
}

/// A builder for [`Bot`](crate::types::Bot).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct BotBuilder {
    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) bot_type: ::std::option::Option<crate::types::BotType>,
    pub(crate) disabled: ::std::option::Option<bool>,
    pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) bot_email: ::std::option::Option<::std::string::String>,
    pub(crate) security_token: ::std::option::Option<::std::string::String>,
}
impl BotBuilder {
    /// <p>The bot ID.</p>
    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bot_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The bot ID.</p>
    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bot_id = input;
        self
    }
    /// <p>The bot ID.</p>
    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.bot_id
    }
    /// <p>The unique ID for the bot user.</p>
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique ID for the bot user.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>The unique ID for the bot user.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// <p>The bot display name.</p>
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The bot display name.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>The bot display name.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// <p>The bot type.</p>
    pub fn bot_type(mut self, input: crate::types::BotType) -> Self {
        self.bot_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The bot type.</p>
    pub fn set_bot_type(mut self, input: ::std::option::Option<crate::types::BotType>) -> Self {
        self.bot_type = input;
        self
    }
    /// <p>The bot type.</p>
    pub fn get_bot_type(&self) -> &::std::option::Option<crate::types::BotType> {
        &self.bot_type
    }
    /// <p>When true, the bot is stopped from running in your account.</p>
    pub fn disabled(mut self, input: bool) -> Self {
        self.disabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>When true, the bot is stopped from running in your account.</p>
    pub fn set_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.disabled = input;
        self
    }
    /// <p>When true, the bot is stopped from running in your account.</p>
    pub fn get_disabled(&self) -> &::std::option::Option<bool> {
        &self.disabled
    }
    /// <p>The bot creation timestamp, in ISO 8601 format.</p>
    pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The bot creation timestamp, in ISO 8601 format.</p>
    pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_timestamp = input;
        self
    }
    /// <p>The bot creation timestamp, in ISO 8601 format.</p>
    pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_timestamp
    }
    /// <p>The updated bot timestamp, in ISO 8601 format.</p>
    pub fn updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated bot timestamp, in ISO 8601 format.</p>
    pub fn set_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_timestamp = input;
        self
    }
    /// <p>The updated bot timestamp, in ISO 8601 format.</p>
    pub fn get_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_timestamp
    }
    /// <p>The bot email address.</p>
    pub fn bot_email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bot_email = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The bot email address.</p>
    pub fn set_bot_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bot_email = input;
        self
    }
    /// <p>The bot email address.</p>
    pub fn get_bot_email(&self) -> &::std::option::Option<::std::string::String> {
        &self.bot_email
    }
    /// <p>The security token used to authenticate Amazon Chime with the outgoing event endpoint.</p>
    pub fn security_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.security_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The security token used to authenticate Amazon Chime with the outgoing event endpoint.</p>
    pub fn set_security_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.security_token = input;
        self
    }
    /// <p>The security token used to authenticate Amazon Chime with the outgoing event endpoint.</p>
    pub fn get_security_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.security_token
    }
    /// Consumes the builder and constructs a [`Bot`](crate::types::Bot).
    pub fn build(self) -> crate::types::Bot {
        crate::types::Bot {
            bot_id: self.bot_id,
            user_id: self.user_id,
            display_name: self.display_name,
            bot_type: self.bot_type,
            disabled: self.disabled,
            created_timestamp: self.created_timestamp,
            updated_timestamp: self.updated_timestamp,
            bot_email: self.bot_email,
            security_token: self.security_token,
        }
    }
}
impl ::std::fmt::Debug for BotBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("BotBuilder");
        formatter.field("bot_id", &self.bot_id);
        formatter.field("user_id", &self.user_id);
        formatter.field("display_name", &"*** Sensitive Data Redacted ***");
        formatter.field("bot_type", &self.bot_type);
        formatter.field("disabled", &self.disabled);
        formatter.field("created_timestamp", &self.created_timestamp);
        formatter.field("updated_timestamp", &self.updated_timestamp);
        formatter.field("bot_email", &"*** Sensitive Data Redacted ***");
        formatter.field("security_token", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}