#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateBotOutput {
pub message: ::std::option::Option<::std::string::String>,
pub bot_id: ::std::string::String,
pub network_id: ::std::option::Option<::std::string::String>,
pub username: ::std::option::Option<::std::string::String>,
pub display_name: ::std::option::Option<::std::string::String>,
pub group_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateBotOutput {
pub fn message(&self) -> ::std::option::Option<&str> {
self.message.as_deref()
}
pub fn bot_id(&self) -> &str {
use std::ops::Deref;
self.bot_id.deref()
}
pub fn network_id(&self) -> ::std::option::Option<&str> {
self.network_id.as_deref()
}
pub fn username(&self) -> ::std::option::Option<&str> {
self.username.as_deref()
}
pub fn display_name(&self) -> ::std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn group_id(&self) -> ::std::option::Option<&str> {
self.group_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateBotOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateBotOutput {
pub fn builder() -> crate::operation::create_bot::builders::CreateBotOutputBuilder {
crate::operation::create_bot::builders::CreateBotOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateBotOutputBuilder {
pub(crate) message: ::std::option::Option<::std::string::String>,
pub(crate) bot_id: ::std::option::Option<::std::string::String>,
pub(crate) network_id: ::std::option::Option<::std::string::String>,
pub(crate) username: ::std::option::Option<::std::string::String>,
pub(crate) display_name: ::std::option::Option<::std::string::String>,
pub(crate) group_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateBotOutputBuilder {
pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message = ::std::option::Option::Some(input.into());
self
}
pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message = input;
self
}
pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
&self.message
}
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
}
pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bot_id = input;
self
}
pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.bot_id
}
pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.network_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.network_id = input;
self
}
pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
&self.network_id
}
pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.username = ::std::option::Option::Some(input.into());
self
}
pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.username = input;
self
}
pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
&self.username
}
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
}
pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.display_name
}
pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.group_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.group_id = input;
self
}
pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
&self.group_id
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_bot::CreateBotOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_bot::CreateBotOutput {
message: self.message,
bot_id: self.bot_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"bot_id",
"bot_id was not specified but it is required when building CreateBotOutput",
)
})?,
network_id: self.network_id,
username: self.username,
display_name: self.display_name,
group_id: self.group_id,
_request_id: self._request_id,
})
}
}