#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateEventDestinationInput {
pub configuration_set_name: ::std::option::Option<::std::string::String>,
pub event_destination_name: ::std::option::Option<::std::string::String>,
pub enabled: ::std::option::Option<bool>,
pub matching_event_types: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>,
pub cloud_watch_logs_destination: ::std::option::Option<crate::types::CloudWatchLogsDestination>,
pub kinesis_firehose_destination: ::std::option::Option<crate::types::KinesisFirehoseDestination>,
pub sns_destination: ::std::option::Option<crate::types::SnsDestination>,
}
impl UpdateEventDestinationInput {
pub fn configuration_set_name(&self) -> ::std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
pub fn event_destination_name(&self) -> ::std::option::Option<&str> {
self.event_destination_name.as_deref()
}
pub fn enabled(&self) -> ::std::option::Option<bool> {
self.enabled
}
pub fn matching_event_types(&self) -> &[crate::types::EventType] {
self.matching_event_types.as_deref().unwrap_or_default()
}
pub fn cloud_watch_logs_destination(&self) -> ::std::option::Option<&crate::types::CloudWatchLogsDestination> {
self.cloud_watch_logs_destination.as_ref()
}
pub fn kinesis_firehose_destination(&self) -> ::std::option::Option<&crate::types::KinesisFirehoseDestination> {
self.kinesis_firehose_destination.as_ref()
}
pub fn sns_destination(&self) -> ::std::option::Option<&crate::types::SnsDestination> {
self.sns_destination.as_ref()
}
}
impl UpdateEventDestinationInput {
pub fn builder() -> crate::operation::update_event_destination::builders::UpdateEventDestinationInputBuilder {
crate::operation::update_event_destination::builders::UpdateEventDestinationInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateEventDestinationInputBuilder {
pub(crate) configuration_set_name: ::std::option::Option<::std::string::String>,
pub(crate) event_destination_name: ::std::option::Option<::std::string::String>,
pub(crate) enabled: ::std::option::Option<bool>,
pub(crate) matching_event_types: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>,
pub(crate) cloud_watch_logs_destination: ::std::option::Option<crate::types::CloudWatchLogsDestination>,
pub(crate) kinesis_firehose_destination: ::std::option::Option<crate::types::KinesisFirehoseDestination>,
pub(crate) sns_destination: ::std::option::Option<crate::types::SnsDestination>,
}
impl UpdateEventDestinationInputBuilder {
pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.configuration_set_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.configuration_set_name = input;
self
}
pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
&self.configuration_set_name
}
pub fn event_destination_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.event_destination_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_event_destination_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.event_destination_name = input;
self
}
pub fn get_event_destination_name(&self) -> &::std::option::Option<::std::string::String> {
&self.event_destination_name
}
pub fn enabled(mut self, input: bool) -> Self {
self.enabled = ::std::option::Option::Some(input);
self
}
pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.enabled = input;
self
}
pub fn get_enabled(&self) -> &::std::option::Option<bool> {
&self.enabled
}
pub fn matching_event_types(mut self, input: crate::types::EventType) -> Self {
let mut v = self.matching_event_types.unwrap_or_default();
v.push(input);
self.matching_event_types = ::std::option::Option::Some(v);
self
}
pub fn set_matching_event_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>) -> Self {
self.matching_event_types = input;
self
}
pub fn get_matching_event_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EventType>> {
&self.matching_event_types
}
pub fn cloud_watch_logs_destination(mut self, input: crate::types::CloudWatchLogsDestination) -> Self {
self.cloud_watch_logs_destination = ::std::option::Option::Some(input);
self
}
pub fn set_cloud_watch_logs_destination(mut self, input: ::std::option::Option<crate::types::CloudWatchLogsDestination>) -> Self {
self.cloud_watch_logs_destination = input;
self
}
pub fn get_cloud_watch_logs_destination(&self) -> &::std::option::Option<crate::types::CloudWatchLogsDestination> {
&self.cloud_watch_logs_destination
}
pub fn kinesis_firehose_destination(mut self, input: crate::types::KinesisFirehoseDestination) -> Self {
self.kinesis_firehose_destination = ::std::option::Option::Some(input);
self
}
pub fn set_kinesis_firehose_destination(mut self, input: ::std::option::Option<crate::types::KinesisFirehoseDestination>) -> Self {
self.kinesis_firehose_destination = input;
self
}
pub fn get_kinesis_firehose_destination(&self) -> &::std::option::Option<crate::types::KinesisFirehoseDestination> {
&self.kinesis_firehose_destination
}
pub fn sns_destination(mut self, input: crate::types::SnsDestination) -> Self {
self.sns_destination = ::std::option::Option::Some(input);
self
}
pub fn set_sns_destination(mut self, input: ::std::option::Option<crate::types::SnsDestination>) -> Self {
self.sns_destination = input;
self
}
pub fn get_sns_destination(&self) -> &::std::option::Option<crate::types::SnsDestination> {
&self.sns_destination
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_event_destination::UpdateEventDestinationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_event_destination::UpdateEventDestinationInput {
configuration_set_name: self.configuration_set_name,
event_destination_name: self.event_destination_name,
enabled: self.enabled,
matching_event_types: self.matching_event_types,
cloud_watch_logs_destination: self.cloud_watch_logs_destination,
kinesis_firehose_destination: self.kinesis_firehose_destination,
sns_destination: self.sns_destination,
})
}
}