#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChannelActivity {
pub name: ::std::string::String,
pub channel_name: ::std::string::String,
pub next: ::std::option::Option<::std::string::String>,
}
impl ChannelActivity {
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn channel_name(&self) -> &str {
use std::ops::Deref;
self.channel_name.deref()
}
pub fn next(&self) -> ::std::option::Option<&str> {
self.next.as_deref()
}
}
impl ChannelActivity {
pub fn builder() -> crate::types::builders::ChannelActivityBuilder {
crate::types::builders::ChannelActivityBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChannelActivityBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) channel_name: ::std::option::Option<::std::string::String>,
pub(crate) next: ::std::option::Option<::std::string::String>,
}
impl ChannelActivityBuilder {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.channel_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.channel_name = input;
self
}
pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
&self.channel_name
}
pub fn next(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next = ::std::option::Option::Some(input.into());
self
}
pub fn set_next(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next = input;
self
}
pub fn get_next(&self) -> &::std::option::Option<::std::string::String> {
&self.next
}
pub fn build(self) -> ::std::result::Result<crate::types::ChannelActivity, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::ChannelActivity {
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building ChannelActivity",
)
})?,
channel_name: self.channel_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"channel_name",
"channel_name was not specified but it is required when building ChannelActivity",
)
})?,
next: self.next,
})
}
}