#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AddNotificationChannelsInput {
pub profiling_group_name: ::std::option::Option<::std::string::String>,
pub channels: ::std::option::Option<::std::vec::Vec<crate::types::Channel>>,
}
impl AddNotificationChannelsInput {
pub fn profiling_group_name(&self) -> ::std::option::Option<&str> {
self.profiling_group_name.as_deref()
}
pub fn channels(&self) -> &[crate::types::Channel] {
self.channels.as_deref().unwrap_or_default()
}
}
impl AddNotificationChannelsInput {
pub fn builder() -> crate::operation::add_notification_channels::builders::AddNotificationChannelsInputBuilder {
crate::operation::add_notification_channels::builders::AddNotificationChannelsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddNotificationChannelsInputBuilder {
pub(crate) profiling_group_name: ::std::option::Option<::std::string::String>,
pub(crate) channels: ::std::option::Option<::std::vec::Vec<crate::types::Channel>>,
}
impl AddNotificationChannelsInputBuilder {
pub fn profiling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profiling_group_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_profiling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profiling_group_name = input;
self
}
pub fn get_profiling_group_name(&self) -> &::std::option::Option<::std::string::String> {
&self.profiling_group_name
}
pub fn channels(mut self, input: crate::types::Channel) -> Self {
let mut v = self.channels.unwrap_or_default();
v.push(input);
self.channels = ::std::option::Option::Some(v);
self
}
pub fn set_channels(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Channel>>) -> Self {
self.channels = input;
self
}
pub fn get_channels(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Channel>> {
&self.channels
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::add_notification_channels::AddNotificationChannelsInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::add_notification_channels::AddNotificationChannelsInput {
profiling_group_name: self.profiling_group_name,
channels: self.channels,
})
}
}