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 CreateEventDestinationInput {
    /// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
    pub configuration_set_name: ::std::option::Option<::std::string::String>,
    /// <p>The name that identifies the event destination.</p>
    pub event_destination_name: ::std::option::Option<::std::string::String>,
    /// <p>An array of event types that determine which events to log. If "ALL" is used, then End User Messaging SMS logs every event type.</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 for logging to Amazon 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 Amazon Data Firehose.</p>
    pub kinesis_firehose_destination: ::std::option::Option<crate::types::KinesisFirehoseDestination>,
    /// <p>An object that contains information about an event destination for logging to Amazon SNS.</p>
    pub sns_destination: ::std::option::Option<crate::types::SnsDestination>,
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateEventDestinationInput {
    /// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
    pub fn configuration_set_name(&self) -> ::std::option::Option<&str> {
        self.configuration_set_name.as_deref()
    }
    /// <p>The name that identifies the event destination.</p>
    pub fn event_destination_name(&self) -> ::std::option::Option<&str> {
        self.event_destination_name.as_deref()
    }
    /// <p>An array of event types that determine which events to log. If "ALL" is used, then End User Messaging SMS logs every event type.</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 for logging to Amazon 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 Amazon Data 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 for logging to Amazon SNS.</p>
    pub fn sns_destination(&self) -> ::std::option::Option<&crate::types::SnsDestination> {
        self.sns_destination.as_ref()
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl CreateEventDestinationInput {
    /// Creates a new builder-style object to manufacture [`CreateEventDestinationInput`](crate::operation::create_event_destination::CreateEventDestinationInput).
    pub fn builder() -> crate::operation::create_event_destination::builders::CreateEventDestinationInputBuilder {
        crate::operation::create_event_destination::builders::CreateEventDestinationInputBuilder::default()
    }
}

/// A builder for [`CreateEventDestinationInput`](crate::operation::create_event_destination::CreateEventDestinationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateEventDestinationInputBuilder {
    pub(crate) configuration_set_name: ::std::option::Option<::std::string::String>,
    pub(crate) event_destination_name: ::std::option::Option<::std::string::String>,
    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>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateEventDestinationInputBuilder {
    /// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</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>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.configuration_set_name = input;
        self
    }
    /// <p>Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the <code>DescribeConfigurationSets</code> action.</p>
    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.configuration_set_name
    }
    /// <p>The name that identifies 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 that identifies 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 that identifies the event destination.</p>
    pub fn get_event_destination_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_destination_name
    }
    /// 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. If "ALL" is used, then End User Messaging SMS logs every event type.</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. If "ALL" is used, then End User Messaging SMS logs every event type.</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. If "ALL" is used, then End User Messaging SMS logs every event type.</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 for logging to Amazon 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 for logging to Amazon 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 for logging to Amazon 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 Amazon Data 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 Amazon Data 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 Amazon Data 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 for logging 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 for logging 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 for logging to Amazon SNS.</p>
    pub fn get_sns_destination(&self) -> &::std::option::Option<crate::types::SnsDestination> {
        &self.sns_destination
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`CreateEventDestinationInput`](crate::operation::create_event_destination::CreateEventDestinationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_event_destination::CreateEventDestinationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_event_destination::CreateEventDestinationInput {
            configuration_set_name: self.configuration_set_name,
            event_destination_name: self.event_destination_name,
            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,
            client_token: self.client_token,
        })
    }
}