aws-sdk-pinpointsmsvoicev2 1.124.0

AWS SDK for Amazon Pinpoint SMS Voice V2
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateEventDestinationInput {
    /// <p>The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    pub configuration_set_name: ::std::option::Option<::std::string::String>,
    /// <p>The name to use for the event destination.</p>
    pub event_destination_name: ::std::option::Option<::std::string::String>,
    /// <p>When set to true logging is enabled.</p>
    pub enabled: ::std::option::Option<bool>,
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    pub matching_event_types: ::std::option::Option<::std::vec::Vec<crate::types::EventType>>,
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub cloud_watch_logs_destination: ::std::option::Option<crate::types::CloudWatchLogsDestination>,
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub kinesis_firehose_destination: ::std::option::Option<crate::types::KinesisFirehoseDestination>,
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub sns_destination: ::std::option::Option<crate::types::SnsDestination>,
}
impl UpdateEventDestinationInput {
    /// <p>The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    pub fn configuration_set_name(&self) -> ::std::option::Option<&str> {
        self.configuration_set_name.as_deref()
    }
    /// <p>The name to use for the event destination.</p>
    pub fn event_destination_name(&self) -> ::std::option::Option<&str> {
        self.event_destination_name.as_deref()
    }
    /// <p>When set to true logging is enabled.</p>
    pub fn enabled(&self) -> ::std::option::Option<bool> {
        self.enabled
    }
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.matching_event_types.is_none()`.
    pub fn matching_event_types(&self) -> &[crate::types::EventType] {
        self.matching_event_types.as_deref().unwrap_or_default()
    }
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub fn cloud_watch_logs_destination(&self) -> ::std::option::Option<&crate::types::CloudWatchLogsDestination> {
        self.cloud_watch_logs_destination.as_ref()
    }
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub fn kinesis_firehose_destination(&self) -> ::std::option::Option<&crate::types::KinesisFirehoseDestination> {
        self.kinesis_firehose_destination.as_ref()
    }
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub fn sns_destination(&self) -> ::std::option::Option<&crate::types::SnsDestination> {
        self.sns_destination.as_ref()
    }
}
impl UpdateEventDestinationInput {
    /// Creates a new builder-style object to manufacture [`UpdateEventDestinationInput`](crate::operation::update_event_destination::UpdateEventDestinationInput).
    pub fn builder() -> crate::operation::update_event_destination::builders::UpdateEventDestinationInputBuilder {
        crate::operation::update_event_destination::builders::UpdateEventDestinationInputBuilder::default()
    }
}

/// A builder for [`UpdateEventDestinationInput`](crate::operation::update_event_destination::UpdateEventDestinationInput).
#[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 {
    /// <p>The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    /// This field is required.
    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
    }
    /// <p>The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.configuration_set_name = input;
        self
    }
    /// <p>The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.</p>
    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.configuration_set_name
    }
    /// <p>The name to use for the event destination.</p>
    /// This field is required.
    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
    }
    /// <p>The name to use for the event destination.</p>
    pub fn set_event_destination_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_destination_name = input;
        self
    }
    /// <p>The name to use for the event destination.</p>
    pub fn get_event_destination_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_destination_name
    }
    /// <p>When set to true logging is enabled.</p>
    pub fn enabled(mut self, input: bool) -> Self {
        self.enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>When set to true logging is enabled.</p>
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enabled = input;
        self
    }
    /// <p>When set to true logging is enabled.</p>
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
        &self.enabled
    }
    /// Appends an item to `matching_event_types`.
    ///
    /// To override the contents of this collection use [`set_matching_event_types`](Self::set_matching_event_types).
    ///
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    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
    }
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    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
    }
    /// <p>An array of event types that determine which events to log.</p><note>
    /// <p>The <code>TEXT_SENT</code> event type is not supported.</p>
    /// </note>
    pub fn get_matching_event_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EventType>> {
        &self.matching_event_types
    }
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub fn cloud_watch_logs_destination(mut self, input: crate::types::CloudWatchLogsDestination) -> Self {
        self.cloud_watch_logs_destination = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub fn set_cloud_watch_logs_destination(mut self, input: ::std::option::Option<crate::types::CloudWatchLogsDestination>) -> Self {
        self.cloud_watch_logs_destination = input;
        self
    }
    /// <p>An object that contains information about an event destination that sends data to CloudWatch Logs.</p>
    pub fn get_cloud_watch_logs_destination(&self) -> &::std::option::Option<crate::types::CloudWatchLogsDestination> {
        &self.cloud_watch_logs_destination
    }
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub fn kinesis_firehose_destination(mut self, input: crate::types::KinesisFirehoseDestination) -> Self {
        self.kinesis_firehose_destination = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub fn set_kinesis_firehose_destination(mut self, input: ::std::option::Option<crate::types::KinesisFirehoseDestination>) -> Self {
        self.kinesis_firehose_destination = input;
        self
    }
    /// <p>An object that contains information about an event destination for logging to Firehose.</p>
    pub fn get_kinesis_firehose_destination(&self) -> &::std::option::Option<crate::types::KinesisFirehoseDestination> {
        &self.kinesis_firehose_destination
    }
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub fn sns_destination(mut self, input: crate::types::SnsDestination) -> Self {
        self.sns_destination = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub fn set_sns_destination(mut self, input: ::std::option::Option<crate::types::SnsDestination>) -> Self {
        self.sns_destination = input;
        self
    }
    /// <p>An object that contains information about an event destination that sends data to Amazon SNS.</p>
    pub fn get_sns_destination(&self) -> &::std::option::Option<crate::types::SnsDestination> {
        &self.sns_destination
    }
    /// Consumes the builder and constructs a [`UpdateEventDestinationInput`](crate::operation::update_event_destination::UpdateEventDestinationInput).
    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,
        })
    }
}