aws-sdk-pinpoint 0.24.0

AWS SDK for Amazon Pinpoint
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Verify OTP Message Response.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerificationResponse {
    /// <p>Specifies whether the OTP is valid or not.</p>
    #[doc(hidden)]
    pub valid: bool,
}
impl VerificationResponse {
    /// <p>Specifies whether the OTP is valid or not.</p>
    pub fn valid(&self) -> bool {
        self.valid
    }
}
/// See [`VerificationResponse`](crate::model::VerificationResponse).
pub mod verification_response {

    /// A builder for [`VerificationResponse`](crate::model::VerificationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) valid: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Specifies whether the OTP is valid or not.</p>
        pub fn valid(mut self, input: bool) -> Self {
            self.valid = Some(input);
            self
        }
        /// <p>Specifies whether the OTP is valid or not.</p>
        pub fn set_valid(mut self, input: std::option::Option<bool>) -> Self {
            self.valid = input;
            self
        }
        /// Consumes the builder and constructs a [`VerificationResponse`](crate::model::VerificationResponse).
        pub fn build(self) -> crate::model::VerificationResponse {
            crate::model::VerificationResponse {
                valid: self.valid.unwrap_or_default(),
            }
        }
    }
}
impl VerificationResponse {
    /// Creates a new builder-style object to manufacture [`VerificationResponse`](crate::model::VerificationResponse).
    pub fn builder() -> crate::model::verification_response::Builder {
        crate::model::verification_response::Builder::default()
    }
}

/// <p>Verify OTP message request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VerifyOtpMessageRequestParameters {
    /// <p>The destination identity to send OTP to.</p>
    #[doc(hidden)]
    pub destination_identity: std::option::Option<std::string::String>,
    /// <p>The OTP the end user provided for verification.</p>
    #[doc(hidden)]
    pub otp: std::option::Option<std::string::String>,
    /// <p>The reference identifier provided when the OTP was previously sent.</p>
    #[doc(hidden)]
    pub reference_id: std::option::Option<std::string::String>,
}
impl VerifyOtpMessageRequestParameters {
    /// <p>The destination identity to send OTP to.</p>
    pub fn destination_identity(&self) -> std::option::Option<&str> {
        self.destination_identity.as_deref()
    }
    /// <p>The OTP the end user provided for verification.</p>
    pub fn otp(&self) -> std::option::Option<&str> {
        self.otp.as_deref()
    }
    /// <p>The reference identifier provided when the OTP was previously sent.</p>
    pub fn reference_id(&self) -> std::option::Option<&str> {
        self.reference_id.as_deref()
    }
}
/// See [`VerifyOtpMessageRequestParameters`](crate::model::VerifyOtpMessageRequestParameters).
pub mod verify_otp_message_request_parameters {

    /// A builder for [`VerifyOtpMessageRequestParameters`](crate::model::VerifyOtpMessageRequestParameters).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_identity: std::option::Option<std::string::String>,
        pub(crate) otp: std::option::Option<std::string::String>,
        pub(crate) reference_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The destination identity to send OTP to.</p>
        pub fn destination_identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_identity = Some(input.into());
            self
        }
        /// <p>The destination identity to send OTP to.</p>
        pub fn set_destination_identity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_identity = input;
            self
        }
        /// <p>The OTP the end user provided for verification.</p>
        pub fn otp(mut self, input: impl Into<std::string::String>) -> Self {
            self.otp = Some(input.into());
            self
        }
        /// <p>The OTP the end user provided for verification.</p>
        pub fn set_otp(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.otp = input;
            self
        }
        /// <p>The reference identifier provided when the OTP was previously sent.</p>
        pub fn reference_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reference_id = Some(input.into());
            self
        }
        /// <p>The reference identifier provided when the OTP was previously sent.</p>
        pub fn set_reference_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.reference_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VerifyOtpMessageRequestParameters`](crate::model::VerifyOtpMessageRequestParameters).
        pub fn build(self) -> crate::model::VerifyOtpMessageRequestParameters {
            crate::model::VerifyOtpMessageRequestParameters {
                destination_identity: self.destination_identity,
                otp: self.otp,
                reference_id: self.reference_id,
            }
        }
    }
}
impl VerifyOtpMessageRequestParameters {
    /// Creates a new builder-style object to manufacture [`VerifyOtpMessageRequestParameters`](crate::model::VerifyOtpMessageRequestParameters).
    pub fn builder() -> crate::model::verify_otp_message_request_parameters::Builder {
        crate::model::verify_otp_message_request_parameters::Builder::default()
    }
}

/// <p>Provides information about an API request or response.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MessageBody {
    /// <p>The message that's returned from the API.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the request or response.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
}
impl MessageBody {
    /// <p>The message that's returned from the API.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The unique identifier for the request or response.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
}
/// See [`MessageBody`](crate::model::MessageBody).
pub mod message_body {

    /// A builder for [`MessageBody`](crate::model::MessageBody).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The message that's returned from the API.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message that's returned from the API.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The unique identifier for the request or response.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the request or response.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// Consumes the builder and constructs a [`MessageBody`](crate::model::MessageBody).
        pub fn build(self) -> crate::model::MessageBody {
            crate::model::MessageBody {
                message: self.message,
                request_id: self.request_id,
            }
        }
    }
}
impl MessageBody {
    /// Creates a new builder-style object to manufacture [`MessageBody`](crate::model::MessageBody).
    pub fn builder() -> crate::model::message_body::Builder {
        crate::model::message_body::Builder::default()
    }
}

/// <p>Specifies the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VoiceTemplateRequest {
    /// <p>The text of the script to use in messages that are based on the message template, in plain text format.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The code for the language to use when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    #[doc(hidden)]
    pub language_code: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>A custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the voice to use when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    #[doc(hidden)]
    pub voice_id: std::option::Option<std::string::String>,
}
impl VoiceTemplateRequest {
    /// <p>The text of the script to use in messages that are based on the message template, in plain text format.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The code for the language to use when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    pub fn language_code(&self) -> std::option::Option<&str> {
        self.language_code.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>A custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the voice to use when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    pub fn voice_id(&self) -> std::option::Option<&str> {
        self.voice_id.as_deref()
    }
}
/// See [`VoiceTemplateRequest`](crate::model::VoiceTemplateRequest).
pub mod voice_template_request {

    /// A builder for [`VoiceTemplateRequest`](crate::model::VoiceTemplateRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) language_code: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) voice_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The text of the script to use in messages that are based on the message template, in plain text format.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The text of the script to use in messages that are based on the message template, in plain text format.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The code for the language to use when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn language_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.language_code = Some(input.into());
            self
        }
        /// <p>The code for the language to use when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn set_language_code(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.language_code = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the voice to use when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn voice_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.voice_id = Some(input.into());
            self
        }
        /// <p>The name of the voice to use when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn set_voice_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.voice_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VoiceTemplateRequest`](crate::model::VoiceTemplateRequest).
        pub fn build(self) -> crate::model::VoiceTemplateRequest {
            crate::model::VoiceTemplateRequest {
                body: self.body,
                default_substitutions: self.default_substitutions,
                language_code: self.language_code,
                tags: self.tags,
                template_description: self.template_description,
                voice_id: self.voice_id,
            }
        }
    }
}
impl VoiceTemplateRequest {
    /// Creates a new builder-style object to manufacture [`VoiceTemplateRequest`](crate::model::VoiceTemplateRequest).
    pub fn builder() -> crate::model::voice_template_request::Builder {
        crate::model::voice_template_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the voice channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VoiceChannelResponse {
    /// <p>The unique identifier for the application that the voice channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the voice channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether the voice channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>(Deprecated) An identifier for the voice channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the voice channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the voice channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the voice channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the voice channel, this value is VOICE.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the voice channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl VoiceChannelResponse {
    /// <p>The unique identifier for the application that the voice channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the voice channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>Specifies whether the voice channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>(Deprecated) An identifier for the voice channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the voice channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the voice channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the voice channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the voice channel, this value is VOICE.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the voice channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`VoiceChannelResponse`](crate::model::VoiceChannelResponse).
pub mod voice_channel_response {

    /// A builder for [`VoiceChannelResponse`](crate::model::VoiceChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the voice channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the voice channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the voice channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the voice channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>Specifies whether the voice channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the voice channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>(Deprecated) An identifier for the voice channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the voice channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the voice channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the voice channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the voice channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the voice channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the voice channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the voice channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the voice channel, this value is VOICE.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the voice channel, this value is VOICE.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the voice channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the voice channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`VoiceChannelResponse`](crate::model::VoiceChannelResponse).
        pub fn build(self) -> crate::model::VoiceChannelResponse {
            crate::model::VoiceChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl VoiceChannelResponse {
    /// Creates a new builder-style object to manufacture [`VoiceChannelResponse`](crate::model::VoiceChannelResponse).
    pub fn builder() -> crate::model::voice_channel_response::Builder {
        crate::model::voice_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the voice channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VoiceChannelRequest {
    /// <p>Specifies whether to enable the voice channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
}
impl VoiceChannelRequest {
    /// <p>Specifies whether to enable the voice channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
}
/// See [`VoiceChannelRequest`](crate::model::VoiceChannelRequest).
pub mod voice_channel_request {

    /// A builder for [`VoiceChannelRequest`](crate::model::VoiceChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Specifies whether to enable the voice channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the voice channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`VoiceChannelRequest`](crate::model::VoiceChannelRequest).
        pub fn build(self) -> crate::model::VoiceChannelRequest {
            crate::model::VoiceChannelRequest {
                enabled: self.enabled.unwrap_or_default(),
            }
        }
    }
}
impl VoiceChannelRequest {
    /// Creates a new builder-style object to manufacture [`VoiceChannelRequest`](crate::model::VoiceChannelRequest).
    pub fn builder() -> crate::model::voice_channel_request::Builder {
        crate::model::voice_channel_request::Builder::default()
    }
}

/// <p>Specifies which version of a message template to use as the active version of the template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateActiveVersionRequest {
    /// <p>The version of the message template to use as the active version of the template. Valid values are: latest, for the most recent version of the template; or, the unique identifier for any existing version of the template. If you specify an identifier, the value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl TemplateActiveVersionRequest {
    /// <p>The version of the message template to use as the active version of the template. Valid values are: latest, for the most recent version of the template; or, the unique identifier for any existing version of the template. If you specify an identifier, the value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`TemplateActiveVersionRequest`](crate::model::TemplateActiveVersionRequest).
pub mod template_active_version_request {

    /// A builder for [`TemplateActiveVersionRequest`](crate::model::TemplateActiveVersionRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The version of the message template to use as the active version of the template. Valid values are: latest, for the most recent version of the template; or, the unique identifier for any existing version of the template. If you specify an identifier, the value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The version of the message template to use as the active version of the template. Valid values are: latest, for the most recent version of the template; or, the unique identifier for any existing version of the template. If you specify an identifier, the value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`TemplateActiveVersionRequest`](crate::model::TemplateActiveVersionRequest).
        pub fn build(self) -> crate::model::TemplateActiveVersionRequest {
            crate::model::TemplateActiveVersionRequest {
                version: self.version,
            }
        }
    }
}
impl TemplateActiveVersionRequest {
    /// Creates a new builder-style object to manufacture [`TemplateActiveVersionRequest`](crate::model::TemplateActiveVersionRequest).
    pub fn builder() -> crate::model::template_active_version_request::Builder {
        crate::model::template_active_version_request::Builder::default()
    }
}

/// <p>Specifies the content and settings for a message template that can be used in text messages that are sent through the SMS channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SmsTemplateRequest {
    /// <p>The message body to use in text messages that are based on the message template.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
    #[doc(hidden)]
    pub recommender_id: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>A custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
}
impl SmsTemplateRequest {
    /// <p>The message body to use in text messages that are based on the message template.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
    pub fn recommender_id(&self) -> std::option::Option<&str> {
        self.recommender_id.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>A custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
}
/// See [`SmsTemplateRequest`](crate::model::SmsTemplateRequest).
pub mod sms_template_request {

    /// A builder for [`SmsTemplateRequest`](crate::model::SmsTemplateRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) recommender_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The message body to use in text messages that are based on the message template.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The message body to use in text messages that are based on the message template.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
        pub fn recommender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.recommender_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
        pub fn set_recommender_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommender_id = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// Consumes the builder and constructs a [`SmsTemplateRequest`](crate::model::SmsTemplateRequest).
        pub fn build(self) -> crate::model::SmsTemplateRequest {
            crate::model::SmsTemplateRequest {
                body: self.body,
                default_substitutions: self.default_substitutions,
                recommender_id: self.recommender_id,
                tags: self.tags,
                template_description: self.template_description,
            }
        }
    }
}
impl SmsTemplateRequest {
    /// Creates a new builder-style object to manufacture [`SmsTemplateRequest`](crate::model::SmsTemplateRequest).
    pub fn builder() -> crate::model::sms_template_request::Builder {
        crate::model::sms_template_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the SMS channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SmsChannelResponse {
    /// <p>The unique identifier for the application that the SMS channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the SMS channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether the SMS channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>(Deprecated) An identifier for the SMS channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the SMS channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the SMS channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the SMS channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the SMS channel, this value is SMS.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The maximum number of promotional messages that you can send through the SMS channel each second.</p>
    #[doc(hidden)]
    pub promotional_messages_per_second: i32,
    /// <p>The identity that displays on recipients' devices when they receive messages from the SMS channel.</p>
    #[doc(hidden)]
    pub sender_id: std::option::Option<std::string::String>,
    /// <p>The registered short code to use when you send messages through the SMS channel.</p>
    #[doc(hidden)]
    pub short_code: std::option::Option<std::string::String>,
    /// <p>The maximum number of transactional messages that you can send through the SMS channel each second.</p>
    #[doc(hidden)]
    pub transactional_messages_per_second: i32,
    /// <p>The current version of the SMS channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl SmsChannelResponse {
    /// <p>The unique identifier for the application that the SMS channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the SMS channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>Specifies whether the SMS channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>(Deprecated) An identifier for the SMS channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the SMS channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the SMS channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the SMS channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the SMS channel, this value is SMS.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The maximum number of promotional messages that you can send through the SMS channel each second.</p>
    pub fn promotional_messages_per_second(&self) -> i32 {
        self.promotional_messages_per_second
    }
    /// <p>The identity that displays on recipients' devices when they receive messages from the SMS channel.</p>
    pub fn sender_id(&self) -> std::option::Option<&str> {
        self.sender_id.as_deref()
    }
    /// <p>The registered short code to use when you send messages through the SMS channel.</p>
    pub fn short_code(&self) -> std::option::Option<&str> {
        self.short_code.as_deref()
    }
    /// <p>The maximum number of transactional messages that you can send through the SMS channel each second.</p>
    pub fn transactional_messages_per_second(&self) -> i32 {
        self.transactional_messages_per_second
    }
    /// <p>The current version of the SMS channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`SmsChannelResponse`](crate::model::SmsChannelResponse).
pub mod sms_channel_response {

    /// A builder for [`SmsChannelResponse`](crate::model::SmsChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) promotional_messages_per_second: std::option::Option<i32>,
        pub(crate) sender_id: std::option::Option<std::string::String>,
        pub(crate) short_code: std::option::Option<std::string::String>,
        pub(crate) transactional_messages_per_second: std::option::Option<i32>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the SMS channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the SMS channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the SMS channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the SMS channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>Specifies whether the SMS channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the SMS channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>(Deprecated) An identifier for the SMS channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the SMS channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the SMS channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the SMS channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the SMS channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the SMS channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the SMS channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the SMS channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the SMS channel, this value is SMS.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the SMS channel, this value is SMS.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The maximum number of promotional messages that you can send through the SMS channel each second.</p>
        pub fn promotional_messages_per_second(mut self, input: i32) -> Self {
            self.promotional_messages_per_second = Some(input);
            self
        }
        /// <p>The maximum number of promotional messages that you can send through the SMS channel each second.</p>
        pub fn set_promotional_messages_per_second(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.promotional_messages_per_second = input;
            self
        }
        /// <p>The identity that displays on recipients' devices when they receive messages from the SMS channel.</p>
        pub fn sender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.sender_id = Some(input.into());
            self
        }
        /// <p>The identity that displays on recipients' devices when they receive messages from the SMS channel.</p>
        pub fn set_sender_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sender_id = input;
            self
        }
        /// <p>The registered short code to use when you send messages through the SMS channel.</p>
        pub fn short_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.short_code = Some(input.into());
            self
        }
        /// <p>The registered short code to use when you send messages through the SMS channel.</p>
        pub fn set_short_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.short_code = input;
            self
        }
        /// <p>The maximum number of transactional messages that you can send through the SMS channel each second.</p>
        pub fn transactional_messages_per_second(mut self, input: i32) -> Self {
            self.transactional_messages_per_second = Some(input);
            self
        }
        /// <p>The maximum number of transactional messages that you can send through the SMS channel each second.</p>
        pub fn set_transactional_messages_per_second(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.transactional_messages_per_second = input;
            self
        }
        /// <p>The current version of the SMS channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the SMS channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`SmsChannelResponse`](crate::model::SmsChannelResponse).
        pub fn build(self) -> crate::model::SmsChannelResponse {
            crate::model::SmsChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                promotional_messages_per_second: self
                    .promotional_messages_per_second
                    .unwrap_or_default(),
                sender_id: self.sender_id,
                short_code: self.short_code,
                transactional_messages_per_second: self
                    .transactional_messages_per_second
                    .unwrap_or_default(),
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl SmsChannelResponse {
    /// Creates a new builder-style object to manufacture [`SmsChannelResponse`](crate::model::SmsChannelResponse).
    pub fn builder() -> crate::model::sms_channel_response::Builder {
        crate::model::sms_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the SMS channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SmsChannelRequest {
    /// <p>Specifies whether to enable the SMS channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
    #[doc(hidden)]
    pub sender_id: std::option::Option<std::string::String>,
    /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
    #[doc(hidden)]
    pub short_code: std::option::Option<std::string::String>,
}
impl SmsChannelRequest {
    /// <p>Specifies whether to enable the SMS channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
    pub fn sender_id(&self) -> std::option::Option<&str> {
        self.sender_id.as_deref()
    }
    /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
    pub fn short_code(&self) -> std::option::Option<&str> {
        self.short_code.as_deref()
    }
}
/// See [`SmsChannelRequest`](crate::model::SmsChannelRequest).
pub mod sms_channel_request {

    /// A builder for [`SmsChannelRequest`](crate::model::SmsChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) sender_id: std::option::Option<std::string::String>,
        pub(crate) short_code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Specifies whether to enable the SMS channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the SMS channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
        pub fn sender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.sender_id = Some(input.into());
            self
        }
        /// <p>The identity that you want to display on recipients' devices when they receive messages from the SMS channel.</p>
        pub fn set_sender_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sender_id = input;
            self
        }
        /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
        pub fn short_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.short_code = Some(input.into());
            self
        }
        /// <p>The registered short code that you want to use when you send messages through the SMS channel.</p>
        pub fn set_short_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.short_code = input;
            self
        }
        /// Consumes the builder and constructs a [`SmsChannelRequest`](crate::model::SmsChannelRequest).
        pub fn build(self) -> crate::model::SmsChannelRequest {
            crate::model::SmsChannelRequest {
                enabled: self.enabled.unwrap_or_default(),
                sender_id: self.sender_id,
                short_code: self.short_code,
            }
        }
    }
}
impl SmsChannelRequest {
    /// Creates a new builder-style object to manufacture [`SmsChannelRequest`](crate::model::SmsChannelRequest).
    pub fn builder() -> crate::model::sms_channel_request::Builder {
        crate::model::sms_channel_request::Builder::default()
    }
}

/// <p>Provides information about the configuration, dimension, and other settings for a segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentResponse {
    /// <p>The unique identifier for the application that the segment is associated with.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the segment.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The date and time when the segment was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The dimension settings for the segment.</p>
    #[doc(hidden)]
    pub dimensions: std::option::Option<crate::model::SegmentDimensions>,
    /// <p>The unique identifier for the segment.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The settings for the import job that's associated with the segment.</p>
    #[doc(hidden)]
    pub import_definition: std::option::Option<crate::model::SegmentImportResource>,
    /// <p>The date and time when the segment was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The name of the segment.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base segments and the dimensions that are applied to those base segments.</p>
    #[doc(hidden)]
    pub segment_groups: std::option::Option<crate::model::SegmentGroupList>,
    /// <p>The segment type. Valid values are:</p>
    /// <ul>
    /// <li><p>DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on endpoint data that's reported by your app. Dynamic segments can change over time.</p></li>
    /// <li><p>IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on endpoint definitions that you import from a file. Imported segments are static; they don't change over time.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub segment_type: std::option::Option<crate::model::SegmentType>,
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The version number of the segment.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl SegmentResponse {
    /// <p>The unique identifier for the application that the segment is associated with.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the segment.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The date and time when the segment was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The dimension settings for the segment.</p>
    pub fn dimensions(&self) -> std::option::Option<&crate::model::SegmentDimensions> {
        self.dimensions.as_ref()
    }
    /// <p>The unique identifier for the segment.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The settings for the import job that's associated with the segment.</p>
    pub fn import_definition(&self) -> std::option::Option<&crate::model::SegmentImportResource> {
        self.import_definition.as_ref()
    }
    /// <p>The date and time when the segment was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The name of the segment.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base segments and the dimensions that are applied to those base segments.</p>
    pub fn segment_groups(&self) -> std::option::Option<&crate::model::SegmentGroupList> {
        self.segment_groups.as_ref()
    }
    /// <p>The segment type. Valid values are:</p>
    /// <ul>
    /// <li><p>DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on endpoint data that's reported by your app. Dynamic segments can change over time.</p></li>
    /// <li><p>IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on endpoint definitions that you import from a file. Imported segments are static; they don't change over time.</p></li>
    /// </ul>
    pub fn segment_type(&self) -> std::option::Option<&crate::model::SegmentType> {
        self.segment_type.as_ref()
    }
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The version number of the segment.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`SegmentResponse`](crate::model::SegmentResponse).
pub mod segment_response {

    /// A builder for [`SegmentResponse`](crate::model::SegmentResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) dimensions: std::option::Option<crate::model::SegmentDimensions>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) import_definition: std::option::Option<crate::model::SegmentImportResource>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) segment_groups: std::option::Option<crate::model::SegmentGroupList>,
        pub(crate) segment_type: std::option::Option<crate::model::SegmentType>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the segment is associated with.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the segment is associated with.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the segment.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the segment.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The date and time when the segment was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the segment was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The dimension settings for the segment.</p>
        pub fn dimensions(mut self, input: crate::model::SegmentDimensions) -> Self {
            self.dimensions = Some(input);
            self
        }
        /// <p>The dimension settings for the segment.</p>
        pub fn set_dimensions(
            mut self,
            input: std::option::Option<crate::model::SegmentDimensions>,
        ) -> Self {
            self.dimensions = input;
            self
        }
        /// <p>The unique identifier for the segment.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the segment.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The settings for the import job that's associated with the segment.</p>
        pub fn import_definition(mut self, input: crate::model::SegmentImportResource) -> Self {
            self.import_definition = Some(input);
            self
        }
        /// <p>The settings for the import job that's associated with the segment.</p>
        pub fn set_import_definition(
            mut self,
            input: std::option::Option<crate::model::SegmentImportResource>,
        ) -> Self {
            self.import_definition = input;
            self
        }
        /// <p>The date and time when the segment was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the segment was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The name of the segment.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the segment.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base segments and the dimensions that are applied to those base segments.</p>
        pub fn segment_groups(mut self, input: crate::model::SegmentGroupList) -> Self {
            self.segment_groups = Some(input);
            self
        }
        /// <p>A list of one or more segment groups that apply to the segment. Each segment group consists of zero or more base segments and the dimensions that are applied to those base segments.</p>
        pub fn set_segment_groups(
            mut self,
            input: std::option::Option<crate::model::SegmentGroupList>,
        ) -> Self {
            self.segment_groups = input;
            self
        }
        /// <p>The segment type. Valid values are:</p>
        /// <ul>
        /// <li><p>DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on endpoint data that's reported by your app. Dynamic segments can change over time.</p></li>
        /// <li><p>IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on endpoint definitions that you import from a file. Imported segments are static; they don't change over time.</p></li>
        /// </ul>
        pub fn segment_type(mut self, input: crate::model::SegmentType) -> Self {
            self.segment_type = Some(input);
            self
        }
        /// <p>The segment type. Valid values are:</p>
        /// <ul>
        /// <li><p>DIMENSIONAL - A dynamic segment, which is a segment that uses selection criteria that you specify and is based on endpoint data that's reported by your app. Dynamic segments can change over time.</p></li>
        /// <li><p>IMPORT - A static segment, which is a segment that uses selection criteria that you specify and is based on endpoint definitions that you import from a file. Imported segments are static; they don't change over time.</p></li>
        /// </ul>
        pub fn set_segment_type(
            mut self,
            input: std::option::Option<crate::model::SegmentType>,
        ) -> Self {
            self.segment_type = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the segment. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The version number of the segment.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The version number of the segment.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentResponse`](crate::model::SegmentResponse).
        pub fn build(self) -> crate::model::SegmentResponse {
            crate::model::SegmentResponse {
                application_id: self.application_id,
                arn: self.arn,
                creation_date: self.creation_date,
                dimensions: self.dimensions,
                id: self.id,
                import_definition: self.import_definition,
                last_modified_date: self.last_modified_date,
                name: self.name,
                segment_groups: self.segment_groups,
                segment_type: self.segment_type,
                tags: self.tags,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl SegmentResponse {
    /// Creates a new builder-style object to manufacture [`SegmentResponse`](crate::model::SegmentResponse).
    pub fn builder() -> crate::model::segment_response::Builder {
        crate::model::segment_response::Builder::default()
    }
}

/// When writing a match expression against `SegmentType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let segmenttype = unimplemented!();
/// match segmenttype {
///     SegmentType::Dimensional => { /* ... */ },
///     SegmentType::Import => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `segmenttype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SegmentType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SegmentType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SegmentType::NewFeature` is defined.
/// Specifically, when `segmenttype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SegmentType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum SegmentType {
    #[allow(missing_docs)] // documentation missing in model
    Dimensional,
    #[allow(missing_docs)] // documentation missing in model
    Import,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SegmentType {
    fn from(s: &str) -> Self {
        match s {
            "DIMENSIONAL" => SegmentType::Dimensional,
            "IMPORT" => SegmentType::Import,
            other => SegmentType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for SegmentType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SegmentType::from(s))
    }
}
impl SegmentType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SegmentType::Dimensional => "DIMENSIONAL",
            SegmentType::Import => "IMPORT",
            SegmentType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DIMENSIONAL", "IMPORT"]
    }
}
impl AsRef<str> for SegmentType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the settings that define the relationships between segment groups for a segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentGroupList {
    /// <p>An array that defines the set of segment criteria to evaluate when handling segment groups for the segment.</p>
    #[doc(hidden)]
    pub groups: std::option::Option<std::vec::Vec<crate::model::SegmentGroup>>,
    /// <p>Specifies how to handle multiple segment groups for the segment. For example, if the segment includes three segment groups, whether the resulting segment includes endpoints that match all, any, or none of the segment groups.</p>
    #[doc(hidden)]
    pub include: std::option::Option<crate::model::Include>,
}
impl SegmentGroupList {
    /// <p>An array that defines the set of segment criteria to evaluate when handling segment groups for the segment.</p>
    pub fn groups(&self) -> std::option::Option<&[crate::model::SegmentGroup]> {
        self.groups.as_deref()
    }
    /// <p>Specifies how to handle multiple segment groups for the segment. For example, if the segment includes three segment groups, whether the resulting segment includes endpoints that match all, any, or none of the segment groups.</p>
    pub fn include(&self) -> std::option::Option<&crate::model::Include> {
        self.include.as_ref()
    }
}
/// See [`SegmentGroupList`](crate::model::SegmentGroupList).
pub mod segment_group_list {

    /// A builder for [`SegmentGroupList`](crate::model::SegmentGroupList).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) groups: std::option::Option<std::vec::Vec<crate::model::SegmentGroup>>,
        pub(crate) include: std::option::Option<crate::model::Include>,
    }
    impl Builder {
        /// Appends an item to `groups`.
        ///
        /// To override the contents of this collection use [`set_groups`](Self::set_groups).
        ///
        /// <p>An array that defines the set of segment criteria to evaluate when handling segment groups for the segment.</p>
        pub fn groups(mut self, input: crate::model::SegmentGroup) -> Self {
            let mut v = self.groups.unwrap_or_default();
            v.push(input);
            self.groups = Some(v);
            self
        }
        /// <p>An array that defines the set of segment criteria to evaluate when handling segment groups for the segment.</p>
        pub fn set_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SegmentGroup>>,
        ) -> Self {
            self.groups = input;
            self
        }
        /// <p>Specifies how to handle multiple segment groups for the segment. For example, if the segment includes three segment groups, whether the resulting segment includes endpoints that match all, any, or none of the segment groups.</p>
        pub fn include(mut self, input: crate::model::Include) -> Self {
            self.include = Some(input);
            self
        }
        /// <p>Specifies how to handle multiple segment groups for the segment. For example, if the segment includes three segment groups, whether the resulting segment includes endpoints that match all, any, or none of the segment groups.</p>
        pub fn set_include(mut self, input: std::option::Option<crate::model::Include>) -> Self {
            self.include = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentGroupList`](crate::model::SegmentGroupList).
        pub fn build(self) -> crate::model::SegmentGroupList {
            crate::model::SegmentGroupList {
                groups: self.groups,
                include: self.include,
            }
        }
    }
}
impl SegmentGroupList {
    /// Creates a new builder-style object to manufacture [`SegmentGroupList`](crate::model::SegmentGroupList).
    pub fn builder() -> crate::model::segment_group_list::Builder {
        crate::model::segment_group_list::Builder::default()
    }
}

/// When writing a match expression against `Include`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let include = unimplemented!();
/// match include {
///     Include::All => { /* ... */ },
///     Include::Any => { /* ... */ },
///     Include::None => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `include` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Include::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Include::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Include::NewFeature` is defined.
/// Specifically, when `include` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Include::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Include {
    #[allow(missing_docs)] // documentation missing in model
    All,
    #[allow(missing_docs)] // documentation missing in model
    Any,
    #[allow(missing_docs)] // documentation missing in model
    None,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Include {
    fn from(s: &str) -> Self {
        match s {
            "ALL" => Include::All,
            "ANY" => Include::Any,
            "NONE" => Include::None,
            other => Include::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Include {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Include::from(s))
    }
}
impl Include {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Include::All => "ALL",
            Include::Any => "ANY",
            Include::None => "NONE",
            Include::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ALL", "ANY", "NONE"]
    }
}
impl AsRef<str> for Include {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the base segments and dimensions for a segment, and the relationships between these base segments and dimensions.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentGroup {
    /// <p>An array that defines the dimensions for the segment.</p>
    #[doc(hidden)]
    pub dimensions: std::option::Option<std::vec::Vec<crate::model::SegmentDimensions>>,
    /// <p>The base segment to build the segment on. A base segment, also referred to as a <i>source segment</i>, defines the initial population of endpoints for a segment. When you add dimensions to a segment, Amazon Pinpoint filters the base segment by using the dimensions that you specify.</p>
    /// <p>You can specify more than one dimensional segment or only one imported segment. If you specify an imported segment, the Amazon Pinpoint console displays a segment size estimate that indicates the size of the imported segment without any filters applied to it.</p>
    #[doc(hidden)]
    pub source_segments: std::option::Option<std::vec::Vec<crate::model::SegmentReference>>,
    /// <p>Specifies how to handle multiple base segments for the segment. For example, if you specify three base segments for the segment, whether the resulting segment is based on all, any, or none of the base segments.</p>
    #[doc(hidden)]
    pub source_type: std::option::Option<crate::model::SourceType>,
    /// <p>Specifies how to handle multiple dimensions for the segment. For example, if you specify three dimensions for the segment, whether the resulting segment includes endpoints that match all, any, or none of the dimensions.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<crate::model::Type>,
}
impl SegmentGroup {
    /// <p>An array that defines the dimensions for the segment.</p>
    pub fn dimensions(&self) -> std::option::Option<&[crate::model::SegmentDimensions]> {
        self.dimensions.as_deref()
    }
    /// <p>The base segment to build the segment on. A base segment, also referred to as a <i>source segment</i>, defines the initial population of endpoints for a segment. When you add dimensions to a segment, Amazon Pinpoint filters the base segment by using the dimensions that you specify.</p>
    /// <p>You can specify more than one dimensional segment or only one imported segment. If you specify an imported segment, the Amazon Pinpoint console displays a segment size estimate that indicates the size of the imported segment without any filters applied to it.</p>
    pub fn source_segments(&self) -> std::option::Option<&[crate::model::SegmentReference]> {
        self.source_segments.as_deref()
    }
    /// <p>Specifies how to handle multiple base segments for the segment. For example, if you specify three base segments for the segment, whether the resulting segment is based on all, any, or none of the base segments.</p>
    pub fn source_type(&self) -> std::option::Option<&crate::model::SourceType> {
        self.source_type.as_ref()
    }
    /// <p>Specifies how to handle multiple dimensions for the segment. For example, if you specify three dimensions for the segment, whether the resulting segment includes endpoints that match all, any, or none of the dimensions.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::Type> {
        self.r#type.as_ref()
    }
}
/// See [`SegmentGroup`](crate::model::SegmentGroup).
pub mod segment_group {

    /// A builder for [`SegmentGroup`](crate::model::SegmentGroup).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dimensions: std::option::Option<std::vec::Vec<crate::model::SegmentDimensions>>,
        pub(crate) source_segments:
            std::option::Option<std::vec::Vec<crate::model::SegmentReference>>,
        pub(crate) source_type: std::option::Option<crate::model::SourceType>,
        pub(crate) r#type: std::option::Option<crate::model::Type>,
    }
    impl Builder {
        /// Appends an item to `dimensions`.
        ///
        /// To override the contents of this collection use [`set_dimensions`](Self::set_dimensions).
        ///
        /// <p>An array that defines the dimensions for the segment.</p>
        pub fn dimensions(mut self, input: crate::model::SegmentDimensions) -> Self {
            let mut v = self.dimensions.unwrap_or_default();
            v.push(input);
            self.dimensions = Some(v);
            self
        }
        /// <p>An array that defines the dimensions for the segment.</p>
        pub fn set_dimensions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SegmentDimensions>>,
        ) -> Self {
            self.dimensions = input;
            self
        }
        /// Appends an item to `source_segments`.
        ///
        /// To override the contents of this collection use [`set_source_segments`](Self::set_source_segments).
        ///
        /// <p>The base segment to build the segment on. A base segment, also referred to as a <i>source segment</i>, defines the initial population of endpoints for a segment. When you add dimensions to a segment, Amazon Pinpoint filters the base segment by using the dimensions that you specify.</p>
        /// <p>You can specify more than one dimensional segment or only one imported segment. If you specify an imported segment, the Amazon Pinpoint console displays a segment size estimate that indicates the size of the imported segment without any filters applied to it.</p>
        pub fn source_segments(mut self, input: crate::model::SegmentReference) -> Self {
            let mut v = self.source_segments.unwrap_or_default();
            v.push(input);
            self.source_segments = Some(v);
            self
        }
        /// <p>The base segment to build the segment on. A base segment, also referred to as a <i>source segment</i>, defines the initial population of endpoints for a segment. When you add dimensions to a segment, Amazon Pinpoint filters the base segment by using the dimensions that you specify.</p>
        /// <p>You can specify more than one dimensional segment or only one imported segment. If you specify an imported segment, the Amazon Pinpoint console displays a segment size estimate that indicates the size of the imported segment without any filters applied to it.</p>
        pub fn set_source_segments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SegmentReference>>,
        ) -> Self {
            self.source_segments = input;
            self
        }
        /// <p>Specifies how to handle multiple base segments for the segment. For example, if you specify three base segments for the segment, whether the resulting segment is based on all, any, or none of the base segments.</p>
        pub fn source_type(mut self, input: crate::model::SourceType) -> Self {
            self.source_type = Some(input);
            self
        }
        /// <p>Specifies how to handle multiple base segments for the segment. For example, if you specify three base segments for the segment, whether the resulting segment is based on all, any, or none of the base segments.</p>
        pub fn set_source_type(
            mut self,
            input: std::option::Option<crate::model::SourceType>,
        ) -> Self {
            self.source_type = input;
            self
        }
        /// <p>Specifies how to handle multiple dimensions for the segment. For example, if you specify three dimensions for the segment, whether the resulting segment includes endpoints that match all, any, or none of the dimensions.</p>
        pub fn r#type(mut self, input: crate::model::Type) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>Specifies how to handle multiple dimensions for the segment. For example, if you specify three dimensions for the segment, whether the resulting segment includes endpoints that match all, any, or none of the dimensions.</p>
        pub fn set_type(mut self, input: std::option::Option<crate::model::Type>) -> Self {
            self.r#type = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentGroup`](crate::model::SegmentGroup).
        pub fn build(self) -> crate::model::SegmentGroup {
            crate::model::SegmentGroup {
                dimensions: self.dimensions,
                source_segments: self.source_segments,
                source_type: self.source_type,
                r#type: self.r#type,
            }
        }
    }
}
impl SegmentGroup {
    /// Creates a new builder-style object to manufacture [`SegmentGroup`](crate::model::SegmentGroup).
    pub fn builder() -> crate::model::segment_group::Builder {
        crate::model::segment_group::Builder::default()
    }
}

/// When writing a match expression against `Type`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let type = unimplemented!();
/// match type {
///     Type::All => { /* ... */ },
///     Type::Any => { /* ... */ },
///     Type::None => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `type` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Type::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Type::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Type::NewFeature` is defined.
/// Specifically, when `type` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Type::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Type {
    #[allow(missing_docs)] // documentation missing in model
    All,
    #[allow(missing_docs)] // documentation missing in model
    Any,
    #[allow(missing_docs)] // documentation missing in model
    None,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Type {
    fn from(s: &str) -> Self {
        match s {
            "ALL" => Type::All,
            "ANY" => Type::Any,
            "NONE" => Type::None,
            other => Type::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Type {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Type::from(s))
    }
}
impl Type {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Type::All => "ALL",
            Type::Any => "ANY",
            Type::None => "NONE",
            Type::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ALL", "ANY", "NONE"]
    }
}
impl AsRef<str> for Type {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `SourceType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let sourcetype = unimplemented!();
/// match sourcetype {
///     SourceType::All => { /* ... */ },
///     SourceType::Any => { /* ... */ },
///     SourceType::None => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `sourcetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `SourceType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `SourceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `SourceType::NewFeature` is defined.
/// Specifically, when `sourcetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `SourceType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum SourceType {
    #[allow(missing_docs)] // documentation missing in model
    All,
    #[allow(missing_docs)] // documentation missing in model
    Any,
    #[allow(missing_docs)] // documentation missing in model
    None,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for SourceType {
    fn from(s: &str) -> Self {
        match s {
            "ALL" => SourceType::All,
            "ANY" => SourceType::Any,
            "NONE" => SourceType::None,
            other => SourceType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for SourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(SourceType::from(s))
    }
}
impl SourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            SourceType::All => "ALL",
            SourceType::Any => "ANY",
            SourceType::None => "NONE",
            SourceType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ALL", "ANY", "NONE"]
    }
}
impl AsRef<str> for SourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the segment identifier and version of a segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentReference {
    /// <p>The unique identifier for the segment.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The version number of the segment.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl SegmentReference {
    /// <p>The unique identifier for the segment.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The version number of the segment.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`SegmentReference`](crate::model::SegmentReference).
pub mod segment_reference {

    /// A builder for [`SegmentReference`](crate::model::SegmentReference).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the segment.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the segment.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The version number of the segment.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The version number of the segment.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentReference`](crate::model::SegmentReference).
        pub fn build(self) -> crate::model::SegmentReference {
            crate::model::SegmentReference {
                id: self.id,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl SegmentReference {
    /// Creates a new builder-style object to manufacture [`SegmentReference`](crate::model::SegmentReference).
    pub fn builder() -> crate::model::segment_reference::Builder {
        crate::model::segment_reference::Builder::default()
    }
}

/// <p>Specifies the dimension settings for a segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentDimensions {
    /// <p>One or more custom attributes to use as criteria for the segment.</p>
    #[doc(hidden)]
    pub attributes: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
    >,
    /// <p>The behavior-based criteria, such as how recently users have used your app, for the segment.</p>
    #[doc(hidden)]
    pub behavior: std::option::Option<crate::model::SegmentBehaviors>,
    /// <p>The demographic-based criteria, such as device platform, for the segment.</p>
    #[doc(hidden)]
    pub demographic: std::option::Option<crate::model::SegmentDemographics>,
    /// <p>The location-based criteria, such as region or GPS coordinates, for the segment.</p>
    #[doc(hidden)]
    pub location: std::option::Option<crate::model::SegmentLocation>,
    /// <p>One or more custom metrics to use as criteria for the segment.</p>
    #[doc(hidden)]
    pub metrics: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
    >,
    /// <p>One or more custom user attributes to use as criteria for the segment.</p>
    #[doc(hidden)]
    pub user_attributes: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
    >,
}
impl SegmentDimensions {
    /// <p>One or more custom attributes to use as criteria for the segment.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
    > {
        self.attributes.as_ref()
    }
    /// <p>The behavior-based criteria, such as how recently users have used your app, for the segment.</p>
    pub fn behavior(&self) -> std::option::Option<&crate::model::SegmentBehaviors> {
        self.behavior.as_ref()
    }
    /// <p>The demographic-based criteria, such as device platform, for the segment.</p>
    pub fn demographic(&self) -> std::option::Option<&crate::model::SegmentDemographics> {
        self.demographic.as_ref()
    }
    /// <p>The location-based criteria, such as region or GPS coordinates, for the segment.</p>
    pub fn location(&self) -> std::option::Option<&crate::model::SegmentLocation> {
        self.location.as_ref()
    }
    /// <p>One or more custom metrics to use as criteria for the segment.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
    > {
        self.metrics.as_ref()
    }
    /// <p>One or more custom user attributes to use as criteria for the segment.</p>
    pub fn user_attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
    > {
        self.user_attributes.as_ref()
    }
}
/// See [`SegmentDimensions`](crate::model::SegmentDimensions).
pub mod segment_dimensions {

    /// A builder for [`SegmentDimensions`](crate::model::SegmentDimensions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
        >,
        pub(crate) behavior: std::option::Option<crate::model::SegmentBehaviors>,
        pub(crate) demographic: std::option::Option<crate::model::SegmentDemographics>,
        pub(crate) location: std::option::Option<crate::model::SegmentLocation>,
        pub(crate) metrics: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
        >,
        pub(crate) user_attributes: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>One or more custom attributes to use as criteria for the segment.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::AttributeDimension,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes to use as criteria for the segment.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The behavior-based criteria, such as how recently users have used your app, for the segment.</p>
        pub fn behavior(mut self, input: crate::model::SegmentBehaviors) -> Self {
            self.behavior = Some(input);
            self
        }
        /// <p>The behavior-based criteria, such as how recently users have used your app, for the segment.</p>
        pub fn set_behavior(
            mut self,
            input: std::option::Option<crate::model::SegmentBehaviors>,
        ) -> Self {
            self.behavior = input;
            self
        }
        /// <p>The demographic-based criteria, such as device platform, for the segment.</p>
        pub fn demographic(mut self, input: crate::model::SegmentDemographics) -> Self {
            self.demographic = Some(input);
            self
        }
        /// <p>The demographic-based criteria, such as device platform, for the segment.</p>
        pub fn set_demographic(
            mut self,
            input: std::option::Option<crate::model::SegmentDemographics>,
        ) -> Self {
            self.demographic = input;
            self
        }
        /// <p>The location-based criteria, such as region or GPS coordinates, for the segment.</p>
        pub fn location(mut self, input: crate::model::SegmentLocation) -> Self {
            self.location = Some(input);
            self
        }
        /// <p>The location-based criteria, such as region or GPS coordinates, for the segment.</p>
        pub fn set_location(
            mut self,
            input: std::option::Option<crate::model::SegmentLocation>,
        ) -> Self {
            self.location = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>One or more custom metrics to use as criteria for the segment.</p>
        pub fn metrics(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::MetricDimension,
        ) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.metrics = Some(hash_map);
            self
        }
        /// <p>One or more custom metrics to use as criteria for the segment.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
            >,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// Adds a key-value pair to `user_attributes`.
        ///
        /// To override the contents of this collection use [`set_user_attributes`](Self::set_user_attributes).
        ///
        /// <p>One or more custom user attributes to use as criteria for the segment.</p>
        pub fn user_attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::AttributeDimension,
        ) -> Self {
            let mut hash_map = self.user_attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.user_attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom user attributes to use as criteria for the segment.</p>
        pub fn set_user_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
            >,
        ) -> Self {
            self.user_attributes = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentDimensions`](crate::model::SegmentDimensions).
        pub fn build(self) -> crate::model::SegmentDimensions {
            crate::model::SegmentDimensions {
                attributes: self.attributes,
                behavior: self.behavior,
                demographic: self.demographic,
                location: self.location,
                metrics: self.metrics,
                user_attributes: self.user_attributes,
            }
        }
    }
}
impl SegmentDimensions {
    /// Creates a new builder-style object to manufacture [`SegmentDimensions`](crate::model::SegmentDimensions).
    pub fn builder() -> crate::model::segment_dimensions::Builder {
        crate::model::segment_dimensions::Builder::default()
    }
}

/// <p>Specifies attribute-based criteria for including or excluding endpoints from a segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AttributeDimension {
    /// <p>The type of segment dimension to use. Valid values are: </p>
    /// <ul>
    /// <li>INCLUSIVE - endpoints that have attributes matching the values are included in the segment.</li>
    /// <li>EXCLUSIVE - endpoints that have attributes matching the values are excluded in the segment.</li>
    /// <li>CONTAINS - endpoints that have attributes' substrings match the values are included in the segment.</li>
    /// <li>BEFORE - endpoints with attributes read as ISO_INSTANT datetimes before the value are included in the segment.</li>
    /// <li>AFTER - endpoints with attributes read as ISO_INSTANT datetimes after the value are included in the segment.</li>
    /// <li>ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.</li>
    /// <li>BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.</li>
    /// <p></p>
    /// </ul>
    #[doc(hidden)]
    pub attribute_type: std::option::Option<crate::model::AttributeType>,
    /// <p>The criteria values to use for the segment dimension. Depending on the value of the AttributeType property, endpoints are included or excluded from the segment if their attribute values match the criteria values.</p>
    #[doc(hidden)]
    pub values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl AttributeDimension {
    /// <p>The type of segment dimension to use. Valid values are: </p>
    /// <ul>
    /// <li>INCLUSIVE - endpoints that have attributes matching the values are included in the segment.</li>
    /// <li>EXCLUSIVE - endpoints that have attributes matching the values are excluded in the segment.</li>
    /// <li>CONTAINS - endpoints that have attributes' substrings match the values are included in the segment.</li>
    /// <li>BEFORE - endpoints with attributes read as ISO_INSTANT datetimes before the value are included in the segment.</li>
    /// <li>AFTER - endpoints with attributes read as ISO_INSTANT datetimes after the value are included in the segment.</li>
    /// <li>ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.</li>
    /// <li>BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.</li>
    /// <p></p>
    /// </ul>
    pub fn attribute_type(&self) -> std::option::Option<&crate::model::AttributeType> {
        self.attribute_type.as_ref()
    }
    /// <p>The criteria values to use for the segment dimension. Depending on the value of the AttributeType property, endpoints are included or excluded from the segment if their attribute values match the criteria values.</p>
    pub fn values(&self) -> std::option::Option<&[std::string::String]> {
        self.values.as_deref()
    }
}
/// See [`AttributeDimension`](crate::model::AttributeDimension).
pub mod attribute_dimension {

    /// A builder for [`AttributeDimension`](crate::model::AttributeDimension).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attribute_type: std::option::Option<crate::model::AttributeType>,
        pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The type of segment dimension to use. Valid values are: </p>
        /// <ul>
        /// <li>INCLUSIVE - endpoints that have attributes matching the values are included in the segment.</li>
        /// <li>EXCLUSIVE - endpoints that have attributes matching the values are excluded in the segment.</li>
        /// <li>CONTAINS - endpoints that have attributes' substrings match the values are included in the segment.</li>
        /// <li>BEFORE - endpoints with attributes read as ISO_INSTANT datetimes before the value are included in the segment.</li>
        /// <li>AFTER - endpoints with attributes read as ISO_INSTANT datetimes after the value are included in the segment.</li>
        /// <li>ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.</li>
        /// <li>BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.</li>
        /// <p></p>
        /// </ul>
        pub fn attribute_type(mut self, input: crate::model::AttributeType) -> Self {
            self.attribute_type = Some(input);
            self
        }
        /// <p>The type of segment dimension to use. Valid values are: </p>
        /// <ul>
        /// <li>INCLUSIVE - endpoints that have attributes matching the values are included in the segment.</li>
        /// <li>EXCLUSIVE - endpoints that have attributes matching the values are excluded in the segment.</li>
        /// <li>CONTAINS - endpoints that have attributes' substrings match the values are included in the segment.</li>
        /// <li>BEFORE - endpoints with attributes read as ISO_INSTANT datetimes before the value are included in the segment.</li>
        /// <li>AFTER - endpoints with attributes read as ISO_INSTANT datetimes after the value are included in the segment.</li>
        /// <li>ON - endpoints with attributes read as ISO_INSTANT dates on the value are included in the segment. Time is ignored in this comparison.</li>
        /// <li>BETWEEN - endpoints with attributes read as ISO_INSTANT datetimes between the values are included in the segment.</li>
        /// <p></p>
        /// </ul>
        pub fn set_attribute_type(
            mut self,
            input: std::option::Option<crate::model::AttributeType>,
        ) -> Self {
            self.attribute_type = input;
            self
        }
        /// Appends an item to `values`.
        ///
        /// To override the contents of this collection use [`set_values`](Self::set_values).
        ///
        /// <p>The criteria values to use for the segment dimension. Depending on the value of the AttributeType property, endpoints are included or excluded from the segment if their attribute values match the criteria values.</p>
        pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.values.unwrap_or_default();
            v.push(input.into());
            self.values = Some(v);
            self
        }
        /// <p>The criteria values to use for the segment dimension. Depending on the value of the AttributeType property, endpoints are included or excluded from the segment if their attribute values match the criteria values.</p>
        pub fn set_values(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.values = input;
            self
        }
        /// Consumes the builder and constructs a [`AttributeDimension`](crate::model::AttributeDimension).
        pub fn build(self) -> crate::model::AttributeDimension {
            crate::model::AttributeDimension {
                attribute_type: self.attribute_type,
                values: self.values,
            }
        }
    }
}
impl AttributeDimension {
    /// Creates a new builder-style object to manufacture [`AttributeDimension`](crate::model::AttributeDimension).
    pub fn builder() -> crate::model::attribute_dimension::Builder {
        crate::model::attribute_dimension::Builder::default()
    }
}

/// When writing a match expression against `AttributeType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let attributetype = unimplemented!();
/// match attributetype {
///     AttributeType::After => { /* ... */ },
///     AttributeType::Before => { /* ... */ },
///     AttributeType::Between => { /* ... */ },
///     AttributeType::Contains => { /* ... */ },
///     AttributeType::Exclusive => { /* ... */ },
///     AttributeType::Inclusive => { /* ... */ },
///     AttributeType::On => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `attributetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `AttributeType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `AttributeType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `AttributeType::NewFeature` is defined.
/// Specifically, when `attributetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `AttributeType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum AttributeType {
    #[allow(missing_docs)] // documentation missing in model
    After,
    #[allow(missing_docs)] // documentation missing in model
    Before,
    #[allow(missing_docs)] // documentation missing in model
    Between,
    #[allow(missing_docs)] // documentation missing in model
    Contains,
    #[allow(missing_docs)] // documentation missing in model
    Exclusive,
    #[allow(missing_docs)] // documentation missing in model
    Inclusive,
    #[allow(missing_docs)] // documentation missing in model
    On,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for AttributeType {
    fn from(s: &str) -> Self {
        match s {
            "AFTER" => AttributeType::After,
            "BEFORE" => AttributeType::Before,
            "BETWEEN" => AttributeType::Between,
            "CONTAINS" => AttributeType::Contains,
            "EXCLUSIVE" => AttributeType::Exclusive,
            "INCLUSIVE" => AttributeType::Inclusive,
            "ON" => AttributeType::On,
            other => AttributeType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for AttributeType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AttributeType::from(s))
    }
}
impl AttributeType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AttributeType::After => "AFTER",
            AttributeType::Before => "BEFORE",
            AttributeType::Between => "BETWEEN",
            AttributeType::Contains => "CONTAINS",
            AttributeType::Exclusive => "EXCLUSIVE",
            AttributeType::Inclusive => "INCLUSIVE",
            AttributeType::On => "ON",
            AttributeType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "AFTER",
            "BEFORE",
            "BETWEEN",
            "CONTAINS",
            "EXCLUSIVE",
            "INCLUSIVE",
            "ON",
        ]
    }
}
impl AsRef<str> for AttributeType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies metric-based criteria for including or excluding endpoints from a segment. These criteria derive from custom metrics that you define for endpoints.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MetricDimension {
    /// <p>The operator to use when comparing metric values. Valid values are: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, and EQUAL.</p>
    #[doc(hidden)]
    pub comparison_operator: std::option::Option<std::string::String>,
    /// <p>The value to compare.</p>
    #[doc(hidden)]
    pub value: f64,
}
impl MetricDimension {
    /// <p>The operator to use when comparing metric values. Valid values are: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, and EQUAL.</p>
    pub fn comparison_operator(&self) -> std::option::Option<&str> {
        self.comparison_operator.as_deref()
    }
    /// <p>The value to compare.</p>
    pub fn value(&self) -> f64 {
        self.value
    }
}
/// See [`MetricDimension`](crate::model::MetricDimension).
pub mod metric_dimension {

    /// A builder for [`MetricDimension`](crate::model::MetricDimension).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) comparison_operator: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The operator to use when comparing metric values. Valid values are: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, and EQUAL.</p>
        pub fn comparison_operator(mut self, input: impl Into<std::string::String>) -> Self {
            self.comparison_operator = Some(input.into());
            self
        }
        /// <p>The operator to use when comparing metric values. Valid values are: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, and EQUAL.</p>
        pub fn set_comparison_operator(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.comparison_operator = input;
            self
        }
        /// <p>The value to compare.</p>
        pub fn value(mut self, input: f64) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>The value to compare.</p>
        pub fn set_value(mut self, input: std::option::Option<f64>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`MetricDimension`](crate::model::MetricDimension).
        pub fn build(self) -> crate::model::MetricDimension {
            crate::model::MetricDimension {
                comparison_operator: self.comparison_operator,
                value: self.value.unwrap_or_default(),
            }
        }
    }
}
impl MetricDimension {
    /// Creates a new builder-style object to manufacture [`MetricDimension`](crate::model::MetricDimension).
    pub fn builder() -> crate::model::metric_dimension::Builder {
        crate::model::metric_dimension::Builder::default()
    }
}

/// <p>Specifies geographical dimension settings for a segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentLocation {
    /// <p>The country or region code, in ISO 3166-1 alpha-2 format, for the segment.</p>
    #[doc(hidden)]
    pub country: std::option::Option<crate::model::SetDimension>,
    /// <p>The GPS location and range for the segment.</p>
    #[doc(hidden)]
    pub gps_point: std::option::Option<crate::model::GpsPointDimension>,
}
impl SegmentLocation {
    /// <p>The country or region code, in ISO 3166-1 alpha-2 format, for the segment.</p>
    pub fn country(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.country.as_ref()
    }
    /// <p>The GPS location and range for the segment.</p>
    pub fn gps_point(&self) -> std::option::Option<&crate::model::GpsPointDimension> {
        self.gps_point.as_ref()
    }
}
/// See [`SegmentLocation`](crate::model::SegmentLocation).
pub mod segment_location {

    /// A builder for [`SegmentLocation`](crate::model::SegmentLocation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) country: std::option::Option<crate::model::SetDimension>,
        pub(crate) gps_point: std::option::Option<crate::model::GpsPointDimension>,
    }
    impl Builder {
        /// <p>The country or region code, in ISO 3166-1 alpha-2 format, for the segment.</p>
        pub fn country(mut self, input: crate::model::SetDimension) -> Self {
            self.country = Some(input);
            self
        }
        /// <p>The country or region code, in ISO 3166-1 alpha-2 format, for the segment.</p>
        pub fn set_country(
            mut self,
            input: std::option::Option<crate::model::SetDimension>,
        ) -> Self {
            self.country = input;
            self
        }
        /// <p>The GPS location and range for the segment.</p>
        pub fn gps_point(mut self, input: crate::model::GpsPointDimension) -> Self {
            self.gps_point = Some(input);
            self
        }
        /// <p>The GPS location and range for the segment.</p>
        pub fn set_gps_point(
            mut self,
            input: std::option::Option<crate::model::GpsPointDimension>,
        ) -> Self {
            self.gps_point = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentLocation`](crate::model::SegmentLocation).
        pub fn build(self) -> crate::model::SegmentLocation {
            crate::model::SegmentLocation {
                country: self.country,
                gps_point: self.gps_point,
            }
        }
    }
}
impl SegmentLocation {
    /// Creates a new builder-style object to manufacture [`SegmentLocation`](crate::model::SegmentLocation).
    pub fn builder() -> crate::model::segment_location::Builder {
        crate::model::segment_location::Builder::default()
    }
}

/// <p>Specifies GPS-based criteria for including or excluding endpoints from a segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GpsPointDimension {
    /// <p>The GPS coordinates to measure distance from.</p>
    #[doc(hidden)]
    pub coordinates: std::option::Option<crate::model::GpsCoordinates>,
    /// <p>The range, in kilometers, from the GPS coordinates.</p>
    #[doc(hidden)]
    pub range_in_kilometers: f64,
}
impl GpsPointDimension {
    /// <p>The GPS coordinates to measure distance from.</p>
    pub fn coordinates(&self) -> std::option::Option<&crate::model::GpsCoordinates> {
        self.coordinates.as_ref()
    }
    /// <p>The range, in kilometers, from the GPS coordinates.</p>
    pub fn range_in_kilometers(&self) -> f64 {
        self.range_in_kilometers
    }
}
/// See [`GpsPointDimension`](crate::model::GpsPointDimension).
pub mod gps_point_dimension {

    /// A builder for [`GpsPointDimension`](crate::model::GpsPointDimension).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) coordinates: std::option::Option<crate::model::GpsCoordinates>,
        pub(crate) range_in_kilometers: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The GPS coordinates to measure distance from.</p>
        pub fn coordinates(mut self, input: crate::model::GpsCoordinates) -> Self {
            self.coordinates = Some(input);
            self
        }
        /// <p>The GPS coordinates to measure distance from.</p>
        pub fn set_coordinates(
            mut self,
            input: std::option::Option<crate::model::GpsCoordinates>,
        ) -> Self {
            self.coordinates = input;
            self
        }
        /// <p>The range, in kilometers, from the GPS coordinates.</p>
        pub fn range_in_kilometers(mut self, input: f64) -> Self {
            self.range_in_kilometers = Some(input);
            self
        }
        /// <p>The range, in kilometers, from the GPS coordinates.</p>
        pub fn set_range_in_kilometers(mut self, input: std::option::Option<f64>) -> Self {
            self.range_in_kilometers = input;
            self
        }
        /// Consumes the builder and constructs a [`GpsPointDimension`](crate::model::GpsPointDimension).
        pub fn build(self) -> crate::model::GpsPointDimension {
            crate::model::GpsPointDimension {
                coordinates: self.coordinates,
                range_in_kilometers: self.range_in_kilometers.unwrap_or_default(),
            }
        }
    }
}
impl GpsPointDimension {
    /// Creates a new builder-style object to manufacture [`GpsPointDimension`](crate::model::GpsPointDimension).
    pub fn builder() -> crate::model::gps_point_dimension::Builder {
        crate::model::gps_point_dimension::Builder::default()
    }
}

/// <p>Specifies the GPS coordinates of a location.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GpsCoordinates {
    /// <p>The latitude coordinate of the location.</p>
    #[doc(hidden)]
    pub latitude: f64,
    /// <p>The longitude coordinate of the location.</p>
    #[doc(hidden)]
    pub longitude: f64,
}
impl GpsCoordinates {
    /// <p>The latitude coordinate of the location.</p>
    pub fn latitude(&self) -> f64 {
        self.latitude
    }
    /// <p>The longitude coordinate of the location.</p>
    pub fn longitude(&self) -> f64 {
        self.longitude
    }
}
/// See [`GpsCoordinates`](crate::model::GpsCoordinates).
pub mod gps_coordinates {

    /// A builder for [`GpsCoordinates`](crate::model::GpsCoordinates).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) latitude: std::option::Option<f64>,
        pub(crate) longitude: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The latitude coordinate of the location.</p>
        pub fn latitude(mut self, input: f64) -> Self {
            self.latitude = Some(input);
            self
        }
        /// <p>The latitude coordinate of the location.</p>
        pub fn set_latitude(mut self, input: std::option::Option<f64>) -> Self {
            self.latitude = input;
            self
        }
        /// <p>The longitude coordinate of the location.</p>
        pub fn longitude(mut self, input: f64) -> Self {
            self.longitude = Some(input);
            self
        }
        /// <p>The longitude coordinate of the location.</p>
        pub fn set_longitude(mut self, input: std::option::Option<f64>) -> Self {
            self.longitude = input;
            self
        }
        /// Consumes the builder and constructs a [`GpsCoordinates`](crate::model::GpsCoordinates).
        pub fn build(self) -> crate::model::GpsCoordinates {
            crate::model::GpsCoordinates {
                latitude: self.latitude.unwrap_or_default(),
                longitude: self.longitude.unwrap_or_default(),
            }
        }
    }
}
impl GpsCoordinates {
    /// Creates a new builder-style object to manufacture [`GpsCoordinates`](crate::model::GpsCoordinates).
    pub fn builder() -> crate::model::gps_coordinates::Builder {
        crate::model::gps_coordinates::Builder::default()
    }
}

/// <p>Specifies the dimension type and values for a segment dimension.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SetDimension {
    /// <p>The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.</p>
    #[doc(hidden)]
    pub dimension_type: std::option::Option<crate::model::DimensionType>,
    /// <p>The criteria values to use for the segment dimension. Depending on the value of the DimensionType property, endpoints are included or excluded from the segment if their values match the criteria values.</p>
    #[doc(hidden)]
    pub values: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl SetDimension {
    /// <p>The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.</p>
    pub fn dimension_type(&self) -> std::option::Option<&crate::model::DimensionType> {
        self.dimension_type.as_ref()
    }
    /// <p>The criteria values to use for the segment dimension. Depending on the value of the DimensionType property, endpoints are included or excluded from the segment if their values match the criteria values.</p>
    pub fn values(&self) -> std::option::Option<&[std::string::String]> {
        self.values.as_deref()
    }
}
/// See [`SetDimension`](crate::model::SetDimension).
pub mod set_dimension {

    /// A builder for [`SetDimension`](crate::model::SetDimension).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dimension_type: std::option::Option<crate::model::DimensionType>,
        pub(crate) values: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.</p>
        pub fn dimension_type(mut self, input: crate::model::DimensionType) -> Self {
            self.dimension_type = Some(input);
            self
        }
        /// <p>The type of segment dimension to use. Valid values are: INCLUSIVE, endpoints that match the criteria are included in the segment; and, EXCLUSIVE, endpoints that match the criteria are excluded from the segment.</p>
        pub fn set_dimension_type(
            mut self,
            input: std::option::Option<crate::model::DimensionType>,
        ) -> Self {
            self.dimension_type = input;
            self
        }
        /// Appends an item to `values`.
        ///
        /// To override the contents of this collection use [`set_values`](Self::set_values).
        ///
        /// <p>The criteria values to use for the segment dimension. Depending on the value of the DimensionType property, endpoints are included or excluded from the segment if their values match the criteria values.</p>
        pub fn values(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.values.unwrap_or_default();
            v.push(input.into());
            self.values = Some(v);
            self
        }
        /// <p>The criteria values to use for the segment dimension. Depending on the value of the DimensionType property, endpoints are included or excluded from the segment if their values match the criteria values.</p>
        pub fn set_values(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.values = input;
            self
        }
        /// Consumes the builder and constructs a [`SetDimension`](crate::model::SetDimension).
        pub fn build(self) -> crate::model::SetDimension {
            crate::model::SetDimension {
                dimension_type: self.dimension_type,
                values: self.values,
            }
        }
    }
}
impl SetDimension {
    /// Creates a new builder-style object to manufacture [`SetDimension`](crate::model::SetDimension).
    pub fn builder() -> crate::model::set_dimension::Builder {
        crate::model::set_dimension::Builder::default()
    }
}

/// When writing a match expression against `DimensionType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let dimensiontype = unimplemented!();
/// match dimensiontype {
///     DimensionType::Exclusive => { /* ... */ },
///     DimensionType::Inclusive => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `dimensiontype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DimensionType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DimensionType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DimensionType::NewFeature` is defined.
/// Specifically, when `dimensiontype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DimensionType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum DimensionType {
    #[allow(missing_docs)] // documentation missing in model
    Exclusive,
    #[allow(missing_docs)] // documentation missing in model
    Inclusive,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DimensionType {
    fn from(s: &str) -> Self {
        match s {
            "EXCLUSIVE" => DimensionType::Exclusive,
            "INCLUSIVE" => DimensionType::Inclusive,
            other => DimensionType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DimensionType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DimensionType::from(s))
    }
}
impl DimensionType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DimensionType::Exclusive => "EXCLUSIVE",
            DimensionType::Inclusive => "INCLUSIVE",
            DimensionType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["EXCLUSIVE", "INCLUSIVE"]
    }
}
impl AsRef<str> for DimensionType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies demographic-based dimension settings for including or excluding endpoints from a segment. These settings derive from characteristics of endpoint devices, such as platform, make, and model.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentDemographics {
    /// <p>The app version criteria for the segment.</p>
    #[doc(hidden)]
    pub app_version: std::option::Option<crate::model::SetDimension>,
    /// <p>The channel criteria for the segment.</p>
    #[doc(hidden)]
    pub channel: std::option::Option<crate::model::SetDimension>,
    /// <p>The device type criteria for the segment.</p>
    #[doc(hidden)]
    pub device_type: std::option::Option<crate::model::SetDimension>,
    /// <p>The device make criteria for the segment.</p>
    #[doc(hidden)]
    pub make: std::option::Option<crate::model::SetDimension>,
    /// <p>The device model criteria for the segment.</p>
    #[doc(hidden)]
    pub model: std::option::Option<crate::model::SetDimension>,
    /// <p>The device platform criteria for the segment.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<crate::model::SetDimension>,
}
impl SegmentDemographics {
    /// <p>The app version criteria for the segment.</p>
    pub fn app_version(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.app_version.as_ref()
    }
    /// <p>The channel criteria for the segment.</p>
    pub fn channel(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.channel.as_ref()
    }
    /// <p>The device type criteria for the segment.</p>
    pub fn device_type(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.device_type.as_ref()
    }
    /// <p>The device make criteria for the segment.</p>
    pub fn make(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.make.as_ref()
    }
    /// <p>The device model criteria for the segment.</p>
    pub fn model(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.model.as_ref()
    }
    /// <p>The device platform criteria for the segment.</p>
    pub fn platform(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.platform.as_ref()
    }
}
/// See [`SegmentDemographics`](crate::model::SegmentDemographics).
pub mod segment_demographics {

    /// A builder for [`SegmentDemographics`](crate::model::SegmentDemographics).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) app_version: std::option::Option<crate::model::SetDimension>,
        pub(crate) channel: std::option::Option<crate::model::SetDimension>,
        pub(crate) device_type: std::option::Option<crate::model::SetDimension>,
        pub(crate) make: std::option::Option<crate::model::SetDimension>,
        pub(crate) model: std::option::Option<crate::model::SetDimension>,
        pub(crate) platform: std::option::Option<crate::model::SetDimension>,
    }
    impl Builder {
        /// <p>The app version criteria for the segment.</p>
        pub fn app_version(mut self, input: crate::model::SetDimension) -> Self {
            self.app_version = Some(input);
            self
        }
        /// <p>The app version criteria for the segment.</p>
        pub fn set_app_version(
            mut self,
            input: std::option::Option<crate::model::SetDimension>,
        ) -> Self {
            self.app_version = input;
            self
        }
        /// <p>The channel criteria for the segment.</p>
        pub fn channel(mut self, input: crate::model::SetDimension) -> Self {
            self.channel = Some(input);
            self
        }
        /// <p>The channel criteria for the segment.</p>
        pub fn set_channel(
            mut self,
            input: std::option::Option<crate::model::SetDimension>,
        ) -> Self {
            self.channel = input;
            self
        }
        /// <p>The device type criteria for the segment.</p>
        pub fn device_type(mut self, input: crate::model::SetDimension) -> Self {
            self.device_type = Some(input);
            self
        }
        /// <p>The device type criteria for the segment.</p>
        pub fn set_device_type(
            mut self,
            input: std::option::Option<crate::model::SetDimension>,
        ) -> Self {
            self.device_type = input;
            self
        }
        /// <p>The device make criteria for the segment.</p>
        pub fn make(mut self, input: crate::model::SetDimension) -> Self {
            self.make = Some(input);
            self
        }
        /// <p>The device make criteria for the segment.</p>
        pub fn set_make(mut self, input: std::option::Option<crate::model::SetDimension>) -> Self {
            self.make = input;
            self
        }
        /// <p>The device model criteria for the segment.</p>
        pub fn model(mut self, input: crate::model::SetDimension) -> Self {
            self.model = Some(input);
            self
        }
        /// <p>The device model criteria for the segment.</p>
        pub fn set_model(mut self, input: std::option::Option<crate::model::SetDimension>) -> Self {
            self.model = input;
            self
        }
        /// <p>The device platform criteria for the segment.</p>
        pub fn platform(mut self, input: crate::model::SetDimension) -> Self {
            self.platform = Some(input);
            self
        }
        /// <p>The device platform criteria for the segment.</p>
        pub fn set_platform(
            mut self,
            input: std::option::Option<crate::model::SetDimension>,
        ) -> Self {
            self.platform = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentDemographics`](crate::model::SegmentDemographics).
        pub fn build(self) -> crate::model::SegmentDemographics {
            crate::model::SegmentDemographics {
                app_version: self.app_version,
                channel: self.channel,
                device_type: self.device_type,
                make: self.make,
                model: self.model,
                platform: self.platform,
            }
        }
    }
}
impl SegmentDemographics {
    /// Creates a new builder-style object to manufacture [`SegmentDemographics`](crate::model::SegmentDemographics).
    pub fn builder() -> crate::model::segment_demographics::Builder {
        crate::model::segment_demographics::Builder::default()
    }
}

/// <p>Specifies dimension settings for including or excluding endpoints from a segment based on how recently an endpoint was active.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentBehaviors {
    /// <p>The dimension settings that are based on how recently an endpoint was active.</p>
    #[doc(hidden)]
    pub recency: std::option::Option<crate::model::RecencyDimension>,
}
impl SegmentBehaviors {
    /// <p>The dimension settings that are based on how recently an endpoint was active.</p>
    pub fn recency(&self) -> std::option::Option<&crate::model::RecencyDimension> {
        self.recency.as_ref()
    }
}
/// See [`SegmentBehaviors`](crate::model::SegmentBehaviors).
pub mod segment_behaviors {

    /// A builder for [`SegmentBehaviors`](crate::model::SegmentBehaviors).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) recency: std::option::Option<crate::model::RecencyDimension>,
    }
    impl Builder {
        /// <p>The dimension settings that are based on how recently an endpoint was active.</p>
        pub fn recency(mut self, input: crate::model::RecencyDimension) -> Self {
            self.recency = Some(input);
            self
        }
        /// <p>The dimension settings that are based on how recently an endpoint was active.</p>
        pub fn set_recency(
            mut self,
            input: std::option::Option<crate::model::RecencyDimension>,
        ) -> Self {
            self.recency = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentBehaviors`](crate::model::SegmentBehaviors).
        pub fn build(self) -> crate::model::SegmentBehaviors {
            crate::model::SegmentBehaviors {
                recency: self.recency,
            }
        }
    }
}
impl SegmentBehaviors {
    /// Creates a new builder-style object to manufacture [`SegmentBehaviors`](crate::model::SegmentBehaviors).
    pub fn builder() -> crate::model::segment_behaviors::Builder {
        crate::model::segment_behaviors::Builder::default()
    }
}

/// <p>Specifies criteria for including or excluding endpoints from a segment based on how recently an endpoint was active.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RecencyDimension {
    /// <p>The duration to use when determining whether an endpoint is active or inactive.</p>
    #[doc(hidden)]
    pub duration: std::option::Option<crate::model::Duration>,
    /// <p>The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren't active within the specified duration are included in the segment.</p>
    #[doc(hidden)]
    pub recency_type: std::option::Option<crate::model::RecencyType>,
}
impl RecencyDimension {
    /// <p>The duration to use when determining whether an endpoint is active or inactive.</p>
    pub fn duration(&self) -> std::option::Option<&crate::model::Duration> {
        self.duration.as_ref()
    }
    /// <p>The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren't active within the specified duration are included in the segment.</p>
    pub fn recency_type(&self) -> std::option::Option<&crate::model::RecencyType> {
        self.recency_type.as_ref()
    }
}
/// See [`RecencyDimension`](crate::model::RecencyDimension).
pub mod recency_dimension {

    /// A builder for [`RecencyDimension`](crate::model::RecencyDimension).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) duration: std::option::Option<crate::model::Duration>,
        pub(crate) recency_type: std::option::Option<crate::model::RecencyType>,
    }
    impl Builder {
        /// <p>The duration to use when determining whether an endpoint is active or inactive.</p>
        pub fn duration(mut self, input: crate::model::Duration) -> Self {
            self.duration = Some(input);
            self
        }
        /// <p>The duration to use when determining whether an endpoint is active or inactive.</p>
        pub fn set_duration(mut self, input: std::option::Option<crate::model::Duration>) -> Self {
            self.duration = input;
            self
        }
        /// <p>The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren't active within the specified duration are included in the segment.</p>
        pub fn recency_type(mut self, input: crate::model::RecencyType) -> Self {
            self.recency_type = Some(input);
            self
        }
        /// <p>The type of recency dimension to use for the segment. Valid values are: ACTIVE, endpoints that were active within the specified duration are included in the segment; and, INACTIVE, endpoints that weren't active within the specified duration are included in the segment.</p>
        pub fn set_recency_type(
            mut self,
            input: std::option::Option<crate::model::RecencyType>,
        ) -> Self {
            self.recency_type = input;
            self
        }
        /// Consumes the builder and constructs a [`RecencyDimension`](crate::model::RecencyDimension).
        pub fn build(self) -> crate::model::RecencyDimension {
            crate::model::RecencyDimension {
                duration: self.duration,
                recency_type: self.recency_type,
            }
        }
    }
}
impl RecencyDimension {
    /// Creates a new builder-style object to manufacture [`RecencyDimension`](crate::model::RecencyDimension).
    pub fn builder() -> crate::model::recency_dimension::Builder {
        crate::model::recency_dimension::Builder::default()
    }
}

/// When writing a match expression against `RecencyType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let recencytype = unimplemented!();
/// match recencytype {
///     RecencyType::Active => { /* ... */ },
///     RecencyType::Inactive => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `recencytype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `RecencyType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `RecencyType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `RecencyType::NewFeature` is defined.
/// Specifically, when `recencytype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `RecencyType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum RecencyType {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Inactive,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RecencyType {
    fn from(s: &str) -> Self {
        match s {
            "ACTIVE" => RecencyType::Active,
            "INACTIVE" => RecencyType::Inactive,
            other => RecencyType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for RecencyType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(RecencyType::from(s))
    }
}
impl RecencyType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            RecencyType::Active => "ACTIVE",
            RecencyType::Inactive => "INACTIVE",
            RecencyType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ACTIVE", "INACTIVE"]
    }
}
impl AsRef<str> for RecencyType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// When writing a match expression against `Duration`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let duration = unimplemented!();
/// match duration {
///     Duration::Day14 => { /* ... */ },
///     Duration::Day30 => { /* ... */ },
///     Duration::Day7 => { /* ... */ },
///     Duration::Hr24 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `duration` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Duration::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Duration::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Duration::NewFeature` is defined.
/// Specifically, when `duration` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Duration::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Duration {
    #[allow(missing_docs)] // documentation missing in model
    Day14,
    #[allow(missing_docs)] // documentation missing in model
    Day30,
    #[allow(missing_docs)] // documentation missing in model
    Day7,
    #[allow(missing_docs)] // documentation missing in model
    Hr24,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Duration {
    fn from(s: &str) -> Self {
        match s {
            "DAY_14" => Duration::Day14,
            "DAY_30" => Duration::Day30,
            "DAY_7" => Duration::Day7,
            "HR_24" => Duration::Hr24,
            other => Duration::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Duration {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Duration::from(s))
    }
}
impl Duration {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Duration::Day14 => "DAY_14",
            Duration::Day30 => "DAY_30",
            Duration::Day7 => "DAY_7",
            Duration::Hr24 => "HR_24",
            Duration::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DAY_14", "DAY_30", "DAY_7", "HR_24"]
    }
}
impl AsRef<str> for Duration {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Provides information about the import job that created a segment. An import job is a job that creates a user segment by importing endpoint definitions.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentImportResource {
    /// <p>The number of channel types in the endpoint definitions that were imported to create the segment.</p>
    #[doc(hidden)]
    pub channel_counts: std::option::Option<std::collections::HashMap<std::string::String, i32>>,
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    #[doc(hidden)]
    pub external_id: std::option::Option<std::string::String>,
    /// <p>The format of the files that were imported to create the segment. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
    #[doc(hidden)]
    pub format: std::option::Option<crate::model::Format>,
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that the endpoint definitions were imported from to create the segment.</p>
    #[doc(hidden)]
    pub s3_url: std::option::Option<std::string::String>,
    /// <p>The number of endpoint definitions that were imported successfully to create the segment.</p>
    #[doc(hidden)]
    pub size: i32,
}
impl SegmentImportResource {
    /// <p>The number of channel types in the endpoint definitions that were imported to create the segment.</p>
    pub fn channel_counts(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, i32>> {
        self.channel_counts.as_ref()
    }
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    pub fn external_id(&self) -> std::option::Option<&str> {
        self.external_id.as_deref()
    }
    /// <p>The format of the files that were imported to create the segment. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
    pub fn format(&self) -> std::option::Option<&crate::model::Format> {
        self.format.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that the endpoint definitions were imported from to create the segment.</p>
    pub fn s3_url(&self) -> std::option::Option<&str> {
        self.s3_url.as_deref()
    }
    /// <p>The number of endpoint definitions that were imported successfully to create the segment.</p>
    pub fn size(&self) -> i32 {
        self.size
    }
}
/// See [`SegmentImportResource`](crate::model::SegmentImportResource).
pub mod segment_import_resource {

    /// A builder for [`SegmentImportResource`](crate::model::SegmentImportResource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) channel_counts:
            std::option::Option<std::collections::HashMap<std::string::String, i32>>,
        pub(crate) external_id: std::option::Option<std::string::String>,
        pub(crate) format: std::option::Option<crate::model::Format>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) s3_url: std::option::Option<std::string::String>,
        pub(crate) size: std::option::Option<i32>,
    }
    impl Builder {
        /// Adds a key-value pair to `channel_counts`.
        ///
        /// To override the contents of this collection use [`set_channel_counts`](Self::set_channel_counts).
        ///
        /// <p>The number of channel types in the endpoint definitions that were imported to create the segment.</p>
        pub fn channel_counts(mut self, k: impl Into<std::string::String>, v: i32) -> Self {
            let mut hash_map = self.channel_counts.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.channel_counts = Some(hash_map);
            self
        }
        /// <p>The number of channel types in the endpoint definitions that were imported to create the segment.</p>
        pub fn set_channel_counts(
            mut self,
            input: std::option::Option<std::collections::HashMap<std::string::String, i32>>,
        ) -> Self {
            self.channel_counts = input;
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn external_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.external_id = Some(input.into());
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn set_external_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.external_id = input;
            self
        }
        /// <p>The format of the files that were imported to create the segment. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
        pub fn format(mut self, input: crate::model::Format) -> Self {
            self.format = Some(input);
            self
        }
        /// <p>The format of the files that were imported to create the segment. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
        pub fn set_format(mut self, input: std::option::Option<crate::model::Format>) -> Self {
            self.format = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that the endpoint definitions were imported from to create the segment.</p>
        pub fn s3_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_url = Some(input.into());
            self
        }
        /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that the endpoint definitions were imported from to create the segment.</p>
        pub fn set_s3_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_url = input;
            self
        }
        /// <p>The number of endpoint definitions that were imported successfully to create the segment.</p>
        pub fn size(mut self, input: i32) -> Self {
            self.size = Some(input);
            self
        }
        /// <p>The number of endpoint definitions that were imported successfully to create the segment.</p>
        pub fn set_size(mut self, input: std::option::Option<i32>) -> Self {
            self.size = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentImportResource`](crate::model::SegmentImportResource).
        pub fn build(self) -> crate::model::SegmentImportResource {
            crate::model::SegmentImportResource {
                channel_counts: self.channel_counts,
                external_id: self.external_id,
                format: self.format,
                role_arn: self.role_arn,
                s3_url: self.s3_url,
                size: self.size.unwrap_or_default(),
            }
        }
    }
}
impl SegmentImportResource {
    /// Creates a new builder-style object to manufacture [`SegmentImportResource`](crate::model::SegmentImportResource).
    pub fn builder() -> crate::model::segment_import_resource::Builder {
        crate::model::segment_import_resource::Builder::default()
    }
}

/// When writing a match expression against `Format`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let format = unimplemented!();
/// match format {
///     Format::Csv => { /* ... */ },
///     Format::Json => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `format` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Format::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Format::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Format::NewFeature` is defined.
/// Specifically, when `format` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Format::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Format {
    #[allow(missing_docs)] // documentation missing in model
    Csv,
    #[allow(missing_docs)] // documentation missing in model
    Json,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Format {
    fn from(s: &str) -> Self {
        match s {
            "CSV" => Format::Csv,
            "JSON" => Format::Json,
            other => Format::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Format {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Format::from(s))
    }
}
impl Format {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Format::Csv => "CSV",
            Format::Json => "JSON",
            Format::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["CSV", "JSON"]
    }
}
impl AsRef<str> for Format {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the configuration, dimension, and other settings for a segment. A WriteSegmentRequest object can include a Dimensions object or a SegmentGroups object, but not both.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WriteSegmentRequest {
    /// <p>The criteria that define the dimensions for the segment.</p>
    #[doc(hidden)]
    pub dimensions: std::option::Option<crate::model::SegmentDimensions>,
    /// <p>The name of the segment.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The segment group to use and the dimensions to apply to the group's base segments in order to build the segment. A segment group can consist of zero or more base segments. Your request can include only one segment group.</p>
    #[doc(hidden)]
    pub segment_groups: std::option::Option<crate::model::SegmentGroupList>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the segment. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl WriteSegmentRequest {
    /// <p>The criteria that define the dimensions for the segment.</p>
    pub fn dimensions(&self) -> std::option::Option<&crate::model::SegmentDimensions> {
        self.dimensions.as_ref()
    }
    /// <p>The name of the segment.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The segment group to use and the dimensions to apply to the group's base segments in order to build the segment. A segment group can consist of zero or more base segments. Your request can include only one segment group.</p>
    pub fn segment_groups(&self) -> std::option::Option<&crate::model::SegmentGroupList> {
        self.segment_groups.as_ref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the segment. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
/// See [`WriteSegmentRequest`](crate::model::WriteSegmentRequest).
pub mod write_segment_request {

    /// A builder for [`WriteSegmentRequest`](crate::model::WriteSegmentRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dimensions: std::option::Option<crate::model::SegmentDimensions>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) segment_groups: std::option::Option<crate::model::SegmentGroupList>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// <p>The criteria that define the dimensions for the segment.</p>
        pub fn dimensions(mut self, input: crate::model::SegmentDimensions) -> Self {
            self.dimensions = Some(input);
            self
        }
        /// <p>The criteria that define the dimensions for the segment.</p>
        pub fn set_dimensions(
            mut self,
            input: std::option::Option<crate::model::SegmentDimensions>,
        ) -> Self {
            self.dimensions = input;
            self
        }
        /// <p>The name of the segment.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the segment.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The segment group to use and the dimensions to apply to the group's base segments in order to build the segment. A segment group can consist of zero or more base segments. Your request can include only one segment group.</p>
        pub fn segment_groups(mut self, input: crate::model::SegmentGroupList) -> Self {
            self.segment_groups = Some(input);
            self
        }
        /// <p>The segment group to use and the dimensions to apply to the group's base segments in order to build the segment. A segment group can consist of zero or more base segments. Your request can include only one segment group.</p>
        pub fn set_segment_groups(
            mut self,
            input: std::option::Option<crate::model::SegmentGroupList>,
        ) -> Self {
            self.segment_groups = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the segment. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the segment. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`WriteSegmentRequest`](crate::model::WriteSegmentRequest).
        pub fn build(self) -> crate::model::WriteSegmentRequest {
            crate::model::WriteSegmentRequest {
                dimensions: self.dimensions,
                name: self.name,
                segment_groups: self.segment_groups,
                tags: self.tags,
            }
        }
    }
}
impl WriteSegmentRequest {
    /// Creates a new builder-style object to manufacture [`WriteSegmentRequest`](crate::model::WriteSegmentRequest).
    pub fn builder() -> crate::model::write_segment_request::Builder {
        crate::model::write_segment_request::Builder::default()
    }
}

/// <p>Provides information about Amazon Pinpoint configuration settings for retrieving and processing data from a recommender model.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RecommenderConfigurationResponse {
    /// <p>A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
    /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    #[doc(hidden)]
    pub attributes:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The date, in extended ISO 8601 format, when the configuration was created for the recommender model.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The custom description of the configuration for the recommender model.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the recommender model configuration.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The custom name of the configuration for the recommender model.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:</p>
    /// <ul>
    /// <li><p>PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
    /// <li><p>PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub recommendation_provider_id_type: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
    #[doc(hidden)]
    pub recommendation_provider_role_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.</p>
    #[doc(hidden)]
    pub recommendation_provider_uri: std::option::Option<std::string::String>,
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.</p>
    #[doc(hidden)]
    pub recommendation_transformer_uri: std::option::Option<std::string::String>,
    /// <p>The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console.</p>
    /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    #[doc(hidden)]
    pub recommendations_display_name: std::option::Option<std::string::String>,
    /// <p>The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables.</p>
    #[doc(hidden)]
    pub recommendations_per_message: i32,
}
impl RecommenderConfigurationResponse {
    /// <p>A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
    /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.attributes.as_ref()
    }
    /// <p>The date, in extended ISO 8601 format, when the configuration was created for the recommender model.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The custom description of the configuration for the recommender model.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The unique identifier for the recommender model configuration.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The custom name of the configuration for the recommender model.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:</p>
    /// <ul>
    /// <li><p>PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
    /// <li><p>PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
    /// </ul>
    pub fn recommendation_provider_id_type(&self) -> std::option::Option<&str> {
        self.recommendation_provider_id_type.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
    pub fn recommendation_provider_role_arn(&self) -> std::option::Option<&str> {
        self.recommendation_provider_role_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.</p>
    pub fn recommendation_provider_uri(&self) -> std::option::Option<&str> {
        self.recommendation_provider_uri.as_deref()
    }
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.</p>
    pub fn recommendation_transformer_uri(&self) -> std::option::Option<&str> {
        self.recommendation_transformer_uri.as_deref()
    }
    /// <p>The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console.</p>
    /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    pub fn recommendations_display_name(&self) -> std::option::Option<&str> {
        self.recommendations_display_name.as_deref()
    }
    /// <p>The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables.</p>
    pub fn recommendations_per_message(&self) -> i32 {
        self.recommendations_per_message
    }
}
/// See [`RecommenderConfigurationResponse`](crate::model::RecommenderConfigurationResponse).
pub mod recommender_configuration_response {

    /// A builder for [`RecommenderConfigurationResponse`](crate::model::RecommenderConfigurationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_id_type: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_role_arn: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_uri: std::option::Option<std::string::String>,
        pub(crate) recommendation_transformer_uri: std::option::Option<std::string::String>,
        pub(crate) recommendations_display_name: std::option::Option<std::string::String>,
        pub(crate) recommendations_per_message: std::option::Option<i32>,
    }
    impl Builder {
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
        /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.attributes = Some(hash_map);
            self
        }
        /// <p>A map that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
        /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The date, in extended ISO 8601 format, when the configuration was created for the recommender model.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in extended ISO 8601 format, when the configuration was created for the recommender model.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The custom description of the configuration for the recommender model.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The custom description of the configuration for the recommender model.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The unique identifier for the recommender model configuration.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recommender model configuration.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in extended ISO 8601 format, when the configuration for the recommender model was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The custom name of the configuration for the recommender model.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The custom name of the configuration for the recommender model.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:</p>
        /// <ul>
        /// <li><p>PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
        /// <li><p>PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
        /// </ul>
        pub fn recommendation_provider_id_type(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_id_type = Some(input.into());
            self
        }
        /// <p>The type of Amazon Pinpoint ID that's associated with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Possible values are:</p>
        /// <ul>
        /// <li><p>PINPOINT_ENDPOINT_ID - Each user in the model is associated with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
        /// <li><p>PINPOINT_USER_ID - Each user in the model is associated with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If this value is specified, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
        /// </ul>
        pub fn set_recommendation_provider_id_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_id_type = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
        pub fn recommendation_provider_role_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
        pub fn set_recommendation_provider_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_role_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.</p>
        pub fn recommendation_provider_uri(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_uri = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the recommender model that Amazon Pinpoint retrieves the recommendation data from. This value is the ARN of an Amazon Personalize campaign.</p>
        pub fn set_recommendation_provider_uri(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_uri = input;
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.</p>
        pub fn recommendation_transformer_uri(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_transformer_uri = Some(input.into());
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to perform additional processing of recommendation data that it retrieves from the recommender model.</p>
        pub fn set_recommendation_transformer_uri(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_transformer_uri = input;
            self
        }
        /// <p>The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console.</p>
        /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn recommendations_display_name(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendations_display_name = Some(input.into());
            self
        }
        /// <p>The custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console.</p>
        /// <p>This value is null if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn set_recommendations_display_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendations_display_name = input;
            self
        }
        /// <p>The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables.</p>
        pub fn recommendations_per_message(mut self, input: i32) -> Self {
            self.recommendations_per_message = Some(input);
            self
        }
        /// <p>The number of recommended items that are retrieved from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables.</p>
        pub fn set_recommendations_per_message(mut self, input: std::option::Option<i32>) -> Self {
            self.recommendations_per_message = input;
            self
        }
        /// Consumes the builder and constructs a [`RecommenderConfigurationResponse`](crate::model::RecommenderConfigurationResponse).
        pub fn build(self) -> crate::model::RecommenderConfigurationResponse {
            crate::model::RecommenderConfigurationResponse {
                attributes: self.attributes,
                creation_date: self.creation_date,
                description: self.description,
                id: self.id,
                last_modified_date: self.last_modified_date,
                name: self.name,
                recommendation_provider_id_type: self.recommendation_provider_id_type,
                recommendation_provider_role_arn: self.recommendation_provider_role_arn,
                recommendation_provider_uri: self.recommendation_provider_uri,
                recommendation_transformer_uri: self.recommendation_transformer_uri,
                recommendations_display_name: self.recommendations_display_name,
                recommendations_per_message: self.recommendations_per_message.unwrap_or_default(),
            }
        }
    }
}
impl RecommenderConfigurationResponse {
    /// Creates a new builder-style object to manufacture [`RecommenderConfigurationResponse`](crate::model::RecommenderConfigurationResponse).
    pub fn builder() -> crate::model::recommender_configuration_response::Builder {
        crate::model::recommender_configuration_response::Builder::default()
    }
}

/// <p>Specifies Amazon Pinpoint configuration settings for retrieving and processing recommendation data from a recommender model.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateRecommenderConfigurationShape {
    /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
    /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
    /// <ul>
    /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
    /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
    /// </ul>
    /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
    #[doc(hidden)]
    pub attributes:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
    /// <ul>
    /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
    /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub recommendation_provider_id_type: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
    #[doc(hidden)]
    pub recommendation_provider_role_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
    #[doc(hidden)]
    pub recommendation_provider_uri: std::option::Option<std::string::String>,
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
    #[doc(hidden)]
    pub recommendation_transformer_uri: std::option::Option<std::string::String>,
    /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
    #[doc(hidden)]
    pub recommendations_display_name: std::option::Option<std::string::String>,
    /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
    /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    #[doc(hidden)]
    pub recommendations_per_message: i32,
}
impl UpdateRecommenderConfigurationShape {
    /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
    /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
    /// <ul>
    /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
    /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
    /// </ul>
    /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.attributes.as_ref()
    }
    /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
    /// <ul>
    /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
    /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
    /// </ul>
    pub fn recommendation_provider_id_type(&self) -> std::option::Option<&str> {
        self.recommendation_provider_id_type.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
    pub fn recommendation_provider_role_arn(&self) -> std::option::Option<&str> {
        self.recommendation_provider_role_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
    pub fn recommendation_provider_uri(&self) -> std::option::Option<&str> {
        self.recommendation_provider_uri.as_deref()
    }
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
    pub fn recommendation_transformer_uri(&self) -> std::option::Option<&str> {
        self.recommendation_transformer_uri.as_deref()
    }
    /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
    pub fn recommendations_display_name(&self) -> std::option::Option<&str> {
        self.recommendations_display_name.as_deref()
    }
    /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
    /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    pub fn recommendations_per_message(&self) -> i32 {
        self.recommendations_per_message
    }
}
/// See [`UpdateRecommenderConfigurationShape`](crate::model::UpdateRecommenderConfigurationShape).
pub mod update_recommender_configuration_shape {

    /// A builder for [`UpdateRecommenderConfigurationShape`](crate::model::UpdateRecommenderConfigurationShape).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_id_type: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_role_arn: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_uri: std::option::Option<std::string::String>,
        pub(crate) recommendation_transformer_uri: std::option::Option<std::string::String>,
        pub(crate) recommendations_display_name: std::option::Option<std::string::String>,
        pub(crate) recommendations_per_message: std::option::Option<i32>,
    }
    impl Builder {
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
        /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
        /// <ul>
        /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
        /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
        /// </ul>
        /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.attributes = Some(hash_map);
            self
        }
        /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
        /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
        /// <ul>
        /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
        /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
        /// </ul>
        /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
        /// <ul>
        /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
        /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
        /// </ul>
        pub fn recommendation_provider_id_type(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_id_type = Some(input.into());
            self
        }
        /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
        /// <ul>
        /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
        /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
        /// </ul>
        pub fn set_recommendation_provider_id_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_id_type = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
        pub fn recommendation_provider_role_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
        pub fn set_recommendation_provider_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_role_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
        pub fn recommendation_provider_uri(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_uri = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
        pub fn set_recommendation_provider_uri(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_uri = input;
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
        pub fn recommendation_transformer_uri(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_transformer_uri = Some(input.into());
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
        pub fn set_recommendation_transformer_uri(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_transformer_uri = input;
            self
        }
        /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
        pub fn recommendations_display_name(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendations_display_name = Some(input.into());
            self
        }
        /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
        pub fn set_recommendations_display_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendations_display_name = input;
            self
        }
        /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
        /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn recommendations_per_message(mut self, input: i32) -> Self {
            self.recommendations_per_message = Some(input);
            self
        }
        /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
        /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn set_recommendations_per_message(mut self, input: std::option::Option<i32>) -> Self {
            self.recommendations_per_message = input;
            self
        }
        /// Consumes the builder and constructs a [`UpdateRecommenderConfigurationShape`](crate::model::UpdateRecommenderConfigurationShape).
        pub fn build(self) -> crate::model::UpdateRecommenderConfigurationShape {
            crate::model::UpdateRecommenderConfigurationShape {
                attributes: self.attributes,
                description: self.description,
                name: self.name,
                recommendation_provider_id_type: self.recommendation_provider_id_type,
                recommendation_provider_role_arn: self.recommendation_provider_role_arn,
                recommendation_provider_uri: self.recommendation_provider_uri,
                recommendation_transformer_uri: self.recommendation_transformer_uri,
                recommendations_display_name: self.recommendations_display_name,
                recommendations_per_message: self.recommendations_per_message.unwrap_or_default(),
            }
        }
    }
}
impl UpdateRecommenderConfigurationShape {
    /// Creates a new builder-style object to manufacture [`UpdateRecommenderConfigurationShape`](crate::model::UpdateRecommenderConfigurationShape).
    pub fn builder() -> crate::model::update_recommender_configuration_shape::Builder {
        crate::model::update_recommender_configuration_shape::Builder::default()
    }
}

/// <p>Specifies the content and settings for a message template that can be used in messages that are sent through a push notification channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PushNotificationTemplateRequest {
    /// <p>The message template to use for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub adm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
    /// <p>The message template to use for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub apns: std::option::Option<crate::model::ApnsPushNotificationTemplate>,
    /// <p>The message template to use for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub baidu: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
    /// <p>The default message template to use for push notification channels.</p>
    ///
    /// _Note: This member has been renamed from `default`._
    #[doc(hidden)]
    pub default_value: std::option::Option<crate::model::DefaultPushNotificationTemplate>,
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub gcm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
    /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
    #[doc(hidden)]
    pub recommender_id: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>A custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
}
impl PushNotificationTemplateRequest {
    /// <p>The message template to use for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn adm(&self) -> std::option::Option<&crate::model::AndroidPushNotificationTemplate> {
        self.adm.as_ref()
    }
    /// <p>The message template to use for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn apns(&self) -> std::option::Option<&crate::model::ApnsPushNotificationTemplate> {
        self.apns.as_ref()
    }
    /// <p>The message template to use for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn baidu(&self) -> std::option::Option<&crate::model::AndroidPushNotificationTemplate> {
        self.baidu.as_ref()
    }
    /// <p>The default message template to use for push notification channels.</p>
    ///
    /// _Note: This member has been renamed from `default`._
    pub fn default_value(
        &self,
    ) -> std::option::Option<&crate::model::DefaultPushNotificationTemplate> {
        self.default_value.as_ref()
    }
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn gcm(&self) -> std::option::Option<&crate::model::AndroidPushNotificationTemplate> {
        self.gcm.as_ref()
    }
    /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
    pub fn recommender_id(&self) -> std::option::Option<&str> {
        self.recommender_id.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>A custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
}
/// See [`PushNotificationTemplateRequest`](crate::model::PushNotificationTemplateRequest).
pub mod push_notification_template_request {

    /// A builder for [`PushNotificationTemplateRequest`](crate::model::PushNotificationTemplateRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) adm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        pub(crate) apns: std::option::Option<crate::model::ApnsPushNotificationTemplate>,
        pub(crate) baidu: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        pub(crate) default_value:
            std::option::Option<crate::model::DefaultPushNotificationTemplate>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) gcm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        pub(crate) recommender_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The message template to use for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn adm(mut self, input: crate::model::AndroidPushNotificationTemplate) -> Self {
            self.adm = Some(input);
            self
        }
        /// <p>The message template to use for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_adm(
            mut self,
            input: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        ) -> Self {
            self.adm = input;
            self
        }
        /// <p>The message template to use for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn apns(mut self, input: crate::model::ApnsPushNotificationTemplate) -> Self {
            self.apns = Some(input);
            self
        }
        /// <p>The message template to use for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_apns(
            mut self,
            input: std::option::Option<crate::model::ApnsPushNotificationTemplate>,
        ) -> Self {
            self.apns = input;
            self
        }
        /// <p>The message template to use for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn baidu(mut self, input: crate::model::AndroidPushNotificationTemplate) -> Self {
            self.baidu = Some(input);
            self
        }
        /// <p>The message template to use for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_baidu(
            mut self,
            input: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        ) -> Self {
            self.baidu = input;
            self
        }
        /// <p>The default message template to use for push notification channels.</p>
        pub fn default_value(
            mut self,
            input: crate::model::DefaultPushNotificationTemplate,
        ) -> Self {
            self.default_value = Some(input);
            self
        }
        /// <p>The default message template to use for push notification channels.</p>
        pub fn set_default(
            mut self,
            input: std::option::Option<crate::model::DefaultPushNotificationTemplate>,
        ) -> Self {
            self.default_value = input;
            self
        }
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn gcm(mut self, input: crate::model::AndroidPushNotificationTemplate) -> Self {
            self.gcm = Some(input);
            self
        }
        /// <p>The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_gcm(
            mut self,
            input: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        ) -> Self {
            self.gcm = input;
            self
        }
        /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
        pub fn recommender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.recommender_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
        pub fn set_recommender_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommender_id = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// Consumes the builder and constructs a [`PushNotificationTemplateRequest`](crate::model::PushNotificationTemplateRequest).
        pub fn build(self) -> crate::model::PushNotificationTemplateRequest {
            crate::model::PushNotificationTemplateRequest {
                adm: self.adm,
                apns: self.apns,
                baidu: self.baidu,
                default_value: self.default_value,
                default_substitutions: self.default_substitutions,
                gcm: self.gcm,
                recommender_id: self.recommender_id,
                tags: self.tags,
                template_description: self.template_description,
            }
        }
    }
}
impl PushNotificationTemplateRequest {
    /// Creates a new builder-style object to manufacture [`PushNotificationTemplateRequest`](crate::model::PushNotificationTemplateRequest).
    pub fn builder() -> crate::model::push_notification_template_request::Builder {
        crate::model::push_notification_template_request::Builder::default()
    }
}

/// <p>Specifies channel-specific content and settings for a message template that can be used in push notifications that are sent through the ADM (Amazon Device Messaging), Baidu (Baidu Cloud Push), or GCM (Firebase Cloud Messaging, formerly Google Cloud Messaging) channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AndroidPushNotificationTemplate {
    /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The message body to use in a push notification that's based on the message template.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The URL of the large icon image to display in the content view of a push notification that's based on the message template.</p>
    #[doc(hidden)]
    pub image_icon_url: std::option::Option<std::string::String>,
    /// <p>The URL of an image to display in a push notification that's based on the message template.</p>
    #[doc(hidden)]
    pub image_url: std::option::Option<std::string::String>,
    /// <p>The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.</p>
    #[doc(hidden)]
    pub small_image_icon_url: std::option::Option<std::string::String>,
    /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    #[doc(hidden)]
    pub sound: std::option::Option<std::string::String>,
    /// <p>The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl AndroidPushNotificationTemplate {
    /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The message body to use in a push notification that's based on the message template.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The URL of the large icon image to display in the content view of a push notification that's based on the message template.</p>
    pub fn image_icon_url(&self) -> std::option::Option<&str> {
        self.image_icon_url.as_deref()
    }
    /// <p>The URL of an image to display in a push notification that's based on the message template.</p>
    pub fn image_url(&self) -> std::option::Option<&str> {
        self.image_url.as_deref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.</p>
    pub fn small_image_icon_url(&self) -> std::option::Option<&str> {
        self.small_image_icon_url.as_deref()
    }
    /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    pub fn sound(&self) -> std::option::Option<&str> {
        self.sound.as_deref()
    }
    /// <p>The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`AndroidPushNotificationTemplate`](crate::model::AndroidPushNotificationTemplate).
pub mod android_push_notification_template {

    /// A builder for [`AndroidPushNotificationTemplate`](crate::model::AndroidPushNotificationTemplate).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) image_icon_url: std::option::Option<std::string::String>,
        pub(crate) image_url: std::option::Option<std::string::String>,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) small_image_icon_url: std::option::Option<std::string::String>,
        pub(crate) sound: std::option::Option<std::string::String>,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The message body to use in a push notification that's based on the message template.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The message body to use in a push notification that's based on the message template.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The URL of the large icon image to display in the content view of a push notification that's based on the message template.</p>
        pub fn image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the large icon image to display in the content view of a push notification that's based on the message template.</p>
        pub fn set_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_icon_url = input;
            self
        }
        /// <p>The URL of an image to display in a push notification that's based on the message template.</p>
        pub fn image_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_url = Some(input.into());
            self
        }
        /// <p>The URL of an image to display in a push notification that's based on the message template.</p>
        pub fn set_image_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_url = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for a push notification that's based on the message template. If specified, this value overrides all other content for the message template.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.</p>
        pub fn small_image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.small_image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of a push notification that's based on the message template.</p>
        pub fn set_small_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.small_image_icon_url = input;
            self
        }
        /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn sound(mut self, input: impl Into<std::string::String>) -> Self {
            self.sound = Some(input.into());
            self
        }
        /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn set_sound(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sound = input;
            self
        }
        /// <p>The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to use in a push notification that's based on the message template. This title appears above the notification message on a recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`AndroidPushNotificationTemplate`](crate::model::AndroidPushNotificationTemplate).
        pub fn build(self) -> crate::model::AndroidPushNotificationTemplate {
            crate::model::AndroidPushNotificationTemplate {
                action: self.action,
                body: self.body,
                image_icon_url: self.image_icon_url,
                image_url: self.image_url,
                raw_content: self.raw_content,
                small_image_icon_url: self.small_image_icon_url,
                sound: self.sound,
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl AndroidPushNotificationTemplate {
    /// Creates a new builder-style object to manufacture [`AndroidPushNotificationTemplate`](crate::model::AndroidPushNotificationTemplate).
    pub fn builder() -> crate::model::android_push_notification_template::Builder {
        crate::model::android_push_notification_template::Builder::default()
    }
}

/// When writing a match expression against `Action`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let action = unimplemented!();
/// match action {
///     Action::DeepLink => { /* ... */ },
///     Action::OpenApp => { /* ... */ },
///     Action::Url => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `action` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Action::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Action::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Action::NewFeature` is defined.
/// Specifically, when `action` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Action::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Action {
    #[allow(missing_docs)] // documentation missing in model
    DeepLink,
    #[allow(missing_docs)] // documentation missing in model
    OpenApp,
    #[allow(missing_docs)] // documentation missing in model
    Url,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Action {
    fn from(s: &str) -> Self {
        match s {
            "DEEP_LINK" => Action::DeepLink,
            "OPEN_APP" => Action::OpenApp,
            "URL" => Action::Url,
            other => Action::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Action {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Action::from(s))
    }
}
impl Action {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Action::DeepLink => "DEEP_LINK",
            Action::OpenApp => "OPEN_APP",
            Action::Url => "URL",
            Action::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DEEP_LINK", "OPEN_APP", "URL"]
    }
}
impl AsRef<str> for Action {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the default settings and content for a message template that can be used in messages that are sent through a push notification channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DefaultPushNotificationTemplate {
    /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The message body to use in push notifications that are based on the message template.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    /// <p>For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
    #[doc(hidden)]
    pub sound: std::option::Option<std::string::String>,
    /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl DefaultPushNotificationTemplate {
    /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The message body to use in push notifications that are based on the message template.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    /// <p>For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
    pub fn sound(&self) -> std::option::Option<&str> {
        self.sound.as_deref()
    }
    /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`DefaultPushNotificationTemplate`](crate::model::DefaultPushNotificationTemplate).
pub mod default_push_notification_template {

    /// A builder for [`DefaultPushNotificationTemplate`](crate::model::DefaultPushNotificationTemplate).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) sound: std::option::Option<std::string::String>,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The message body to use in push notifications that are based on the message template.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The message body to use in push notifications that are based on the message template.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        /// <p>For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
        pub fn sound(mut self, input: impl Into<std::string::String>) -> Self {
            self.sound = Some(input.into());
            self
        }
        /// <p>The sound to play when a recipient receives a push notification that's based on the message template. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        /// <p>For an iOS platform, this value is the key for the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
        pub fn set_sound(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sound = input;
            self
        }
        /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`DefaultPushNotificationTemplate`](crate::model::DefaultPushNotificationTemplate).
        pub fn build(self) -> crate::model::DefaultPushNotificationTemplate {
            crate::model::DefaultPushNotificationTemplate {
                action: self.action,
                body: self.body,
                sound: self.sound,
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl DefaultPushNotificationTemplate {
    /// Creates a new builder-style object to manufacture [`DefaultPushNotificationTemplate`](crate::model::DefaultPushNotificationTemplate).
    pub fn builder() -> crate::model::default_push_notification_template::Builder {
        crate::model::default_push_notification_template::Builder::default()
    }
}

/// <p>Specifies channel-specific content and settings for a message template that can be used in push notifications that are sent through the APNs (Apple Push Notification service) channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsPushNotificationTemplate {
    /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The message body to use in push notifications that are based on the message template.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The URL of an image or video to display in push notifications that are based on the message template.</p>
    #[doc(hidden)]
    pub media_url: std::option::Option<std::string::String>,
    /// <p>The raw, JSON-formatted string to use as the payload for push notifications that are based on the message template. If specified, this value overrides all other content for the message template.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
    #[doc(hidden)]
    pub sound: std::option::Option<std::string::String>,
    /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl ApnsPushNotificationTemplate {
    /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The message body to use in push notifications that are based on the message template.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The URL of an image or video to display in push notifications that are based on the message template.</p>
    pub fn media_url(&self) -> std::option::Option<&str> {
        self.media_url.as_deref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for push notifications that are based on the message template. If specified, this value overrides all other content for the message template.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
    pub fn sound(&self) -> std::option::Option<&str> {
        self.sound.as_deref()
    }
    /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`ApnsPushNotificationTemplate`](crate::model::ApnsPushNotificationTemplate).
pub mod apns_push_notification_template {

    /// A builder for [`ApnsPushNotificationTemplate`](crate::model::ApnsPushNotificationTemplate).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) media_url: std::option::Option<std::string::String>,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) sound: std::option::Option<std::string::String>,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if a recipient taps a push notification that's based on the message template. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The message body to use in push notifications that are based on the message template.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The message body to use in push notifications that are based on the message template.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The URL of an image or video to display in push notifications that are based on the message template.</p>
        pub fn media_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.media_url = Some(input.into());
            self
        }
        /// <p>The URL of an image or video to display in push notifications that are based on the message template.</p>
        pub fn set_media_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.media_url = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for push notifications that are based on the message template. If specified, this value overrides all other content for the message template.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for push notifications that are based on the message template. If specified, this value overrides all other content for the message template.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// <p>The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
        pub fn sound(mut self, input: impl Into<std::string::String>) -> Self {
            self.sound = Some(input.into());
            self
        }
        /// <p>The key for the sound to play when the recipient receives a push notification that's based on the message template. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
        pub fn set_sound(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sound = input;
            self
        }
        /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps a push notification that's based on the message template and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsPushNotificationTemplate`](crate::model::ApnsPushNotificationTemplate).
        pub fn build(self) -> crate::model::ApnsPushNotificationTemplate {
            crate::model::ApnsPushNotificationTemplate {
                action: self.action,
                body: self.body,
                media_url: self.media_url,
                raw_content: self.raw_content,
                sound: self.sound,
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl ApnsPushNotificationTemplate {
    /// Creates a new builder-style object to manufacture [`ApnsPushNotificationTemplate`](crate::model::ApnsPushNotificationTemplate).
    pub fn builder() -> crate::model::apns_push_notification_template::Builder {
        crate::model::apns_push_notification_template::Builder::default()
    }
}

/// <p>Provides information about the status, configuration, and other settings for a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyResponse {
    /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity.</p>
    #[doc(hidden)]
    pub activities:
        std::option::Option<std::collections::HashMap<std::string::String, crate::model::Activity>>,
    /// <p>The unique identifier for the application that the journey applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the journey was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the journey.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The messaging and entry limits for the journey.</p>
    #[doc(hidden)]
    pub limits: std::option::Option<crate::model::JourneyLimits>,
    /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. If this value is true, the schedule uses each participant's local time.</p>
    #[doc(hidden)]
    pub local_time: bool,
    /// <p>The name of the journey.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
    /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
    /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
    #[doc(hidden)]
    pub quiet_time: std::option::Option<crate::model::QuietTime>,
    /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
    #[doc(hidden)]
    pub refresh_frequency: std::option::Option<std::string::String>,
    /// <p>The schedule settings for the journey.</p>
    #[doc(hidden)]
    pub schedule: std::option::Option<crate::model::JourneySchedule>,
    /// <p>The unique identifier for the first activity in the journey.</p>
    #[doc(hidden)]
    pub start_activity: std::option::Option<std::string::String>,
    /// <p>The segment that defines which users are participants in the journey.</p>
    #[doc(hidden)]
    pub start_condition: std::option::Option<crate::model::StartCondition>,
    /// <p>The current status of the journey. Possible values are:</p>
    /// <ul>
    /// <li><p>DRAFT - The journey is being developed and hasn't been published yet.</p></li>
    /// <li><p>ACTIVE - The journey has been developed and published. Depending on the journey's schedule, the journey may currently be running or scheduled to start running at a later time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
    /// <li><p>COMPLETED - The journey has been published and has finished running. All participants have entered the journey and no participants are waiting to complete the journey or any activities in the journey.</p></li>
    /// <li><p>CANCELLED - The journey has been stopped. If a journey's status is CANCELLED, you can't add, change, or remove activities or segment settings from the journey.</p></li>
    /// <li><p>CLOSED - The journey has been published and has started running. It may have also passed its scheduled end time, or passed its scheduled start time and a refresh frequency hasn't been specified for it. If a journey's status is CLOSED, you can't add participants to it, and no existing participants can enter the journey for the first time. However, any existing participants who are currently waiting to start an activity may continue the journey.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::State>,
    /// <p>This object is not used or supported.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
    #[doc(hidden)]
    pub wait_for_quiet_time: bool,
    /// <p>Specifies whether a journey should be refreshed on segment update.</p>
    #[doc(hidden)]
    pub refresh_on_segment_update: bool,
    /// <p>The channel-specific configurations for the journey.</p>
    #[doc(hidden)]
    pub journey_channel_settings: std::option::Option<crate::model::JourneyChannelSettings>,
    /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
    #[doc(hidden)]
    pub sending_schedule: bool,
    /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    #[doc(hidden)]
    pub open_hours: std::option::Option<crate::model::OpenHours>,
    /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    #[doc(hidden)]
    pub closed_days: std::option::Option<crate::model::ClosedDays>,
}
impl JourneyResponse {
    /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity.</p>
    pub fn activities(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, crate::model::Activity>>
    {
        self.activities.as_ref()
    }
    /// <p>The unique identifier for the application that the journey applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the journey was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The unique identifier for the journey.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The messaging and entry limits for the journey.</p>
    pub fn limits(&self) -> std::option::Option<&crate::model::JourneyLimits> {
        self.limits.as_ref()
    }
    /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. If this value is true, the schedule uses each participant's local time.</p>
    pub fn local_time(&self) -> bool {
        self.local_time
    }
    /// <p>The name of the journey.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
    /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
    /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
    pub fn quiet_time(&self) -> std::option::Option<&crate::model::QuietTime> {
        self.quiet_time.as_ref()
    }
    /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
    pub fn refresh_frequency(&self) -> std::option::Option<&str> {
        self.refresh_frequency.as_deref()
    }
    /// <p>The schedule settings for the journey.</p>
    pub fn schedule(&self) -> std::option::Option<&crate::model::JourneySchedule> {
        self.schedule.as_ref()
    }
    /// <p>The unique identifier for the first activity in the journey.</p>
    pub fn start_activity(&self) -> std::option::Option<&str> {
        self.start_activity.as_deref()
    }
    /// <p>The segment that defines which users are participants in the journey.</p>
    pub fn start_condition(&self) -> std::option::Option<&crate::model::StartCondition> {
        self.start_condition.as_ref()
    }
    /// <p>The current status of the journey. Possible values are:</p>
    /// <ul>
    /// <li><p>DRAFT - The journey is being developed and hasn't been published yet.</p></li>
    /// <li><p>ACTIVE - The journey has been developed and published. Depending on the journey's schedule, the journey may currently be running or scheduled to start running at a later time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
    /// <li><p>COMPLETED - The journey has been published and has finished running. All participants have entered the journey and no participants are waiting to complete the journey or any activities in the journey.</p></li>
    /// <li><p>CANCELLED - The journey has been stopped. If a journey's status is CANCELLED, you can't add, change, or remove activities or segment settings from the journey.</p></li>
    /// <li><p>CLOSED - The journey has been published and has started running. It may have also passed its scheduled end time, or passed its scheduled start time and a refresh frequency hasn't been specified for it. If a journey's status is CLOSED, you can't add participants to it, and no existing participants can enter the journey for the first time. However, any existing participants who are currently waiting to start an activity may continue the journey.</p></li>
    /// </ul>
    pub fn state(&self) -> std::option::Option<&crate::model::State> {
        self.state.as_ref()
    }
    /// <p>This object is not used or supported.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
    pub fn wait_for_quiet_time(&self) -> bool {
        self.wait_for_quiet_time
    }
    /// <p>Specifies whether a journey should be refreshed on segment update.</p>
    pub fn refresh_on_segment_update(&self) -> bool {
        self.refresh_on_segment_update
    }
    /// <p>The channel-specific configurations for the journey.</p>
    pub fn journey_channel_settings(
        &self,
    ) -> std::option::Option<&crate::model::JourneyChannelSettings> {
        self.journey_channel_settings.as_ref()
    }
    /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
    pub fn sending_schedule(&self) -> bool {
        self.sending_schedule
    }
    /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    pub fn open_hours(&self) -> std::option::Option<&crate::model::OpenHours> {
        self.open_hours.as_ref()
    }
    /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    pub fn closed_days(&self) -> std::option::Option<&crate::model::ClosedDays> {
        self.closed_days.as_ref()
    }
}
/// See [`JourneyResponse`](crate::model::JourneyResponse).
pub mod journey_response {

    /// A builder for [`JourneyResponse`](crate::model::JourneyResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) activities: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::Activity>,
        >,
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) limits: std::option::Option<crate::model::JourneyLimits>,
        pub(crate) local_time: std::option::Option<bool>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) quiet_time: std::option::Option<crate::model::QuietTime>,
        pub(crate) refresh_frequency: std::option::Option<std::string::String>,
        pub(crate) schedule: std::option::Option<crate::model::JourneySchedule>,
        pub(crate) start_activity: std::option::Option<std::string::String>,
        pub(crate) start_condition: std::option::Option<crate::model::StartCondition>,
        pub(crate) state: std::option::Option<crate::model::State>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) wait_for_quiet_time: std::option::Option<bool>,
        pub(crate) refresh_on_segment_update: std::option::Option<bool>,
        pub(crate) journey_channel_settings:
            std::option::Option<crate::model::JourneyChannelSettings>,
        pub(crate) sending_schedule: std::option::Option<bool>,
        pub(crate) open_hours: std::option::Option<crate::model::OpenHours>,
        pub(crate) closed_days: std::option::Option<crate::model::ClosedDays>,
    }
    impl Builder {
        /// Adds a key-value pair to `activities`.
        ///
        /// To override the contents of this collection use [`set_activities`](Self::set_activities).
        ///
        /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity.</p>
        pub fn activities(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::Activity,
        ) -> Self {
            let mut hash_map = self.activities.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.activities = Some(hash_map);
            self
        }
        /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity.</p>
        pub fn set_activities(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::Activity>,
            >,
        ) -> Self {
            self.activities = input;
            self
        }
        /// <p>The unique identifier for the application that the journey applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the journey applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The unique identifier for the journey.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the journey.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The messaging and entry limits for the journey.</p>
        pub fn limits(mut self, input: crate::model::JourneyLimits) -> Self {
            self.limits = Some(input);
            self
        }
        /// <p>The messaging and entry limits for the journey.</p>
        pub fn set_limits(
            mut self,
            input: std::option::Option<crate::model::JourneyLimits>,
        ) -> Self {
            self.limits = input;
            self
        }
        /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. If this value is true, the schedule uses each participant's local time.</p>
        pub fn local_time(mut self, input: bool) -> Self {
            self.local_time = Some(input);
            self
        }
        /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. If this value is true, the schedule uses each participant's local time.</p>
        pub fn set_local_time(mut self, input: std::option::Option<bool>) -> Self {
            self.local_time = input;
            self
        }
        /// <p>The name of the journey.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the journey.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
        /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
        /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
        pub fn quiet_time(mut self, input: crate::model::QuietTime) -> Self {
            self.quiet_time = Some(input);
            self
        }
        /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
        /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
        /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
        pub fn set_quiet_time(
            mut self,
            input: std::option::Option<crate::model::QuietTime>,
        ) -> Self {
            self.quiet_time = input;
            self
        }
        /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
        pub fn refresh_frequency(mut self, input: impl Into<std::string::String>) -> Self {
            self.refresh_frequency = Some(input.into());
            self
        }
        /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
        pub fn set_refresh_frequency(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.refresh_frequency = input;
            self
        }
        /// <p>The schedule settings for the journey.</p>
        pub fn schedule(mut self, input: crate::model::JourneySchedule) -> Self {
            self.schedule = Some(input);
            self
        }
        /// <p>The schedule settings for the journey.</p>
        pub fn set_schedule(
            mut self,
            input: std::option::Option<crate::model::JourneySchedule>,
        ) -> Self {
            self.schedule = input;
            self
        }
        /// <p>The unique identifier for the first activity in the journey.</p>
        pub fn start_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the first activity in the journey.</p>
        pub fn set_start_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.start_activity = input;
            self
        }
        /// <p>The segment that defines which users are participants in the journey.</p>
        pub fn start_condition(mut self, input: crate::model::StartCondition) -> Self {
            self.start_condition = Some(input);
            self
        }
        /// <p>The segment that defines which users are participants in the journey.</p>
        pub fn set_start_condition(
            mut self,
            input: std::option::Option<crate::model::StartCondition>,
        ) -> Self {
            self.start_condition = input;
            self
        }
        /// <p>The current status of the journey. Possible values are:</p>
        /// <ul>
        /// <li><p>DRAFT - The journey is being developed and hasn't been published yet.</p></li>
        /// <li><p>ACTIVE - The journey has been developed and published. Depending on the journey's schedule, the journey may currently be running or scheduled to start running at a later time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
        /// <li><p>COMPLETED - The journey has been published and has finished running. All participants have entered the journey and no participants are waiting to complete the journey or any activities in the journey.</p></li>
        /// <li><p>CANCELLED - The journey has been stopped. If a journey's status is CANCELLED, you can't add, change, or remove activities or segment settings from the journey.</p></li>
        /// <li><p>CLOSED - The journey has been published and has started running. It may have also passed its scheduled end time, or passed its scheduled start time and a refresh frequency hasn't been specified for it. If a journey's status is CLOSED, you can't add participants to it, and no existing participants can enter the journey for the first time. However, any existing participants who are currently waiting to start an activity may continue the journey.</p></li>
        /// </ul>
        pub fn state(mut self, input: crate::model::State) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current status of the journey. Possible values are:</p>
        /// <ul>
        /// <li><p>DRAFT - The journey is being developed and hasn't been published yet.</p></li>
        /// <li><p>ACTIVE - The journey has been developed and published. Depending on the journey's schedule, the journey may currently be running or scheduled to start running at a later time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
        /// <li><p>COMPLETED - The journey has been published and has finished running. All participants have entered the journey and no participants are waiting to complete the journey or any activities in the journey.</p></li>
        /// <li><p>CANCELLED - The journey has been stopped. If a journey's status is CANCELLED, you can't add, change, or remove activities or segment settings from the journey.</p></li>
        /// <li><p>CLOSED - The journey has been published and has started running. It may have also passed its scheduled end time, or passed its scheduled start time and a refresh frequency hasn't been specified for it. If a journey's status is CLOSED, you can't add participants to it, and no existing participants can enter the journey for the first time. However, any existing participants who are currently waiting to start an activity may continue the journey.</p></li>
        /// </ul>
        pub fn set_state(mut self, input: std::option::Option<crate::model::State>) -> Self {
            self.state = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>This object is not used or supported.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>This object is not used or supported.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
        pub fn wait_for_quiet_time(mut self, input: bool) -> Self {
            self.wait_for_quiet_time = Some(input);
            self
        }
        /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
        pub fn set_wait_for_quiet_time(mut self, input: std::option::Option<bool>) -> Self {
            self.wait_for_quiet_time = input;
            self
        }
        /// <p>Specifies whether a journey should be refreshed on segment update.</p>
        pub fn refresh_on_segment_update(mut self, input: bool) -> Self {
            self.refresh_on_segment_update = Some(input);
            self
        }
        /// <p>Specifies whether a journey should be refreshed on segment update.</p>
        pub fn set_refresh_on_segment_update(mut self, input: std::option::Option<bool>) -> Self {
            self.refresh_on_segment_update = input;
            self
        }
        /// <p>The channel-specific configurations for the journey.</p>
        pub fn journey_channel_settings(
            mut self,
            input: crate::model::JourneyChannelSettings,
        ) -> Self {
            self.journey_channel_settings = Some(input);
            self
        }
        /// <p>The channel-specific configurations for the journey.</p>
        pub fn set_journey_channel_settings(
            mut self,
            input: std::option::Option<crate::model::JourneyChannelSettings>,
        ) -> Self {
            self.journey_channel_settings = input;
            self
        }
        /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
        pub fn sending_schedule(mut self, input: bool) -> Self {
            self.sending_schedule = Some(input);
            self
        }
        /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
        pub fn set_sending_schedule(mut self, input: std::option::Option<bool>) -> Self {
            self.sending_schedule = input;
            self
        }
        /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn open_hours(mut self, input: crate::model::OpenHours) -> Self {
            self.open_hours = Some(input);
            self
        }
        /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn set_open_hours(
            mut self,
            input: std::option::Option<crate::model::OpenHours>,
        ) -> Self {
            self.open_hours = input;
            self
        }
        /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn closed_days(mut self, input: crate::model::ClosedDays) -> Self {
            self.closed_days = Some(input);
            self
        }
        /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn set_closed_days(
            mut self,
            input: std::option::Option<crate::model::ClosedDays>,
        ) -> Self {
            self.closed_days = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyResponse`](crate::model::JourneyResponse).
        pub fn build(self) -> crate::model::JourneyResponse {
            crate::model::JourneyResponse {
                activities: self.activities,
                application_id: self.application_id,
                creation_date: self.creation_date,
                id: self.id,
                last_modified_date: self.last_modified_date,
                limits: self.limits,
                local_time: self.local_time.unwrap_or_default(),
                name: self.name,
                quiet_time: self.quiet_time,
                refresh_frequency: self.refresh_frequency,
                schedule: self.schedule,
                start_activity: self.start_activity,
                start_condition: self.start_condition,
                state: self.state,
                tags: self.tags,
                wait_for_quiet_time: self.wait_for_quiet_time.unwrap_or_default(),
                refresh_on_segment_update: self.refresh_on_segment_update.unwrap_or_default(),
                journey_channel_settings: self.journey_channel_settings,
                sending_schedule: self.sending_schedule.unwrap_or_default(),
                open_hours: self.open_hours,
                closed_days: self.closed_days,
            }
        }
    }
}
impl JourneyResponse {
    /// Creates a new builder-style object to manufacture [`JourneyResponse`](crate::model::JourneyResponse).
    pub fn builder() -> crate::model::journey_response::Builder {
        crate::model::journey_response::Builder::default()
    }
}

/// <p>The time when journey will stop sending messages.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClosedDays {
    /// <p>Rules for Email Channel.</p>
    #[doc(hidden)]
    pub email: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
    /// <p>Rules for SMS Channel.</p>
    #[doc(hidden)]
    pub sms: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
    /// <p>Rules for Push Channel.</p>
    #[doc(hidden)]
    pub push: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
    /// <p>Rules for Voice Channel.</p>
    #[doc(hidden)]
    pub voice: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
    /// <p>Rules for Custom Channel.</p>
    #[doc(hidden)]
    pub custom: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
}
impl ClosedDays {
    /// <p>Rules for Email Channel.</p>
    pub fn email(&self) -> std::option::Option<&[crate::model::ClosedDaysRule]> {
        self.email.as_deref()
    }
    /// <p>Rules for SMS Channel.</p>
    pub fn sms(&self) -> std::option::Option<&[crate::model::ClosedDaysRule]> {
        self.sms.as_deref()
    }
    /// <p>Rules for Push Channel.</p>
    pub fn push(&self) -> std::option::Option<&[crate::model::ClosedDaysRule]> {
        self.push.as_deref()
    }
    /// <p>Rules for Voice Channel.</p>
    pub fn voice(&self) -> std::option::Option<&[crate::model::ClosedDaysRule]> {
        self.voice.as_deref()
    }
    /// <p>Rules for Custom Channel.</p>
    pub fn custom(&self) -> std::option::Option<&[crate::model::ClosedDaysRule]> {
        self.custom.as_deref()
    }
}
/// See [`ClosedDays`](crate::model::ClosedDays).
pub mod closed_days {

    /// A builder for [`ClosedDays`](crate::model::ClosedDays).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) email: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        pub(crate) sms: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        pub(crate) push: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        pub(crate) voice: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        pub(crate) custom: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
    }
    impl Builder {
        /// Appends an item to `email`.
        ///
        /// To override the contents of this collection use [`set_email`](Self::set_email).
        ///
        /// <p>Rules for Email Channel.</p>
        pub fn email(mut self, input: crate::model::ClosedDaysRule) -> Self {
            let mut v = self.email.unwrap_or_default();
            v.push(input);
            self.email = Some(v);
            self
        }
        /// <p>Rules for Email Channel.</p>
        pub fn set_email(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        ) -> Self {
            self.email = input;
            self
        }
        /// Appends an item to `sms`.
        ///
        /// To override the contents of this collection use [`set_sms`](Self::set_sms).
        ///
        /// <p>Rules for SMS Channel.</p>
        pub fn sms(mut self, input: crate::model::ClosedDaysRule) -> Self {
            let mut v = self.sms.unwrap_or_default();
            v.push(input);
            self.sms = Some(v);
            self
        }
        /// <p>Rules for SMS Channel.</p>
        pub fn set_sms(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        ) -> Self {
            self.sms = input;
            self
        }
        /// Appends an item to `push`.
        ///
        /// To override the contents of this collection use [`set_push`](Self::set_push).
        ///
        /// <p>Rules for Push Channel.</p>
        pub fn push(mut self, input: crate::model::ClosedDaysRule) -> Self {
            let mut v = self.push.unwrap_or_default();
            v.push(input);
            self.push = Some(v);
            self
        }
        /// <p>Rules for Push Channel.</p>
        pub fn set_push(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        ) -> Self {
            self.push = input;
            self
        }
        /// Appends an item to `voice`.
        ///
        /// To override the contents of this collection use [`set_voice`](Self::set_voice).
        ///
        /// <p>Rules for Voice Channel.</p>
        pub fn voice(mut self, input: crate::model::ClosedDaysRule) -> Self {
            let mut v = self.voice.unwrap_or_default();
            v.push(input);
            self.voice = Some(v);
            self
        }
        /// <p>Rules for Voice Channel.</p>
        pub fn set_voice(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        ) -> Self {
            self.voice = input;
            self
        }
        /// Appends an item to `custom`.
        ///
        /// To override the contents of this collection use [`set_custom`](Self::set_custom).
        ///
        /// <p>Rules for Custom Channel.</p>
        pub fn custom(mut self, input: crate::model::ClosedDaysRule) -> Self {
            let mut v = self.custom.unwrap_or_default();
            v.push(input);
            self.custom = Some(v);
            self
        }
        /// <p>Rules for Custom Channel.</p>
        pub fn set_custom(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ClosedDaysRule>>,
        ) -> Self {
            self.custom = input;
            self
        }
        /// Consumes the builder and constructs a [`ClosedDays`](crate::model::ClosedDays).
        pub fn build(self) -> crate::model::ClosedDays {
            crate::model::ClosedDays {
                email: self.email,
                sms: self.sms,
                push: self.push,
                voice: self.voice,
                custom: self.custom,
            }
        }
    }
}
impl ClosedDays {
    /// Creates a new builder-style object to manufacture [`ClosedDays`](crate::model::ClosedDays).
    pub fn builder() -> crate::model::closed_days::Builder {
        crate::model::closed_days::Builder::default()
    }
}

/// <p>Closed Days Rule. Part of Journey sending schedule.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClosedDaysRule {
    /// <p>Name of the rule.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>Start Datetime in ISO 8601 format.</p>
    #[doc(hidden)]
    pub start_date_time: std::option::Option<std::string::String>,
    /// <p>End Datetime in ISO 8601 format.</p>
    #[doc(hidden)]
    pub end_date_time: std::option::Option<std::string::String>,
}
impl ClosedDaysRule {
    /// <p>Name of the rule.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Start Datetime in ISO 8601 format.</p>
    pub fn start_date_time(&self) -> std::option::Option<&str> {
        self.start_date_time.as_deref()
    }
    /// <p>End Datetime in ISO 8601 format.</p>
    pub fn end_date_time(&self) -> std::option::Option<&str> {
        self.end_date_time.as_deref()
    }
}
/// See [`ClosedDaysRule`](crate::model::ClosedDaysRule).
pub mod closed_days_rule {

    /// A builder for [`ClosedDaysRule`](crate::model::ClosedDaysRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) start_date_time: std::option::Option<std::string::String>,
        pub(crate) end_date_time: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Name of the rule.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>Name of the rule.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>Start Datetime in ISO 8601 format.</p>
        pub fn start_date_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_date_time = Some(input.into());
            self
        }
        /// <p>Start Datetime in ISO 8601 format.</p>
        pub fn set_start_date_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.start_date_time = input;
            self
        }
        /// <p>End Datetime in ISO 8601 format.</p>
        pub fn end_date_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.end_date_time = Some(input.into());
            self
        }
        /// <p>End Datetime in ISO 8601 format.</p>
        pub fn set_end_date_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.end_date_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ClosedDaysRule`](crate::model::ClosedDaysRule).
        pub fn build(self) -> crate::model::ClosedDaysRule {
            crate::model::ClosedDaysRule {
                name: self.name,
                start_date_time: self.start_date_time,
                end_date_time: self.end_date_time,
            }
        }
    }
}
impl ClosedDaysRule {
    /// Creates a new builder-style object to manufacture [`ClosedDaysRule`](crate::model::ClosedDaysRule).
    pub fn builder() -> crate::model::closed_days_rule::Builder {
        crate::model::closed_days_rule::Builder::default()
    }
}

/// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OpenHours {
    /// <p>Rules for Email Channel.</p>
    #[doc(hidden)]
    pub email: std::option::Option<
        std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    >,
    /// <p>Rules for SMS Channel.</p>
    #[doc(hidden)]
    pub sms: std::option::Option<
        std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    >,
    /// <p>Rules for Push Channel.</p>
    #[doc(hidden)]
    pub push: std::option::Option<
        std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    >,
    /// <p>Rules for Voice Channel.</p>
    #[doc(hidden)]
    pub voice: std::option::Option<
        std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    >,
    /// <p>Rules for Custom Channel.</p>
    #[doc(hidden)]
    pub custom: std::option::Option<
        std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    >,
}
impl OpenHours {
    /// <p>Rules for Email Channel.</p>
    pub fn email(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    > {
        self.email.as_ref()
    }
    /// <p>Rules for SMS Channel.</p>
    pub fn sms(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    > {
        self.sms.as_ref()
    }
    /// <p>Rules for Push Channel.</p>
    pub fn push(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    > {
        self.push.as_ref()
    }
    /// <p>Rules for Voice Channel.</p>
    pub fn voice(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    > {
        self.voice.as_ref()
    }
    /// <p>Rules for Custom Channel.</p>
    pub fn custom(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<
            crate::model::DayOfWeek,
            std::vec::Vec<crate::model::OpenHoursRule>,
        >,
    > {
        self.custom.as_ref()
    }
}
/// See [`OpenHours`](crate::model::OpenHours).
pub mod open_hours {

    /// A builder for [`OpenHours`](crate::model::OpenHours).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) email: std::option::Option<
            std::collections::HashMap<
                crate::model::DayOfWeek,
                std::vec::Vec<crate::model::OpenHoursRule>,
            >,
        >,
        pub(crate) sms: std::option::Option<
            std::collections::HashMap<
                crate::model::DayOfWeek,
                std::vec::Vec<crate::model::OpenHoursRule>,
            >,
        >,
        pub(crate) push: std::option::Option<
            std::collections::HashMap<
                crate::model::DayOfWeek,
                std::vec::Vec<crate::model::OpenHoursRule>,
            >,
        >,
        pub(crate) voice: std::option::Option<
            std::collections::HashMap<
                crate::model::DayOfWeek,
                std::vec::Vec<crate::model::OpenHoursRule>,
            >,
        >,
        pub(crate) custom: std::option::Option<
            std::collections::HashMap<
                crate::model::DayOfWeek,
                std::vec::Vec<crate::model::OpenHoursRule>,
            >,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `email`.
        ///
        /// To override the contents of this collection use [`set_email`](Self::set_email).
        ///
        /// <p>Rules for Email Channel.</p>
        pub fn email(
            mut self,
            k: crate::model::DayOfWeek,
            v: std::vec::Vec<crate::model::OpenHoursRule>,
        ) -> Self {
            let mut hash_map = self.email.unwrap_or_default();
            hash_map.insert(k, v);
            self.email = Some(hash_map);
            self
        }
        /// <p>Rules for Email Channel.</p>
        pub fn set_email(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    crate::model::DayOfWeek,
                    std::vec::Vec<crate::model::OpenHoursRule>,
                >,
            >,
        ) -> Self {
            self.email = input;
            self
        }
        /// Adds a key-value pair to `sms`.
        ///
        /// To override the contents of this collection use [`set_sms`](Self::set_sms).
        ///
        /// <p>Rules for SMS Channel.</p>
        pub fn sms(
            mut self,
            k: crate::model::DayOfWeek,
            v: std::vec::Vec<crate::model::OpenHoursRule>,
        ) -> Self {
            let mut hash_map = self.sms.unwrap_or_default();
            hash_map.insert(k, v);
            self.sms = Some(hash_map);
            self
        }
        /// <p>Rules for SMS Channel.</p>
        pub fn set_sms(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    crate::model::DayOfWeek,
                    std::vec::Vec<crate::model::OpenHoursRule>,
                >,
            >,
        ) -> Self {
            self.sms = input;
            self
        }
        /// Adds a key-value pair to `push`.
        ///
        /// To override the contents of this collection use [`set_push`](Self::set_push).
        ///
        /// <p>Rules for Push Channel.</p>
        pub fn push(
            mut self,
            k: crate::model::DayOfWeek,
            v: std::vec::Vec<crate::model::OpenHoursRule>,
        ) -> Self {
            let mut hash_map = self.push.unwrap_or_default();
            hash_map.insert(k, v);
            self.push = Some(hash_map);
            self
        }
        /// <p>Rules for Push Channel.</p>
        pub fn set_push(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    crate::model::DayOfWeek,
                    std::vec::Vec<crate::model::OpenHoursRule>,
                >,
            >,
        ) -> Self {
            self.push = input;
            self
        }
        /// Adds a key-value pair to `voice`.
        ///
        /// To override the contents of this collection use [`set_voice`](Self::set_voice).
        ///
        /// <p>Rules for Voice Channel.</p>
        pub fn voice(
            mut self,
            k: crate::model::DayOfWeek,
            v: std::vec::Vec<crate::model::OpenHoursRule>,
        ) -> Self {
            let mut hash_map = self.voice.unwrap_or_default();
            hash_map.insert(k, v);
            self.voice = Some(hash_map);
            self
        }
        /// <p>Rules for Voice Channel.</p>
        pub fn set_voice(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    crate::model::DayOfWeek,
                    std::vec::Vec<crate::model::OpenHoursRule>,
                >,
            >,
        ) -> Self {
            self.voice = input;
            self
        }
        /// Adds a key-value pair to `custom`.
        ///
        /// To override the contents of this collection use [`set_custom`](Self::set_custom).
        ///
        /// <p>Rules for Custom Channel.</p>
        pub fn custom(
            mut self,
            k: crate::model::DayOfWeek,
            v: std::vec::Vec<crate::model::OpenHoursRule>,
        ) -> Self {
            let mut hash_map = self.custom.unwrap_or_default();
            hash_map.insert(k, v);
            self.custom = Some(hash_map);
            self
        }
        /// <p>Rules for Custom Channel.</p>
        pub fn set_custom(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    crate::model::DayOfWeek,
                    std::vec::Vec<crate::model::OpenHoursRule>,
                >,
            >,
        ) -> Self {
            self.custom = input;
            self
        }
        /// Consumes the builder and constructs a [`OpenHours`](crate::model::OpenHours).
        pub fn build(self) -> crate::model::OpenHours {
            crate::model::OpenHours {
                email: self.email,
                sms: self.sms,
                push: self.push,
                voice: self.voice,
                custom: self.custom,
            }
        }
    }
}
impl OpenHours {
    /// Creates a new builder-style object to manufacture [`OpenHours`](crate::model::OpenHours).
    pub fn builder() -> crate::model::open_hours::Builder {
        crate::model::open_hours::Builder::default()
    }
}

/// <p>List of OpenHours Rules.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OpenHoursRule {
    /// <p>Local start time in ISO 8601 format.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<std::string::String>,
    /// <p>Local start time in ISO 8601 format.</p>
    #[doc(hidden)]
    pub end_time: std::option::Option<std::string::String>,
}
impl OpenHoursRule {
    /// <p>Local start time in ISO 8601 format.</p>
    pub fn start_time(&self) -> std::option::Option<&str> {
        self.start_time.as_deref()
    }
    /// <p>Local start time in ISO 8601 format.</p>
    pub fn end_time(&self) -> std::option::Option<&str> {
        self.end_time.as_deref()
    }
}
/// See [`OpenHoursRule`](crate::model::OpenHoursRule).
pub mod open_hours_rule {

    /// A builder for [`OpenHoursRule`](crate::model::OpenHoursRule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) start_time: std::option::Option<std::string::String>,
        pub(crate) end_time: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Local start time in ISO 8601 format.</p>
        pub fn start_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_time = Some(input.into());
            self
        }
        /// <p>Local start time in ISO 8601 format.</p>
        pub fn set_start_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.start_time = input;
            self
        }
        /// <p>Local start time in ISO 8601 format.</p>
        pub fn end_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.end_time = Some(input.into());
            self
        }
        /// <p>Local start time in ISO 8601 format.</p>
        pub fn set_end_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.end_time = input;
            self
        }
        /// Consumes the builder and constructs a [`OpenHoursRule`](crate::model::OpenHoursRule).
        pub fn build(self) -> crate::model::OpenHoursRule {
            crate::model::OpenHoursRule {
                start_time: self.start_time,
                end_time: self.end_time,
            }
        }
    }
}
impl OpenHoursRule {
    /// Creates a new builder-style object to manufacture [`OpenHoursRule`](crate::model::OpenHoursRule).
    pub fn builder() -> crate::model::open_hours_rule::Builder {
        crate::model::open_hours_rule::Builder::default()
    }
}

/// When writing a match expression against `DayOfWeek`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let dayofweek = unimplemented!();
/// match dayofweek {
///     DayOfWeek::Friday => { /* ... */ },
///     DayOfWeek::Monday => { /* ... */ },
///     DayOfWeek::Saturday => { /* ... */ },
///     DayOfWeek::Sunday => { /* ... */ },
///     DayOfWeek::Thursday => { /* ... */ },
///     DayOfWeek::Tuesday => { /* ... */ },
///     DayOfWeek::Wednesday => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `dayofweek` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DayOfWeek::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DayOfWeek::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DayOfWeek::NewFeature` is defined.
/// Specifically, when `dayofweek` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DayOfWeek::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum DayOfWeek {
    #[allow(missing_docs)] // documentation missing in model
    Friday,
    #[allow(missing_docs)] // documentation missing in model
    Monday,
    #[allow(missing_docs)] // documentation missing in model
    Saturday,
    #[allow(missing_docs)] // documentation missing in model
    Sunday,
    #[allow(missing_docs)] // documentation missing in model
    Thursday,
    #[allow(missing_docs)] // documentation missing in model
    Tuesday,
    #[allow(missing_docs)] // documentation missing in model
    Wednesday,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DayOfWeek {
    fn from(s: &str) -> Self {
        match s {
            "FRIDAY" => DayOfWeek::Friday,
            "MONDAY" => DayOfWeek::Monday,
            "SATURDAY" => DayOfWeek::Saturday,
            "SUNDAY" => DayOfWeek::Sunday,
            "THURSDAY" => DayOfWeek::Thursday,
            "TUESDAY" => DayOfWeek::Tuesday,
            "WEDNESDAY" => DayOfWeek::Wednesday,
            other => DayOfWeek::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DayOfWeek {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DayOfWeek::from(s))
    }
}
impl DayOfWeek {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DayOfWeek::Friday => "FRIDAY",
            DayOfWeek::Monday => "MONDAY",
            DayOfWeek::Saturday => "SATURDAY",
            DayOfWeek::Sunday => "SUNDAY",
            DayOfWeek::Thursday => "THURSDAY",
            DayOfWeek::Tuesday => "TUESDAY",
            DayOfWeek::Wednesday => "WEDNESDAY",
            DayOfWeek::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "FRIDAY",
            "MONDAY",
            "SATURDAY",
            "SUNDAY",
            "THURSDAY",
            "TUESDAY",
            "WEDNESDAY",
        ]
    }
}
impl AsRef<str> for DayOfWeek {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The channel-specific configurations for the journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyChannelSettings {
    /// <p>Amazon Resource Name (ARN) of the Connect Campaign.</p>
    #[doc(hidden)]
    pub connect_campaign_arn: std::option::Option<std::string::String>,
    /// <p>IAM role ARN to be assumed when invoking Connect campaign execution APIs for dialing.</p>
    #[doc(hidden)]
    pub connect_campaign_execution_role_arn: std::option::Option<std::string::String>,
}
impl JourneyChannelSettings {
    /// <p>Amazon Resource Name (ARN) of the Connect Campaign.</p>
    pub fn connect_campaign_arn(&self) -> std::option::Option<&str> {
        self.connect_campaign_arn.as_deref()
    }
    /// <p>IAM role ARN to be assumed when invoking Connect campaign execution APIs for dialing.</p>
    pub fn connect_campaign_execution_role_arn(&self) -> std::option::Option<&str> {
        self.connect_campaign_execution_role_arn.as_deref()
    }
}
/// See [`JourneyChannelSettings`](crate::model::JourneyChannelSettings).
pub mod journey_channel_settings {

    /// A builder for [`JourneyChannelSettings`](crate::model::JourneyChannelSettings).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) connect_campaign_arn: std::option::Option<std::string::String>,
        pub(crate) connect_campaign_execution_role_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Amazon Resource Name (ARN) of the Connect Campaign.</p>
        pub fn connect_campaign_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.connect_campaign_arn = Some(input.into());
            self
        }
        /// <p>Amazon Resource Name (ARN) of the Connect Campaign.</p>
        pub fn set_connect_campaign_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connect_campaign_arn = input;
            self
        }
        /// <p>IAM role ARN to be assumed when invoking Connect campaign execution APIs for dialing.</p>
        pub fn connect_campaign_execution_role_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.connect_campaign_execution_role_arn = Some(input.into());
            self
        }
        /// <p>IAM role ARN to be assumed when invoking Connect campaign execution APIs for dialing.</p>
        pub fn set_connect_campaign_execution_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.connect_campaign_execution_role_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyChannelSettings`](crate::model::JourneyChannelSettings).
        pub fn build(self) -> crate::model::JourneyChannelSettings {
            crate::model::JourneyChannelSettings {
                connect_campaign_arn: self.connect_campaign_arn,
                connect_campaign_execution_role_arn: self.connect_campaign_execution_role_arn,
            }
        }
    }
}
impl JourneyChannelSettings {
    /// Creates a new builder-style object to manufacture [`JourneyChannelSettings`](crate::model::JourneyChannelSettings).
    pub fn builder() -> crate::model::journey_channel_settings::Builder {
        crate::model::journey_channel_settings::Builder::default()
    }
}

/// When writing a match expression against `State`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let state = unimplemented!();
/// match state {
///     State::Active => { /* ... */ },
///     State::Cancelled => { /* ... */ },
///     State::Closed => { /* ... */ },
///     State::Completed => { /* ... */ },
///     State::Draft => { /* ... */ },
///     State::Paused => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `state` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `State::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `State::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `State::NewFeature` is defined.
/// Specifically, when `state` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `State::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum State {
    #[allow(missing_docs)] // documentation missing in model
    Active,
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Closed,
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Draft,
    #[allow(missing_docs)] // documentation missing in model
    Paused,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for State {
    fn from(s: &str) -> Self {
        match s {
            "ACTIVE" => State::Active,
            "CANCELLED" => State::Cancelled,
            "CLOSED" => State::Closed,
            "COMPLETED" => State::Completed,
            "DRAFT" => State::Draft,
            "PAUSED" => State::Paused,
            other => State::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for State {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(State::from(s))
    }
}
impl State {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            State::Active => "ACTIVE",
            State::Cancelled => "CANCELLED",
            State::Closed => "CLOSED",
            State::Completed => "COMPLETED",
            State::Draft => "DRAFT",
            State::Paused => "PAUSED",
            State::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "ACTIVE",
            "CANCELLED",
            "CLOSED",
            "COMPLETED",
            "DRAFT",
            "PAUSED",
        ]
    }
}
impl AsRef<str> for State {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the conditions for the first activity in a journey. This activity and its conditions determine which users are participants in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartCondition {
    /// <p>The custom description of the condition.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>Specifies the settings for an event that causes a journey activity to start.</p>
    #[doc(hidden)]
    pub event_start_condition: std::option::Option<crate::model::EventStartCondition>,
    /// <p>The segment that's associated with the first activity in the journey. This segment determines which users are participants in the journey.</p>
    #[doc(hidden)]
    pub segment_start_condition: std::option::Option<crate::model::SegmentCondition>,
}
impl StartCondition {
    /// <p>The custom description of the condition.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Specifies the settings for an event that causes a journey activity to start.</p>
    pub fn event_start_condition(&self) -> std::option::Option<&crate::model::EventStartCondition> {
        self.event_start_condition.as_ref()
    }
    /// <p>The segment that's associated with the first activity in the journey. This segment determines which users are participants in the journey.</p>
    pub fn segment_start_condition(&self) -> std::option::Option<&crate::model::SegmentCondition> {
        self.segment_start_condition.as_ref()
    }
}
/// See [`StartCondition`](crate::model::StartCondition).
pub mod start_condition {

    /// A builder for [`StartCondition`](crate::model::StartCondition).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) event_start_condition: std::option::Option<crate::model::EventStartCondition>,
        pub(crate) segment_start_condition: std::option::Option<crate::model::SegmentCondition>,
    }
    impl Builder {
        /// <p>The custom description of the condition.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The custom description of the condition.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>Specifies the settings for an event that causes a journey activity to start.</p>
        pub fn event_start_condition(mut self, input: crate::model::EventStartCondition) -> Self {
            self.event_start_condition = Some(input);
            self
        }
        /// <p>Specifies the settings for an event that causes a journey activity to start.</p>
        pub fn set_event_start_condition(
            mut self,
            input: std::option::Option<crate::model::EventStartCondition>,
        ) -> Self {
            self.event_start_condition = input;
            self
        }
        /// <p>The segment that's associated with the first activity in the journey. This segment determines which users are participants in the journey.</p>
        pub fn segment_start_condition(mut self, input: crate::model::SegmentCondition) -> Self {
            self.segment_start_condition = Some(input);
            self
        }
        /// <p>The segment that's associated with the first activity in the journey. This segment determines which users are participants in the journey.</p>
        pub fn set_segment_start_condition(
            mut self,
            input: std::option::Option<crate::model::SegmentCondition>,
        ) -> Self {
            self.segment_start_condition = input;
            self
        }
        /// Consumes the builder and constructs a [`StartCondition`](crate::model::StartCondition).
        pub fn build(self) -> crate::model::StartCondition {
            crate::model::StartCondition {
                description: self.description,
                event_start_condition: self.event_start_condition,
                segment_start_condition: self.segment_start_condition,
            }
        }
    }
}
impl StartCondition {
    /// Creates a new builder-style object to manufacture [`StartCondition`](crate::model::StartCondition).
    pub fn builder() -> crate::model::start_condition::Builder {
        crate::model::start_condition::Builder::default()
    }
}

/// <p>Specifies a segment to associate with an activity in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentCondition {
    /// <p>The unique identifier for the segment to associate with the activity.</p>
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
}
impl SegmentCondition {
    /// <p>The unique identifier for the segment to associate with the activity.</p>
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
}
/// See [`SegmentCondition`](crate::model::SegmentCondition).
pub mod segment_condition {

    /// A builder for [`SegmentCondition`](crate::model::SegmentCondition).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) segment_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier for the segment to associate with the activity.</p>
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the segment to associate with the activity.</p>
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentCondition`](crate::model::SegmentCondition).
        pub fn build(self) -> crate::model::SegmentCondition {
            crate::model::SegmentCondition {
                segment_id: self.segment_id,
            }
        }
    }
}
impl SegmentCondition {
    /// Creates a new builder-style object to manufacture [`SegmentCondition`](crate::model::SegmentCondition).
    pub fn builder() -> crate::model::segment_condition::Builder {
        crate::model::segment_condition::Builder::default()
    }
}

/// <p>Specifies the settings for an event that causes a journey activity to start.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventStartCondition {
    /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
    #[doc(hidden)]
    pub event_filter: std::option::Option<crate::model::EventFilter>,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
}
impl EventStartCondition {
    /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
    pub fn event_filter(&self) -> std::option::Option<&crate::model::EventFilter> {
        self.event_filter.as_ref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
}
/// See [`EventStartCondition`](crate::model::EventStartCondition).
pub mod event_start_condition {

    /// A builder for [`EventStartCondition`](crate::model::EventStartCondition).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) event_filter: std::option::Option<crate::model::EventFilter>,
        pub(crate) segment_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
        pub fn event_filter(mut self, input: crate::model::EventFilter) -> Self {
            self.event_filter = Some(input);
            self
        }
        /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
        pub fn set_event_filter(
            mut self,
            input: std::option::Option<crate::model::EventFilter>,
        ) -> Self {
            self.event_filter = input;
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// Consumes the builder and constructs a [`EventStartCondition`](crate::model::EventStartCondition).
        pub fn build(self) -> crate::model::EventStartCondition {
            crate::model::EventStartCondition {
                event_filter: self.event_filter,
                segment_id: self.segment_id,
            }
        }
    }
}
impl EventStartCondition {
    /// Creates a new builder-style object to manufacture [`EventStartCondition`](crate::model::EventStartCondition).
    pub fn builder() -> crate::model::event_start_condition::Builder {
        crate::model::event_start_condition::Builder::default()
    }
}

/// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventFilter {
    /// <p>The dimensions for the event filter to use for the campaign or the journey activity.</p>
    #[doc(hidden)]
    pub dimensions: std::option::Option<crate::model::EventDimensions>,
    /// <p>The type of event that causes the campaign to be sent or the journey activity to be performed. Valid values are: SYSTEM, sends the campaign or performs the activity when a system event occurs; and, ENDPOINT, sends the campaign or performs the activity when an endpoint event (
    /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
    #[doc(hidden)]
    pub filter_type: std::option::Option<crate::model::FilterType>,
}
impl EventFilter {
    /// <p>The dimensions for the event filter to use for the campaign or the journey activity.</p>
    pub fn dimensions(&self) -> std::option::Option<&crate::model::EventDimensions> {
        self.dimensions.as_ref()
    }
    /// <p>The type of event that causes the campaign to be sent or the journey activity to be performed. Valid values are: SYSTEM, sends the campaign or performs the activity when a system event occurs; and, ENDPOINT, sends the campaign or performs the activity when an endpoint event (
    /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
    pub fn filter_type(&self) -> std::option::Option<&crate::model::FilterType> {
        self.filter_type.as_ref()
    }
}
/// See [`EventFilter`](crate::model::EventFilter).
pub mod event_filter {

    /// A builder for [`EventFilter`](crate::model::EventFilter).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dimensions: std::option::Option<crate::model::EventDimensions>,
        pub(crate) filter_type: std::option::Option<crate::model::FilterType>,
    }
    impl Builder {
        /// <p>The dimensions for the event filter to use for the campaign or the journey activity.</p>
        pub fn dimensions(mut self, input: crate::model::EventDimensions) -> Self {
            self.dimensions = Some(input);
            self
        }
        /// <p>The dimensions for the event filter to use for the campaign or the journey activity.</p>
        pub fn set_dimensions(
            mut self,
            input: std::option::Option<crate::model::EventDimensions>,
        ) -> Self {
            self.dimensions = input;
            self
        }
        /// <p>The type of event that causes the campaign to be sent or the journey activity to be performed. Valid values are: SYSTEM, sends the campaign or performs the activity when a system event occurs; and, ENDPOINT, sends the campaign or performs the activity when an endpoint event (
        /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
        pub fn filter_type(mut self, input: crate::model::FilterType) -> Self {
            self.filter_type = Some(input);
            self
        }
        /// <p>The type of event that causes the campaign to be sent or the journey activity to be performed. Valid values are: SYSTEM, sends the campaign or performs the activity when a system event occurs; and, ENDPOINT, sends the campaign or performs the activity when an endpoint event (
        /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
        pub fn set_filter_type(
            mut self,
            input: std::option::Option<crate::model::FilterType>,
        ) -> Self {
            self.filter_type = input;
            self
        }
        /// Consumes the builder and constructs a [`EventFilter`](crate::model::EventFilter).
        pub fn build(self) -> crate::model::EventFilter {
            crate::model::EventFilter {
                dimensions: self.dimensions,
                filter_type: self.filter_type,
            }
        }
    }
}
impl EventFilter {
    /// Creates a new builder-style object to manufacture [`EventFilter`](crate::model::EventFilter).
    pub fn builder() -> crate::model::event_filter::Builder {
        crate::model::event_filter::Builder::default()
    }
}

/// When writing a match expression against `FilterType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let filtertype = unimplemented!();
/// match filtertype {
///     FilterType::Endpoint => { /* ... */ },
///     FilterType::System => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `filtertype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `FilterType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `FilterType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `FilterType::NewFeature` is defined.
/// Specifically, when `filtertype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `FilterType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum FilterType {
    #[allow(missing_docs)] // documentation missing in model
    Endpoint,
    #[allow(missing_docs)] // documentation missing in model
    System,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for FilterType {
    fn from(s: &str) -> Self {
        match s {
            "ENDPOINT" => FilterType::Endpoint,
            "SYSTEM" => FilterType::System,
            other => FilterType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for FilterType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(FilterType::from(s))
    }
}
impl FilterType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            FilterType::Endpoint => "ENDPOINT",
            FilterType::System => "SYSTEM",
            FilterType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ENDPOINT", "SYSTEM"]
    }
}
impl AsRef<str> for FilterType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the dimensions for an event filter that determines when a campaign is sent or a journey activity is performed.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventDimensions {
    /// <p>One or more custom attributes that your application reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.</p>
    #[doc(hidden)]
    pub attributes: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
    >,
    /// <p>The name of the event that causes the campaign to be sent or the journey activity to be performed. This can be a standard event that Amazon Pinpoint generates, such as _email.delivered. For campaigns, this can also be a custom event that's specific to your application. For information about standard events, see <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams.html">Streaming Amazon Pinpoint Events</a> in the <i>Amazon Pinpoint Developer Guide</i>.</p>
    #[doc(hidden)]
    pub event_type: std::option::Option<crate::model::SetDimension>,
    /// <p>One or more custom metrics that your application reports to Amazon Pinpoint. You can use these metrics as selection criteria when you create an event filter.</p>
    #[doc(hidden)]
    pub metrics: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
    >,
}
impl EventDimensions {
    /// <p>One or more custom attributes that your application reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
    > {
        self.attributes.as_ref()
    }
    /// <p>The name of the event that causes the campaign to be sent or the journey activity to be performed. This can be a standard event that Amazon Pinpoint generates, such as _email.delivered. For campaigns, this can also be a custom event that's specific to your application. For information about standard events, see <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams.html">Streaming Amazon Pinpoint Events</a> in the <i>Amazon Pinpoint Developer Guide</i>.</p>
    pub fn event_type(&self) -> std::option::Option<&crate::model::SetDimension> {
        self.event_type.as_ref()
    }
    /// <p>One or more custom metrics that your application reports to Amazon Pinpoint. You can use these metrics as selection criteria when you create an event filter.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
    > {
        self.metrics.as_ref()
    }
}
/// See [`EventDimensions`](crate::model::EventDimensions).
pub mod event_dimensions {

    /// A builder for [`EventDimensions`](crate::model::EventDimensions).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
        >,
        pub(crate) event_type: std::option::Option<crate::model::SetDimension>,
        pub(crate) metrics: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>One or more custom attributes that your application reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::AttributeDimension,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes that your application reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::AttributeDimension>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The name of the event that causes the campaign to be sent or the journey activity to be performed. This can be a standard event that Amazon Pinpoint generates, such as _email.delivered. For campaigns, this can also be a custom event that's specific to your application. For information about standard events, see <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams.html">Streaming Amazon Pinpoint Events</a> in the <i>Amazon Pinpoint Developer Guide</i>.</p>
        pub fn event_type(mut self, input: crate::model::SetDimension) -> Self {
            self.event_type = Some(input);
            self
        }
        /// <p>The name of the event that causes the campaign to be sent or the journey activity to be performed. This can be a standard event that Amazon Pinpoint generates, such as _email.delivered. For campaigns, this can also be a custom event that's specific to your application. For information about standard events, see <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams.html">Streaming Amazon Pinpoint Events</a> in the <i>Amazon Pinpoint Developer Guide</i>.</p>
        pub fn set_event_type(
            mut self,
            input: std::option::Option<crate::model::SetDimension>,
        ) -> Self {
            self.event_type = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>One or more custom metrics that your application reports to Amazon Pinpoint. You can use these metrics as selection criteria when you create an event filter.</p>
        pub fn metrics(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::MetricDimension,
        ) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.metrics = Some(hash_map);
            self
        }
        /// <p>One or more custom metrics that your application reports to Amazon Pinpoint. You can use these metrics as selection criteria when you create an event filter.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::MetricDimension>,
            >,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// Consumes the builder and constructs a [`EventDimensions`](crate::model::EventDimensions).
        pub fn build(self) -> crate::model::EventDimensions {
            crate::model::EventDimensions {
                attributes: self.attributes,
                event_type: self.event_type,
                metrics: self.metrics,
            }
        }
    }
}
impl EventDimensions {
    /// Creates a new builder-style object to manufacture [`EventDimensions`](crate::model::EventDimensions).
    pub fn builder() -> crate::model::event_dimensions::Builder {
        crate::model::event_dimensions::Builder::default()
    }
}

/// <p>Specifies the schedule settings for a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneySchedule {
    /// <p>The scheduled time, in ISO 8601 format, when the journey ended or will end.</p>
    #[doc(hidden)]
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The scheduled time, in ISO 8601 format, when the journey began or will begin.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The starting UTC offset for the journey schedule, if the value of the journey's LocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+08:45, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+12:45, UTC+13, UTC+13:45, UTC-02, UTC-02:30, UTC-03, UTC-03:30, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-09:30, UTC-10, and UTC-11.</p>
    #[doc(hidden)]
    pub timezone: std::option::Option<std::string::String>,
}
impl JourneySchedule {
    /// <p>The scheduled time, in ISO 8601 format, when the journey ended or will end.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The scheduled time, in ISO 8601 format, when the journey began or will begin.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The starting UTC offset for the journey schedule, if the value of the journey's LocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+08:45, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+12:45, UTC+13, UTC+13:45, UTC-02, UTC-02:30, UTC-03, UTC-03:30, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-09:30, UTC-10, and UTC-11.</p>
    pub fn timezone(&self) -> std::option::Option<&str> {
        self.timezone.as_deref()
    }
}
/// See [`JourneySchedule`](crate::model::JourneySchedule).
pub mod journey_schedule {

    /// A builder for [`JourneySchedule`](crate::model::JourneySchedule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) timezone: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The scheduled time, in ISO 8601 format, when the journey ended or will end.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The scheduled time, in ISO 8601 format, when the journey ended or will end.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// <p>The scheduled time, in ISO 8601 format, when the journey began or will begin.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The scheduled time, in ISO 8601 format, when the journey began or will begin.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The starting UTC offset for the journey schedule, if the value of the journey's LocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+08:45, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+12:45, UTC+13, UTC+13:45, UTC-02, UTC-02:30, UTC-03, UTC-03:30, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-09:30, UTC-10, and UTC-11.</p>
        pub fn timezone(mut self, input: impl Into<std::string::String>) -> Self {
            self.timezone = Some(input.into());
            self
        }
        /// <p>The starting UTC offset for the journey schedule, if the value of the journey's LocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+08:45, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+12:45, UTC+13, UTC+13:45, UTC-02, UTC-02:30, UTC-03, UTC-03:30, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-09:30, UTC-10, and UTC-11.</p>
        pub fn set_timezone(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.timezone = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneySchedule`](crate::model::JourneySchedule).
        pub fn build(self) -> crate::model::JourneySchedule {
            crate::model::JourneySchedule {
                end_time: self.end_time,
                start_time: self.start_time,
                timezone: self.timezone,
            }
        }
    }
}
impl JourneySchedule {
    /// Creates a new builder-style object to manufacture [`JourneySchedule`](crate::model::JourneySchedule).
    pub fn builder() -> crate::model::journey_schedule::Builder {
        crate::model::journey_schedule::Builder::default()
    }
}

/// <p>Specifies the start and end times that define a time range when messages aren't sent to endpoints.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct QuietTime {
    /// <p>The specific time when quiet time ends. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
    #[doc(hidden)]
    pub end: std::option::Option<std::string::String>,
    /// <p>The specific time when quiet time begins. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
    #[doc(hidden)]
    pub start: std::option::Option<std::string::String>,
}
impl QuietTime {
    /// <p>The specific time when quiet time ends. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
    pub fn end(&self) -> std::option::Option<&str> {
        self.end.as_deref()
    }
    /// <p>The specific time when quiet time begins. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
    pub fn start(&self) -> std::option::Option<&str> {
        self.start.as_deref()
    }
}
/// See [`QuietTime`](crate::model::QuietTime).
pub mod quiet_time {

    /// A builder for [`QuietTime`](crate::model::QuietTime).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) end: std::option::Option<std::string::String>,
        pub(crate) start: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The specific time when quiet time ends. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
        pub fn end(mut self, input: impl Into<std::string::String>) -> Self {
            self.end = Some(input.into());
            self
        }
        /// <p>The specific time when quiet time ends. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
        pub fn set_end(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.end = input;
            self
        }
        /// <p>The specific time when quiet time begins. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
        pub fn start(mut self, input: impl Into<std::string::String>) -> Self {
            self.start = Some(input.into());
            self
        }
        /// <p>The specific time when quiet time begins. This value has to use 24-hour notation and be in HH:MM format, where HH is the hour (with a leading zero, if applicable) and MM is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.</p>
        pub fn set_start(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.start = input;
            self
        }
        /// Consumes the builder and constructs a [`QuietTime`](crate::model::QuietTime).
        pub fn build(self) -> crate::model::QuietTime {
            crate::model::QuietTime {
                end: self.end,
                start: self.start,
            }
        }
    }
}
impl QuietTime {
    /// Creates a new builder-style object to manufacture [`QuietTime`](crate::model::QuietTime).
    pub fn builder() -> crate::model::quiet_time::Builder {
        crate::model::quiet_time::Builder::default()
    }
}

/// <p>Specifies limits on the messages that a journey can send and the number of times participants can enter a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyLimits {
    /// <p>The maximum number of messages that the journey can send to a single participant during a 24-hour period. The maximum value is 100.</p>
    #[doc(hidden)]
    pub daily_cap: i32,
    /// <p>The maximum number of times that a participant can enter the journey. The maximum value is 100. To allow participants to enter the journey an unlimited number of times, set this value to 0.</p>
    #[doc(hidden)]
    pub endpoint_reentry_cap: i32,
    /// <p>The maximum number of messages that the journey can send each second.</p>
    #[doc(hidden)]
    pub messages_per_second: i32,
    /// <p>Minimum time that must pass before an endpoint can re-enter a given journey. The duration should use an ISO 8601 format, such as PT1H. </p>
    #[doc(hidden)]
    pub endpoint_reentry_interval: std::option::Option<std::string::String>,
}
impl JourneyLimits {
    /// <p>The maximum number of messages that the journey can send to a single participant during a 24-hour period. The maximum value is 100.</p>
    pub fn daily_cap(&self) -> i32 {
        self.daily_cap
    }
    /// <p>The maximum number of times that a participant can enter the journey. The maximum value is 100. To allow participants to enter the journey an unlimited number of times, set this value to 0.</p>
    pub fn endpoint_reentry_cap(&self) -> i32 {
        self.endpoint_reentry_cap
    }
    /// <p>The maximum number of messages that the journey can send each second.</p>
    pub fn messages_per_second(&self) -> i32 {
        self.messages_per_second
    }
    /// <p>Minimum time that must pass before an endpoint can re-enter a given journey. The duration should use an ISO 8601 format, such as PT1H. </p>
    pub fn endpoint_reentry_interval(&self) -> std::option::Option<&str> {
        self.endpoint_reentry_interval.as_deref()
    }
}
/// See [`JourneyLimits`](crate::model::JourneyLimits).
pub mod journey_limits {

    /// A builder for [`JourneyLimits`](crate::model::JourneyLimits).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) daily_cap: std::option::Option<i32>,
        pub(crate) endpoint_reentry_cap: std::option::Option<i32>,
        pub(crate) messages_per_second: std::option::Option<i32>,
        pub(crate) endpoint_reentry_interval: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The maximum number of messages that the journey can send to a single participant during a 24-hour period. The maximum value is 100.</p>
        pub fn daily_cap(mut self, input: i32) -> Self {
            self.daily_cap = Some(input);
            self
        }
        /// <p>The maximum number of messages that the journey can send to a single participant during a 24-hour period. The maximum value is 100.</p>
        pub fn set_daily_cap(mut self, input: std::option::Option<i32>) -> Self {
            self.daily_cap = input;
            self
        }
        /// <p>The maximum number of times that a participant can enter the journey. The maximum value is 100. To allow participants to enter the journey an unlimited number of times, set this value to 0.</p>
        pub fn endpoint_reentry_cap(mut self, input: i32) -> Self {
            self.endpoint_reentry_cap = Some(input);
            self
        }
        /// <p>The maximum number of times that a participant can enter the journey. The maximum value is 100. To allow participants to enter the journey an unlimited number of times, set this value to 0.</p>
        pub fn set_endpoint_reentry_cap(mut self, input: std::option::Option<i32>) -> Self {
            self.endpoint_reentry_cap = input;
            self
        }
        /// <p>The maximum number of messages that the journey can send each second.</p>
        pub fn messages_per_second(mut self, input: i32) -> Self {
            self.messages_per_second = Some(input);
            self
        }
        /// <p>The maximum number of messages that the journey can send each second.</p>
        pub fn set_messages_per_second(mut self, input: std::option::Option<i32>) -> Self {
            self.messages_per_second = input;
            self
        }
        /// <p>Minimum time that must pass before an endpoint can re-enter a given journey. The duration should use an ISO 8601 format, such as PT1H. </p>
        pub fn endpoint_reentry_interval(mut self, input: impl Into<std::string::String>) -> Self {
            self.endpoint_reentry_interval = Some(input.into());
            self
        }
        /// <p>Minimum time that must pass before an endpoint can re-enter a given journey. The duration should use an ISO 8601 format, such as PT1H. </p>
        pub fn set_endpoint_reentry_interval(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.endpoint_reentry_interval = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyLimits`](crate::model::JourneyLimits).
        pub fn build(self) -> crate::model::JourneyLimits {
            crate::model::JourneyLimits {
                daily_cap: self.daily_cap.unwrap_or_default(),
                endpoint_reentry_cap: self.endpoint_reentry_cap.unwrap_or_default(),
                messages_per_second: self.messages_per_second.unwrap_or_default(),
                endpoint_reentry_interval: self.endpoint_reentry_interval,
            }
        }
    }
}
impl JourneyLimits {
    /// Creates a new builder-style object to manufacture [`JourneyLimits`](crate::model::JourneyLimits).
    pub fn builder() -> crate::model::journey_limits::Builder {
        crate::model::journey_limits::Builder::default()
    }
}

/// <p>Specifies the configuration and other settings for an activity in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Activity {
    /// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
    #[doc(hidden)]
    pub custom: std::option::Option<crate::model::CustomMessageActivity>,
    /// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
    #[doc(hidden)]
    pub conditional_split: std::option::Option<crate::model::ConditionalSplitActivity>,
    /// <p>The custom description of the activity.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
    #[doc(hidden)]
    pub email: std::option::Option<crate::model::EmailMessageActivity>,
    /// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
    #[doc(hidden)]
    pub holdout: std::option::Option<crate::model::HoldoutActivity>,
    /// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
    #[doc(hidden)]
    pub multi_condition: std::option::Option<crate::model::MultiConditionalSplitActivity>,
    /// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
    #[doc(hidden)]
    pub push: std::option::Option<crate::model::PushMessageActivity>,
    /// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
    #[doc(hidden)]
    pub random_split: std::option::Option<crate::model::RandomSplitActivity>,
    /// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
    #[doc(hidden)]
    pub sms: std::option::Option<crate::model::SmsMessageActivity>,
    /// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
    #[doc(hidden)]
    pub wait: std::option::Option<crate::model::WaitActivity>,
    /// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
    #[doc(hidden)]
    pub contact_center: std::option::Option<crate::model::ContactCenterActivity>,
}
impl Activity {
    /// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
    pub fn custom(&self) -> std::option::Option<&crate::model::CustomMessageActivity> {
        self.custom.as_ref()
    }
    /// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
    pub fn conditional_split(
        &self,
    ) -> std::option::Option<&crate::model::ConditionalSplitActivity> {
        self.conditional_split.as_ref()
    }
    /// <p>The custom description of the activity.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
    pub fn email(&self) -> std::option::Option<&crate::model::EmailMessageActivity> {
        self.email.as_ref()
    }
    /// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
    pub fn holdout(&self) -> std::option::Option<&crate::model::HoldoutActivity> {
        self.holdout.as_ref()
    }
    /// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
    pub fn multi_condition(
        &self,
    ) -> std::option::Option<&crate::model::MultiConditionalSplitActivity> {
        self.multi_condition.as_ref()
    }
    /// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
    pub fn push(&self) -> std::option::Option<&crate::model::PushMessageActivity> {
        self.push.as_ref()
    }
    /// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
    pub fn random_split(&self) -> std::option::Option<&crate::model::RandomSplitActivity> {
        self.random_split.as_ref()
    }
    /// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
    pub fn sms(&self) -> std::option::Option<&crate::model::SmsMessageActivity> {
        self.sms.as_ref()
    }
    /// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
    pub fn wait(&self) -> std::option::Option<&crate::model::WaitActivity> {
        self.wait.as_ref()
    }
    /// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
    pub fn contact_center(&self) -> std::option::Option<&crate::model::ContactCenterActivity> {
        self.contact_center.as_ref()
    }
}
/// See [`Activity`](crate::model::Activity).
pub mod activity {

    /// A builder for [`Activity`](crate::model::Activity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) custom: std::option::Option<crate::model::CustomMessageActivity>,
        pub(crate) conditional_split: std::option::Option<crate::model::ConditionalSplitActivity>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) email: std::option::Option<crate::model::EmailMessageActivity>,
        pub(crate) holdout: std::option::Option<crate::model::HoldoutActivity>,
        pub(crate) multi_condition:
            std::option::Option<crate::model::MultiConditionalSplitActivity>,
        pub(crate) push: std::option::Option<crate::model::PushMessageActivity>,
        pub(crate) random_split: std::option::Option<crate::model::RandomSplitActivity>,
        pub(crate) sms: std::option::Option<crate::model::SmsMessageActivity>,
        pub(crate) wait: std::option::Option<crate::model::WaitActivity>,
        pub(crate) contact_center: std::option::Option<crate::model::ContactCenterActivity>,
    }
    impl Builder {
        /// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
        pub fn custom(mut self, input: crate::model::CustomMessageActivity) -> Self {
            self.custom = Some(input);
            self
        }
        /// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
        pub fn set_custom(
            mut self,
            input: std::option::Option<crate::model::CustomMessageActivity>,
        ) -> Self {
            self.custom = input;
            self
        }
        /// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
        pub fn conditional_split(mut self, input: crate::model::ConditionalSplitActivity) -> Self {
            self.conditional_split = Some(input);
            self
        }
        /// <p>The settings for a yes/no split activity. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p>
        pub fn set_conditional_split(
            mut self,
            input: std::option::Option<crate::model::ConditionalSplitActivity>,
        ) -> Self {
            self.conditional_split = input;
            self
        }
        /// <p>The custom description of the activity.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The custom description of the activity.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
        pub fn email(mut self, input: crate::model::EmailMessageActivity) -> Self {
            self.email = Some(input);
            self
        }
        /// <p>The settings for an email activity. This type of activity sends an email message to participants.</p>
        pub fn set_email(
            mut self,
            input: std::option::Option<crate::model::EmailMessageActivity>,
        ) -> Self {
            self.email = input;
            self
        }
        /// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
        pub fn holdout(mut self, input: crate::model::HoldoutActivity) -> Self {
            self.holdout = Some(input);
            self
        }
        /// <p>The settings for a holdout activity. This type of activity stops a journey for a specified percentage of participants.</p>
        pub fn set_holdout(
            mut self,
            input: std::option::Option<crate::model::HoldoutActivity>,
        ) -> Self {
            self.holdout = input;
            self
        }
        /// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
        pub fn multi_condition(
            mut self,
            input: crate::model::MultiConditionalSplitActivity,
        ) -> Self {
            self.multi_condition = Some(input);
            self
        }
        /// <p>The settings for a multivariate split activity. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p>
        pub fn set_multi_condition(
            mut self,
            input: std::option::Option<crate::model::MultiConditionalSplitActivity>,
        ) -> Self {
            self.multi_condition = input;
            self
        }
        /// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
        pub fn push(mut self, input: crate::model::PushMessageActivity) -> Self {
            self.push = Some(input);
            self
        }
        /// <p>The settings for a push notification activity. This type of activity sends a push notification to participants.</p>
        pub fn set_push(
            mut self,
            input: std::option::Option<crate::model::PushMessageActivity>,
        ) -> Self {
            self.push = input;
            self
        }
        /// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
        pub fn random_split(mut self, input: crate::model::RandomSplitActivity) -> Self {
            self.random_split = Some(input);
            self
        }
        /// <p>The settings for a random split activity. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
        pub fn set_random_split(
            mut self,
            input: std::option::Option<crate::model::RandomSplitActivity>,
        ) -> Self {
            self.random_split = input;
            self
        }
        /// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
        pub fn sms(mut self, input: crate::model::SmsMessageActivity) -> Self {
            self.sms = Some(input);
            self
        }
        /// <p>The settings for an SMS activity. This type of activity sends a text message to participants.</p>
        pub fn set_sms(
            mut self,
            input: std::option::Option<crate::model::SmsMessageActivity>,
        ) -> Self {
            self.sms = input;
            self
        }
        /// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
        pub fn wait(mut self, input: crate::model::WaitActivity) -> Self {
            self.wait = Some(input);
            self
        }
        /// <p>The settings for a wait activity. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
        pub fn set_wait(mut self, input: std::option::Option<crate::model::WaitActivity>) -> Self {
            self.wait = input;
            self
        }
        /// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
        pub fn contact_center(mut self, input: crate::model::ContactCenterActivity) -> Self {
            self.contact_center = Some(input);
            self
        }
        /// <p>The settings for a connect activity. This type of activity initiates a contact center call to participants.</p>
        pub fn set_contact_center(
            mut self,
            input: std::option::Option<crate::model::ContactCenterActivity>,
        ) -> Self {
            self.contact_center = input;
            self
        }
        /// Consumes the builder and constructs a [`Activity`](crate::model::Activity).
        pub fn build(self) -> crate::model::Activity {
            crate::model::Activity {
                custom: self.custom,
                conditional_split: self.conditional_split,
                description: self.description,
                email: self.email,
                holdout: self.holdout,
                multi_condition: self.multi_condition,
                push: self.push,
                random_split: self.random_split,
                sms: self.sms,
                wait: self.wait,
                contact_center: self.contact_center,
            }
        }
    }
}
impl Activity {
    /// Creates a new builder-style object to manufacture [`Activity`](crate::model::Activity).
    pub fn builder() -> crate::model::activity::Builder {
        crate::model::activity::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ContactCenterActivity {
    /// <p>The unique identifier for the next activity to perform after the this activity.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
}
impl ContactCenterActivity {
    /// <p>The unique identifier for the next activity to perform after the this activity.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
}
/// See [`ContactCenterActivity`](crate::model::ContactCenterActivity).
pub mod contact_center_activity {

    /// A builder for [`ContactCenterActivity`](crate::model::ContactCenterActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) next_activity: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier for the next activity to perform after the this activity.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform after the this activity.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// Consumes the builder and constructs a [`ContactCenterActivity`](crate::model::ContactCenterActivity).
        pub fn build(self) -> crate::model::ContactCenterActivity {
            crate::model::ContactCenterActivity {
                next_activity: self.next_activity,
            }
        }
    }
}
impl ContactCenterActivity {
    /// Creates a new builder-style object to manufacture [`ContactCenterActivity`](crate::model::ContactCenterActivity).
    pub fn builder() -> crate::model::contact_center_activity::Builder {
        crate::model::contact_center_activity::Builder::default()
    }
}

/// <p>Specifies the settings for a wait activity in a journey. This type of activity waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WaitActivity {
    /// <p>The unique identifier for the next activity to perform, after performing the wait activity.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
    /// <p>The amount of time to wait or the date and time when the activity moves participants to the next activity in the journey.</p>
    #[doc(hidden)]
    pub wait_time: std::option::Option<crate::model::WaitTime>,
}
impl WaitActivity {
    /// <p>The unique identifier for the next activity to perform, after performing the wait activity.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
    /// <p>The amount of time to wait or the date and time when the activity moves participants to the next activity in the journey.</p>
    pub fn wait_time(&self) -> std::option::Option<&crate::model::WaitTime> {
        self.wait_time.as_ref()
    }
}
/// See [`WaitActivity`](crate::model::WaitActivity).
pub mod wait_activity {

    /// A builder for [`WaitActivity`](crate::model::WaitActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) next_activity: std::option::Option<std::string::String>,
        pub(crate) wait_time: std::option::Option<crate::model::WaitTime>,
    }
    impl Builder {
        /// <p>The unique identifier for the next activity to perform, after performing the wait activity.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after performing the wait activity.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// <p>The amount of time to wait or the date and time when the activity moves participants to the next activity in the journey.</p>
        pub fn wait_time(mut self, input: crate::model::WaitTime) -> Self {
            self.wait_time = Some(input);
            self
        }
        /// <p>The amount of time to wait or the date and time when the activity moves participants to the next activity in the journey.</p>
        pub fn set_wait_time(mut self, input: std::option::Option<crate::model::WaitTime>) -> Self {
            self.wait_time = input;
            self
        }
        /// Consumes the builder and constructs a [`WaitActivity`](crate::model::WaitActivity).
        pub fn build(self) -> crate::model::WaitActivity {
            crate::model::WaitActivity {
                next_activity: self.next_activity,
                wait_time: self.wait_time,
            }
        }
    }
}
impl WaitActivity {
    /// Creates a new builder-style object to manufacture [`WaitActivity`](crate::model::WaitActivity).
    pub fn builder() -> crate::model::wait_activity::Builder {
        crate::model::wait_activity::Builder::default()
    }
}

/// <p>Specifies a duration or a date and time that indicates when Amazon Pinpoint determines whether an activity's conditions have been met or an activity moves participants to the next activity in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WaitTime {
    /// <p>The amount of time to wait, as a duration in ISO 8601 format, before determining whether the activity's conditions have been met or moving participants to the next activity in the journey.</p>
    #[doc(hidden)]
    pub wait_for: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint determines whether the activity's conditions have been met or the activity moves participants to the next activity in the journey.</p>
    #[doc(hidden)]
    pub wait_until: std::option::Option<std::string::String>,
}
impl WaitTime {
    /// <p>The amount of time to wait, as a duration in ISO 8601 format, before determining whether the activity's conditions have been met or moving participants to the next activity in the journey.</p>
    pub fn wait_for(&self) -> std::option::Option<&str> {
        self.wait_for.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint determines whether the activity's conditions have been met or the activity moves participants to the next activity in the journey.</p>
    pub fn wait_until(&self) -> std::option::Option<&str> {
        self.wait_until.as_deref()
    }
}
/// See [`WaitTime`](crate::model::WaitTime).
pub mod wait_time {

    /// A builder for [`WaitTime`](crate::model::WaitTime).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) wait_for: std::option::Option<std::string::String>,
        pub(crate) wait_until: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The amount of time to wait, as a duration in ISO 8601 format, before determining whether the activity's conditions have been met or moving participants to the next activity in the journey.</p>
        pub fn wait_for(mut self, input: impl Into<std::string::String>) -> Self {
            self.wait_for = Some(input.into());
            self
        }
        /// <p>The amount of time to wait, as a duration in ISO 8601 format, before determining whether the activity's conditions have been met or moving participants to the next activity in the journey.</p>
        pub fn set_wait_for(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.wait_for = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint determines whether the activity's conditions have been met or the activity moves participants to the next activity in the journey.</p>
        pub fn wait_until(mut self, input: impl Into<std::string::String>) -> Self {
            self.wait_until = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint determines whether the activity's conditions have been met or the activity moves participants to the next activity in the journey.</p>
        pub fn set_wait_until(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.wait_until = input;
            self
        }
        /// Consumes the builder and constructs a [`WaitTime`](crate::model::WaitTime).
        pub fn build(self) -> crate::model::WaitTime {
            crate::model::WaitTime {
                wait_for: self.wait_for,
                wait_until: self.wait_until,
            }
        }
    }
}
impl WaitTime {
    /// Creates a new builder-style object to manufacture [`WaitTime`](crate::model::WaitTime).
    pub fn builder() -> crate::model::wait_time::Builder {
        crate::model::wait_time::Builder::default()
    }
}

/// <p>Specifies the settings for an SMS activity in a journey. This type of activity sends a text message to participants.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SmsMessageActivity {
    /// <p>Specifies the sender ID and message type for an SMS message that's sent to participants in a journey.</p>
    #[doc(hidden)]
    pub message_config: std::option::Option<crate::model::JourneySmsMessage>,
    /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
    /// <p>The name of the SMS message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the version of the SMS template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    #[doc(hidden)]
    pub template_version: std::option::Option<std::string::String>,
}
impl SmsMessageActivity {
    /// <p>Specifies the sender ID and message type for an SMS message that's sent to participants in a journey.</p>
    pub fn message_config(&self) -> std::option::Option<&crate::model::JourneySmsMessage> {
        self.message_config.as_ref()
    }
    /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
    /// <p>The name of the SMS message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The unique identifier for the version of the SMS template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    pub fn template_version(&self) -> std::option::Option<&str> {
        self.template_version.as_deref()
    }
}
/// See [`SmsMessageActivity`](crate::model::SmsMessageActivity).
pub mod sms_message_activity {

    /// A builder for [`SmsMessageActivity`](crate::model::SmsMessageActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message_config: std::option::Option<crate::model::JourneySmsMessage>,
        pub(crate) next_activity: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Specifies the sender ID and message type for an SMS message that's sent to participants in a journey.</p>
        pub fn message_config(mut self, input: crate::model::JourneySmsMessage) -> Self {
            self.message_config = Some(input);
            self
        }
        /// <p>Specifies the sender ID and message type for an SMS message that's sent to participants in a journey.</p>
        pub fn set_message_config(
            mut self,
            input: std::option::Option<crate::model::JourneySmsMessage>,
        ) -> Self {
            self.message_config = input;
            self
        }
        /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// <p>The name of the SMS message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the SMS message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The unique identifier for the version of the SMS template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn template_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_version = Some(input.into());
            self
        }
        /// <p>The unique identifier for the version of the SMS template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn set_template_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_version = input;
            self
        }
        /// Consumes the builder and constructs a [`SmsMessageActivity`](crate::model::SmsMessageActivity).
        pub fn build(self) -> crate::model::SmsMessageActivity {
            crate::model::SmsMessageActivity {
                message_config: self.message_config,
                next_activity: self.next_activity,
                template_name: self.template_name,
                template_version: self.template_version,
            }
        }
    }
}
impl SmsMessageActivity {
    /// Creates a new builder-style object to manufacture [`SmsMessageActivity`](crate::model::SmsMessageActivity).
    pub fn builder() -> crate::model::sms_message_activity::Builder {
        crate::model::sms_message_activity::Builder::default()
    }
}

/// <p>Specifies the sender ID and message type for an SMS message that's sent to participants in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneySmsMessage {
    /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
    #[doc(hidden)]
    pub message_type: std::option::Option<crate::model::MessageType>,
    /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
    #[doc(hidden)]
    pub origination_number: std::option::Option<std::string::String>,
    /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region. For more information, see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-countries.html">Supported Countries and Regions</a> in the Amazon Pinpoint User Guide.</p>
    #[doc(hidden)]
    pub sender_id: std::option::Option<std::string::String>,
    /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
    #[doc(hidden)]
    pub entity_id: std::option::Option<std::string::String>,
    /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
    #[doc(hidden)]
    pub template_id: std::option::Option<std::string::String>,
}
impl JourneySmsMessage {
    /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
    pub fn message_type(&self) -> std::option::Option<&crate::model::MessageType> {
        self.message_type.as_ref()
    }
    /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
    pub fn origination_number(&self) -> std::option::Option<&str> {
        self.origination_number.as_deref()
    }
    /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region. For more information, see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-countries.html">Supported Countries and Regions</a> in the Amazon Pinpoint User Guide.</p>
    pub fn sender_id(&self) -> std::option::Option<&str> {
        self.sender_id.as_deref()
    }
    /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
    pub fn entity_id(&self) -> std::option::Option<&str> {
        self.entity_id.as_deref()
    }
    /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
    pub fn template_id(&self) -> std::option::Option<&str> {
        self.template_id.as_deref()
    }
}
/// See [`JourneySmsMessage`](crate::model::JourneySmsMessage).
pub mod journey_sms_message {

    /// A builder for [`JourneySmsMessage`](crate::model::JourneySmsMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message_type: std::option::Option<crate::model::MessageType>,
        pub(crate) origination_number: std::option::Option<std::string::String>,
        pub(crate) sender_id: std::option::Option<std::string::String>,
        pub(crate) entity_id: std::option::Option<std::string::String>,
        pub(crate) template_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
        pub fn message_type(mut self, input: crate::model::MessageType) -> Self {
            self.message_type = Some(input);
            self
        }
        /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
        pub fn set_message_type(
            mut self,
            input: std::option::Option<crate::model::MessageType>,
        ) -> Self {
            self.message_type = input;
            self
        }
        /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
        pub fn origination_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.origination_number = Some(input.into());
            self
        }
        /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
        pub fn set_origination_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.origination_number = input;
            self
        }
        /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region. For more information, see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-countries.html">Supported Countries and Regions</a> in the Amazon Pinpoint User Guide.</p>
        pub fn sender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.sender_id = Some(input.into());
            self
        }
        /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region. For more information, see <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-countries.html">Supported Countries and Regions</a> in the Amazon Pinpoint User Guide.</p>
        pub fn set_sender_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sender_id = input;
            self
        }
        /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
        pub fn entity_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.entity_id = Some(input.into());
            self
        }
        /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
        pub fn set_entity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.entity_id = input;
            self
        }
        /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
        pub fn template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_id = Some(input.into());
            self
        }
        /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
        pub fn set_template_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.template_id = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneySmsMessage`](crate::model::JourneySmsMessage).
        pub fn build(self) -> crate::model::JourneySmsMessage {
            crate::model::JourneySmsMessage {
                message_type: self.message_type,
                origination_number: self.origination_number,
                sender_id: self.sender_id,
                entity_id: self.entity_id,
                template_id: self.template_id,
            }
        }
    }
}
impl JourneySmsMessage {
    /// Creates a new builder-style object to manufacture [`JourneySmsMessage`](crate::model::JourneySmsMessage).
    pub fn builder() -> crate::model::journey_sms_message::Builder {
        crate::model::journey_sms_message::Builder::default()
    }
}

/// When writing a match expression against `MessageType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let messagetype = unimplemented!();
/// match messagetype {
///     MessageType::Promotional => { /* ... */ },
///     MessageType::Transactional => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `messagetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `MessageType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `MessageType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `MessageType::NewFeature` is defined.
/// Specifically, when `messagetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `MessageType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum MessageType {
    #[allow(missing_docs)] // documentation missing in model
    Promotional,
    #[allow(missing_docs)] // documentation missing in model
    Transactional,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MessageType {
    fn from(s: &str) -> Self {
        match s {
            "PROMOTIONAL" => MessageType::Promotional,
            "TRANSACTIONAL" => MessageType::Transactional,
            other => MessageType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for MessageType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(MessageType::from(s))
    }
}
impl MessageType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            MessageType::Promotional => "PROMOTIONAL",
            MessageType::Transactional => "TRANSACTIONAL",
            MessageType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["PROMOTIONAL", "TRANSACTIONAL"]
    }
}
impl AsRef<str> for MessageType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the settings for a random split activity in a journey. This type of activity randomly sends specified percentages of participants down one of as many as five paths in a journey, based on conditions that you specify.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RandomSplitActivity {
    /// <p>The paths for the activity, including the percentage of participants to enter each path and the activity to perform for each path.</p>
    #[doc(hidden)]
    pub branches: std::option::Option<std::vec::Vec<crate::model::RandomSplitEntry>>,
}
impl RandomSplitActivity {
    /// <p>The paths for the activity, including the percentage of participants to enter each path and the activity to perform for each path.</p>
    pub fn branches(&self) -> std::option::Option<&[crate::model::RandomSplitEntry]> {
        self.branches.as_deref()
    }
}
/// See [`RandomSplitActivity`](crate::model::RandomSplitActivity).
pub mod random_split_activity {

    /// A builder for [`RandomSplitActivity`](crate::model::RandomSplitActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) branches: std::option::Option<std::vec::Vec<crate::model::RandomSplitEntry>>,
    }
    impl Builder {
        /// Appends an item to `branches`.
        ///
        /// To override the contents of this collection use [`set_branches`](Self::set_branches).
        ///
        /// <p>The paths for the activity, including the percentage of participants to enter each path and the activity to perform for each path.</p>
        pub fn branches(mut self, input: crate::model::RandomSplitEntry) -> Self {
            let mut v = self.branches.unwrap_or_default();
            v.push(input);
            self.branches = Some(v);
            self
        }
        /// <p>The paths for the activity, including the percentage of participants to enter each path and the activity to perform for each path.</p>
        pub fn set_branches(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::RandomSplitEntry>>,
        ) -> Self {
            self.branches = input;
            self
        }
        /// Consumes the builder and constructs a [`RandomSplitActivity`](crate::model::RandomSplitActivity).
        pub fn build(self) -> crate::model::RandomSplitActivity {
            crate::model::RandomSplitActivity {
                branches: self.branches,
            }
        }
    }
}
impl RandomSplitActivity {
    /// Creates a new builder-style object to manufacture [`RandomSplitActivity`](crate::model::RandomSplitActivity).
    pub fn builder() -> crate::model::random_split_activity::Builder {
        crate::model::random_split_activity::Builder::default()
    }
}

/// <p>Specifies the settings for a path in a random split activity in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RandomSplitEntry {
    /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
    /// <p>The percentage of participants to send down the activity path.</p>
    /// <p>To determine which participants are sent down each path, Amazon Pinpoint applies a probability-based algorithm to the percentages that you specify for the paths. Therefore, the actual percentage of participants who are sent down a path may not be equal to the percentage that you specify.</p>
    #[doc(hidden)]
    pub percentage: i32,
}
impl RandomSplitEntry {
    /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
    /// <p>The percentage of participants to send down the activity path.</p>
    /// <p>To determine which participants are sent down each path, Amazon Pinpoint applies a probability-based algorithm to the percentages that you specify for the paths. Therefore, the actual percentage of participants who are sent down a path may not be equal to the percentage that you specify.</p>
    pub fn percentage(&self) -> i32 {
        self.percentage
    }
}
/// See [`RandomSplitEntry`](crate::model::RandomSplitEntry).
pub mod random_split_entry {

    /// A builder for [`RandomSplitEntry`](crate::model::RandomSplitEntry).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) next_activity: std::option::Option<std::string::String>,
        pub(crate) percentage: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// <p>The percentage of participants to send down the activity path.</p>
        /// <p>To determine which participants are sent down each path, Amazon Pinpoint applies a probability-based algorithm to the percentages that you specify for the paths. Therefore, the actual percentage of participants who are sent down a path may not be equal to the percentage that you specify.</p>
        pub fn percentage(mut self, input: i32) -> Self {
            self.percentage = Some(input);
            self
        }
        /// <p>The percentage of participants to send down the activity path.</p>
        /// <p>To determine which participants are sent down each path, Amazon Pinpoint applies a probability-based algorithm to the percentages that you specify for the paths. Therefore, the actual percentage of participants who are sent down a path may not be equal to the percentage that you specify.</p>
        pub fn set_percentage(mut self, input: std::option::Option<i32>) -> Self {
            self.percentage = input;
            self
        }
        /// Consumes the builder and constructs a [`RandomSplitEntry`](crate::model::RandomSplitEntry).
        pub fn build(self) -> crate::model::RandomSplitEntry {
            crate::model::RandomSplitEntry {
                next_activity: self.next_activity,
                percentage: self.percentage.unwrap_or_default(),
            }
        }
    }
}
impl RandomSplitEntry {
    /// Creates a new builder-style object to manufacture [`RandomSplitEntry`](crate::model::RandomSplitEntry).
    pub fn builder() -> crate::model::random_split_entry::Builder {
        crate::model::random_split_entry::Builder::default()
    }
}

/// <p>Specifies the settings for a push notification activity in a journey. This type of activity sends a push notification to participants.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PushMessageActivity {
    /// <p>Specifies the time to live (TTL) value for push notifications that are sent to participants in a journey.</p>
    #[doc(hidden)]
    pub message_config: std::option::Option<crate::model::JourneyPushMessage>,
    /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
    /// <p>The name of the push notification template to use for the message. If specified, this value must match the name of an existing message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the version of the push notification template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    #[doc(hidden)]
    pub template_version: std::option::Option<std::string::String>,
}
impl PushMessageActivity {
    /// <p>Specifies the time to live (TTL) value for push notifications that are sent to participants in a journey.</p>
    pub fn message_config(&self) -> std::option::Option<&crate::model::JourneyPushMessage> {
        self.message_config.as_ref()
    }
    /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
    /// <p>The name of the push notification template to use for the message. If specified, this value must match the name of an existing message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The unique identifier for the version of the push notification template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    pub fn template_version(&self) -> std::option::Option<&str> {
        self.template_version.as_deref()
    }
}
/// See [`PushMessageActivity`](crate::model::PushMessageActivity).
pub mod push_message_activity {

    /// A builder for [`PushMessageActivity`](crate::model::PushMessageActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message_config: std::option::Option<crate::model::JourneyPushMessage>,
        pub(crate) next_activity: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Specifies the time to live (TTL) value for push notifications that are sent to participants in a journey.</p>
        pub fn message_config(mut self, input: crate::model::JourneyPushMessage) -> Self {
            self.message_config = Some(input);
            self
        }
        /// <p>Specifies the time to live (TTL) value for push notifications that are sent to participants in a journey.</p>
        pub fn set_message_config(
            mut self,
            input: std::option::Option<crate::model::JourneyPushMessage>,
        ) -> Self {
            self.message_config = input;
            self
        }
        /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// <p>The name of the push notification template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the push notification template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The unique identifier for the version of the push notification template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn template_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_version = Some(input.into());
            self
        }
        /// <p>The unique identifier for the version of the push notification template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn set_template_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_version = input;
            self
        }
        /// Consumes the builder and constructs a [`PushMessageActivity`](crate::model::PushMessageActivity).
        pub fn build(self) -> crate::model::PushMessageActivity {
            crate::model::PushMessageActivity {
                message_config: self.message_config,
                next_activity: self.next_activity,
                template_name: self.template_name,
                template_version: self.template_version,
            }
        }
    }
}
impl PushMessageActivity {
    /// Creates a new builder-style object to manufacture [`PushMessageActivity`](crate::model::PushMessageActivity).
    pub fn builder() -> crate::model::push_message_activity::Builder {
        crate::model::push_message_activity::Builder::default()
    }
}

/// <p>Specifies the message configuration for a push notification that's sent to participants in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyPushMessage {
    /// <p>The number of seconds that the push notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
    /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
    #[doc(hidden)]
    pub time_to_live: std::option::Option<std::string::String>,
}
impl JourneyPushMessage {
    /// <p>The number of seconds that the push notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
    /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
    pub fn time_to_live(&self) -> std::option::Option<&str> {
        self.time_to_live.as_deref()
    }
}
/// See [`JourneyPushMessage`](crate::model::JourneyPushMessage).
pub mod journey_push_message {

    /// A builder for [`JourneyPushMessage`](crate::model::JourneyPushMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) time_to_live: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The number of seconds that the push notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
        /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
        pub fn time_to_live(mut self, input: impl Into<std::string::String>) -> Self {
            self.time_to_live = Some(input.into());
            self
        }
        /// <p>The number of seconds that the push notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
        /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
        pub fn set_time_to_live(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.time_to_live = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyPushMessage`](crate::model::JourneyPushMessage).
        pub fn build(self) -> crate::model::JourneyPushMessage {
            crate::model::JourneyPushMessage {
                time_to_live: self.time_to_live,
            }
        }
    }
}
impl JourneyPushMessage {
    /// Creates a new builder-style object to manufacture [`JourneyPushMessage`](crate::model::JourneyPushMessage).
    pub fn builder() -> crate::model::journey_push_message::Builder {
        crate::model::journey_push_message::Builder::default()
    }
}

/// <p>Specifies the settings for a multivariate split activity in a journey. This type of activity sends participants down one of as many as five paths (including a default <i>Else</i> path) in a journey, based on conditions that you specify.</p> <note>
/// <p>To create multivariate split activities that send participants down different paths based on push notification events (such as Open or Received events), your mobile app has to specify the User ID and Endpoint ID values. For more information, see <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/integrate.html">Integrating Amazon Pinpoint with your application</a> in the <i>Amazon Pinpoint Developer Guide</i>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MultiConditionalSplitActivity {
    /// <p>The paths for the activity, including the conditions for entering each path and the activity to perform for each path.</p>
    #[doc(hidden)]
    pub branches: std::option::Option<std::vec::Vec<crate::model::MultiConditionalBranch>>,
    /// <p>The unique identifier for the activity to perform for participants who don't meet any of the conditions specified for other paths in the activity.</p>
    #[doc(hidden)]
    pub default_activity: std::option::Option<std::string::String>,
    /// <p>The amount of time to wait or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
    #[doc(hidden)]
    pub evaluation_wait_time: std::option::Option<crate::model::WaitTime>,
}
impl MultiConditionalSplitActivity {
    /// <p>The paths for the activity, including the conditions for entering each path and the activity to perform for each path.</p>
    pub fn branches(&self) -> std::option::Option<&[crate::model::MultiConditionalBranch]> {
        self.branches.as_deref()
    }
    /// <p>The unique identifier for the activity to perform for participants who don't meet any of the conditions specified for other paths in the activity.</p>
    pub fn default_activity(&self) -> std::option::Option<&str> {
        self.default_activity.as_deref()
    }
    /// <p>The amount of time to wait or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
    pub fn evaluation_wait_time(&self) -> std::option::Option<&crate::model::WaitTime> {
        self.evaluation_wait_time.as_ref()
    }
}
/// See [`MultiConditionalSplitActivity`](crate::model::MultiConditionalSplitActivity).
pub mod multi_conditional_split_activity {

    /// A builder for [`MultiConditionalSplitActivity`](crate::model::MultiConditionalSplitActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) branches:
            std::option::Option<std::vec::Vec<crate::model::MultiConditionalBranch>>,
        pub(crate) default_activity: std::option::Option<std::string::String>,
        pub(crate) evaluation_wait_time: std::option::Option<crate::model::WaitTime>,
    }
    impl Builder {
        /// Appends an item to `branches`.
        ///
        /// To override the contents of this collection use [`set_branches`](Self::set_branches).
        ///
        /// <p>The paths for the activity, including the conditions for entering each path and the activity to perform for each path.</p>
        pub fn branches(mut self, input: crate::model::MultiConditionalBranch) -> Self {
            let mut v = self.branches.unwrap_or_default();
            v.push(input);
            self.branches = Some(v);
            self
        }
        /// <p>The paths for the activity, including the conditions for entering each path and the activity to perform for each path.</p>
        pub fn set_branches(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::MultiConditionalBranch>>,
        ) -> Self {
            self.branches = input;
            self
        }
        /// <p>The unique identifier for the activity to perform for participants who don't meet any of the conditions specified for other paths in the activity.</p>
        pub fn default_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the activity to perform for participants who don't meet any of the conditions specified for other paths in the activity.</p>
        pub fn set_default_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_activity = input;
            self
        }
        /// <p>The amount of time to wait or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
        pub fn evaluation_wait_time(mut self, input: crate::model::WaitTime) -> Self {
            self.evaluation_wait_time = Some(input);
            self
        }
        /// <p>The amount of time to wait or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
        pub fn set_evaluation_wait_time(
            mut self,
            input: std::option::Option<crate::model::WaitTime>,
        ) -> Self {
            self.evaluation_wait_time = input;
            self
        }
        /// Consumes the builder and constructs a [`MultiConditionalSplitActivity`](crate::model::MultiConditionalSplitActivity).
        pub fn build(self) -> crate::model::MultiConditionalSplitActivity {
            crate::model::MultiConditionalSplitActivity {
                branches: self.branches,
                default_activity: self.default_activity,
                evaluation_wait_time: self.evaluation_wait_time,
            }
        }
    }
}
impl MultiConditionalSplitActivity {
    /// Creates a new builder-style object to manufacture [`MultiConditionalSplitActivity`](crate::model::MultiConditionalSplitActivity).
    pub fn builder() -> crate::model::multi_conditional_split_activity::Builder {
        crate::model::multi_conditional_split_activity::Builder::default()
    }
}

/// <p>Specifies a condition to evaluate for an activity path in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MultiConditionalBranch {
    /// <p>The condition to evaluate for the activity path.</p>
    #[doc(hidden)]
    pub condition: std::option::Option<crate::model::SimpleCondition>,
    /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
}
impl MultiConditionalBranch {
    /// <p>The condition to evaluate for the activity path.</p>
    pub fn condition(&self) -> std::option::Option<&crate::model::SimpleCondition> {
        self.condition.as_ref()
    }
    /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
}
/// See [`MultiConditionalBranch`](crate::model::MultiConditionalBranch).
pub mod multi_conditional_branch {

    /// A builder for [`MultiConditionalBranch`](crate::model::MultiConditionalBranch).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) condition: std::option::Option<crate::model::SimpleCondition>,
        pub(crate) next_activity: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The condition to evaluate for the activity path.</p>
        pub fn condition(mut self, input: crate::model::SimpleCondition) -> Self {
            self.condition = Some(input);
            self
        }
        /// <p>The condition to evaluate for the activity path.</p>
        pub fn set_condition(
            mut self,
            input: std::option::Option<crate::model::SimpleCondition>,
        ) -> Self {
            self.condition = input;
            self
        }
        /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after completing the activity for the path.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// Consumes the builder and constructs a [`MultiConditionalBranch`](crate::model::MultiConditionalBranch).
        pub fn build(self) -> crate::model::MultiConditionalBranch {
            crate::model::MultiConditionalBranch {
                condition: self.condition,
                next_activity: self.next_activity,
            }
        }
    }
}
impl MultiConditionalBranch {
    /// Creates a new builder-style object to manufacture [`MultiConditionalBranch`](crate::model::MultiConditionalBranch).
    pub fn builder() -> crate::model::multi_conditional_branch::Builder {
        crate::model::multi_conditional_branch::Builder::default()
    }
}

/// <p>Specifies a condition to evaluate for an activity in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SimpleCondition {
    /// <p>The dimension settings for the event that's associated with the activity.</p>
    #[doc(hidden)]
    pub event_condition: std::option::Option<crate::model::EventCondition>,
    /// <p>The segment that's associated with the activity.</p>
    #[doc(hidden)]
    pub segment_condition: std::option::Option<crate::model::SegmentCondition>,
    /// <p>The dimension settings for the segment that's associated with the activity.</p>
    #[doc(hidden)]
    pub segment_dimensions: std::option::Option<crate::model::SegmentDimensions>,
}
impl SimpleCondition {
    /// <p>The dimension settings for the event that's associated with the activity.</p>
    pub fn event_condition(&self) -> std::option::Option<&crate::model::EventCondition> {
        self.event_condition.as_ref()
    }
    /// <p>The segment that's associated with the activity.</p>
    pub fn segment_condition(&self) -> std::option::Option<&crate::model::SegmentCondition> {
        self.segment_condition.as_ref()
    }
    /// <p>The dimension settings for the segment that's associated with the activity.</p>
    pub fn segment_dimensions(&self) -> std::option::Option<&crate::model::SegmentDimensions> {
        self.segment_dimensions.as_ref()
    }
}
/// See [`SimpleCondition`](crate::model::SimpleCondition).
pub mod simple_condition {

    /// A builder for [`SimpleCondition`](crate::model::SimpleCondition).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) event_condition: std::option::Option<crate::model::EventCondition>,
        pub(crate) segment_condition: std::option::Option<crate::model::SegmentCondition>,
        pub(crate) segment_dimensions: std::option::Option<crate::model::SegmentDimensions>,
    }
    impl Builder {
        /// <p>The dimension settings for the event that's associated with the activity.</p>
        pub fn event_condition(mut self, input: crate::model::EventCondition) -> Self {
            self.event_condition = Some(input);
            self
        }
        /// <p>The dimension settings for the event that's associated with the activity.</p>
        pub fn set_event_condition(
            mut self,
            input: std::option::Option<crate::model::EventCondition>,
        ) -> Self {
            self.event_condition = input;
            self
        }
        /// <p>The segment that's associated with the activity.</p>
        pub fn segment_condition(mut self, input: crate::model::SegmentCondition) -> Self {
            self.segment_condition = Some(input);
            self
        }
        /// <p>The segment that's associated with the activity.</p>
        pub fn set_segment_condition(
            mut self,
            input: std::option::Option<crate::model::SegmentCondition>,
        ) -> Self {
            self.segment_condition = input;
            self
        }
        /// <p>The dimension settings for the segment that's associated with the activity.</p>
        pub fn segment_dimensions(mut self, input: crate::model::SegmentDimensions) -> Self {
            self.segment_dimensions = Some(input);
            self
        }
        /// <p>The dimension settings for the segment that's associated with the activity.</p>
        pub fn set_segment_dimensions(
            mut self,
            input: std::option::Option<crate::model::SegmentDimensions>,
        ) -> Self {
            self.segment_dimensions = input;
            self
        }
        /// Consumes the builder and constructs a [`SimpleCondition`](crate::model::SimpleCondition).
        pub fn build(self) -> crate::model::SimpleCondition {
            crate::model::SimpleCondition {
                event_condition: self.event_condition,
                segment_condition: self.segment_condition,
                segment_dimensions: self.segment_dimensions,
            }
        }
    }
}
impl SimpleCondition {
    /// Creates a new builder-style object to manufacture [`SimpleCondition`](crate::model::SimpleCondition).
    pub fn builder() -> crate::model::simple_condition::Builder {
        crate::model::simple_condition::Builder::default()
    }
}

/// <p>Specifies the conditions to evaluate for an event that applies to an activity in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventCondition {
    /// <p>The dimensions for the event filter to use for the activity.</p>
    #[doc(hidden)]
    pub dimensions: std::option::Option<crate::model::EventDimensions>,
    /// <p>The message identifier (message_id) for the message to use when determining whether message events meet the condition.</p>
    #[doc(hidden)]
    pub message_activity: std::option::Option<std::string::String>,
}
impl EventCondition {
    /// <p>The dimensions for the event filter to use for the activity.</p>
    pub fn dimensions(&self) -> std::option::Option<&crate::model::EventDimensions> {
        self.dimensions.as_ref()
    }
    /// <p>The message identifier (message_id) for the message to use when determining whether message events meet the condition.</p>
    pub fn message_activity(&self) -> std::option::Option<&str> {
        self.message_activity.as_deref()
    }
}
/// See [`EventCondition`](crate::model::EventCondition).
pub mod event_condition {

    /// A builder for [`EventCondition`](crate::model::EventCondition).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dimensions: std::option::Option<crate::model::EventDimensions>,
        pub(crate) message_activity: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The dimensions for the event filter to use for the activity.</p>
        pub fn dimensions(mut self, input: crate::model::EventDimensions) -> Self {
            self.dimensions = Some(input);
            self
        }
        /// <p>The dimensions for the event filter to use for the activity.</p>
        pub fn set_dimensions(
            mut self,
            input: std::option::Option<crate::model::EventDimensions>,
        ) -> Self {
            self.dimensions = input;
            self
        }
        /// <p>The message identifier (message_id) for the message to use when determining whether message events meet the condition.</p>
        pub fn message_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.message_activity = Some(input.into());
            self
        }
        /// <p>The message identifier (message_id) for the message to use when determining whether message events meet the condition.</p>
        pub fn set_message_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.message_activity = input;
            self
        }
        /// Consumes the builder and constructs a [`EventCondition`](crate::model::EventCondition).
        pub fn build(self) -> crate::model::EventCondition {
            crate::model::EventCondition {
                dimensions: self.dimensions,
                message_activity: self.message_activity,
            }
        }
    }
}
impl EventCondition {
    /// Creates a new builder-style object to manufacture [`EventCondition`](crate::model::EventCondition).
    pub fn builder() -> crate::model::event_condition::Builder {
        crate::model::event_condition::Builder::default()
    }
}

/// <p>Specifies the settings for a holdout activity in a journey. This type of activity stops a journey for a specified percentage of participants.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct HoldoutActivity {
    /// <p>The unique identifier for the next activity to perform, after performing the holdout activity.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
    /// <p>The percentage of participants who shouldn't continue the journey.</p>
    /// <p>To determine which participants are held out, Amazon Pinpoint applies a probability-based algorithm to the percentage that you specify. Therefore, the actual percentage of participants who are held out may not be equal to the percentage that you specify.</p>
    #[doc(hidden)]
    pub percentage: i32,
}
impl HoldoutActivity {
    /// <p>The unique identifier for the next activity to perform, after performing the holdout activity.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
    /// <p>The percentage of participants who shouldn't continue the journey.</p>
    /// <p>To determine which participants are held out, Amazon Pinpoint applies a probability-based algorithm to the percentage that you specify. Therefore, the actual percentage of participants who are held out may not be equal to the percentage that you specify.</p>
    pub fn percentage(&self) -> i32 {
        self.percentage
    }
}
/// See [`HoldoutActivity`](crate::model::HoldoutActivity).
pub mod holdout_activity {

    /// A builder for [`HoldoutActivity`](crate::model::HoldoutActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) next_activity: std::option::Option<std::string::String>,
        pub(crate) percentage: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the next activity to perform, after performing the holdout activity.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after performing the holdout activity.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// <p>The percentage of participants who shouldn't continue the journey.</p>
        /// <p>To determine which participants are held out, Amazon Pinpoint applies a probability-based algorithm to the percentage that you specify. Therefore, the actual percentage of participants who are held out may not be equal to the percentage that you specify.</p>
        pub fn percentage(mut self, input: i32) -> Self {
            self.percentage = Some(input);
            self
        }
        /// <p>The percentage of participants who shouldn't continue the journey.</p>
        /// <p>To determine which participants are held out, Amazon Pinpoint applies a probability-based algorithm to the percentage that you specify. Therefore, the actual percentage of participants who are held out may not be equal to the percentage that you specify.</p>
        pub fn set_percentage(mut self, input: std::option::Option<i32>) -> Self {
            self.percentage = input;
            self
        }
        /// Consumes the builder and constructs a [`HoldoutActivity`](crate::model::HoldoutActivity).
        pub fn build(self) -> crate::model::HoldoutActivity {
            crate::model::HoldoutActivity {
                next_activity: self.next_activity,
                percentage: self.percentage.unwrap_or_default(),
            }
        }
    }
}
impl HoldoutActivity {
    /// Creates a new builder-style object to manufacture [`HoldoutActivity`](crate::model::HoldoutActivity).
    pub fn builder() -> crate::model::holdout_activity::Builder {
        crate::model::holdout_activity::Builder::default()
    }
}

/// <p>Specifies the settings for an email activity in a journey. This type of activity sends an email message to participants.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmailMessageActivity {
    /// <p>Specifies the sender address for an email message that's sent to participants in the journey.</p>
    #[doc(hidden)]
    pub message_config: std::option::Option<crate::model::JourneyEmailMessage>,
    /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
    /// <p>The name of the email message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the version of the email template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    #[doc(hidden)]
    pub template_version: std::option::Option<std::string::String>,
}
impl EmailMessageActivity {
    /// <p>Specifies the sender address for an email message that's sent to participants in the journey.</p>
    pub fn message_config(&self) -> std::option::Option<&crate::model::JourneyEmailMessage> {
        self.message_config.as_ref()
    }
    /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
    /// <p>The name of the email message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The unique identifier for the version of the email template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    pub fn template_version(&self) -> std::option::Option<&str> {
        self.template_version.as_deref()
    }
}
/// See [`EmailMessageActivity`](crate::model::EmailMessageActivity).
pub mod email_message_activity {

    /// A builder for [`EmailMessageActivity`](crate::model::EmailMessageActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message_config: std::option::Option<crate::model::JourneyEmailMessage>,
        pub(crate) next_activity: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Specifies the sender address for an email message that's sent to participants in the journey.</p>
        pub fn message_config(mut self, input: crate::model::JourneyEmailMessage) -> Self {
            self.message_config = Some(input);
            self
        }
        /// <p>Specifies the sender address for an email message that's sent to participants in the journey.</p>
        pub fn set_message_config(
            mut self,
            input: std::option::Option<crate::model::JourneyEmailMessage>,
        ) -> Self {
            self.message_config = input;
            self
        }
        /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after the message is sent.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// <p>The name of the email message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the email message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The unique identifier for the version of the email template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn template_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_version = Some(input.into());
            self
        }
        /// <p>The unique identifier for the version of the email template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn set_template_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_version = input;
            self
        }
        /// Consumes the builder and constructs a [`EmailMessageActivity`](crate::model::EmailMessageActivity).
        pub fn build(self) -> crate::model::EmailMessageActivity {
            crate::model::EmailMessageActivity {
                message_config: self.message_config,
                next_activity: self.next_activity,
                template_name: self.template_name,
                template_version: self.template_version,
            }
        }
    }
}
impl EmailMessageActivity {
    /// Creates a new builder-style object to manufacture [`EmailMessageActivity`](crate::model::EmailMessageActivity).
    pub fn builder() -> crate::model::email_message_activity::Builder {
        crate::model::email_message_activity::Builder::default()
    }
}

/// <p>Specifies the "From" address for an email message that's sent to participants in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyEmailMessage {
    /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
    #[doc(hidden)]
    pub from_address: std::option::Option<std::string::String>,
}
impl JourneyEmailMessage {
    /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
    pub fn from_address(&self) -> std::option::Option<&str> {
        self.from_address.as_deref()
    }
}
/// See [`JourneyEmailMessage`](crate::model::JourneyEmailMessage).
pub mod journey_email_message {

    /// A builder for [`JourneyEmailMessage`](crate::model::JourneyEmailMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) from_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
        pub fn from_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.from_address = Some(input.into());
            self
        }
        /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
        pub fn set_from_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.from_address = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyEmailMessage`](crate::model::JourneyEmailMessage).
        pub fn build(self) -> crate::model::JourneyEmailMessage {
            crate::model::JourneyEmailMessage {
                from_address: self.from_address,
            }
        }
    }
}
impl JourneyEmailMessage {
    /// Creates a new builder-style object to manufacture [`JourneyEmailMessage`](crate::model::JourneyEmailMessage).
    pub fn builder() -> crate::model::journey_email_message::Builder {
        crate::model::journey_email_message::Builder::default()
    }
}

/// <p>Specifies the settings for a yes/no split activity in a journey. This type of activity sends participants down one of two paths in a journey, based on conditions that you specify.</p> <note>
/// <p>To create yes/no split activities that send participants down different paths based on push notification events (such as Open or Received events), your mobile app has to specify the User ID and Endpoint ID values. For more information, see <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/integrate.html">Integrating Amazon Pinpoint with your application</a> in the <i>Amazon Pinpoint Developer Guide</i>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConditionalSplitActivity {
    /// <p>The conditions that define the paths for the activity, and the relationship between the conditions.</p>
    #[doc(hidden)]
    pub condition: std::option::Option<crate::model::Condition>,
    /// <p>The amount of time to wait before determining whether the conditions are met, or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
    #[doc(hidden)]
    pub evaluation_wait_time: std::option::Option<crate::model::WaitTime>,
    /// <p>The unique identifier for the activity to perform if the conditions aren't met.</p>
    #[doc(hidden)]
    pub false_activity: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the activity to perform if the conditions are met.</p>
    #[doc(hidden)]
    pub true_activity: std::option::Option<std::string::String>,
}
impl ConditionalSplitActivity {
    /// <p>The conditions that define the paths for the activity, and the relationship between the conditions.</p>
    pub fn condition(&self) -> std::option::Option<&crate::model::Condition> {
        self.condition.as_ref()
    }
    /// <p>The amount of time to wait before determining whether the conditions are met, or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
    pub fn evaluation_wait_time(&self) -> std::option::Option<&crate::model::WaitTime> {
        self.evaluation_wait_time.as_ref()
    }
    /// <p>The unique identifier for the activity to perform if the conditions aren't met.</p>
    pub fn false_activity(&self) -> std::option::Option<&str> {
        self.false_activity.as_deref()
    }
    /// <p>The unique identifier for the activity to perform if the conditions are met.</p>
    pub fn true_activity(&self) -> std::option::Option<&str> {
        self.true_activity.as_deref()
    }
}
/// See [`ConditionalSplitActivity`](crate::model::ConditionalSplitActivity).
pub mod conditional_split_activity {

    /// A builder for [`ConditionalSplitActivity`](crate::model::ConditionalSplitActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) condition: std::option::Option<crate::model::Condition>,
        pub(crate) evaluation_wait_time: std::option::Option<crate::model::WaitTime>,
        pub(crate) false_activity: std::option::Option<std::string::String>,
        pub(crate) true_activity: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The conditions that define the paths for the activity, and the relationship between the conditions.</p>
        pub fn condition(mut self, input: crate::model::Condition) -> Self {
            self.condition = Some(input);
            self
        }
        /// <p>The conditions that define the paths for the activity, and the relationship between the conditions.</p>
        pub fn set_condition(
            mut self,
            input: std::option::Option<crate::model::Condition>,
        ) -> Self {
            self.condition = input;
            self
        }
        /// <p>The amount of time to wait before determining whether the conditions are met, or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
        pub fn evaluation_wait_time(mut self, input: crate::model::WaitTime) -> Self {
            self.evaluation_wait_time = Some(input);
            self
        }
        /// <p>The amount of time to wait before determining whether the conditions are met, or the date and time when Amazon Pinpoint determines whether the conditions are met.</p>
        pub fn set_evaluation_wait_time(
            mut self,
            input: std::option::Option<crate::model::WaitTime>,
        ) -> Self {
            self.evaluation_wait_time = input;
            self
        }
        /// <p>The unique identifier for the activity to perform if the conditions aren't met.</p>
        pub fn false_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.false_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the activity to perform if the conditions aren't met.</p>
        pub fn set_false_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.false_activity = input;
            self
        }
        /// <p>The unique identifier for the activity to perform if the conditions are met.</p>
        pub fn true_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.true_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the activity to perform if the conditions are met.</p>
        pub fn set_true_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.true_activity = input;
            self
        }
        /// Consumes the builder and constructs a [`ConditionalSplitActivity`](crate::model::ConditionalSplitActivity).
        pub fn build(self) -> crate::model::ConditionalSplitActivity {
            crate::model::ConditionalSplitActivity {
                condition: self.condition,
                evaluation_wait_time: self.evaluation_wait_time,
                false_activity: self.false_activity,
                true_activity: self.true_activity,
            }
        }
    }
}
impl ConditionalSplitActivity {
    /// Creates a new builder-style object to manufacture [`ConditionalSplitActivity`](crate::model::ConditionalSplitActivity).
    pub fn builder() -> crate::model::conditional_split_activity::Builder {
        crate::model::conditional_split_activity::Builder::default()
    }
}

/// <p>Specifies the conditions to evaluate for an activity in a journey, and how to evaluate those conditions.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Condition {
    /// <p>The conditions to evaluate for the activity.</p>
    #[doc(hidden)]
    pub conditions: std::option::Option<std::vec::Vec<crate::model::SimpleCondition>>,
    /// <p>Specifies how to handle multiple conditions for the activity. For example, if you specify two conditions for an activity, whether both or only one of the conditions must be met for the activity to be performed.</p>
    #[doc(hidden)]
    pub operator: std::option::Option<crate::model::Operator>,
}
impl Condition {
    /// <p>The conditions to evaluate for the activity.</p>
    pub fn conditions(&self) -> std::option::Option<&[crate::model::SimpleCondition]> {
        self.conditions.as_deref()
    }
    /// <p>Specifies how to handle multiple conditions for the activity. For example, if you specify two conditions for an activity, whether both or only one of the conditions must be met for the activity to be performed.</p>
    pub fn operator(&self) -> std::option::Option<&crate::model::Operator> {
        self.operator.as_ref()
    }
}
/// See [`Condition`](crate::model::Condition).
pub mod condition {

    /// A builder for [`Condition`](crate::model::Condition).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) conditions: std::option::Option<std::vec::Vec<crate::model::SimpleCondition>>,
        pub(crate) operator: std::option::Option<crate::model::Operator>,
    }
    impl Builder {
        /// Appends an item to `conditions`.
        ///
        /// To override the contents of this collection use [`set_conditions`](Self::set_conditions).
        ///
        /// <p>The conditions to evaluate for the activity.</p>
        pub fn conditions(mut self, input: crate::model::SimpleCondition) -> Self {
            let mut v = self.conditions.unwrap_or_default();
            v.push(input);
            self.conditions = Some(v);
            self
        }
        /// <p>The conditions to evaluate for the activity.</p>
        pub fn set_conditions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SimpleCondition>>,
        ) -> Self {
            self.conditions = input;
            self
        }
        /// <p>Specifies how to handle multiple conditions for the activity. For example, if you specify two conditions for an activity, whether both or only one of the conditions must be met for the activity to be performed.</p>
        pub fn operator(mut self, input: crate::model::Operator) -> Self {
            self.operator = Some(input);
            self
        }
        /// <p>Specifies how to handle multiple conditions for the activity. For example, if you specify two conditions for an activity, whether both or only one of the conditions must be met for the activity to be performed.</p>
        pub fn set_operator(mut self, input: std::option::Option<crate::model::Operator>) -> Self {
            self.operator = input;
            self
        }
        /// Consumes the builder and constructs a [`Condition`](crate::model::Condition).
        pub fn build(self) -> crate::model::Condition {
            crate::model::Condition {
                conditions: self.conditions,
                operator: self.operator,
            }
        }
    }
}
impl Condition {
    /// Creates a new builder-style object to manufacture [`Condition`](crate::model::Condition).
    pub fn builder() -> crate::model::condition::Builder {
        crate::model::condition::Builder::default()
    }
}

/// When writing a match expression against `Operator`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let operator = unimplemented!();
/// match operator {
///     Operator::All => { /* ... */ },
///     Operator::Any => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `operator` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Operator::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Operator::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Operator::NewFeature` is defined.
/// Specifically, when `operator` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Operator::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Operator {
    #[allow(missing_docs)] // documentation missing in model
    All,
    #[allow(missing_docs)] // documentation missing in model
    Any,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Operator {
    fn from(s: &str) -> Self {
        match s {
            "ALL" => Operator::All,
            "ANY" => Operator::Any,
            other => Operator::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Operator {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Operator::from(s))
    }
}
impl Operator {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Operator::All => "ALL",
            Operator::Any => "ANY",
            Operator::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["ALL", "ANY"]
    }
}
impl AsRef<str> for Operator {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The settings for a custom message activity. This type of activity calls an AWS Lambda function or web hook that sends messages to participants.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CustomMessageActivity {
    /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
    /// <ul>
    /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
    /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub delivery_uri: std::option::Option<std::string::String>,
    /// <p>The types of endpoints to send the custom message to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
    #[doc(hidden)]
    pub endpoint_types: std::option::Option<std::vec::Vec<crate::model::EndpointTypesElement>>,
    /// <p>Specifies the message data included in a custom channel message that's sent to participants in a journey.</p>
    #[doc(hidden)]
    pub message_config: std::option::Option<crate::model::JourneyCustomMessage>,
    /// <p>The unique identifier for the next activity to perform, after Amazon Pinpoint calls the AWS Lambda function or web hook.</p>
    #[doc(hidden)]
    pub next_activity: std::option::Option<std::string::String>,
    /// <p>The name of the custom message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    #[doc(hidden)]
    pub template_version: std::option::Option<std::string::String>,
}
impl CustomMessageActivity {
    /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
    /// <ul>
    /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
    /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
    /// </ul>
    pub fn delivery_uri(&self) -> std::option::Option<&str> {
        self.delivery_uri.as_deref()
    }
    /// <p>The types of endpoints to send the custom message to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
    pub fn endpoint_types(&self) -> std::option::Option<&[crate::model::EndpointTypesElement]> {
        self.endpoint_types.as_deref()
    }
    /// <p>Specifies the message data included in a custom channel message that's sent to participants in a journey.</p>
    pub fn message_config(&self) -> std::option::Option<&crate::model::JourneyCustomMessage> {
        self.message_config.as_ref()
    }
    /// <p>The unique identifier for the next activity to perform, after Amazon Pinpoint calls the AWS Lambda function or web hook.</p>
    pub fn next_activity(&self) -> std::option::Option<&str> {
        self.next_activity.as_deref()
    }
    /// <p>The name of the custom message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    pub fn template_version(&self) -> std::option::Option<&str> {
        self.template_version.as_deref()
    }
}
/// See [`CustomMessageActivity`](crate::model::CustomMessageActivity).
pub mod custom_message_activity {

    /// A builder for [`CustomMessageActivity`](crate::model::CustomMessageActivity).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) delivery_uri: std::option::Option<std::string::String>,
        pub(crate) endpoint_types:
            std::option::Option<std::vec::Vec<crate::model::EndpointTypesElement>>,
        pub(crate) message_config: std::option::Option<crate::model::JourneyCustomMessage>,
        pub(crate) next_activity: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
        /// <ul>
        /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
        /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
        /// </ul>
        pub fn delivery_uri(mut self, input: impl Into<std::string::String>) -> Self {
            self.delivery_uri = Some(input.into());
            self
        }
        /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
        /// <ul>
        /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
        /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
        /// </ul>
        pub fn set_delivery_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.delivery_uri = input;
            self
        }
        /// Appends an item to `endpoint_types`.
        ///
        /// To override the contents of this collection use [`set_endpoint_types`](Self::set_endpoint_types).
        ///
        /// <p>The types of endpoints to send the custom message to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
        pub fn endpoint_types(mut self, input: crate::model::EndpointTypesElement) -> Self {
            let mut v = self.endpoint_types.unwrap_or_default();
            v.push(input);
            self.endpoint_types = Some(v);
            self
        }
        /// <p>The types of endpoints to send the custom message to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
        pub fn set_endpoint_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::EndpointTypesElement>>,
        ) -> Self {
            self.endpoint_types = input;
            self
        }
        /// <p>Specifies the message data included in a custom channel message that's sent to participants in a journey.</p>
        pub fn message_config(mut self, input: crate::model::JourneyCustomMessage) -> Self {
            self.message_config = Some(input);
            self
        }
        /// <p>Specifies the message data included in a custom channel message that's sent to participants in a journey.</p>
        pub fn set_message_config(
            mut self,
            input: std::option::Option<crate::model::JourneyCustomMessage>,
        ) -> Self {
            self.message_config = input;
            self
        }
        /// <p>The unique identifier for the next activity to perform, after Amazon Pinpoint calls the AWS Lambda function or web hook.</p>
        pub fn next_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the next activity to perform, after Amazon Pinpoint calls the AWS Lambda function or web hook.</p>
        pub fn set_next_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.next_activity = input;
            self
        }
        /// <p>The name of the custom message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the custom message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn template_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_version = Some(input.into());
            self
        }
        /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn set_template_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_version = input;
            self
        }
        /// Consumes the builder and constructs a [`CustomMessageActivity`](crate::model::CustomMessageActivity).
        pub fn build(self) -> crate::model::CustomMessageActivity {
            crate::model::CustomMessageActivity {
                delivery_uri: self.delivery_uri,
                endpoint_types: self.endpoint_types,
                message_config: self.message_config,
                next_activity: self.next_activity,
                template_name: self.template_name,
                template_version: self.template_version,
            }
        }
    }
}
impl CustomMessageActivity {
    /// Creates a new builder-style object to manufacture [`CustomMessageActivity`](crate::model::CustomMessageActivity).
    pub fn builder() -> crate::model::custom_message_activity::Builder {
        crate::model::custom_message_activity::Builder::default()
    }
}

/// <p>Specifies the message content for a custom channel message that's sent to participants in a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyCustomMessage {
    /// <p>The message content that's passed to an AWS Lambda function or to a web hook.</p>
    #[doc(hidden)]
    pub data: std::option::Option<std::string::String>,
}
impl JourneyCustomMessage {
    /// <p>The message content that's passed to an AWS Lambda function or to a web hook.</p>
    pub fn data(&self) -> std::option::Option<&str> {
        self.data.as_deref()
    }
}
/// See [`JourneyCustomMessage`](crate::model::JourneyCustomMessage).
pub mod journey_custom_message {

    /// A builder for [`JourneyCustomMessage`](crate::model::JourneyCustomMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) data: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The message content that's passed to an AWS Lambda function or to a web hook.</p>
        pub fn data(mut self, input: impl Into<std::string::String>) -> Self {
            self.data = Some(input.into());
            self
        }
        /// <p>The message content that's passed to an AWS Lambda function or to a web hook.</p>
        pub fn set_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.data = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyCustomMessage`](crate::model::JourneyCustomMessage).
        pub fn build(self) -> crate::model::JourneyCustomMessage {
            crate::model::JourneyCustomMessage { data: self.data }
        }
    }
}
impl JourneyCustomMessage {
    /// Creates a new builder-style object to manufacture [`JourneyCustomMessage`](crate::model::JourneyCustomMessage).
    pub fn builder() -> crate::model::journey_custom_message::Builder {
        crate::model::journey_custom_message::Builder::default()
    }
}

/// When writing a match expression against `EndpointTypesElement`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let endpointtypeselement = unimplemented!();
/// match endpointtypeselement {
///     EndpointTypesElement::Adm => { /* ... */ },
///     EndpointTypesElement::Apns => { /* ... */ },
///     EndpointTypesElement::ApnsSandbox => { /* ... */ },
///     EndpointTypesElement::ApnsVoip => { /* ... */ },
///     EndpointTypesElement::ApnsVoipSandbox => { /* ... */ },
///     EndpointTypesElement::Baidu => { /* ... */ },
///     EndpointTypesElement::Custom => { /* ... */ },
///     EndpointTypesElement::Email => { /* ... */ },
///     EndpointTypesElement::Gcm => { /* ... */ },
///     EndpointTypesElement::InApp => { /* ... */ },
///     EndpointTypesElement::Push => { /* ... */ },
///     EndpointTypesElement::Sms => { /* ... */ },
///     EndpointTypesElement::Voice => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `endpointtypeselement` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `EndpointTypesElement::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `EndpointTypesElement::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `EndpointTypesElement::NewFeature` is defined.
/// Specifically, when `endpointtypeselement` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `EndpointTypesElement::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum EndpointTypesElement {
    #[allow(missing_docs)] // documentation missing in model
    Adm,
    #[allow(missing_docs)] // documentation missing in model
    Apns,
    #[allow(missing_docs)] // documentation missing in model
    ApnsSandbox,
    #[allow(missing_docs)] // documentation missing in model
    ApnsVoip,
    #[allow(missing_docs)] // documentation missing in model
    ApnsVoipSandbox,
    #[allow(missing_docs)] // documentation missing in model
    Baidu,
    #[allow(missing_docs)] // documentation missing in model
    Custom,
    #[allow(missing_docs)] // documentation missing in model
    Email,
    #[allow(missing_docs)] // documentation missing in model
    Gcm,
    #[allow(missing_docs)] // documentation missing in model
    InApp,
    #[allow(missing_docs)] // documentation missing in model
    Push,
    #[allow(missing_docs)] // documentation missing in model
    Sms,
    #[allow(missing_docs)] // documentation missing in model
    Voice,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for EndpointTypesElement {
    fn from(s: &str) -> Self {
        match s {
            "ADM" => EndpointTypesElement::Adm,
            "APNS" => EndpointTypesElement::Apns,
            "APNS_SANDBOX" => EndpointTypesElement::ApnsSandbox,
            "APNS_VOIP" => EndpointTypesElement::ApnsVoip,
            "APNS_VOIP_SANDBOX" => EndpointTypesElement::ApnsVoipSandbox,
            "BAIDU" => EndpointTypesElement::Baidu,
            "CUSTOM" => EndpointTypesElement::Custom,
            "EMAIL" => EndpointTypesElement::Email,
            "GCM" => EndpointTypesElement::Gcm,
            "IN_APP" => EndpointTypesElement::InApp,
            "PUSH" => EndpointTypesElement::Push,
            "SMS" => EndpointTypesElement::Sms,
            "VOICE" => EndpointTypesElement::Voice,
            other => {
                EndpointTypesElement::Unknown(crate::types::UnknownVariantValue(other.to_owned()))
            }
        }
    }
}
impl std::str::FromStr for EndpointTypesElement {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(EndpointTypesElement::from(s))
    }
}
impl EndpointTypesElement {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            EndpointTypesElement::Adm => "ADM",
            EndpointTypesElement::Apns => "APNS",
            EndpointTypesElement::ApnsSandbox => "APNS_SANDBOX",
            EndpointTypesElement::ApnsVoip => "APNS_VOIP",
            EndpointTypesElement::ApnsVoipSandbox => "APNS_VOIP_SANDBOX",
            EndpointTypesElement::Baidu => "BAIDU",
            EndpointTypesElement::Custom => "CUSTOM",
            EndpointTypesElement::Email => "EMAIL",
            EndpointTypesElement::Gcm => "GCM",
            EndpointTypesElement::InApp => "IN_APP",
            EndpointTypesElement::Push => "PUSH",
            EndpointTypesElement::Sms => "SMS",
            EndpointTypesElement::Voice => "VOICE",
            EndpointTypesElement::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "ADM",
            "APNS",
            "APNS_SANDBOX",
            "APNS_VOIP",
            "APNS_VOIP_SANDBOX",
            "BAIDU",
            "CUSTOM",
            "EMAIL",
            "GCM",
            "IN_APP",
            "PUSH",
            "SMS",
            "VOICE",
        ]
    }
}
impl AsRef<str> for EndpointTypesElement {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Changes the status of a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyStateRequest {
    /// <p>The status of the journey. Currently, Supported values are ACTIVE, PAUSED, and CANCELLED</p>
    /// <p>If you cancel a journey, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Amazon Pinpoint also continues to collect and aggregate analytics data for those activities, until they are complete, and any activities that were complete when you cancelled the journey.</p>
    /// <p>After you cancel a journey, you can't add, change, or remove any activities from the journey. In addition, Amazon Pinpoint stops evaluating the journey and doesn't perform any activities that haven't started.</p>
    /// <p>When the journey is paused, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Endpoints will stop entering journeys when the journey is paused and will resume entering the journey after the journey is resumed. For wait activities, wait time is paused when the journey is paused. Currently, PAUSED only supports journeys with a segment refresh interval.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::State>,
}
impl JourneyStateRequest {
    /// <p>The status of the journey. Currently, Supported values are ACTIVE, PAUSED, and CANCELLED</p>
    /// <p>If you cancel a journey, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Amazon Pinpoint also continues to collect and aggregate analytics data for those activities, until they are complete, and any activities that were complete when you cancelled the journey.</p>
    /// <p>After you cancel a journey, you can't add, change, or remove any activities from the journey. In addition, Amazon Pinpoint stops evaluating the journey and doesn't perform any activities that haven't started.</p>
    /// <p>When the journey is paused, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Endpoints will stop entering journeys when the journey is paused and will resume entering the journey after the journey is resumed. For wait activities, wait time is paused when the journey is paused. Currently, PAUSED only supports journeys with a segment refresh interval.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::State> {
        self.state.as_ref()
    }
}
/// See [`JourneyStateRequest`](crate::model::JourneyStateRequest).
pub mod journey_state_request {

    /// A builder for [`JourneyStateRequest`](crate::model::JourneyStateRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) state: std::option::Option<crate::model::State>,
    }
    impl Builder {
        /// <p>The status of the journey. Currently, Supported values are ACTIVE, PAUSED, and CANCELLED</p>
        /// <p>If you cancel a journey, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Amazon Pinpoint also continues to collect and aggregate analytics data for those activities, until they are complete, and any activities that were complete when you cancelled the journey.</p>
        /// <p>After you cancel a journey, you can't add, change, or remove any activities from the journey. In addition, Amazon Pinpoint stops evaluating the journey and doesn't perform any activities that haven't started.</p>
        /// <p>When the journey is paused, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Endpoints will stop entering journeys when the journey is paused and will resume entering the journey after the journey is resumed. For wait activities, wait time is paused when the journey is paused. Currently, PAUSED only supports journeys with a segment refresh interval.</p>
        pub fn state(mut self, input: crate::model::State) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The status of the journey. Currently, Supported values are ACTIVE, PAUSED, and CANCELLED</p>
        /// <p>If you cancel a journey, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Amazon Pinpoint also continues to collect and aggregate analytics data for those activities, until they are complete, and any activities that were complete when you cancelled the journey.</p>
        /// <p>After you cancel a journey, you can't add, change, or remove any activities from the journey. In addition, Amazon Pinpoint stops evaluating the journey and doesn't perform any activities that haven't started.</p>
        /// <p>When the journey is paused, Amazon Pinpoint continues to perform activities that are currently in progress, until those activities are complete. Endpoints will stop entering journeys when the journey is paused and will resume entering the journey after the journey is resumed. For wait activities, wait time is paused when the journey is paused. Currently, PAUSED only supports journeys with a segment refresh interval.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::State>) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyStateRequest`](crate::model::JourneyStateRequest).
        pub fn build(self) -> crate::model::JourneyStateRequest {
            crate::model::JourneyStateRequest { state: self.state }
        }
    }
}
impl JourneyStateRequest {
    /// Creates a new builder-style object to manufacture [`JourneyStateRequest`](crate::model::JourneyStateRequest).
    pub fn builder() -> crate::model::journey_state_request::Builder {
        crate::model::journey_state_request::Builder::default()
    }
}

/// <p>Specifies the configuration and other settings for a journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WriteJourneyRequest {
    /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity. An activity identifier can contain a maximum of 100 characters. The characters must be alphanumeric characters.</p>
    #[doc(hidden)]
    pub activities:
        std::option::Option<std::collections::HashMap<std::string::String, crate::model::Activity>>,
    /// <p>The date, in ISO 8601 format, when the journey was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The messaging and entry limits for the journey.</p>
    #[doc(hidden)]
    pub limits: std::option::Option<crate::model::JourneyLimits>,
    /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. To base the schedule on each participant's local time, set this value to true.</p>
    #[doc(hidden)]
    pub local_time: bool,
    /// <p>The name of the journey. A journey name can contain a maximum of 150 characters. The characters can be alphanumeric characters or symbols, such as underscores (_) or hyphens (-). A journey name can't contain any spaces.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
    /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
    /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
    #[doc(hidden)]
    pub quiet_time: std::option::Option<crate::model::QuietTime>,
    /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
    #[doc(hidden)]
    pub refresh_frequency: std::option::Option<std::string::String>,
    /// <p>The schedule settings for the journey.</p>
    #[doc(hidden)]
    pub schedule: std::option::Option<crate::model::JourneySchedule>,
    /// <p>The unique identifier for the first activity in the journey. The identifier for this activity can contain a maximum of 128 characters. The characters must be alphanumeric characters.</p>
    #[doc(hidden)]
    pub start_activity: std::option::Option<std::string::String>,
    /// <p>The segment that defines which users are participants in the journey.</p>
    #[doc(hidden)]
    pub start_condition: std::option::Option<crate::model::StartCondition>,
    /// <p>The status of the journey. Valid values are:</p>
    /// <ul>
    /// <li><p>DRAFT - Saves the journey and doesn't publish it.</p></li>
    /// <li><p>ACTIVE - Saves and publishes the journey. Depending on the journey's schedule, the journey starts running immediately or at the scheduled start time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
    /// </ul>
    /// <p>PAUSED, CANCELLED, COMPLETED, and CLOSED states are not supported in requests to create or update a journey. To cancel, pause, or resume a journey, use the
    /// <link linkend="apps-application-id-journeys-journey-id-state">Journey State resource.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::State>,
    /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
    #[doc(hidden)]
    pub wait_for_quiet_time: bool,
    /// <p>Specifies whether a journey should be refreshed on segment update.</p>
    #[doc(hidden)]
    pub refresh_on_segment_update: bool,
    /// <p>The channel-specific configurations for the journey.</p>
    #[doc(hidden)]
    pub journey_channel_settings: std::option::Option<crate::model::JourneyChannelSettings>,
    /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
    #[doc(hidden)]
    pub sending_schedule: bool,
    /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    #[doc(hidden)]
    pub open_hours: std::option::Option<crate::model::OpenHours>,
    /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    #[doc(hidden)]
    pub closed_days: std::option::Option<crate::model::ClosedDays>,
}
impl WriteJourneyRequest {
    /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity. An activity identifier can contain a maximum of 100 characters. The characters must be alphanumeric characters.</p>
    pub fn activities(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, crate::model::Activity>>
    {
        self.activities.as_ref()
    }
    /// <p>The date, in ISO 8601 format, when the journey was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The messaging and entry limits for the journey.</p>
    pub fn limits(&self) -> std::option::Option<&crate::model::JourneyLimits> {
        self.limits.as_ref()
    }
    /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. To base the schedule on each participant's local time, set this value to true.</p>
    pub fn local_time(&self) -> bool {
        self.local_time
    }
    /// <p>The name of the journey. A journey name can contain a maximum of 150 characters. The characters can be alphanumeric characters or symbols, such as underscores (_) or hyphens (-). A journey name can't contain any spaces.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
    /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
    /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
    pub fn quiet_time(&self) -> std::option::Option<&crate::model::QuietTime> {
        self.quiet_time.as_ref()
    }
    /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
    pub fn refresh_frequency(&self) -> std::option::Option<&str> {
        self.refresh_frequency.as_deref()
    }
    /// <p>The schedule settings for the journey.</p>
    pub fn schedule(&self) -> std::option::Option<&crate::model::JourneySchedule> {
        self.schedule.as_ref()
    }
    /// <p>The unique identifier for the first activity in the journey. The identifier for this activity can contain a maximum of 128 characters. The characters must be alphanumeric characters.</p>
    pub fn start_activity(&self) -> std::option::Option<&str> {
        self.start_activity.as_deref()
    }
    /// <p>The segment that defines which users are participants in the journey.</p>
    pub fn start_condition(&self) -> std::option::Option<&crate::model::StartCondition> {
        self.start_condition.as_ref()
    }
    /// <p>The status of the journey. Valid values are:</p>
    /// <ul>
    /// <li><p>DRAFT - Saves the journey and doesn't publish it.</p></li>
    /// <li><p>ACTIVE - Saves and publishes the journey. Depending on the journey's schedule, the journey starts running immediately or at the scheduled start time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
    /// </ul>
    /// <p>PAUSED, CANCELLED, COMPLETED, and CLOSED states are not supported in requests to create or update a journey. To cancel, pause, or resume a journey, use the
    /// <link linkend="apps-application-id-journeys-journey-id-state">Journey State resource.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::State> {
        self.state.as_ref()
    }
    /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
    pub fn wait_for_quiet_time(&self) -> bool {
        self.wait_for_quiet_time
    }
    /// <p>Specifies whether a journey should be refreshed on segment update.</p>
    pub fn refresh_on_segment_update(&self) -> bool {
        self.refresh_on_segment_update
    }
    /// <p>The channel-specific configurations for the journey.</p>
    pub fn journey_channel_settings(
        &self,
    ) -> std::option::Option<&crate::model::JourneyChannelSettings> {
        self.journey_channel_settings.as_ref()
    }
    /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
    pub fn sending_schedule(&self) -> bool {
        self.sending_schedule
    }
    /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    pub fn open_hours(&self) -> std::option::Option<&crate::model::OpenHours> {
        self.open_hours.as_ref()
    }
    /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
    pub fn closed_days(&self) -> std::option::Option<&crate::model::ClosedDays> {
        self.closed_days.as_ref()
    }
}
/// See [`WriteJourneyRequest`](crate::model::WriteJourneyRequest).
pub mod write_journey_request {

    /// A builder for [`WriteJourneyRequest`](crate::model::WriteJourneyRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) activities: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::Activity>,
        >,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) limits: std::option::Option<crate::model::JourneyLimits>,
        pub(crate) local_time: std::option::Option<bool>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) quiet_time: std::option::Option<crate::model::QuietTime>,
        pub(crate) refresh_frequency: std::option::Option<std::string::String>,
        pub(crate) schedule: std::option::Option<crate::model::JourneySchedule>,
        pub(crate) start_activity: std::option::Option<std::string::String>,
        pub(crate) start_condition: std::option::Option<crate::model::StartCondition>,
        pub(crate) state: std::option::Option<crate::model::State>,
        pub(crate) wait_for_quiet_time: std::option::Option<bool>,
        pub(crate) refresh_on_segment_update: std::option::Option<bool>,
        pub(crate) journey_channel_settings:
            std::option::Option<crate::model::JourneyChannelSettings>,
        pub(crate) sending_schedule: std::option::Option<bool>,
        pub(crate) open_hours: std::option::Option<crate::model::OpenHours>,
        pub(crate) closed_days: std::option::Option<crate::model::ClosedDays>,
    }
    impl Builder {
        /// Adds a key-value pair to `activities`.
        ///
        /// To override the contents of this collection use [`set_activities`](Self::set_activities).
        ///
        /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity. An activity identifier can contain a maximum of 100 characters. The characters must be alphanumeric characters.</p>
        pub fn activities(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::Activity,
        ) -> Self {
            let mut hash_map = self.activities.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.activities = Some(hash_map);
            self
        }
        /// <p>A map that contains a set of Activity objects, one object for each activity in the journey. For each Activity object, the key is the unique identifier (string) for an activity and the value is the settings for the activity. An activity identifier can contain a maximum of 100 characters. The characters must be alphanumeric characters.</p>
        pub fn set_activities(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::Activity>,
            >,
        ) -> Self {
            self.activities = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the journey was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The messaging and entry limits for the journey.</p>
        pub fn limits(mut self, input: crate::model::JourneyLimits) -> Self {
            self.limits = Some(input);
            self
        }
        /// <p>The messaging and entry limits for the journey.</p>
        pub fn set_limits(
            mut self,
            input: std::option::Option<crate::model::JourneyLimits>,
        ) -> Self {
            self.limits = input;
            self
        }
        /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. To base the schedule on each participant's local time, set this value to true.</p>
        pub fn local_time(mut self, input: bool) -> Self {
            self.local_time = Some(input);
            self
        }
        /// <p>Specifies whether the journey's scheduled start and end times use each participant's local time. To base the schedule on each participant's local time, set this value to true.</p>
        pub fn set_local_time(mut self, input: std::option::Option<bool>) -> Self {
            self.local_time = input;
            self
        }
        /// <p>The name of the journey. A journey name can contain a maximum of 150 characters. The characters can be alphanumeric characters or symbols, such as underscores (_) or hyphens (-). A journey name can't contain any spaces.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the journey. A journey name can contain a maximum of 150 characters. The characters can be alphanumeric characters or symbols, such as underscores (_) or hyphens (-). A journey name can't contain any spaces.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
        /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
        /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
        pub fn quiet_time(mut self, input: crate::model::QuietTime) -> Self {
            self.quiet_time = Some(input);
            self
        }
        /// <p>The quiet time settings for the journey. Quiet time is a specific time range when a journey doesn't send messages to participants, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint for the participant is set to a valid value.</p></li>
        /// <li><p>The current time in the participant's time zone is later than or equal to the time specified by the QuietTime.Start property for the journey.</p></li>
        /// <li><p>The current time in the participant's time zone is earlier than or equal to the time specified by the QuietTime.End property for the journey.</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the participant will receive messages from the journey, even if quiet time is enabled.</p>
        pub fn set_quiet_time(
            mut self,
            input: std::option::Option<crate::model::QuietTime>,
        ) -> Self {
            self.quiet_time = input;
            self
        }
        /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
        pub fn refresh_frequency(mut self, input: impl Into<std::string::String>) -> Self {
            self.refresh_frequency = Some(input.into());
            self
        }
        /// <p>The frequency with which Amazon Pinpoint evaluates segment and event data for the journey, as a duration in ISO 8601 format.</p>
        pub fn set_refresh_frequency(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.refresh_frequency = input;
            self
        }
        /// <p>The schedule settings for the journey.</p>
        pub fn schedule(mut self, input: crate::model::JourneySchedule) -> Self {
            self.schedule = Some(input);
            self
        }
        /// <p>The schedule settings for the journey.</p>
        pub fn set_schedule(
            mut self,
            input: std::option::Option<crate::model::JourneySchedule>,
        ) -> Self {
            self.schedule = input;
            self
        }
        /// <p>The unique identifier for the first activity in the journey. The identifier for this activity can contain a maximum of 128 characters. The characters must be alphanumeric characters.</p>
        pub fn start_activity(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_activity = Some(input.into());
            self
        }
        /// <p>The unique identifier for the first activity in the journey. The identifier for this activity can contain a maximum of 128 characters. The characters must be alphanumeric characters.</p>
        pub fn set_start_activity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.start_activity = input;
            self
        }
        /// <p>The segment that defines which users are participants in the journey.</p>
        pub fn start_condition(mut self, input: crate::model::StartCondition) -> Self {
            self.start_condition = Some(input);
            self
        }
        /// <p>The segment that defines which users are participants in the journey.</p>
        pub fn set_start_condition(
            mut self,
            input: std::option::Option<crate::model::StartCondition>,
        ) -> Self {
            self.start_condition = input;
            self
        }
        /// <p>The status of the journey. Valid values are:</p>
        /// <ul>
        /// <li><p>DRAFT - Saves the journey and doesn't publish it.</p></li>
        /// <li><p>ACTIVE - Saves and publishes the journey. Depending on the journey's schedule, the journey starts running immediately or at the scheduled start time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
        /// </ul>
        /// <p>PAUSED, CANCELLED, COMPLETED, and CLOSED states are not supported in requests to create or update a journey. To cancel, pause, or resume a journey, use the
        /// <link linkend="apps-application-id-journeys-journey-id-state">Journey State resource.</p>
        pub fn state(mut self, input: crate::model::State) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The status of the journey. Valid values are:</p>
        /// <ul>
        /// <li><p>DRAFT - Saves the journey and doesn't publish it.</p></li>
        /// <li><p>ACTIVE - Saves and publishes the journey. Depending on the journey's schedule, the journey starts running immediately or at the scheduled start time. If a journey's status is ACTIVE, you can't add, change, or remove activities from it.</p></li>
        /// </ul>
        /// <p>PAUSED, CANCELLED, COMPLETED, and CLOSED states are not supported in requests to create or update a journey. To cancel, pause, or resume a journey, use the
        /// <link linkend="apps-application-id-journeys-journey-id-state">Journey State resource.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::State>) -> Self {
            self.state = input;
            self
        }
        /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
        pub fn wait_for_quiet_time(mut self, input: bool) -> Self {
            self.wait_for_quiet_time = Some(input);
            self
        }
        /// <p>Specifies whether endpoints in quiet hours should enter a wait till the end of their quiet hours.</p>
        pub fn set_wait_for_quiet_time(mut self, input: std::option::Option<bool>) -> Self {
            self.wait_for_quiet_time = input;
            self
        }
        /// <p>Specifies whether a journey should be refreshed on segment update.</p>
        pub fn refresh_on_segment_update(mut self, input: bool) -> Self {
            self.refresh_on_segment_update = Some(input);
            self
        }
        /// <p>Specifies whether a journey should be refreshed on segment update.</p>
        pub fn set_refresh_on_segment_update(mut self, input: std::option::Option<bool>) -> Self {
            self.refresh_on_segment_update = input;
            self
        }
        /// <p>The channel-specific configurations for the journey.</p>
        pub fn journey_channel_settings(
            mut self,
            input: crate::model::JourneyChannelSettings,
        ) -> Self {
            self.journey_channel_settings = Some(input);
            self
        }
        /// <p>The channel-specific configurations for the journey.</p>
        pub fn set_journey_channel_settings(
            mut self,
            input: std::option::Option<crate::model::JourneyChannelSettings>,
        ) -> Self {
            self.journey_channel_settings = input;
            self
        }
        /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
        pub fn sending_schedule(mut self, input: bool) -> Self {
            self.sending_schedule = Some(input);
            self
        }
        /// <p>Indicates if journey have Advance Quiet Time (OpenHours and ClosedDays). This flag should be set to true in order to allow (OpenHours and ClosedDays)</p>
        pub fn set_sending_schedule(mut self, input: std::option::Option<bool>) -> Self {
            self.sending_schedule = input;
            self
        }
        /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn open_hours(mut self, input: crate::model::OpenHours) -> Self {
            self.open_hours = Some(input);
            self
        }
        /// <p>The time when journey allow to send messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn set_open_hours(
            mut self,
            input: std::option::Option<crate::model::OpenHours>,
        ) -> Self {
            self.open_hours = input;
            self
        }
        /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn closed_days(mut self, input: crate::model::ClosedDays) -> Self {
            self.closed_days = Some(input);
            self
        }
        /// <p>The time when journey will stop sending messages. QuietTime should be configured first and SendingSchedule should be set to true.</p>
        pub fn set_closed_days(
            mut self,
            input: std::option::Option<crate::model::ClosedDays>,
        ) -> Self {
            self.closed_days = input;
            self
        }
        /// Consumes the builder and constructs a [`WriteJourneyRequest`](crate::model::WriteJourneyRequest).
        pub fn build(self) -> crate::model::WriteJourneyRequest {
            crate::model::WriteJourneyRequest {
                activities: self.activities,
                creation_date: self.creation_date,
                last_modified_date: self.last_modified_date,
                limits: self.limits,
                local_time: self.local_time.unwrap_or_default(),
                name: self.name,
                quiet_time: self.quiet_time,
                refresh_frequency: self.refresh_frequency,
                schedule: self.schedule,
                start_activity: self.start_activity,
                start_condition: self.start_condition,
                state: self.state,
                wait_for_quiet_time: self.wait_for_quiet_time.unwrap_or_default(),
                refresh_on_segment_update: self.refresh_on_segment_update.unwrap_or_default(),
                journey_channel_settings: self.journey_channel_settings,
                sending_schedule: self.sending_schedule.unwrap_or_default(),
                open_hours: self.open_hours,
                closed_days: self.closed_days,
            }
        }
    }
}
impl WriteJourneyRequest {
    /// Creates a new builder-style object to manufacture [`WriteJourneyRequest`](crate::model::WriteJourneyRequest).
    pub fn builder() -> crate::model::write_journey_request::Builder {
        crate::model::write_journey_request::Builder::default()
    }
}

/// <p>InApp Template Request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppTemplateRequest {
    /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
    #[doc(hidden)]
    pub content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
    /// <p>Custom config to be sent to client.</p>
    #[doc(hidden)]
    pub custom_config:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The layout of the message.</p>
    #[doc(hidden)]
    pub layout: std::option::Option<crate::model::Layout>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The description of the template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
}
impl InAppTemplateRequest {
    /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
    pub fn content(&self) -> std::option::Option<&[crate::model::InAppMessageContent]> {
        self.content.as_deref()
    }
    /// <p>Custom config to be sent to client.</p>
    pub fn custom_config(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.custom_config.as_ref()
    }
    /// <p>The layout of the message.</p>
    pub fn layout(&self) -> std::option::Option<&crate::model::Layout> {
        self.layout.as_ref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The description of the template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
}
/// See [`InAppTemplateRequest`](crate::model::InAppTemplateRequest).
pub mod in_app_template_request {

    /// A builder for [`InAppTemplateRequest`](crate::model::InAppTemplateRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        pub(crate) custom_config: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) layout: std::option::Option<crate::model::Layout>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `content`.
        ///
        /// To override the contents of this collection use [`set_content`](Self::set_content).
        ///
        /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
        pub fn content(mut self, input: crate::model::InAppMessageContent) -> Self {
            let mut v = self.content.unwrap_or_default();
            v.push(input);
            self.content = Some(v);
            self
        }
        /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
        pub fn set_content(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        ) -> Self {
            self.content = input;
            self
        }
        /// Adds a key-value pair to `custom_config`.
        ///
        /// To override the contents of this collection use [`set_custom_config`](Self::set_custom_config).
        ///
        /// <p>Custom config to be sent to client.</p>
        pub fn custom_config(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.custom_config.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.custom_config = Some(hash_map);
            self
        }
        /// <p>Custom config to be sent to client.</p>
        pub fn set_custom_config(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.custom_config = input;
            self
        }
        /// <p>The layout of the message.</p>
        pub fn layout(mut self, input: crate::model::Layout) -> Self {
            self.layout = Some(input);
            self
        }
        /// <p>The layout of the message.</p>
        pub fn set_layout(mut self, input: std::option::Option<crate::model::Layout>) -> Self {
            self.layout = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The description of the template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The description of the template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppTemplateRequest`](crate::model::InAppTemplateRequest).
        pub fn build(self) -> crate::model::InAppTemplateRequest {
            crate::model::InAppTemplateRequest {
                content: self.content,
                custom_config: self.custom_config,
                layout: self.layout,
                tags: self.tags,
                template_description: self.template_description,
            }
        }
    }
}
impl InAppTemplateRequest {
    /// Creates a new builder-style object to manufacture [`InAppTemplateRequest`](crate::model::InAppTemplateRequest).
    pub fn builder() -> crate::model::in_app_template_request::Builder {
        crate::model::in_app_template_request::Builder::default()
    }
}

/// When writing a match expression against `Layout`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let layout = unimplemented!();
/// match layout {
///     Layout::BottomBanner => { /* ... */ },
///     Layout::Carousel => { /* ... */ },
///     Layout::MiddleBanner => { /* ... */ },
///     Layout::MobileFeed => { /* ... */ },
///     Layout::Overlays => { /* ... */ },
///     Layout::TopBanner => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `layout` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Layout::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Layout::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Layout::NewFeature` is defined.
/// Specifically, when `layout` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Layout::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Layout {
    #[allow(missing_docs)] // documentation missing in model
    BottomBanner,
    #[allow(missing_docs)] // documentation missing in model
    Carousel,
    #[allow(missing_docs)] // documentation missing in model
    MiddleBanner,
    #[allow(missing_docs)] // documentation missing in model
    MobileFeed,
    #[allow(missing_docs)] // documentation missing in model
    Overlays,
    #[allow(missing_docs)] // documentation missing in model
    TopBanner,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Layout {
    fn from(s: &str) -> Self {
        match s {
            "BOTTOM_BANNER" => Layout::BottomBanner,
            "CAROUSEL" => Layout::Carousel,
            "MIDDLE_BANNER" => Layout::MiddleBanner,
            "MOBILE_FEED" => Layout::MobileFeed,
            "OVERLAYS" => Layout::Overlays,
            "TOP_BANNER" => Layout::TopBanner,
            other => Layout::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Layout {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Layout::from(s))
    }
}
impl Layout {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Layout::BottomBanner => "BOTTOM_BANNER",
            Layout::Carousel => "CAROUSEL",
            Layout::MiddleBanner => "MIDDLE_BANNER",
            Layout::MobileFeed => "MOBILE_FEED",
            Layout::Overlays => "OVERLAYS",
            Layout::TopBanner => "TOP_BANNER",
            Layout::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "BOTTOM_BANNER",
            "CAROUSEL",
            "MIDDLE_BANNER",
            "MOBILE_FEED",
            "OVERLAYS",
            "TOP_BANNER",
        ]
    }
}
impl AsRef<str> for Layout {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The configuration for the message content.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppMessageContent {
    /// <p>The background color for the message.</p>
    #[doc(hidden)]
    pub background_color: std::option::Option<std::string::String>,
    /// <p>The configuration for the message body.</p>
    #[doc(hidden)]
    pub body_config: std::option::Option<crate::model::InAppMessageBodyConfig>,
    /// <p>The configuration for the message header.</p>
    #[doc(hidden)]
    pub header_config: std::option::Option<crate::model::InAppMessageHeaderConfig>,
    /// <p>The image url for the background of message.</p>
    #[doc(hidden)]
    pub image_url: std::option::Option<std::string::String>,
    /// <p>The first button inside the message.</p>
    #[doc(hidden)]
    pub primary_btn: std::option::Option<crate::model::InAppMessageButton>,
    /// <p>The second button inside message.</p>
    #[doc(hidden)]
    pub secondary_btn: std::option::Option<crate::model::InAppMessageButton>,
}
impl InAppMessageContent {
    /// <p>The background color for the message.</p>
    pub fn background_color(&self) -> std::option::Option<&str> {
        self.background_color.as_deref()
    }
    /// <p>The configuration for the message body.</p>
    pub fn body_config(&self) -> std::option::Option<&crate::model::InAppMessageBodyConfig> {
        self.body_config.as_ref()
    }
    /// <p>The configuration for the message header.</p>
    pub fn header_config(&self) -> std::option::Option<&crate::model::InAppMessageHeaderConfig> {
        self.header_config.as_ref()
    }
    /// <p>The image url for the background of message.</p>
    pub fn image_url(&self) -> std::option::Option<&str> {
        self.image_url.as_deref()
    }
    /// <p>The first button inside the message.</p>
    pub fn primary_btn(&self) -> std::option::Option<&crate::model::InAppMessageButton> {
        self.primary_btn.as_ref()
    }
    /// <p>The second button inside message.</p>
    pub fn secondary_btn(&self) -> std::option::Option<&crate::model::InAppMessageButton> {
        self.secondary_btn.as_ref()
    }
}
/// See [`InAppMessageContent`](crate::model::InAppMessageContent).
pub mod in_app_message_content {

    /// A builder for [`InAppMessageContent`](crate::model::InAppMessageContent).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) background_color: std::option::Option<std::string::String>,
        pub(crate) body_config: std::option::Option<crate::model::InAppMessageBodyConfig>,
        pub(crate) header_config: std::option::Option<crate::model::InAppMessageHeaderConfig>,
        pub(crate) image_url: std::option::Option<std::string::String>,
        pub(crate) primary_btn: std::option::Option<crate::model::InAppMessageButton>,
        pub(crate) secondary_btn: std::option::Option<crate::model::InAppMessageButton>,
    }
    impl Builder {
        /// <p>The background color for the message.</p>
        pub fn background_color(mut self, input: impl Into<std::string::String>) -> Self {
            self.background_color = Some(input.into());
            self
        }
        /// <p>The background color for the message.</p>
        pub fn set_background_color(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.background_color = input;
            self
        }
        /// <p>The configuration for the message body.</p>
        pub fn body_config(mut self, input: crate::model::InAppMessageBodyConfig) -> Self {
            self.body_config = Some(input);
            self
        }
        /// <p>The configuration for the message body.</p>
        pub fn set_body_config(
            mut self,
            input: std::option::Option<crate::model::InAppMessageBodyConfig>,
        ) -> Self {
            self.body_config = input;
            self
        }
        /// <p>The configuration for the message header.</p>
        pub fn header_config(mut self, input: crate::model::InAppMessageHeaderConfig) -> Self {
            self.header_config = Some(input);
            self
        }
        /// <p>The configuration for the message header.</p>
        pub fn set_header_config(
            mut self,
            input: std::option::Option<crate::model::InAppMessageHeaderConfig>,
        ) -> Self {
            self.header_config = input;
            self
        }
        /// <p>The image url for the background of message.</p>
        pub fn image_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_url = Some(input.into());
            self
        }
        /// <p>The image url for the background of message.</p>
        pub fn set_image_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_url = input;
            self
        }
        /// <p>The first button inside the message.</p>
        pub fn primary_btn(mut self, input: crate::model::InAppMessageButton) -> Self {
            self.primary_btn = Some(input);
            self
        }
        /// <p>The first button inside the message.</p>
        pub fn set_primary_btn(
            mut self,
            input: std::option::Option<crate::model::InAppMessageButton>,
        ) -> Self {
            self.primary_btn = input;
            self
        }
        /// <p>The second button inside message.</p>
        pub fn secondary_btn(mut self, input: crate::model::InAppMessageButton) -> Self {
            self.secondary_btn = Some(input);
            self
        }
        /// <p>The second button inside message.</p>
        pub fn set_secondary_btn(
            mut self,
            input: std::option::Option<crate::model::InAppMessageButton>,
        ) -> Self {
            self.secondary_btn = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppMessageContent`](crate::model::InAppMessageContent).
        pub fn build(self) -> crate::model::InAppMessageContent {
            crate::model::InAppMessageContent {
                background_color: self.background_color,
                body_config: self.body_config,
                header_config: self.header_config,
                image_url: self.image_url,
                primary_btn: self.primary_btn,
                secondary_btn: self.secondary_btn,
            }
        }
    }
}
impl InAppMessageContent {
    /// Creates a new builder-style object to manufacture [`InAppMessageContent`](crate::model::InAppMessageContent).
    pub fn builder() -> crate::model::in_app_message_content::Builder {
        crate::model::in_app_message_content::Builder::default()
    }
}

/// <p>Button Config for an in-app message.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppMessageButton {
    /// <p>Default button content.</p>
    #[doc(hidden)]
    pub android: std::option::Option<crate::model::OverrideButtonConfiguration>,
    /// <p>Default button content.</p>
    #[doc(hidden)]
    pub default_config: std::option::Option<crate::model::DefaultButtonConfiguration>,
    /// <p>Default button content.</p>
    #[doc(hidden)]
    pub ios: std::option::Option<crate::model::OverrideButtonConfiguration>,
    /// <p>Default button content.</p>
    #[doc(hidden)]
    pub web: std::option::Option<crate::model::OverrideButtonConfiguration>,
}
impl InAppMessageButton {
    /// <p>Default button content.</p>
    pub fn android(&self) -> std::option::Option<&crate::model::OverrideButtonConfiguration> {
        self.android.as_ref()
    }
    /// <p>Default button content.</p>
    pub fn default_config(&self) -> std::option::Option<&crate::model::DefaultButtonConfiguration> {
        self.default_config.as_ref()
    }
    /// <p>Default button content.</p>
    pub fn ios(&self) -> std::option::Option<&crate::model::OverrideButtonConfiguration> {
        self.ios.as_ref()
    }
    /// <p>Default button content.</p>
    pub fn web(&self) -> std::option::Option<&crate::model::OverrideButtonConfiguration> {
        self.web.as_ref()
    }
}
/// See [`InAppMessageButton`](crate::model::InAppMessageButton).
pub mod in_app_message_button {

    /// A builder for [`InAppMessageButton`](crate::model::InAppMessageButton).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) android: std::option::Option<crate::model::OverrideButtonConfiguration>,
        pub(crate) default_config: std::option::Option<crate::model::DefaultButtonConfiguration>,
        pub(crate) ios: std::option::Option<crate::model::OverrideButtonConfiguration>,
        pub(crate) web: std::option::Option<crate::model::OverrideButtonConfiguration>,
    }
    impl Builder {
        /// <p>Default button content.</p>
        pub fn android(mut self, input: crate::model::OverrideButtonConfiguration) -> Self {
            self.android = Some(input);
            self
        }
        /// <p>Default button content.</p>
        pub fn set_android(
            mut self,
            input: std::option::Option<crate::model::OverrideButtonConfiguration>,
        ) -> Self {
            self.android = input;
            self
        }
        /// <p>Default button content.</p>
        pub fn default_config(mut self, input: crate::model::DefaultButtonConfiguration) -> Self {
            self.default_config = Some(input);
            self
        }
        /// <p>Default button content.</p>
        pub fn set_default_config(
            mut self,
            input: std::option::Option<crate::model::DefaultButtonConfiguration>,
        ) -> Self {
            self.default_config = input;
            self
        }
        /// <p>Default button content.</p>
        pub fn ios(mut self, input: crate::model::OverrideButtonConfiguration) -> Self {
            self.ios = Some(input);
            self
        }
        /// <p>Default button content.</p>
        pub fn set_ios(
            mut self,
            input: std::option::Option<crate::model::OverrideButtonConfiguration>,
        ) -> Self {
            self.ios = input;
            self
        }
        /// <p>Default button content.</p>
        pub fn web(mut self, input: crate::model::OverrideButtonConfiguration) -> Self {
            self.web = Some(input);
            self
        }
        /// <p>Default button content.</p>
        pub fn set_web(
            mut self,
            input: std::option::Option<crate::model::OverrideButtonConfiguration>,
        ) -> Self {
            self.web = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppMessageButton`](crate::model::InAppMessageButton).
        pub fn build(self) -> crate::model::InAppMessageButton {
            crate::model::InAppMessageButton {
                android: self.android,
                default_config: self.default_config,
                ios: self.ios,
                web: self.web,
            }
        }
    }
}
impl InAppMessageButton {
    /// Creates a new builder-style object to manufacture [`InAppMessageButton`](crate::model::InAppMessageButton).
    pub fn builder() -> crate::model::in_app_message_button::Builder {
        crate::model::in_app_message_button::Builder::default()
    }
}

/// <p>Override button configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OverrideButtonConfiguration {
    /// <p>Action triggered by the button.</p>
    #[doc(hidden)]
    pub button_action: std::option::Option<crate::model::ButtonAction>,
    /// <p>Button destination.</p>
    #[doc(hidden)]
    pub link: std::option::Option<std::string::String>,
}
impl OverrideButtonConfiguration {
    /// <p>Action triggered by the button.</p>
    pub fn button_action(&self) -> std::option::Option<&crate::model::ButtonAction> {
        self.button_action.as_ref()
    }
    /// <p>Button destination.</p>
    pub fn link(&self) -> std::option::Option<&str> {
        self.link.as_deref()
    }
}
/// See [`OverrideButtonConfiguration`](crate::model::OverrideButtonConfiguration).
pub mod override_button_configuration {

    /// A builder for [`OverrideButtonConfiguration`](crate::model::OverrideButtonConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) button_action: std::option::Option<crate::model::ButtonAction>,
        pub(crate) link: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Action triggered by the button.</p>
        pub fn button_action(mut self, input: crate::model::ButtonAction) -> Self {
            self.button_action = Some(input);
            self
        }
        /// <p>Action triggered by the button.</p>
        pub fn set_button_action(
            mut self,
            input: std::option::Option<crate::model::ButtonAction>,
        ) -> Self {
            self.button_action = input;
            self
        }
        /// <p>Button destination.</p>
        pub fn link(mut self, input: impl Into<std::string::String>) -> Self {
            self.link = Some(input.into());
            self
        }
        /// <p>Button destination.</p>
        pub fn set_link(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.link = input;
            self
        }
        /// Consumes the builder and constructs a [`OverrideButtonConfiguration`](crate::model::OverrideButtonConfiguration).
        pub fn build(self) -> crate::model::OverrideButtonConfiguration {
            crate::model::OverrideButtonConfiguration {
                button_action: self.button_action,
                link: self.link,
            }
        }
    }
}
impl OverrideButtonConfiguration {
    /// Creates a new builder-style object to manufacture [`OverrideButtonConfiguration`](crate::model::OverrideButtonConfiguration).
    pub fn builder() -> crate::model::override_button_configuration::Builder {
        crate::model::override_button_configuration::Builder::default()
    }
}

/// When writing a match expression against `ButtonAction`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let buttonaction = unimplemented!();
/// match buttonaction {
///     ButtonAction::Close => { /* ... */ },
///     ButtonAction::DeepLink => { /* ... */ },
///     ButtonAction::Link => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `buttonaction` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ButtonAction::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ButtonAction::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ButtonAction::NewFeature` is defined.
/// Specifically, when `buttonaction` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ButtonAction::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ButtonAction {
    #[allow(missing_docs)] // documentation missing in model
    Close,
    #[allow(missing_docs)] // documentation missing in model
    DeepLink,
    #[allow(missing_docs)] // documentation missing in model
    Link,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ButtonAction {
    fn from(s: &str) -> Self {
        match s {
            "CLOSE" => ButtonAction::Close,
            "DEEP_LINK" => ButtonAction::DeepLink,
            "LINK" => ButtonAction::Link,
            other => ButtonAction::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ButtonAction {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ButtonAction::from(s))
    }
}
impl ButtonAction {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ButtonAction::Close => "CLOSE",
            ButtonAction::DeepLink => "DEEP_LINK",
            ButtonAction::Link => "LINK",
            ButtonAction::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["CLOSE", "DEEP_LINK", "LINK"]
    }
}
impl AsRef<str> for ButtonAction {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Default button configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DefaultButtonConfiguration {
    /// <p>The background color of the button.</p>
    #[doc(hidden)]
    pub background_color: std::option::Option<std::string::String>,
    /// <p>The border radius of the button.</p>
    #[doc(hidden)]
    pub border_radius: i32,
    /// <p>Action triggered by the button.</p>
    #[doc(hidden)]
    pub button_action: std::option::Option<crate::model::ButtonAction>,
    /// <p>Button destination.</p>
    #[doc(hidden)]
    pub link: std::option::Option<std::string::String>,
    /// <p>Button text.</p>
    #[doc(hidden)]
    pub text: std::option::Option<std::string::String>,
    /// <p>The text color of the button.</p>
    #[doc(hidden)]
    pub text_color: std::option::Option<std::string::String>,
}
impl DefaultButtonConfiguration {
    /// <p>The background color of the button.</p>
    pub fn background_color(&self) -> std::option::Option<&str> {
        self.background_color.as_deref()
    }
    /// <p>The border radius of the button.</p>
    pub fn border_radius(&self) -> i32 {
        self.border_radius
    }
    /// <p>Action triggered by the button.</p>
    pub fn button_action(&self) -> std::option::Option<&crate::model::ButtonAction> {
        self.button_action.as_ref()
    }
    /// <p>Button destination.</p>
    pub fn link(&self) -> std::option::Option<&str> {
        self.link.as_deref()
    }
    /// <p>Button text.</p>
    pub fn text(&self) -> std::option::Option<&str> {
        self.text.as_deref()
    }
    /// <p>The text color of the button.</p>
    pub fn text_color(&self) -> std::option::Option<&str> {
        self.text_color.as_deref()
    }
}
/// See [`DefaultButtonConfiguration`](crate::model::DefaultButtonConfiguration).
pub mod default_button_configuration {

    /// A builder for [`DefaultButtonConfiguration`](crate::model::DefaultButtonConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) background_color: std::option::Option<std::string::String>,
        pub(crate) border_radius: std::option::Option<i32>,
        pub(crate) button_action: std::option::Option<crate::model::ButtonAction>,
        pub(crate) link: std::option::Option<std::string::String>,
        pub(crate) text: std::option::Option<std::string::String>,
        pub(crate) text_color: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The background color of the button.</p>
        pub fn background_color(mut self, input: impl Into<std::string::String>) -> Self {
            self.background_color = Some(input.into());
            self
        }
        /// <p>The background color of the button.</p>
        pub fn set_background_color(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.background_color = input;
            self
        }
        /// <p>The border radius of the button.</p>
        pub fn border_radius(mut self, input: i32) -> Self {
            self.border_radius = Some(input);
            self
        }
        /// <p>The border radius of the button.</p>
        pub fn set_border_radius(mut self, input: std::option::Option<i32>) -> Self {
            self.border_radius = input;
            self
        }
        /// <p>Action triggered by the button.</p>
        pub fn button_action(mut self, input: crate::model::ButtonAction) -> Self {
            self.button_action = Some(input);
            self
        }
        /// <p>Action triggered by the button.</p>
        pub fn set_button_action(
            mut self,
            input: std::option::Option<crate::model::ButtonAction>,
        ) -> Self {
            self.button_action = input;
            self
        }
        /// <p>Button destination.</p>
        pub fn link(mut self, input: impl Into<std::string::String>) -> Self {
            self.link = Some(input.into());
            self
        }
        /// <p>Button destination.</p>
        pub fn set_link(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.link = input;
            self
        }
        /// <p>Button text.</p>
        pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
            self.text = Some(input.into());
            self
        }
        /// <p>Button text.</p>
        pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.text = input;
            self
        }
        /// <p>The text color of the button.</p>
        pub fn text_color(mut self, input: impl Into<std::string::String>) -> Self {
            self.text_color = Some(input.into());
            self
        }
        /// <p>The text color of the button.</p>
        pub fn set_text_color(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.text_color = input;
            self
        }
        /// Consumes the builder and constructs a [`DefaultButtonConfiguration`](crate::model::DefaultButtonConfiguration).
        pub fn build(self) -> crate::model::DefaultButtonConfiguration {
            crate::model::DefaultButtonConfiguration {
                background_color: self.background_color,
                border_radius: self.border_radius.unwrap_or_default(),
                button_action: self.button_action,
                link: self.link,
                text: self.text,
                text_color: self.text_color,
            }
        }
    }
}
impl DefaultButtonConfiguration {
    /// Creates a new builder-style object to manufacture [`DefaultButtonConfiguration`](crate::model::DefaultButtonConfiguration).
    pub fn builder() -> crate::model::default_button_configuration::Builder {
        crate::model::default_button_configuration::Builder::default()
    }
}

/// <p>Text config for Message Header.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppMessageHeaderConfig {
    /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
    #[doc(hidden)]
    pub alignment: std::option::Option<crate::model::Alignment>,
    /// <p>Message Header.</p>
    #[doc(hidden)]
    pub header: std::option::Option<std::string::String>,
    /// <p>The text color.</p>
    #[doc(hidden)]
    pub text_color: std::option::Option<std::string::String>,
}
impl InAppMessageHeaderConfig {
    /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
    pub fn alignment(&self) -> std::option::Option<&crate::model::Alignment> {
        self.alignment.as_ref()
    }
    /// <p>Message Header.</p>
    pub fn header(&self) -> std::option::Option<&str> {
        self.header.as_deref()
    }
    /// <p>The text color.</p>
    pub fn text_color(&self) -> std::option::Option<&str> {
        self.text_color.as_deref()
    }
}
/// See [`InAppMessageHeaderConfig`](crate::model::InAppMessageHeaderConfig).
pub mod in_app_message_header_config {

    /// A builder for [`InAppMessageHeaderConfig`](crate::model::InAppMessageHeaderConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) alignment: std::option::Option<crate::model::Alignment>,
        pub(crate) header: std::option::Option<std::string::String>,
        pub(crate) text_color: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
        pub fn alignment(mut self, input: crate::model::Alignment) -> Self {
            self.alignment = Some(input);
            self
        }
        /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
        pub fn set_alignment(
            mut self,
            input: std::option::Option<crate::model::Alignment>,
        ) -> Self {
            self.alignment = input;
            self
        }
        /// <p>Message Header.</p>
        pub fn header(mut self, input: impl Into<std::string::String>) -> Self {
            self.header = Some(input.into());
            self
        }
        /// <p>Message Header.</p>
        pub fn set_header(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.header = input;
            self
        }
        /// <p>The text color.</p>
        pub fn text_color(mut self, input: impl Into<std::string::String>) -> Self {
            self.text_color = Some(input.into());
            self
        }
        /// <p>The text color.</p>
        pub fn set_text_color(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.text_color = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppMessageHeaderConfig`](crate::model::InAppMessageHeaderConfig).
        pub fn build(self) -> crate::model::InAppMessageHeaderConfig {
            crate::model::InAppMessageHeaderConfig {
                alignment: self.alignment,
                header: self.header,
                text_color: self.text_color,
            }
        }
    }
}
impl InAppMessageHeaderConfig {
    /// Creates a new builder-style object to manufacture [`InAppMessageHeaderConfig`](crate::model::InAppMessageHeaderConfig).
    pub fn builder() -> crate::model::in_app_message_header_config::Builder {
        crate::model::in_app_message_header_config::Builder::default()
    }
}

/// When writing a match expression against `Alignment`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let alignment = unimplemented!();
/// match alignment {
///     Alignment::Center => { /* ... */ },
///     Alignment::Left => { /* ... */ },
///     Alignment::Right => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `alignment` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Alignment::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Alignment::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Alignment::NewFeature` is defined.
/// Specifically, when `alignment` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Alignment::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Alignment {
    #[allow(missing_docs)] // documentation missing in model
    Center,
    #[allow(missing_docs)] // documentation missing in model
    Left,
    #[allow(missing_docs)] // documentation missing in model
    Right,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Alignment {
    fn from(s: &str) -> Self {
        match s {
            "CENTER" => Alignment::Center,
            "LEFT" => Alignment::Left,
            "RIGHT" => Alignment::Right,
            other => Alignment::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Alignment {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Alignment::from(s))
    }
}
impl Alignment {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Alignment::Center => "CENTER",
            Alignment::Left => "LEFT",
            Alignment::Right => "RIGHT",
            Alignment::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["CENTER", "LEFT", "RIGHT"]
    }
}
impl AsRef<str> for Alignment {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Text config for Message Body.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppMessageBodyConfig {
    /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
    #[doc(hidden)]
    pub alignment: std::option::Option<crate::model::Alignment>,
    /// <p>Message Body.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The text color.</p>
    #[doc(hidden)]
    pub text_color: std::option::Option<std::string::String>,
}
impl InAppMessageBodyConfig {
    /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
    pub fn alignment(&self) -> std::option::Option<&crate::model::Alignment> {
        self.alignment.as_ref()
    }
    /// <p>Message Body.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The text color.</p>
    pub fn text_color(&self) -> std::option::Option<&str> {
        self.text_color.as_deref()
    }
}
/// See [`InAppMessageBodyConfig`](crate::model::InAppMessageBodyConfig).
pub mod in_app_message_body_config {

    /// A builder for [`InAppMessageBodyConfig`](crate::model::InAppMessageBodyConfig).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) alignment: std::option::Option<crate::model::Alignment>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) text_color: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
        pub fn alignment(mut self, input: crate::model::Alignment) -> Self {
            self.alignment = Some(input);
            self
        }
        /// <p>The alignment of the text. Valid values: LEFT, CENTER, RIGHT.</p>
        pub fn set_alignment(
            mut self,
            input: std::option::Option<crate::model::Alignment>,
        ) -> Self {
            self.alignment = input;
            self
        }
        /// <p>Message Body.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>Message Body.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The text color.</p>
        pub fn text_color(mut self, input: impl Into<std::string::String>) -> Self {
            self.text_color = Some(input.into());
            self
        }
        /// <p>The text color.</p>
        pub fn set_text_color(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.text_color = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppMessageBodyConfig`](crate::model::InAppMessageBodyConfig).
        pub fn build(self) -> crate::model::InAppMessageBodyConfig {
            crate::model::InAppMessageBodyConfig {
                alignment: self.alignment,
                body: self.body,
                text_color: self.text_color,
            }
        }
    }
}
impl InAppMessageBodyConfig {
    /// Creates a new builder-style object to manufacture [`InAppMessageBodyConfig`](crate::model::InAppMessageBodyConfig).
    pub fn builder() -> crate::model::in_app_message_body_config::Builder {
        crate::model::in_app_message_body_config::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the GCM channel for an application. The GCM channel enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GcmChannelResponse {
    /// <p>The unique identifier for the application that the GCM channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the GCM channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
    #[doc(hidden)]
    pub credential: std::option::Option<std::string::String>,
    /// <p>Specifies whether the GCM channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>(Deprecated) An identifier for the GCM channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the GCM channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the GCM channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time when the GCM channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the GCM channel, this value is GCM.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the GCM channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl GcmChannelResponse {
    /// <p>The unique identifier for the application that the GCM channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time when the GCM channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
    pub fn credential(&self) -> std::option::Option<&str> {
        self.credential.as_deref()
    }
    /// <p>Specifies whether the GCM channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>(Deprecated) An identifier for the GCM channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the GCM channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the GCM channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time when the GCM channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the GCM channel, this value is GCM.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the GCM channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`GcmChannelResponse`](crate::model::GcmChannelResponse).
pub mod gcm_channel_response {

    /// A builder for [`GcmChannelResponse`](crate::model::GcmChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) credential: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the GCM channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the GCM channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time when the GCM channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the GCM channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
        pub fn credential(mut self, input: impl Into<std::string::String>) -> Self {
            self.credential = Some(input.into());
            self
        }
        /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
        pub fn set_credential(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.credential = input;
            self
        }
        /// <p>Specifies whether the GCM channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the GCM channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>(Deprecated) An identifier for the GCM channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the GCM channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the GCM channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the GCM channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the GCM channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the GCM channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time when the GCM channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the GCM channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the GCM channel, this value is GCM.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the GCM channel, this value is GCM.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the GCM channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the GCM channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`GcmChannelResponse`](crate::model::GcmChannelResponse).
        pub fn build(self) -> crate::model::GcmChannelResponse {
            crate::model::GcmChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                credential: self.credential,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl GcmChannelResponse {
    /// Creates a new builder-style object to manufacture [`GcmChannelResponse`](crate::model::GcmChannelResponse).
    pub fn builder() -> crate::model::gcm_channel_response::Builder {
        crate::model::gcm_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the GCM channel for an application. This channel enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GcmChannelRequest {
    /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
    #[doc(hidden)]
    pub api_key: std::option::Option<std::string::String>,
    /// <p>Specifies whether to enable the GCM channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
}
impl GcmChannelRequest {
    /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
    pub fn api_key(&self) -> std::option::Option<&str> {
        self.api_key.as_deref()
    }
    /// <p>Specifies whether to enable the GCM channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
}
/// See [`GcmChannelRequest`](crate::model::GcmChannelRequest).
pub mod gcm_channel_request {

    /// A builder for [`GcmChannelRequest`](crate::model::GcmChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) api_key: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
        pub fn api_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.api_key = Some(input.into());
            self
        }
        /// <p>The Web API Key, also referred to as an <i>API_KEY</i> or <i>server key</i>, that you received from Google to communicate with Google services.</p>
        pub fn set_api_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.api_key = input;
            self
        }
        /// <p>Specifies whether to enable the GCM channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the GCM channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`GcmChannelRequest`](crate::model::GcmChannelRequest).
        pub fn build(self) -> crate::model::GcmChannelRequest {
            crate::model::GcmChannelRequest {
                api_key: self.api_key,
                enabled: self.enabled.unwrap_or_default(),
            }
        }
    }
}
impl GcmChannelRequest {
    /// Creates a new builder-style object to manufacture [`GcmChannelRequest`](crate::model::GcmChannelRequest).
    pub fn builder() -> crate::model::gcm_channel_request::Builder {
        crate::model::gcm_channel_request::Builder::default()
    }
}

/// <p>Specifies a batch of endpoints to create or update and the settings and attributes to set or change for each endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointBatchRequest {
    /// <p>An array that defines the endpoints to create or update and, for each endpoint, the property values to set or change. An array can contain a maximum of 100 items.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::EndpointBatchItem>>,
}
impl EndpointBatchRequest {
    /// <p>An array that defines the endpoints to create or update and, for each endpoint, the property values to set or change. An array can contain a maximum of 100 items.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::EndpointBatchItem]> {
        self.item.as_deref()
    }
}
/// See [`EndpointBatchRequest`](crate::model::EndpointBatchRequest).
pub mod endpoint_batch_request {

    /// A builder for [`EndpointBatchRequest`](crate::model::EndpointBatchRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::EndpointBatchItem>>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array that defines the endpoints to create or update and, for each endpoint, the property values to set or change. An array can contain a maximum of 100 items.</p>
        pub fn item(mut self, input: crate::model::EndpointBatchItem) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array that defines the endpoints to create or update and, for each endpoint, the property values to set or change. An array can contain a maximum of 100 items.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::EndpointBatchItem>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointBatchRequest`](crate::model::EndpointBatchRequest).
        pub fn build(self) -> crate::model::EndpointBatchRequest {
            crate::model::EndpointBatchRequest { item: self.item }
        }
    }
}
impl EndpointBatchRequest {
    /// Creates a new builder-style object to manufacture [`EndpointBatchRequest`](crate::model::EndpointBatchRequest).
    pub fn builder() -> crate::model::endpoint_batch_request::Builder {
        crate::model::endpoint_batch_request::Builder::default()
    }
}

/// <p>Specifies an endpoint to create or update and the settings and attributes to set or change for the endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointBatchItem {
    /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
    #[doc(hidden)]
    pub address: std::option::Option<std::string::String>,
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
    /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
    #[doc(hidden)]
    pub attributes: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
    #[doc(hidden)]
    pub channel_type: std::option::Option<crate::model::ChannelType>,
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    #[doc(hidden)]
    pub demographic: std::option::Option<crate::model::EndpointDemographic>,
    /// <p>The date and time, in ISO 8601 format, when the endpoint was created or updated.</p>
    #[doc(hidden)]
    pub effective_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    #[doc(hidden)]
    pub endpoint_status: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the endpoint in the context of the batch.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The geographic information for the endpoint.</p>
    #[doc(hidden)]
    pub location: std::option::Option<crate::model::EndpointLocation>,
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    #[doc(hidden)]
    pub metrics: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    #[doc(hidden)]
    pub opt_out: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the request to create or update the endpoint.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
    #[doc(hidden)]
    pub user: std::option::Option<crate::model::EndpointUser>,
}
impl EndpointBatchItem {
    /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
    pub fn address(&self) -> std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
    /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.attributes.as_ref()
    }
    /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
    pub fn channel_type(&self) -> std::option::Option<&crate::model::ChannelType> {
        self.channel_type.as_ref()
    }
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    pub fn demographic(&self) -> std::option::Option<&crate::model::EndpointDemographic> {
        self.demographic.as_ref()
    }
    /// <p>The date and time, in ISO 8601 format, when the endpoint was created or updated.</p>
    pub fn effective_date(&self) -> std::option::Option<&str> {
        self.effective_date.as_deref()
    }
    /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    pub fn endpoint_status(&self) -> std::option::Option<&str> {
        self.endpoint_status.as_deref()
    }
    /// <p>The unique identifier for the endpoint in the context of the batch.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The geographic information for the endpoint.</p>
    pub fn location(&self) -> std::option::Option<&crate::model::EndpointLocation> {
        self.location.as_ref()
    }
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, f64>> {
        self.metrics.as_ref()
    }
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    pub fn opt_out(&self) -> std::option::Option<&str> {
        self.opt_out.as_deref()
    }
    /// <p>The unique identifier for the request to create or update the endpoint.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
    pub fn user(&self) -> std::option::Option<&crate::model::EndpointUser> {
        self.user.as_ref()
    }
}
/// See [`EndpointBatchItem`](crate::model::EndpointBatchItem).
pub mod endpoint_batch_item {

    /// A builder for [`EndpointBatchItem`](crate::model::EndpointBatchItem).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) address: std::option::Option<std::string::String>,
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) channel_type: std::option::Option<crate::model::ChannelType>,
        pub(crate) demographic: std::option::Option<crate::model::EndpointDemographic>,
        pub(crate) effective_date: std::option::Option<std::string::String>,
        pub(crate) endpoint_status: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) location: std::option::Option<crate::model::EndpointLocation>,
        pub(crate) metrics:
            std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        pub(crate) opt_out: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
        pub(crate) user: std::option::Option<crate::model::EndpointUser>,
    }
    impl Builder {
        /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
        pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
            self.address = Some(input.into());
            self
        }
        /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
        pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.address = input;
            self
        }
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
        /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
        /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
        pub fn channel_type(mut self, input: crate::model::ChannelType) -> Self {
            self.channel_type = Some(input);
            self
        }
        /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
        pub fn set_channel_type(
            mut self,
            input: std::option::Option<crate::model::ChannelType>,
        ) -> Self {
            self.channel_type = input;
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn demographic(mut self, input: crate::model::EndpointDemographic) -> Self {
            self.demographic = Some(input);
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn set_demographic(
            mut self,
            input: std::option::Option<crate::model::EndpointDemographic>,
        ) -> Self {
            self.demographic = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was created or updated.</p>
        pub fn effective_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.effective_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was created or updated.</p>
        pub fn set_effective_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.effective_date = input;
            self
        }
        /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn endpoint_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.endpoint_status = Some(input.into());
            self
        }
        /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn set_endpoint_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.endpoint_status = input;
            self
        }
        /// <p>The unique identifier for the endpoint in the context of the batch.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the endpoint in the context of the batch.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn location(mut self, input: crate::model::EndpointLocation) -> Self {
            self.location = Some(input);
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn set_location(
            mut self,
            input: std::option::Option<crate::model::EndpointLocation>,
        ) -> Self {
            self.location = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn metrics(mut self, k: impl Into<std::string::String>, v: f64) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.metrics = Some(hash_map);
            self
        }
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn opt_out(mut self, input: impl Into<std::string::String>) -> Self {
            self.opt_out = Some(input.into());
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn set_opt_out(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.opt_out = input;
            self
        }
        /// <p>The unique identifier for the request to create or update the endpoint.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the request to create or update the endpoint.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
        pub fn user(mut self, input: crate::model::EndpointUser) -> Self {
            self.user = Some(input);
            self
        }
        /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
        pub fn set_user(mut self, input: std::option::Option<crate::model::EndpointUser>) -> Self {
            self.user = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointBatchItem`](crate::model::EndpointBatchItem).
        pub fn build(self) -> crate::model::EndpointBatchItem {
            crate::model::EndpointBatchItem {
                address: self.address,
                attributes: self.attributes,
                channel_type: self.channel_type,
                demographic: self.demographic,
                effective_date: self.effective_date,
                endpoint_status: self.endpoint_status,
                id: self.id,
                location: self.location,
                metrics: self.metrics,
                opt_out: self.opt_out,
                request_id: self.request_id,
                user: self.user,
            }
        }
    }
}
impl EndpointBatchItem {
    /// Creates a new builder-style object to manufacture [`EndpointBatchItem`](crate::model::EndpointBatchItem).
    pub fn builder() -> crate::model::endpoint_batch_item::Builder {
        crate::model::endpoint_batch_item::Builder::default()
    }
}

/// <p>Specifies data for one or more attributes that describe the user who's associated with an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointUser {
    /// <p>One or more custom attributes that describe the user by associating a name with an array of values. For example, the value of an attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
    /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
    #[doc(hidden)]
    pub user_attributes: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The unique identifier for the user.</p>
    #[doc(hidden)]
    pub user_id: std::option::Option<std::string::String>,
}
impl EndpointUser {
    /// <p>One or more custom attributes that describe the user by associating a name with an array of values. For example, the value of an attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
    /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
    pub fn user_attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.user_attributes.as_ref()
    }
    /// <p>The unique identifier for the user.</p>
    pub fn user_id(&self) -> std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
/// See [`EndpointUser`](crate::model::EndpointUser).
pub mod endpoint_user {

    /// A builder for [`EndpointUser`](crate::model::EndpointUser).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) user_attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) user_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Adds a key-value pair to `user_attributes`.
        ///
        /// To override the contents of this collection use [`set_user_attributes`](Self::set_user_attributes).
        ///
        /// <p>One or more custom attributes that describe the user by associating a name with an array of values. For example, the value of an attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
        /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
        pub fn user_attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.user_attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.user_attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes that describe the user by associating a name with an array of values. For example, the value of an attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
        /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
        pub fn set_user_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.user_attributes = input;
            self
        }
        /// <p>The unique identifier for the user.</p>
        pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.user_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the user.</p>
        pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.user_id = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointUser`](crate::model::EndpointUser).
        pub fn build(self) -> crate::model::EndpointUser {
            crate::model::EndpointUser {
                user_attributes: self.user_attributes,
                user_id: self.user_id,
            }
        }
    }
}
impl EndpointUser {
    /// Creates a new builder-style object to manufacture [`EndpointUser`](crate::model::EndpointUser).
    pub fn builder() -> crate::model::endpoint_user::Builder {
        crate::model::endpoint_user::Builder::default()
    }
}

/// <p>Specifies geographic information about an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointLocation {
    /// <p>The name of the city where the endpoint is located.</p>
    #[doc(hidden)]
    pub city: std::option::Option<std::string::String>,
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the endpoint is located. For example, US for the United States.</p>
    #[doc(hidden)]
    pub country: std::option::Option<std::string::String>,
    /// <p>The latitude coordinate of the endpoint location, rounded to one decimal place.</p>
    #[doc(hidden)]
    pub latitude: f64,
    /// <p>The longitude coordinate of the endpoint location, rounded to one decimal place.</p>
    #[doc(hidden)]
    pub longitude: f64,
    /// <p>The postal or ZIP code for the area where the endpoint is located.</p>
    #[doc(hidden)]
    pub postal_code: std::option::Option<std::string::String>,
    /// <p>The name of the region where the endpoint is located. For locations in the United States, this value is the name of a state.</p>
    #[doc(hidden)]
    pub region: std::option::Option<std::string::String>,
}
impl EndpointLocation {
    /// <p>The name of the city where the endpoint is located.</p>
    pub fn city(&self) -> std::option::Option<&str> {
        self.city.as_deref()
    }
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the endpoint is located. For example, US for the United States.</p>
    pub fn country(&self) -> std::option::Option<&str> {
        self.country.as_deref()
    }
    /// <p>The latitude coordinate of the endpoint location, rounded to one decimal place.</p>
    pub fn latitude(&self) -> f64 {
        self.latitude
    }
    /// <p>The longitude coordinate of the endpoint location, rounded to one decimal place.</p>
    pub fn longitude(&self) -> f64 {
        self.longitude
    }
    /// <p>The postal or ZIP code for the area where the endpoint is located.</p>
    pub fn postal_code(&self) -> std::option::Option<&str> {
        self.postal_code.as_deref()
    }
    /// <p>The name of the region where the endpoint is located. For locations in the United States, this value is the name of a state.</p>
    pub fn region(&self) -> std::option::Option<&str> {
        self.region.as_deref()
    }
}
/// See [`EndpointLocation`](crate::model::EndpointLocation).
pub mod endpoint_location {

    /// A builder for [`EndpointLocation`](crate::model::EndpointLocation).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) city: std::option::Option<std::string::String>,
        pub(crate) country: std::option::Option<std::string::String>,
        pub(crate) latitude: std::option::Option<f64>,
        pub(crate) longitude: std::option::Option<f64>,
        pub(crate) postal_code: std::option::Option<std::string::String>,
        pub(crate) region: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the city where the endpoint is located.</p>
        pub fn city(mut self, input: impl Into<std::string::String>) -> Self {
            self.city = Some(input.into());
            self
        }
        /// <p>The name of the city where the endpoint is located.</p>
        pub fn set_city(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.city = input;
            self
        }
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the endpoint is located. For example, US for the United States.</p>
        pub fn country(mut self, input: impl Into<std::string::String>) -> Self {
            self.country = Some(input.into());
            self
        }
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the endpoint is located. For example, US for the United States.</p>
        pub fn set_country(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.country = input;
            self
        }
        /// <p>The latitude coordinate of the endpoint location, rounded to one decimal place.</p>
        pub fn latitude(mut self, input: f64) -> Self {
            self.latitude = Some(input);
            self
        }
        /// <p>The latitude coordinate of the endpoint location, rounded to one decimal place.</p>
        pub fn set_latitude(mut self, input: std::option::Option<f64>) -> Self {
            self.latitude = input;
            self
        }
        /// <p>The longitude coordinate of the endpoint location, rounded to one decimal place.</p>
        pub fn longitude(mut self, input: f64) -> Self {
            self.longitude = Some(input);
            self
        }
        /// <p>The longitude coordinate of the endpoint location, rounded to one decimal place.</p>
        pub fn set_longitude(mut self, input: std::option::Option<f64>) -> Self {
            self.longitude = input;
            self
        }
        /// <p>The postal or ZIP code for the area where the endpoint is located.</p>
        pub fn postal_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.postal_code = Some(input.into());
            self
        }
        /// <p>The postal or ZIP code for the area where the endpoint is located.</p>
        pub fn set_postal_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.postal_code = input;
            self
        }
        /// <p>The name of the region where the endpoint is located. For locations in the United States, this value is the name of a state.</p>
        pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
            self.region = Some(input.into());
            self
        }
        /// <p>The name of the region where the endpoint is located. For locations in the United States, this value is the name of a state.</p>
        pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.region = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointLocation`](crate::model::EndpointLocation).
        pub fn build(self) -> crate::model::EndpointLocation {
            crate::model::EndpointLocation {
                city: self.city,
                country: self.country,
                latitude: self.latitude.unwrap_or_default(),
                longitude: self.longitude.unwrap_or_default(),
                postal_code: self.postal_code,
                region: self.region,
            }
        }
    }
}
impl EndpointLocation {
    /// Creates a new builder-style object to manufacture [`EndpointLocation`](crate::model::EndpointLocation).
    pub fn builder() -> crate::model::endpoint_location::Builder {
        crate::model::endpoint_location::Builder::default()
    }
}

/// <p>Specifies demographic information about an endpoint, such as the applicable time zone and platform.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointDemographic {
    /// <p>The version of the app that's associated with the endpoint.</p>
    #[doc(hidden)]
    pub app_version: std::option::Option<std::string::String>,
    /// <p>The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), followed by an ISO 3166-1 alpha-2 value.</p>
    #[doc(hidden)]
    pub locale: std::option::Option<std::string::String>,
    /// <p>The manufacturer of the endpoint device, such as apple or samsung.</p>
    #[doc(hidden)]
    pub make: std::option::Option<std::string::String>,
    /// <p>The model name or number of the endpoint device, such as iPhone or SM-G900F.</p>
    #[doc(hidden)]
    pub model: std::option::Option<std::string::String>,
    /// <p>The model version of the endpoint device.</p>
    #[doc(hidden)]
    pub model_version: std::option::Option<std::string::String>,
    /// <p>The platform of the endpoint device, such as ios.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The platform version of the endpoint device.</p>
    #[doc(hidden)]
    pub platform_version: std::option::Option<std::string::String>,
    /// <p>The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles.</p>
    #[doc(hidden)]
    pub timezone: std::option::Option<std::string::String>,
}
impl EndpointDemographic {
    /// <p>The version of the app that's associated with the endpoint.</p>
    pub fn app_version(&self) -> std::option::Option<&str> {
        self.app_version.as_deref()
    }
    /// <p>The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), followed by an ISO 3166-1 alpha-2 value.</p>
    pub fn locale(&self) -> std::option::Option<&str> {
        self.locale.as_deref()
    }
    /// <p>The manufacturer of the endpoint device, such as apple or samsung.</p>
    pub fn make(&self) -> std::option::Option<&str> {
        self.make.as_deref()
    }
    /// <p>The model name or number of the endpoint device, such as iPhone or SM-G900F.</p>
    pub fn model(&self) -> std::option::Option<&str> {
        self.model.as_deref()
    }
    /// <p>The model version of the endpoint device.</p>
    pub fn model_version(&self) -> std::option::Option<&str> {
        self.model_version.as_deref()
    }
    /// <p>The platform of the endpoint device, such as ios.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The platform version of the endpoint device.</p>
    pub fn platform_version(&self) -> std::option::Option<&str> {
        self.platform_version.as_deref()
    }
    /// <p>The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles.</p>
    pub fn timezone(&self) -> std::option::Option<&str> {
        self.timezone.as_deref()
    }
}
/// See [`EndpointDemographic`](crate::model::EndpointDemographic).
pub mod endpoint_demographic {

    /// A builder for [`EndpointDemographic`](crate::model::EndpointDemographic).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) app_version: std::option::Option<std::string::String>,
        pub(crate) locale: std::option::Option<std::string::String>,
        pub(crate) make: std::option::Option<std::string::String>,
        pub(crate) model: std::option::Option<std::string::String>,
        pub(crate) model_version: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) platform_version: std::option::Option<std::string::String>,
        pub(crate) timezone: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The version of the app that's associated with the endpoint.</p>
        pub fn app_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.app_version = Some(input.into());
            self
        }
        /// <p>The version of the app that's associated with the endpoint.</p>
        pub fn set_app_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.app_version = input;
            self
        }
        /// <p>The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), followed by an ISO 3166-1 alpha-2 value.</p>
        pub fn locale(mut self, input: impl Into<std::string::String>) -> Self {
            self.locale = Some(input.into());
            self
        }
        /// <p>The locale of the endpoint, in the following format: the ISO 639-1 alpha-2 code, followed by an underscore (_), followed by an ISO 3166-1 alpha-2 value.</p>
        pub fn set_locale(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.locale = input;
            self
        }
        /// <p>The manufacturer of the endpoint device, such as apple or samsung.</p>
        pub fn make(mut self, input: impl Into<std::string::String>) -> Self {
            self.make = Some(input.into());
            self
        }
        /// <p>The manufacturer of the endpoint device, such as apple or samsung.</p>
        pub fn set_make(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.make = input;
            self
        }
        /// <p>The model name or number of the endpoint device, such as iPhone or SM-G900F.</p>
        pub fn model(mut self, input: impl Into<std::string::String>) -> Self {
            self.model = Some(input.into());
            self
        }
        /// <p>The model name or number of the endpoint device, such as iPhone or SM-G900F.</p>
        pub fn set_model(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.model = input;
            self
        }
        /// <p>The model version of the endpoint device.</p>
        pub fn model_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.model_version = Some(input.into());
            self
        }
        /// <p>The model version of the endpoint device.</p>
        pub fn set_model_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.model_version = input;
            self
        }
        /// <p>The platform of the endpoint device, such as ios.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The platform of the endpoint device, such as ios.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The platform version of the endpoint device.</p>
        pub fn platform_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform_version = Some(input.into());
            self
        }
        /// <p>The platform version of the endpoint device.</p>
        pub fn set_platform_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.platform_version = input;
            self
        }
        /// <p>The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles.</p>
        pub fn timezone(mut self, input: impl Into<std::string::String>) -> Self {
            self.timezone = Some(input.into());
            self
        }
        /// <p>The time zone of the endpoint, specified as a tz database name value, such as America/Los_Angeles.</p>
        pub fn set_timezone(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.timezone = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointDemographic`](crate::model::EndpointDemographic).
        pub fn build(self) -> crate::model::EndpointDemographic {
            crate::model::EndpointDemographic {
                app_version: self.app_version,
                locale: self.locale,
                make: self.make,
                model: self.model,
                model_version: self.model_version,
                platform: self.platform,
                platform_version: self.platform_version,
                timezone: self.timezone,
            }
        }
    }
}
impl EndpointDemographic {
    /// Creates a new builder-style object to manufacture [`EndpointDemographic`](crate::model::EndpointDemographic).
    pub fn builder() -> crate::model::endpoint_demographic::Builder {
        crate::model::endpoint_demographic::Builder::default()
    }
}

/// When writing a match expression against `ChannelType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let channeltype = unimplemented!();
/// match channeltype {
///     ChannelType::Adm => { /* ... */ },
///     ChannelType::Apns => { /* ... */ },
///     ChannelType::ApnsSandbox => { /* ... */ },
///     ChannelType::ApnsVoip => { /* ... */ },
///     ChannelType::ApnsVoipSandbox => { /* ... */ },
///     ChannelType::Baidu => { /* ... */ },
///     ChannelType::Custom => { /* ... */ },
///     ChannelType::Email => { /* ... */ },
///     ChannelType::Gcm => { /* ... */ },
///     ChannelType::InApp => { /* ... */ },
///     ChannelType::Push => { /* ... */ },
///     ChannelType::Sms => { /* ... */ },
///     ChannelType::Voice => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `channeltype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `ChannelType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `ChannelType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `ChannelType::NewFeature` is defined.
/// Specifically, when `channeltype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `ChannelType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ChannelType {
    #[allow(missing_docs)] // documentation missing in model
    Adm,
    #[allow(missing_docs)] // documentation missing in model
    Apns,
    #[allow(missing_docs)] // documentation missing in model
    ApnsSandbox,
    #[allow(missing_docs)] // documentation missing in model
    ApnsVoip,
    #[allow(missing_docs)] // documentation missing in model
    ApnsVoipSandbox,
    #[allow(missing_docs)] // documentation missing in model
    Baidu,
    #[allow(missing_docs)] // documentation missing in model
    Custom,
    #[allow(missing_docs)] // documentation missing in model
    Email,
    #[allow(missing_docs)] // documentation missing in model
    Gcm,
    #[allow(missing_docs)] // documentation missing in model
    InApp,
    #[allow(missing_docs)] // documentation missing in model
    Push,
    #[allow(missing_docs)] // documentation missing in model
    Sms,
    #[allow(missing_docs)] // documentation missing in model
    Voice,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for ChannelType {
    fn from(s: &str) -> Self {
        match s {
            "ADM" => ChannelType::Adm,
            "APNS" => ChannelType::Apns,
            "APNS_SANDBOX" => ChannelType::ApnsSandbox,
            "APNS_VOIP" => ChannelType::ApnsVoip,
            "APNS_VOIP_SANDBOX" => ChannelType::ApnsVoipSandbox,
            "BAIDU" => ChannelType::Baidu,
            "CUSTOM" => ChannelType::Custom,
            "EMAIL" => ChannelType::Email,
            "GCM" => ChannelType::Gcm,
            "IN_APP" => ChannelType::InApp,
            "PUSH" => ChannelType::Push,
            "SMS" => ChannelType::Sms,
            "VOICE" => ChannelType::Voice,
            other => ChannelType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for ChannelType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ChannelType::from(s))
    }
}
impl ChannelType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ChannelType::Adm => "ADM",
            ChannelType::Apns => "APNS",
            ChannelType::ApnsSandbox => "APNS_SANDBOX",
            ChannelType::ApnsVoip => "APNS_VOIP",
            ChannelType::ApnsVoipSandbox => "APNS_VOIP_SANDBOX",
            ChannelType::Baidu => "BAIDU",
            ChannelType::Custom => "CUSTOM",
            ChannelType::Email => "EMAIL",
            ChannelType::Gcm => "GCM",
            ChannelType::InApp => "IN_APP",
            ChannelType::Push => "PUSH",
            ChannelType::Sms => "SMS",
            ChannelType::Voice => "VOICE",
            ChannelType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "ADM",
            "APNS",
            "APNS_SANDBOX",
            "APNS_VOIP",
            "APNS_VOIP_SANDBOX",
            "BAIDU",
            "CUSTOM",
            "EMAIL",
            "GCM",
            "IN_APP",
            "PUSH",
            "SMS",
            "VOICE",
        ]
    }
}
impl AsRef<str> for ChannelType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the channel type and other settings for an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointRequest {
    /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
    #[doc(hidden)]
    pub address: std::option::Option<std::string::String>,
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
    /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
    #[doc(hidden)]
    pub attributes: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
    #[doc(hidden)]
    pub channel_type: std::option::Option<crate::model::ChannelType>,
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    #[doc(hidden)]
    pub demographic: std::option::Option<crate::model::EndpointDemographic>,
    /// <p>The date and time, in ISO 8601 format, when the endpoint is updated.</p>
    #[doc(hidden)]
    pub effective_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    #[doc(hidden)]
    pub endpoint_status: std::option::Option<std::string::String>,
    /// <p>The geographic information for the endpoint.</p>
    #[doc(hidden)]
    pub location: std::option::Option<crate::model::EndpointLocation>,
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    #[doc(hidden)]
    pub metrics: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    #[doc(hidden)]
    pub opt_out: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the most recent request to update the endpoint.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
    #[doc(hidden)]
    pub user: std::option::Option<crate::model::EndpointUser>,
}
impl EndpointRequest {
    /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
    pub fn address(&self) -> std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
    /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.attributes.as_ref()
    }
    /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
    pub fn channel_type(&self) -> std::option::Option<&crate::model::ChannelType> {
        self.channel_type.as_ref()
    }
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    pub fn demographic(&self) -> std::option::Option<&crate::model::EndpointDemographic> {
        self.demographic.as_ref()
    }
    /// <p>The date and time, in ISO 8601 format, when the endpoint is updated.</p>
    pub fn effective_date(&self) -> std::option::Option<&str> {
        self.effective_date.as_deref()
    }
    /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    pub fn endpoint_status(&self) -> std::option::Option<&str> {
        self.endpoint_status.as_deref()
    }
    /// <p>The geographic information for the endpoint.</p>
    pub fn location(&self) -> std::option::Option<&crate::model::EndpointLocation> {
        self.location.as_ref()
    }
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, f64>> {
        self.metrics.as_ref()
    }
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    pub fn opt_out(&self) -> std::option::Option<&str> {
        self.opt_out.as_deref()
    }
    /// <p>The unique identifier for the most recent request to update the endpoint.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
    pub fn user(&self) -> std::option::Option<&crate::model::EndpointUser> {
        self.user.as_ref()
    }
}
/// See [`EndpointRequest`](crate::model::EndpointRequest).
pub mod endpoint_request {

    /// A builder for [`EndpointRequest`](crate::model::EndpointRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) address: std::option::Option<std::string::String>,
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) channel_type: std::option::Option<crate::model::ChannelType>,
        pub(crate) demographic: std::option::Option<crate::model::EndpointDemographic>,
        pub(crate) effective_date: std::option::Option<std::string::String>,
        pub(crate) endpoint_status: std::option::Option<std::string::String>,
        pub(crate) location: std::option::Option<crate::model::EndpointLocation>,
        pub(crate) metrics:
            std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        pub(crate) opt_out: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
        pub(crate) user: std::option::Option<crate::model::EndpointUser>,
    }
    impl Builder {
        /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
        pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
            self.address = Some(input.into());
            self
        }
        /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For a push-notification channel, use the token provided by the push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.</p>
        pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.address = input;
            self
        }
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
        /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments. Attribute names are case sensitive.</p>
        /// <p>An attribute name can contain up to 50 characters. An attribute value can contain up to 100 characters. When you define the name of a custom attribute, avoid using the following characters: number sign (#), colon (:), question mark (?), backslash (\), and slash (/). The Amazon Pinpoint console can't display attribute names that contain these characters. This restriction doesn't apply to attribute values.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
        pub fn channel_type(mut self, input: crate::model::ChannelType) -> Self {
            self.channel_type = Some(input);
            self
        }
        /// <p>The channel to use when sending messages or push notifications to the endpoint.</p>
        pub fn set_channel_type(
            mut self,
            input: std::option::Option<crate::model::ChannelType>,
        ) -> Self {
            self.channel_type = input;
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn demographic(mut self, input: crate::model::EndpointDemographic) -> Self {
            self.demographic = Some(input);
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn set_demographic(
            mut self,
            input: std::option::Option<crate::model::EndpointDemographic>,
        ) -> Self {
            self.demographic = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint is updated.</p>
        pub fn effective_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.effective_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint is updated.</p>
        pub fn set_effective_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.effective_date = input;
            self
        }
        /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn endpoint_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.endpoint_status = Some(input.into());
            self
        }
        /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn set_endpoint_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.endpoint_status = input;
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn location(mut self, input: crate::model::EndpointLocation) -> Self {
            self.location = Some(input);
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn set_location(
            mut self,
            input: std::option::Option<crate::model::EndpointLocation>,
        ) -> Self {
            self.location = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn metrics(mut self, k: impl Into<std::string::String>, v: f64) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.metrics = Some(hash_map);
            self
        }
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn opt_out(mut self, input: impl Into<std::string::String>) -> Self {
            self.opt_out = Some(input.into());
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn set_opt_out(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.opt_out = input;
            self
        }
        /// <p>The unique identifier for the most recent request to update the endpoint.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the most recent request to update the endpoint.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
        pub fn user(mut self, input: crate::model::EndpointUser) -> Self {
            self.user = Some(input);
            self
        }
        /// <p>One or more custom attributes that describe the user who's associated with the endpoint.</p>
        pub fn set_user(mut self, input: std::option::Option<crate::model::EndpointUser>) -> Self {
            self.user = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointRequest`](crate::model::EndpointRequest).
        pub fn build(self) -> crate::model::EndpointRequest {
            crate::model::EndpointRequest {
                address: self.address,
                attributes: self.attributes,
                channel_type: self.channel_type,
                demographic: self.demographic,
                effective_date: self.effective_date,
                endpoint_status: self.endpoint_status,
                location: self.location,
                metrics: self.metrics,
                opt_out: self.opt_out,
                request_id: self.request_id,
                user: self.user,
            }
        }
    }
}
impl EndpointRequest {
    /// Creates a new builder-style object to manufacture [`EndpointRequest`](crate::model::EndpointRequest).
    pub fn builder() -> crate::model::endpoint_request::Builder {
        crate::model::endpoint_request::Builder::default()
    }
}

/// <p>Specifies the content and settings for a message template that can be used in messages that are sent through the email channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmailTemplateRequest {
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
    #[doc(hidden)]
    pub html_part: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
    #[doc(hidden)]
    pub recommender_id: std::option::Option<std::string::String>,
    /// <p>The subject line, or title, to use in email messages that are based on the message template.</p>
    #[doc(hidden)]
    pub subject: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>A custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
    #[doc(hidden)]
    pub text_part: std::option::Option<std::string::String>,
}
impl EmailTemplateRequest {
    /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
    pub fn html_part(&self) -> std::option::Option<&str> {
        self.html_part.as_deref()
    }
    /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
    pub fn recommender_id(&self) -> std::option::Option<&str> {
        self.recommender_id.as_deref()
    }
    /// <p>The subject line, or title, to use in email messages that are based on the message template.</p>
    pub fn subject(&self) -> std::option::Option<&str> {
        self.subject.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>A custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
    pub fn text_part(&self) -> std::option::Option<&str> {
        self.text_part.as_deref()
    }
}
/// See [`EmailTemplateRequest`](crate::model::EmailTemplateRequest).
pub mod email_template_request {

    /// A builder for [`EmailTemplateRequest`](crate::model::EmailTemplateRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) html_part: std::option::Option<std::string::String>,
        pub(crate) recommender_id: std::option::Option<std::string::String>,
        pub(crate) subject: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) text_part: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>A JSON object that specifies the default values to use for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable. When you create a message that's based on the template, you can override these defaults with message-specific and address-specific variables and values.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
        pub fn html_part(mut self, input: impl Into<std::string::String>) -> Self {
            self.html_part = Some(input.into());
            self
        }
        /// <p>The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
        pub fn set_html_part(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.html_part = input;
            self
        }
        /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
        pub fn recommender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.recommender_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recommender model to use for the message template. Amazon Pinpoint uses this value to determine how to retrieve and process data from a recommender model when it sends messages that use the template, if the template contains message variables for recommendation data.</p>
        pub fn set_recommender_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommender_id = input;
            self
        }
        /// <p>The subject line, or title, to use in email messages that are based on the message template.</p>
        pub fn subject(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject = Some(input.into());
            self
        }
        /// <p>The subject line, or title, to use in email messages that are based on the message template.</p>
        pub fn set_subject(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>A custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
        pub fn text_part(mut self, input: impl Into<std::string::String>) -> Self {
            self.text_part = Some(input.into());
            self
        }
        /// <p>The message body, in plain text format, to use in email messages that are based on the message template. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
        pub fn set_text_part(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.text_part = input;
            self
        }
        /// Consumes the builder and constructs a [`EmailTemplateRequest`](crate::model::EmailTemplateRequest).
        pub fn build(self) -> crate::model::EmailTemplateRequest {
            crate::model::EmailTemplateRequest {
                default_substitutions: self.default_substitutions,
                html_part: self.html_part,
                recommender_id: self.recommender_id,
                subject: self.subject,
                tags: self.tags,
                template_description: self.template_description,
                text_part: self.text_part,
            }
        }
    }
}
impl EmailTemplateRequest {
    /// Creates a new builder-style object to manufacture [`EmailTemplateRequest`](crate::model::EmailTemplateRequest).
    pub fn builder() -> crate::model::email_template_request::Builder {
        crate::model::email_template_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the email channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmailChannelResponse {
    /// <p>The unique identifier for the application that the email channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that's applied to messages that are sent through the channel.</p>
    #[doc(hidden)]
    pub configuration_set: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the email channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether the email channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The verified email address that email is sent from when you send email through the channel.</p>
    #[doc(hidden)]
    pub from_address: std::option::Option<std::string::String>,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>(Deprecated) An identifier for the email channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's used when you send email through the channel.</p>
    #[doc(hidden)]
    pub identity: std::option::Option<std::string::String>,
    /// <p>Specifies whether the email channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the email channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the email channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The maximum number of emails that can be sent through the channel each second.</p>
    #[doc(hidden)]
    pub messages_per_second: i32,
    /// <p>The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related event data for the channel.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The current version of the email channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl EmailChannelResponse {
    /// <p>The unique identifier for the application that the email channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that's applied to messages that are sent through the channel.</p>
    pub fn configuration_set(&self) -> std::option::Option<&str> {
        self.configuration_set.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the email channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>Specifies whether the email channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The verified email address that email is sent from when you send email through the channel.</p>
    pub fn from_address(&self) -> std::option::Option<&str> {
        self.from_address.as_deref()
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>(Deprecated) An identifier for the email channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's used when you send email through the channel.</p>
    pub fn identity(&self) -> std::option::Option<&str> {
        self.identity.as_deref()
    }
    /// <p>Specifies whether the email channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the email channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the email channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The maximum number of emails that can be sent through the channel each second.</p>
    pub fn messages_per_second(&self) -> i32 {
        self.messages_per_second
    }
    /// <p>The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related event data for the channel.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The current version of the email channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`EmailChannelResponse`](crate::model::EmailChannelResponse).
pub mod email_channel_response {

    /// A builder for [`EmailChannelResponse`](crate::model::EmailChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) configuration_set: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) from_address: std::option::Option<std::string::String>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) identity: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) messages_per_second: std::option::Option<i32>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the email channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the email channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that's applied to messages that are sent through the channel.</p>
        pub fn configuration_set(mut self, input: impl Into<std::string::String>) -> Self {
            self.configuration_set = Some(input.into());
            self
        }
        /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that's applied to messages that are sent through the channel.</p>
        pub fn set_configuration_set(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.configuration_set = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the email channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the email channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>Specifies whether the email channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the email channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The verified email address that email is sent from when you send email through the channel.</p>
        pub fn from_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.from_address = Some(input.into());
            self
        }
        /// <p>The verified email address that email is sent from when you send email through the channel.</p>
        pub fn set_from_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.from_address = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>(Deprecated) An identifier for the email channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the email channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's used when you send email through the channel.</p>
        pub fn identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.identity = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that's used when you send email through the channel.</p>
        pub fn set_identity(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.identity = input;
            self
        }
        /// <p>Specifies whether the email channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the email channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the email channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the email channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the email channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the email channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The maximum number of emails that can be sent through the channel each second.</p>
        pub fn messages_per_second(mut self, input: i32) -> Self {
            self.messages_per_second = Some(input);
            self
        }
        /// <p>The maximum number of emails that can be sent through the channel each second.</p>
        pub fn set_messages_per_second(mut self, input: std::option::Option<i32>) -> Self {
            self.messages_per_second = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related event data for the channel.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the AWS Identity and Access Management (IAM) role that Amazon Pinpoint uses to submit email-related event data for the channel.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>The current version of the email channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the email channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`EmailChannelResponse`](crate::model::EmailChannelResponse).
        pub fn build(self) -> crate::model::EmailChannelResponse {
            crate::model::EmailChannelResponse {
                application_id: self.application_id,
                configuration_set: self.configuration_set,
                creation_date: self.creation_date,
                enabled: self.enabled.unwrap_or_default(),
                from_address: self.from_address,
                has_credential: self.has_credential.unwrap_or_default(),
                id: self.id,
                identity: self.identity,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                messages_per_second: self.messages_per_second.unwrap_or_default(),
                platform: self.platform,
                role_arn: self.role_arn,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl EmailChannelResponse {
    /// Creates a new builder-style object to manufacture [`EmailChannelResponse`](crate::model::EmailChannelResponse).
    pub fn builder() -> crate::model::email_channel_response::Builder {
        crate::model::email_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the email channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmailChannelRequest {
    /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that you want to apply to messages that you send through the channel.</p>
    #[doc(hidden)]
    pub configuration_set: std::option::Option<std::string::String>,
    /// <p>Specifies whether to enable the email channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The verified email address that you want to send email from when you send email through the channel.</p>
    #[doc(hidden)]
    pub from_address: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that you want to use when you send email through the channel.</p>
    #[doc(hidden)]
    pub identity: std::option::Option<std::string::String>,
    /// <p>The ARN of the AWS Identity and Access Management (IAM) role that you want Amazon Pinpoint to use when it submits email-related event data for the channel.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
}
impl EmailChannelRequest {
    /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that you want to apply to messages that you send through the channel.</p>
    pub fn configuration_set(&self) -> std::option::Option<&str> {
        self.configuration_set.as_deref()
    }
    /// <p>Specifies whether to enable the email channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The verified email address that you want to send email from when you send email through the channel.</p>
    pub fn from_address(&self) -> std::option::Option<&str> {
        self.from_address.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that you want to use when you send email through the channel.</p>
    pub fn identity(&self) -> std::option::Option<&str> {
        self.identity.as_deref()
    }
    /// <p>The ARN of the AWS Identity and Access Management (IAM) role that you want Amazon Pinpoint to use when it submits email-related event data for the channel.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
}
/// See [`EmailChannelRequest`](crate::model::EmailChannelRequest).
pub mod email_channel_request {

    /// A builder for [`EmailChannelRequest`](crate::model::EmailChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) configuration_set: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) from_address: std::option::Option<std::string::String>,
        pub(crate) identity: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that you want to apply to messages that you send through the channel.</p>
        pub fn configuration_set(mut self, input: impl Into<std::string::String>) -> Self {
            self.configuration_set = Some(input.into());
            self
        }
        /// <p>The <a href="https://docs.aws.amazon.com/ses/latest/APIReference/API_ConfigurationSet.html">Amazon SES configuration set</a> that you want to apply to messages that you send through the channel.</p>
        pub fn set_configuration_set(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.configuration_set = input;
            self
        }
        /// <p>Specifies whether to enable the email channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the email channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The verified email address that you want to send email from when you send email through the channel.</p>
        pub fn from_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.from_address = Some(input.into());
            self
        }
        /// <p>The verified email address that you want to send email from when you send email through the channel.</p>
        pub fn set_from_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.from_address = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that you want to use when you send email through the channel.</p>
        pub fn identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.identity = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the identity, verified with Amazon Simple Email Service (Amazon SES), that you want to use when you send email through the channel.</p>
        pub fn set_identity(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.identity = input;
            self
        }
        /// <p>The ARN of the AWS Identity and Access Management (IAM) role that you want Amazon Pinpoint to use when it submits email-related event data for the channel.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the AWS Identity and Access Management (IAM) role that you want Amazon Pinpoint to use when it submits email-related event data for the channel.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`EmailChannelRequest`](crate::model::EmailChannelRequest).
        pub fn build(self) -> crate::model::EmailChannelRequest {
            crate::model::EmailChannelRequest {
                configuration_set: self.configuration_set,
                enabled: self.enabled.unwrap_or_default(),
                from_address: self.from_address,
                identity: self.identity,
                role_arn: self.role_arn,
            }
        }
    }
}
impl EmailChannelRequest {
    /// Creates a new builder-style object to manufacture [`EmailChannelRequest`](crate::model::EmailChannelRequest).
    pub fn builder() -> crate::model::email_channel_request::Builder {
        crate::model::email_channel_request::Builder::default()
    }
}

/// <p>Provides information about the status, configuration, and other settings for a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignResponse {
    /// <p>An array of responses, one for each treatment that you defined for the campaign, in addition to the default treatment.</p>
    #[doc(hidden)]
    pub additional_treatments: std::option::Option<std::vec::Vec<crate::model::TreatmentResource>>,
    /// <p>The unique identifier for the application that the campaign applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the campaign was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The delivery configuration settings for sending the campaign through a custom channel.</p>
    #[doc(hidden)]
    pub custom_delivery_configuration:
        std::option::Option<crate::model::CustomDeliveryConfiguration>,
    /// <p>The current status of the campaign's default treatment. This value exists only for campaigns that have more than one treatment.</p>
    #[doc(hidden)]
    pub default_state: std::option::Option<crate::model::CampaignState>,
    /// <p>The custom description of the campaign.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
    #[doc(hidden)]
    pub holdout_percent: i32,
    /// <p>The settings for the AWS Lambda function to use as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
    #[doc(hidden)]
    pub hook: std::option::Option<crate::model::CampaignHook>,
    /// <p>The unique identifier for the campaign.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the campaign is paused. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
    #[doc(hidden)]
    pub is_paused: bool,
    /// <p>The date, in ISO 8601 format, when the campaign was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The messaging limits for the campaign.</p>
    #[doc(hidden)]
    pub limits: std::option::Option<crate::model::CampaignLimits>,
    /// <p>The message configuration settings for the campaign.</p>
    #[doc(hidden)]
    pub message_configuration: std::option::Option<crate::model::MessageConfiguration>,
    /// <p>The name of the campaign.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The schedule settings for the campaign.</p>
    #[doc(hidden)]
    pub schedule: std::option::Option<crate::model::Schedule>,
    /// <p>The unique identifier for the segment that's associated with the campaign.</p>
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
    /// <p>The version number of the segment that's associated with the campaign.</p>
    #[doc(hidden)]
    pub segment_version: i32,
    /// <p>The current status of the campaign.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::CampaignState>,
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The message template that’s used for the campaign.</p>
    #[doc(hidden)]
    pub template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
    /// <p>The custom description of the default treatment for the campaign.</p>
    #[doc(hidden)]
    pub treatment_description: std::option::Option<std::string::String>,
    /// <p>The custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
    #[doc(hidden)]
    pub treatment_name: std::option::Option<std::string::String>,
    /// <p>The version number of the campaign.</p>
    #[doc(hidden)]
    pub version: i32,
    /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
    #[doc(hidden)]
    pub priority: i32,
}
impl CampaignResponse {
    /// <p>An array of responses, one for each treatment that you defined for the campaign, in addition to the default treatment.</p>
    pub fn additional_treatments(&self) -> std::option::Option<&[crate::model::TreatmentResource]> {
        self.additional_treatments.as_deref()
    }
    /// <p>The unique identifier for the application that the campaign applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the campaign was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The delivery configuration settings for sending the campaign through a custom channel.</p>
    pub fn custom_delivery_configuration(
        &self,
    ) -> std::option::Option<&crate::model::CustomDeliveryConfiguration> {
        self.custom_delivery_configuration.as_ref()
    }
    /// <p>The current status of the campaign's default treatment. This value exists only for campaigns that have more than one treatment.</p>
    pub fn default_state(&self) -> std::option::Option<&crate::model::CampaignState> {
        self.default_state.as_ref()
    }
    /// <p>The custom description of the campaign.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
    pub fn holdout_percent(&self) -> i32 {
        self.holdout_percent
    }
    /// <p>The settings for the AWS Lambda function to use as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
    pub fn hook(&self) -> std::option::Option<&crate::model::CampaignHook> {
        self.hook.as_ref()
    }
    /// <p>The unique identifier for the campaign.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the campaign is paused. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
    pub fn is_paused(&self) -> bool {
        self.is_paused
    }
    /// <p>The date, in ISO 8601 format, when the campaign was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The messaging limits for the campaign.</p>
    pub fn limits(&self) -> std::option::Option<&crate::model::CampaignLimits> {
        self.limits.as_ref()
    }
    /// <p>The message configuration settings for the campaign.</p>
    pub fn message_configuration(
        &self,
    ) -> std::option::Option<&crate::model::MessageConfiguration> {
        self.message_configuration.as_ref()
    }
    /// <p>The name of the campaign.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The schedule settings for the campaign.</p>
    pub fn schedule(&self) -> std::option::Option<&crate::model::Schedule> {
        self.schedule.as_ref()
    }
    /// <p>The unique identifier for the segment that's associated with the campaign.</p>
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
    /// <p>The version number of the segment that's associated with the campaign.</p>
    pub fn segment_version(&self) -> i32 {
        self.segment_version
    }
    /// <p>The current status of the campaign.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::CampaignState> {
        self.state.as_ref()
    }
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The message template that’s used for the campaign.</p>
    pub fn template_configuration(
        &self,
    ) -> std::option::Option<&crate::model::TemplateConfiguration> {
        self.template_configuration.as_ref()
    }
    /// <p>The custom description of the default treatment for the campaign.</p>
    pub fn treatment_description(&self) -> std::option::Option<&str> {
        self.treatment_description.as_deref()
    }
    /// <p>The custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
    pub fn treatment_name(&self) -> std::option::Option<&str> {
        self.treatment_name.as_deref()
    }
    /// <p>The version number of the campaign.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
    /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
    pub fn priority(&self) -> i32 {
        self.priority
    }
}
/// See [`CampaignResponse`](crate::model::CampaignResponse).
pub mod campaign_response {

    /// A builder for [`CampaignResponse`](crate::model::CampaignResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) additional_treatments:
            std::option::Option<std::vec::Vec<crate::model::TreatmentResource>>,
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) custom_delivery_configuration:
            std::option::Option<crate::model::CustomDeliveryConfiguration>,
        pub(crate) default_state: std::option::Option<crate::model::CampaignState>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) holdout_percent: std::option::Option<i32>,
        pub(crate) hook: std::option::Option<crate::model::CampaignHook>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_paused: std::option::Option<bool>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) limits: std::option::Option<crate::model::CampaignLimits>,
        pub(crate) message_configuration: std::option::Option<crate::model::MessageConfiguration>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) schedule: std::option::Option<crate::model::Schedule>,
        pub(crate) segment_id: std::option::Option<std::string::String>,
        pub(crate) segment_version: std::option::Option<i32>,
        pub(crate) state: std::option::Option<crate::model::CampaignState>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
        pub(crate) treatment_description: std::option::Option<std::string::String>,
        pub(crate) treatment_name: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
        pub(crate) priority: std::option::Option<i32>,
    }
    impl Builder {
        /// Appends an item to `additional_treatments`.
        ///
        /// To override the contents of this collection use [`set_additional_treatments`](Self::set_additional_treatments).
        ///
        /// <p>An array of responses, one for each treatment that you defined for the campaign, in addition to the default treatment.</p>
        pub fn additional_treatments(mut self, input: crate::model::TreatmentResource) -> Self {
            let mut v = self.additional_treatments.unwrap_or_default();
            v.push(input);
            self.additional_treatments = Some(v);
            self
        }
        /// <p>An array of responses, one for each treatment that you defined for the campaign, in addition to the default treatment.</p>
        pub fn set_additional_treatments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TreatmentResource>>,
        ) -> Self {
            self.additional_treatments = input;
            self
        }
        /// <p>The unique identifier for the application that the campaign applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the campaign applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the campaign.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the campaign was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the campaign was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The delivery configuration settings for sending the campaign through a custom channel.</p>
        pub fn custom_delivery_configuration(
            mut self,
            input: crate::model::CustomDeliveryConfiguration,
        ) -> Self {
            self.custom_delivery_configuration = Some(input);
            self
        }
        /// <p>The delivery configuration settings for sending the campaign through a custom channel.</p>
        pub fn set_custom_delivery_configuration(
            mut self,
            input: std::option::Option<crate::model::CustomDeliveryConfiguration>,
        ) -> Self {
            self.custom_delivery_configuration = input;
            self
        }
        /// <p>The current status of the campaign's default treatment. This value exists only for campaigns that have more than one treatment.</p>
        pub fn default_state(mut self, input: crate::model::CampaignState) -> Self {
            self.default_state = Some(input);
            self
        }
        /// <p>The current status of the campaign's default treatment. This value exists only for campaigns that have more than one treatment.</p>
        pub fn set_default_state(
            mut self,
            input: std::option::Option<crate::model::CampaignState>,
        ) -> Self {
            self.default_state = input;
            self
        }
        /// <p>The custom description of the campaign.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>The custom description of the campaign.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
        pub fn holdout_percent(mut self, input: i32) -> Self {
            self.holdout_percent = Some(input);
            self
        }
        /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
        pub fn set_holdout_percent(mut self, input: std::option::Option<i32>) -> Self {
            self.holdout_percent = input;
            self
        }
        /// <p>The settings for the AWS Lambda function to use as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
        pub fn hook(mut self, input: crate::model::CampaignHook) -> Self {
            self.hook = Some(input);
            self
        }
        /// <p>The settings for the AWS Lambda function to use as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
        pub fn set_hook(mut self, input: std::option::Option<crate::model::CampaignHook>) -> Self {
            self.hook = input;
            self
        }
        /// <p>The unique identifier for the campaign.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the campaign.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the campaign is paused. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
        pub fn is_paused(mut self, input: bool) -> Self {
            self.is_paused = Some(input);
            self
        }
        /// <p>Specifies whether the campaign is paused. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
        pub fn set_is_paused(mut self, input: std::option::Option<bool>) -> Self {
            self.is_paused = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the campaign was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the campaign was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The messaging limits for the campaign.</p>
        pub fn limits(mut self, input: crate::model::CampaignLimits) -> Self {
            self.limits = Some(input);
            self
        }
        /// <p>The messaging limits for the campaign.</p>
        pub fn set_limits(
            mut self,
            input: std::option::Option<crate::model::CampaignLimits>,
        ) -> Self {
            self.limits = input;
            self
        }
        /// <p>The message configuration settings for the campaign.</p>
        pub fn message_configuration(mut self, input: crate::model::MessageConfiguration) -> Self {
            self.message_configuration = Some(input);
            self
        }
        /// <p>The message configuration settings for the campaign.</p>
        pub fn set_message_configuration(
            mut self,
            input: std::option::Option<crate::model::MessageConfiguration>,
        ) -> Self {
            self.message_configuration = input;
            self
        }
        /// <p>The name of the campaign.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the campaign.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The schedule settings for the campaign.</p>
        pub fn schedule(mut self, input: crate::model::Schedule) -> Self {
            self.schedule = Some(input);
            self
        }
        /// <p>The schedule settings for the campaign.</p>
        pub fn set_schedule(mut self, input: std::option::Option<crate::model::Schedule>) -> Self {
            self.schedule = input;
            self
        }
        /// <p>The unique identifier for the segment that's associated with the campaign.</p>
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the segment that's associated with the campaign.</p>
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// <p>The version number of the segment that's associated with the campaign.</p>
        pub fn segment_version(mut self, input: i32) -> Self {
            self.segment_version = Some(input);
            self
        }
        /// <p>The version number of the segment that's associated with the campaign.</p>
        pub fn set_segment_version(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_version = input;
            self
        }
        /// <p>The current status of the campaign.</p>
        pub fn state(mut self, input: crate::model::CampaignState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current status of the campaign.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::CampaignState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The message template that’s used for the campaign.</p>
        pub fn template_configuration(
            mut self,
            input: crate::model::TemplateConfiguration,
        ) -> Self {
            self.template_configuration = Some(input);
            self
        }
        /// <p>The message template that’s used for the campaign.</p>
        pub fn set_template_configuration(
            mut self,
            input: std::option::Option<crate::model::TemplateConfiguration>,
        ) -> Self {
            self.template_configuration = input;
            self
        }
        /// <p>The custom description of the default treatment for the campaign.</p>
        pub fn treatment_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_description = Some(input.into());
            self
        }
        /// <p>The custom description of the default treatment for the campaign.</p>
        pub fn set_treatment_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_description = input;
            self
        }
        /// <p>The custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
        pub fn treatment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_name = Some(input.into());
            self
        }
        /// <p>The custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
        pub fn set_treatment_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_name = input;
            self
        }
        /// <p>The version number of the campaign.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The version number of the campaign.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
        pub fn priority(mut self, input: i32) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
        pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
            self.priority = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignResponse`](crate::model::CampaignResponse).
        pub fn build(self) -> crate::model::CampaignResponse {
            crate::model::CampaignResponse {
                additional_treatments: self.additional_treatments,
                application_id: self.application_id,
                arn: self.arn,
                creation_date: self.creation_date,
                custom_delivery_configuration: self.custom_delivery_configuration,
                default_state: self.default_state,
                description: self.description,
                holdout_percent: self.holdout_percent.unwrap_or_default(),
                hook: self.hook,
                id: self.id,
                is_paused: self.is_paused.unwrap_or_default(),
                last_modified_date: self.last_modified_date,
                limits: self.limits,
                message_configuration: self.message_configuration,
                name: self.name,
                schedule: self.schedule,
                segment_id: self.segment_id,
                segment_version: self.segment_version.unwrap_or_default(),
                state: self.state,
                tags: self.tags,
                template_configuration: self.template_configuration,
                treatment_description: self.treatment_description,
                treatment_name: self.treatment_name,
                version: self.version.unwrap_or_default(),
                priority: self.priority.unwrap_or_default(),
            }
        }
    }
}
impl CampaignResponse {
    /// Creates a new builder-style object to manufacture [`CampaignResponse`](crate::model::CampaignResponse).
    pub fn builder() -> crate::model::campaign_response::Builder {
        crate::model::campaign_response::Builder::default()
    }
}

/// <p>Specifies the message template to use for the message, for each type of channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateConfiguration {
    /// <p>The email template to use for the message.</p>
    #[doc(hidden)]
    pub email_template: std::option::Option<crate::model::Template>,
    /// <p>The push notification template to use for the message.</p>
    #[doc(hidden)]
    pub push_template: std::option::Option<crate::model::Template>,
    /// <p>The SMS template to use for the message.</p>
    #[doc(hidden)]
    pub sms_template: std::option::Option<crate::model::Template>,
    /// <p>The voice template to use for the message. This object isn't supported for campaigns.</p>
    #[doc(hidden)]
    pub voice_template: std::option::Option<crate::model::Template>,
}
impl TemplateConfiguration {
    /// <p>The email template to use for the message.</p>
    pub fn email_template(&self) -> std::option::Option<&crate::model::Template> {
        self.email_template.as_ref()
    }
    /// <p>The push notification template to use for the message.</p>
    pub fn push_template(&self) -> std::option::Option<&crate::model::Template> {
        self.push_template.as_ref()
    }
    /// <p>The SMS template to use for the message.</p>
    pub fn sms_template(&self) -> std::option::Option<&crate::model::Template> {
        self.sms_template.as_ref()
    }
    /// <p>The voice template to use for the message. This object isn't supported for campaigns.</p>
    pub fn voice_template(&self) -> std::option::Option<&crate::model::Template> {
        self.voice_template.as_ref()
    }
}
/// See [`TemplateConfiguration`](crate::model::TemplateConfiguration).
pub mod template_configuration {

    /// A builder for [`TemplateConfiguration`](crate::model::TemplateConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) email_template: std::option::Option<crate::model::Template>,
        pub(crate) push_template: std::option::Option<crate::model::Template>,
        pub(crate) sms_template: std::option::Option<crate::model::Template>,
        pub(crate) voice_template: std::option::Option<crate::model::Template>,
    }
    impl Builder {
        /// <p>The email template to use for the message.</p>
        pub fn email_template(mut self, input: crate::model::Template) -> Self {
            self.email_template = Some(input);
            self
        }
        /// <p>The email template to use for the message.</p>
        pub fn set_email_template(
            mut self,
            input: std::option::Option<crate::model::Template>,
        ) -> Self {
            self.email_template = input;
            self
        }
        /// <p>The push notification template to use for the message.</p>
        pub fn push_template(mut self, input: crate::model::Template) -> Self {
            self.push_template = Some(input);
            self
        }
        /// <p>The push notification template to use for the message.</p>
        pub fn set_push_template(
            mut self,
            input: std::option::Option<crate::model::Template>,
        ) -> Self {
            self.push_template = input;
            self
        }
        /// <p>The SMS template to use for the message.</p>
        pub fn sms_template(mut self, input: crate::model::Template) -> Self {
            self.sms_template = Some(input);
            self
        }
        /// <p>The SMS template to use for the message.</p>
        pub fn set_sms_template(
            mut self,
            input: std::option::Option<crate::model::Template>,
        ) -> Self {
            self.sms_template = input;
            self
        }
        /// <p>The voice template to use for the message. This object isn't supported for campaigns.</p>
        pub fn voice_template(mut self, input: crate::model::Template) -> Self {
            self.voice_template = Some(input);
            self
        }
        /// <p>The voice template to use for the message. This object isn't supported for campaigns.</p>
        pub fn set_voice_template(
            mut self,
            input: std::option::Option<crate::model::Template>,
        ) -> Self {
            self.voice_template = input;
            self
        }
        /// Consumes the builder and constructs a [`TemplateConfiguration`](crate::model::TemplateConfiguration).
        pub fn build(self) -> crate::model::TemplateConfiguration {
            crate::model::TemplateConfiguration {
                email_template: self.email_template,
                push_template: self.push_template,
                sms_template: self.sms_template,
                voice_template: self.voice_template,
            }
        }
    }
}
impl TemplateConfiguration {
    /// Creates a new builder-style object to manufacture [`TemplateConfiguration`](crate::model::TemplateConfiguration).
    pub fn builder() -> crate::model::template_configuration::Builder {
        crate::model::template_configuration::Builder::default()
    }
}

/// <p>Specifies the name and version of the message template to use for the message.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Template {
    /// <p>The name of the message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl Template {
    /// <p>The name of the message template to use for the message. If specified, this value must match the name of an existing message template.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
    /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
    /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`Template`](crate::model::Template).
pub mod template {

    /// A builder for [`Template`](crate::model::Template).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the message template to use for the message. If specified, this value must match the name of an existing message template.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the
        /// <link linkend="templates-template-name-template-type-versions">Template Versions resource.</p>
        /// <p>If you don't specify a value for this property, Amazon Pinpoint uses the <i>active version</i> of the template. The <i>active version</i> is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`Template`](crate::model::Template).
        pub fn build(self) -> crate::model::Template {
            crate::model::Template {
                name: self.name,
                version: self.version,
            }
        }
    }
}
impl Template {
    /// Creates a new builder-style object to manufacture [`Template`](crate::model::Template).
    pub fn builder() -> crate::model::template::Builder {
        crate::model::template::Builder::default()
    }
}

/// <p>Provides information about the status of a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignState {
    /// <p>The current status of the campaign, or the current status of a treatment that belongs to an A/B test campaign.</p>
    /// <p>If a campaign uses A/B testing, the campaign has a status of COMPLETED only if all campaign treatments have a status of COMPLETED. If you delete the segment that's associated with a campaign, the campaign fails and has a status of DELETED.</p>
    #[doc(hidden)]
    pub campaign_status: std::option::Option<crate::model::CampaignStatus>,
}
impl CampaignState {
    /// <p>The current status of the campaign, or the current status of a treatment that belongs to an A/B test campaign.</p>
    /// <p>If a campaign uses A/B testing, the campaign has a status of COMPLETED only if all campaign treatments have a status of COMPLETED. If you delete the segment that's associated with a campaign, the campaign fails and has a status of DELETED.</p>
    pub fn campaign_status(&self) -> std::option::Option<&crate::model::CampaignStatus> {
        self.campaign_status.as_ref()
    }
}
/// See [`CampaignState`](crate::model::CampaignState).
pub mod campaign_state {

    /// A builder for [`CampaignState`](crate::model::CampaignState).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) campaign_status: std::option::Option<crate::model::CampaignStatus>,
    }
    impl Builder {
        /// <p>The current status of the campaign, or the current status of a treatment that belongs to an A/B test campaign.</p>
        /// <p>If a campaign uses A/B testing, the campaign has a status of COMPLETED only if all campaign treatments have a status of COMPLETED. If you delete the segment that's associated with a campaign, the campaign fails and has a status of DELETED.</p>
        pub fn campaign_status(mut self, input: crate::model::CampaignStatus) -> Self {
            self.campaign_status = Some(input);
            self
        }
        /// <p>The current status of the campaign, or the current status of a treatment that belongs to an A/B test campaign.</p>
        /// <p>If a campaign uses A/B testing, the campaign has a status of COMPLETED only if all campaign treatments have a status of COMPLETED. If you delete the segment that's associated with a campaign, the campaign fails and has a status of DELETED.</p>
        pub fn set_campaign_status(
            mut self,
            input: std::option::Option<crate::model::CampaignStatus>,
        ) -> Self {
            self.campaign_status = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignState`](crate::model::CampaignState).
        pub fn build(self) -> crate::model::CampaignState {
            crate::model::CampaignState {
                campaign_status: self.campaign_status,
            }
        }
    }
}
impl CampaignState {
    /// Creates a new builder-style object to manufacture [`CampaignState`](crate::model::CampaignState).
    pub fn builder() -> crate::model::campaign_state::Builder {
        crate::model::campaign_state::Builder::default()
    }
}

/// When writing a match expression against `CampaignStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let campaignstatus = unimplemented!();
/// match campaignstatus {
///     CampaignStatus::Completed => { /* ... */ },
///     CampaignStatus::Deleted => { /* ... */ },
///     CampaignStatus::Executing => { /* ... */ },
///     CampaignStatus::Invalid => { /* ... */ },
///     CampaignStatus::Paused => { /* ... */ },
///     CampaignStatus::PendingNextRun => { /* ... */ },
///     CampaignStatus::Scheduled => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `campaignstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `CampaignStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `CampaignStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `CampaignStatus::NewFeature` is defined.
/// Specifically, when `campaignstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `CampaignStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum CampaignStatus {
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Deleted,
    #[allow(missing_docs)] // documentation missing in model
    Executing,
    #[allow(missing_docs)] // documentation missing in model
    Invalid,
    #[allow(missing_docs)] // documentation missing in model
    Paused,
    #[allow(missing_docs)] // documentation missing in model
    PendingNextRun,
    #[allow(missing_docs)] // documentation missing in model
    Scheduled,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for CampaignStatus {
    fn from(s: &str) -> Self {
        match s {
            "COMPLETED" => CampaignStatus::Completed,
            "DELETED" => CampaignStatus::Deleted,
            "EXECUTING" => CampaignStatus::Executing,
            "INVALID" => CampaignStatus::Invalid,
            "PAUSED" => CampaignStatus::Paused,
            "PENDING_NEXT_RUN" => CampaignStatus::PendingNextRun,
            "SCHEDULED" => CampaignStatus::Scheduled,
            other => CampaignStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for CampaignStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(CampaignStatus::from(s))
    }
}
impl CampaignStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            CampaignStatus::Completed => "COMPLETED",
            CampaignStatus::Deleted => "DELETED",
            CampaignStatus::Executing => "EXECUTING",
            CampaignStatus::Invalid => "INVALID",
            CampaignStatus::Paused => "PAUSED",
            CampaignStatus::PendingNextRun => "PENDING_NEXT_RUN",
            CampaignStatus::Scheduled => "SCHEDULED",
            CampaignStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "COMPLETED",
            "DELETED",
            "EXECUTING",
            "INVALID",
            "PAUSED",
            "PENDING_NEXT_RUN",
            "SCHEDULED",
        ]
    }
}
impl AsRef<str> for CampaignStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the schedule settings for a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Schedule {
    /// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
    #[doc(hidden)]
    pub end_time: std::option::Option<std::string::String>,
    /// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
    #[doc(hidden)]
    pub event_filter: std::option::Option<crate::model::CampaignEventFilter>,
    /// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
    #[doc(hidden)]
    pub frequency: std::option::Option<crate::model::Frequency>,
    /// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
    #[doc(hidden)]
    pub is_local_time: bool,
    /// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
    /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
    /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
    #[doc(hidden)]
    pub quiet_time: std::option::Option<crate::model::QuietTime>,
    /// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<std::string::String>,
    /// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
    #[doc(hidden)]
    pub timezone: std::option::Option<std::string::String>,
}
impl Schedule {
    /// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
    pub fn end_time(&self) -> std::option::Option<&str> {
        self.end_time.as_deref()
    }
    /// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
    pub fn event_filter(&self) -> std::option::Option<&crate::model::CampaignEventFilter> {
        self.event_filter.as_ref()
    }
    /// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
    pub fn frequency(&self) -> std::option::Option<&crate::model::Frequency> {
        self.frequency.as_ref()
    }
    /// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
    pub fn is_local_time(&self) -> bool {
        self.is_local_time
    }
    /// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
    /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
    /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
    pub fn quiet_time(&self) -> std::option::Option<&crate::model::QuietTime> {
        self.quiet_time.as_ref()
    }
    /// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
    pub fn start_time(&self) -> std::option::Option<&str> {
        self.start_time.as_deref()
    }
    /// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
    pub fn timezone(&self) -> std::option::Option<&str> {
        self.timezone.as_deref()
    }
}
/// See [`Schedule`](crate::model::Schedule).
pub mod schedule {

    /// A builder for [`Schedule`](crate::model::Schedule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) end_time: std::option::Option<std::string::String>,
        pub(crate) event_filter: std::option::Option<crate::model::CampaignEventFilter>,
        pub(crate) frequency: std::option::Option<crate::model::Frequency>,
        pub(crate) is_local_time: std::option::Option<bool>,
        pub(crate) quiet_time: std::option::Option<crate::model::QuietTime>,
        pub(crate) start_time: std::option::Option<std::string::String>,
        pub(crate) timezone: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
        pub fn end_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.end_time = Some(input.into());
            self
        }
        /// <p>The scheduled time, in ISO 8601 format, when the campaign ended or will end.</p>
        pub fn set_end_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.end_time = input;
            self
        }
        /// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
        pub fn event_filter(mut self, input: crate::model::CampaignEventFilter) -> Self {
            self.event_filter = Some(input);
            self
        }
        /// <p>The type of event that causes the campaign to be sent, if the value of the Frequency property is EVENT.</p>
        pub fn set_event_filter(
            mut self,
            input: std::option::Option<crate::model::CampaignEventFilter>,
        ) -> Self {
            self.event_filter = input;
            self
        }
        /// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
        pub fn frequency(mut self, input: crate::model::Frequency) -> Self {
            self.frequency = Some(input);
            self
        }
        /// <p>Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event.</p>
        pub fn set_frequency(
            mut self,
            input: std::option::Option<crate::model::Frequency>,
        ) -> Self {
            self.frequency = input;
            self
        }
        /// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
        pub fn is_local_time(mut self, input: bool) -> Self {
            self.is_local_time = Some(input);
            self
        }
        /// <p>Specifies whether the start and end times for the campaign schedule use each recipient's local time. To base the schedule on each recipient's local time, set this value to true.</p>
        pub fn set_is_local_time(mut self, input: std::option::Option<bool>) -> Self {
            self.is_local_time = input;
            self
        }
        /// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
        /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
        /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
        pub fn quiet_time(mut self, input: crate::model::QuietTime) -> Self {
            self.quiet_time = Some(input);
            self
        }
        /// <p>The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
        /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the campaign.</p></li>
        /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the campaign.</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled.</p>
        pub fn set_quiet_time(
            mut self,
            input: std::option::Option<crate::model::QuietTime>,
        ) -> Self {
            self.quiet_time = input;
            self
        }
        /// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
        pub fn start_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_time = Some(input.into());
            self
        }
        /// <p>The scheduled time when the campaign began or will begin. Valid values are: IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601 format.</p>
        pub fn set_start_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
        pub fn timezone(mut self, input: impl Into<std::string::String>) -> Self {
            self.timezone = Some(input.into());
            self
        }
        /// <p>The starting UTC offset for the campaign schedule, if the value of the IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
        pub fn set_timezone(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.timezone = input;
            self
        }
        /// Consumes the builder and constructs a [`Schedule`](crate::model::Schedule).
        pub fn build(self) -> crate::model::Schedule {
            crate::model::Schedule {
                end_time: self.end_time,
                event_filter: self.event_filter,
                frequency: self.frequency,
                is_local_time: self.is_local_time.unwrap_or_default(),
                quiet_time: self.quiet_time,
                start_time: self.start_time,
                timezone: self.timezone,
            }
        }
    }
}
impl Schedule {
    /// Creates a new builder-style object to manufacture [`Schedule`](crate::model::Schedule).
    pub fn builder() -> crate::model::schedule::Builder {
        crate::model::schedule::Builder::default()
    }
}

/// When writing a match expression against `Frequency`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let frequency = unimplemented!();
/// match frequency {
///     Frequency::Daily => { /* ... */ },
///     Frequency::Event => { /* ... */ },
///     Frequency::Hourly => { /* ... */ },
///     Frequency::InAppEvent => { /* ... */ },
///     Frequency::Monthly => { /* ... */ },
///     Frequency::Once => { /* ... */ },
///     Frequency::Weekly => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `frequency` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Frequency::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Frequency::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Frequency::NewFeature` is defined.
/// Specifically, when `frequency` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Frequency::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Frequency {
    #[allow(missing_docs)] // documentation missing in model
    Daily,
    #[allow(missing_docs)] // documentation missing in model
    Event,
    #[allow(missing_docs)] // documentation missing in model
    Hourly,
    #[allow(missing_docs)] // documentation missing in model
    InAppEvent,
    #[allow(missing_docs)] // documentation missing in model
    Monthly,
    #[allow(missing_docs)] // documentation missing in model
    Once,
    #[allow(missing_docs)] // documentation missing in model
    Weekly,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Frequency {
    fn from(s: &str) -> Self {
        match s {
            "DAILY" => Frequency::Daily,
            "EVENT" => Frequency::Event,
            "HOURLY" => Frequency::Hourly,
            "IN_APP_EVENT" => Frequency::InAppEvent,
            "MONTHLY" => Frequency::Monthly,
            "ONCE" => Frequency::Once,
            "WEEKLY" => Frequency::Weekly,
            other => Frequency::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Frequency {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Frequency::from(s))
    }
}
impl Frequency {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Frequency::Daily => "DAILY",
            Frequency::Event => "EVENT",
            Frequency::Hourly => "HOURLY",
            Frequency::InAppEvent => "IN_APP_EVENT",
            Frequency::Monthly => "MONTHLY",
            Frequency::Once => "ONCE",
            Frequency::Weekly => "WEEKLY",
            Frequency::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "DAILY",
            "EVENT",
            "HOURLY",
            "IN_APP_EVENT",
            "MONTHLY",
            "ONCE",
            "WEEKLY",
        ]
    }
}
impl AsRef<str> for Frequency {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the settings for events that cause a campaign to be sent.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignEventFilter {
    /// <p>The dimension settings of the event filter for the campaign.</p>
    #[doc(hidden)]
    pub dimensions: std::option::Option<crate::model::EventDimensions>,
    /// <p>The type of event that causes the campaign to be sent. Valid values are: SYSTEM, sends the campaign when a system event occurs; and, ENDPOINT, sends the campaign when an endpoint event (
    /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
    #[doc(hidden)]
    pub filter_type: std::option::Option<crate::model::FilterType>,
}
impl CampaignEventFilter {
    /// <p>The dimension settings of the event filter for the campaign.</p>
    pub fn dimensions(&self) -> std::option::Option<&crate::model::EventDimensions> {
        self.dimensions.as_ref()
    }
    /// <p>The type of event that causes the campaign to be sent. Valid values are: SYSTEM, sends the campaign when a system event occurs; and, ENDPOINT, sends the campaign when an endpoint event (
    /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
    pub fn filter_type(&self) -> std::option::Option<&crate::model::FilterType> {
        self.filter_type.as_ref()
    }
}
/// See [`CampaignEventFilter`](crate::model::CampaignEventFilter).
pub mod campaign_event_filter {

    /// A builder for [`CampaignEventFilter`](crate::model::CampaignEventFilter).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) dimensions: std::option::Option<crate::model::EventDimensions>,
        pub(crate) filter_type: std::option::Option<crate::model::FilterType>,
    }
    impl Builder {
        /// <p>The dimension settings of the event filter for the campaign.</p>
        pub fn dimensions(mut self, input: crate::model::EventDimensions) -> Self {
            self.dimensions = Some(input);
            self
        }
        /// <p>The dimension settings of the event filter for the campaign.</p>
        pub fn set_dimensions(
            mut self,
            input: std::option::Option<crate::model::EventDimensions>,
        ) -> Self {
            self.dimensions = input;
            self
        }
        /// <p>The type of event that causes the campaign to be sent. Valid values are: SYSTEM, sends the campaign when a system event occurs; and, ENDPOINT, sends the campaign when an endpoint event (
        /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
        pub fn filter_type(mut self, input: crate::model::FilterType) -> Self {
            self.filter_type = Some(input);
            self
        }
        /// <p>The type of event that causes the campaign to be sent. Valid values are: SYSTEM, sends the campaign when a system event occurs; and, ENDPOINT, sends the campaign when an endpoint event (
        /// <link linkend="apps-application-id-events">Events resource) occurs.</p>
        pub fn set_filter_type(
            mut self,
            input: std::option::Option<crate::model::FilterType>,
        ) -> Self {
            self.filter_type = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignEventFilter`](crate::model::CampaignEventFilter).
        pub fn build(self) -> crate::model::CampaignEventFilter {
            crate::model::CampaignEventFilter {
                dimensions: self.dimensions,
                filter_type: self.filter_type,
            }
        }
    }
}
impl CampaignEventFilter {
    /// Creates a new builder-style object to manufacture [`CampaignEventFilter`](crate::model::CampaignEventFilter).
    pub fn builder() -> crate::model::campaign_event_filter::Builder {
        crate::model::campaign_event_filter::Builder::default()
    }
}

/// <p>Specifies the message configuration settings for a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MessageConfiguration {
    /// <p>The message that the campaign sends through the ADM (Amazon Device Messaging) channel. If specified, this message overrides the default message.</p>
    #[doc(hidden)]
    pub adm_message: std::option::Option<crate::model::Message>,
    /// <p>The message that the campaign sends through the APNs (Apple Push Notification service) channel. If specified, this message overrides the default message.</p>
    #[doc(hidden)]
    pub apns_message: std::option::Option<crate::model::Message>,
    /// <p>The message that the campaign sends through the Baidu (Baidu Cloud Push) channel. If specified, this message overrides the default message.</p>
    #[doc(hidden)]
    pub baidu_message: std::option::Option<crate::model::Message>,
    /// <p>The message that the campaign sends through a custom channel, as specified by the delivery configuration (CustomDeliveryConfiguration) settings for the campaign. If specified, this message overrides the default message.</p>
    #[doc(hidden)]
    pub custom_message: std::option::Option<crate::model::CampaignCustomMessage>,
    /// <p>The default message that the campaign sends through all the channels that are configured for the campaign.</p>
    #[doc(hidden)]
    pub default_message: std::option::Option<crate::model::Message>,
    /// <p>The message that the campaign sends through the email channel. If specified, this message overrides the default message.</p>
    #[doc(hidden)]
    pub email_message: std::option::Option<crate::model::CampaignEmailMessage>,
    /// <p>The message that the campaign sends through the GCM channel, which enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. If specified, this message overrides the default message.</p>
    #[doc(hidden)]
    pub gcm_message: std::option::Option<crate::model::Message>,
    /// <p>The message that the campaign sends through the SMS channel. If specified, this message overrides the default message.</p>
    #[doc(hidden)]
    pub sms_message: std::option::Option<crate::model::CampaignSmsMessage>,
    /// <p>The in-app message configuration.</p>
    #[doc(hidden)]
    pub in_app_message: std::option::Option<crate::model::CampaignInAppMessage>,
}
impl MessageConfiguration {
    /// <p>The message that the campaign sends through the ADM (Amazon Device Messaging) channel. If specified, this message overrides the default message.</p>
    pub fn adm_message(&self) -> std::option::Option<&crate::model::Message> {
        self.adm_message.as_ref()
    }
    /// <p>The message that the campaign sends through the APNs (Apple Push Notification service) channel. If specified, this message overrides the default message.</p>
    pub fn apns_message(&self) -> std::option::Option<&crate::model::Message> {
        self.apns_message.as_ref()
    }
    /// <p>The message that the campaign sends through the Baidu (Baidu Cloud Push) channel. If specified, this message overrides the default message.</p>
    pub fn baidu_message(&self) -> std::option::Option<&crate::model::Message> {
        self.baidu_message.as_ref()
    }
    /// <p>The message that the campaign sends through a custom channel, as specified by the delivery configuration (CustomDeliveryConfiguration) settings for the campaign. If specified, this message overrides the default message.</p>
    pub fn custom_message(&self) -> std::option::Option<&crate::model::CampaignCustomMessage> {
        self.custom_message.as_ref()
    }
    /// <p>The default message that the campaign sends through all the channels that are configured for the campaign.</p>
    pub fn default_message(&self) -> std::option::Option<&crate::model::Message> {
        self.default_message.as_ref()
    }
    /// <p>The message that the campaign sends through the email channel. If specified, this message overrides the default message.</p>
    pub fn email_message(&self) -> std::option::Option<&crate::model::CampaignEmailMessage> {
        self.email_message.as_ref()
    }
    /// <p>The message that the campaign sends through the GCM channel, which enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. If specified, this message overrides the default message.</p>
    pub fn gcm_message(&self) -> std::option::Option<&crate::model::Message> {
        self.gcm_message.as_ref()
    }
    /// <p>The message that the campaign sends through the SMS channel. If specified, this message overrides the default message.</p>
    pub fn sms_message(&self) -> std::option::Option<&crate::model::CampaignSmsMessage> {
        self.sms_message.as_ref()
    }
    /// <p>The in-app message configuration.</p>
    pub fn in_app_message(&self) -> std::option::Option<&crate::model::CampaignInAppMessage> {
        self.in_app_message.as_ref()
    }
}
/// See [`MessageConfiguration`](crate::model::MessageConfiguration).
pub mod message_configuration {

    /// A builder for [`MessageConfiguration`](crate::model::MessageConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) adm_message: std::option::Option<crate::model::Message>,
        pub(crate) apns_message: std::option::Option<crate::model::Message>,
        pub(crate) baidu_message: std::option::Option<crate::model::Message>,
        pub(crate) custom_message: std::option::Option<crate::model::CampaignCustomMessage>,
        pub(crate) default_message: std::option::Option<crate::model::Message>,
        pub(crate) email_message: std::option::Option<crate::model::CampaignEmailMessage>,
        pub(crate) gcm_message: std::option::Option<crate::model::Message>,
        pub(crate) sms_message: std::option::Option<crate::model::CampaignSmsMessage>,
        pub(crate) in_app_message: std::option::Option<crate::model::CampaignInAppMessage>,
    }
    impl Builder {
        /// <p>The message that the campaign sends through the ADM (Amazon Device Messaging) channel. If specified, this message overrides the default message.</p>
        pub fn adm_message(mut self, input: crate::model::Message) -> Self {
            self.adm_message = Some(input);
            self
        }
        /// <p>The message that the campaign sends through the ADM (Amazon Device Messaging) channel. If specified, this message overrides the default message.</p>
        pub fn set_adm_message(
            mut self,
            input: std::option::Option<crate::model::Message>,
        ) -> Self {
            self.adm_message = input;
            self
        }
        /// <p>The message that the campaign sends through the APNs (Apple Push Notification service) channel. If specified, this message overrides the default message.</p>
        pub fn apns_message(mut self, input: crate::model::Message) -> Self {
            self.apns_message = Some(input);
            self
        }
        /// <p>The message that the campaign sends through the APNs (Apple Push Notification service) channel. If specified, this message overrides the default message.</p>
        pub fn set_apns_message(
            mut self,
            input: std::option::Option<crate::model::Message>,
        ) -> Self {
            self.apns_message = input;
            self
        }
        /// <p>The message that the campaign sends through the Baidu (Baidu Cloud Push) channel. If specified, this message overrides the default message.</p>
        pub fn baidu_message(mut self, input: crate::model::Message) -> Self {
            self.baidu_message = Some(input);
            self
        }
        /// <p>The message that the campaign sends through the Baidu (Baidu Cloud Push) channel. If specified, this message overrides the default message.</p>
        pub fn set_baidu_message(
            mut self,
            input: std::option::Option<crate::model::Message>,
        ) -> Self {
            self.baidu_message = input;
            self
        }
        /// <p>The message that the campaign sends through a custom channel, as specified by the delivery configuration (CustomDeliveryConfiguration) settings for the campaign. If specified, this message overrides the default message.</p>
        pub fn custom_message(mut self, input: crate::model::CampaignCustomMessage) -> Self {
            self.custom_message = Some(input);
            self
        }
        /// <p>The message that the campaign sends through a custom channel, as specified by the delivery configuration (CustomDeliveryConfiguration) settings for the campaign. If specified, this message overrides the default message.</p>
        pub fn set_custom_message(
            mut self,
            input: std::option::Option<crate::model::CampaignCustomMessage>,
        ) -> Self {
            self.custom_message = input;
            self
        }
        /// <p>The default message that the campaign sends through all the channels that are configured for the campaign.</p>
        pub fn default_message(mut self, input: crate::model::Message) -> Self {
            self.default_message = Some(input);
            self
        }
        /// <p>The default message that the campaign sends through all the channels that are configured for the campaign.</p>
        pub fn set_default_message(
            mut self,
            input: std::option::Option<crate::model::Message>,
        ) -> Self {
            self.default_message = input;
            self
        }
        /// <p>The message that the campaign sends through the email channel. If specified, this message overrides the default message.</p>
        pub fn email_message(mut self, input: crate::model::CampaignEmailMessage) -> Self {
            self.email_message = Some(input);
            self
        }
        /// <p>The message that the campaign sends through the email channel. If specified, this message overrides the default message.</p>
        pub fn set_email_message(
            mut self,
            input: std::option::Option<crate::model::CampaignEmailMessage>,
        ) -> Self {
            self.email_message = input;
            self
        }
        /// <p>The message that the campaign sends through the GCM channel, which enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. If specified, this message overrides the default message.</p>
        pub fn gcm_message(mut self, input: crate::model::Message) -> Self {
            self.gcm_message = Some(input);
            self
        }
        /// <p>The message that the campaign sends through the GCM channel, which enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. If specified, this message overrides the default message.</p>
        pub fn set_gcm_message(
            mut self,
            input: std::option::Option<crate::model::Message>,
        ) -> Self {
            self.gcm_message = input;
            self
        }
        /// <p>The message that the campaign sends through the SMS channel. If specified, this message overrides the default message.</p>
        pub fn sms_message(mut self, input: crate::model::CampaignSmsMessage) -> Self {
            self.sms_message = Some(input);
            self
        }
        /// <p>The message that the campaign sends through the SMS channel. If specified, this message overrides the default message.</p>
        pub fn set_sms_message(
            mut self,
            input: std::option::Option<crate::model::CampaignSmsMessage>,
        ) -> Self {
            self.sms_message = input;
            self
        }
        /// <p>The in-app message configuration.</p>
        pub fn in_app_message(mut self, input: crate::model::CampaignInAppMessage) -> Self {
            self.in_app_message = Some(input);
            self
        }
        /// <p>The in-app message configuration.</p>
        pub fn set_in_app_message(
            mut self,
            input: std::option::Option<crate::model::CampaignInAppMessage>,
        ) -> Self {
            self.in_app_message = input;
            self
        }
        /// Consumes the builder and constructs a [`MessageConfiguration`](crate::model::MessageConfiguration).
        pub fn build(self) -> crate::model::MessageConfiguration {
            crate::model::MessageConfiguration {
                adm_message: self.adm_message,
                apns_message: self.apns_message,
                baidu_message: self.baidu_message,
                custom_message: self.custom_message,
                default_message: self.default_message,
                email_message: self.email_message,
                gcm_message: self.gcm_message,
                sms_message: self.sms_message,
                in_app_message: self.in_app_message,
            }
        }
    }
}
impl MessageConfiguration {
    /// Creates a new builder-style object to manufacture [`MessageConfiguration`](crate::model::MessageConfiguration).
    pub fn builder() -> crate::model::message_configuration::Builder {
        crate::model::message_configuration::Builder::default()
    }
}

/// <p>In-app message configuration.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignInAppMessage {
    /// <p>The message body of the notification, the email body or the text message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>In-app message content.</p>
    #[doc(hidden)]
    pub content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
    /// <p>Custom config to be sent to client.</p>
    #[doc(hidden)]
    pub custom_config:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>In-app message layout.</p>
    #[doc(hidden)]
    pub layout: std::option::Option<crate::model::Layout>,
}
impl CampaignInAppMessage {
    /// <p>The message body of the notification, the email body or the text message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>In-app message content.</p>
    pub fn content(&self) -> std::option::Option<&[crate::model::InAppMessageContent]> {
        self.content.as_deref()
    }
    /// <p>Custom config to be sent to client.</p>
    pub fn custom_config(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.custom_config.as_ref()
    }
    /// <p>In-app message layout.</p>
    pub fn layout(&self) -> std::option::Option<&crate::model::Layout> {
        self.layout.as_ref()
    }
}
/// See [`CampaignInAppMessage`](crate::model::CampaignInAppMessage).
pub mod campaign_in_app_message {

    /// A builder for [`CampaignInAppMessage`](crate::model::CampaignInAppMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        pub(crate) custom_config: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) layout: std::option::Option<crate::model::Layout>,
    }
    impl Builder {
        /// <p>The message body of the notification, the email body or the text message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The message body of the notification, the email body or the text message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// Appends an item to `content`.
        ///
        /// To override the contents of this collection use [`set_content`](Self::set_content).
        ///
        /// <p>In-app message content.</p>
        pub fn content(mut self, input: crate::model::InAppMessageContent) -> Self {
            let mut v = self.content.unwrap_or_default();
            v.push(input);
            self.content = Some(v);
            self
        }
        /// <p>In-app message content.</p>
        pub fn set_content(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        ) -> Self {
            self.content = input;
            self
        }
        /// Adds a key-value pair to `custom_config`.
        ///
        /// To override the contents of this collection use [`set_custom_config`](Self::set_custom_config).
        ///
        /// <p>Custom config to be sent to client.</p>
        pub fn custom_config(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.custom_config.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.custom_config = Some(hash_map);
            self
        }
        /// <p>Custom config to be sent to client.</p>
        pub fn set_custom_config(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.custom_config = input;
            self
        }
        /// <p>In-app message layout.</p>
        pub fn layout(mut self, input: crate::model::Layout) -> Self {
            self.layout = Some(input);
            self
        }
        /// <p>In-app message layout.</p>
        pub fn set_layout(mut self, input: std::option::Option<crate::model::Layout>) -> Self {
            self.layout = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignInAppMessage`](crate::model::CampaignInAppMessage).
        pub fn build(self) -> crate::model::CampaignInAppMessage {
            crate::model::CampaignInAppMessage {
                body: self.body,
                content: self.content,
                custom_config: self.custom_config,
                layout: self.layout,
            }
        }
    }
}
impl CampaignInAppMessage {
    /// Creates a new builder-style object to manufacture [`CampaignInAppMessage`](crate::model::CampaignInAppMessage).
    pub fn builder() -> crate::model::campaign_in_app_message::Builder {
        crate::model::campaign_in_app_message::Builder::default()
    }
}

/// <p>Specifies the content and settings for an SMS message that's sent to recipients of a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignSmsMessage {
    /// <p>The body of the SMS message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
    #[doc(hidden)]
    pub message_type: std::option::Option<crate::model::MessageType>,
    /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
    #[doc(hidden)]
    pub origination_number: std::option::Option<std::string::String>,
    /// <p>The sender ID to display on recipients' devices when they receive the SMS message.</p>
    #[doc(hidden)]
    pub sender_id: std::option::Option<std::string::String>,
    /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
    #[doc(hidden)]
    pub entity_id: std::option::Option<std::string::String>,
    /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
    #[doc(hidden)]
    pub template_id: std::option::Option<std::string::String>,
}
impl CampaignSmsMessage {
    /// <p>The body of the SMS message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
    pub fn message_type(&self) -> std::option::Option<&crate::model::MessageType> {
        self.message_type.as_ref()
    }
    /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
    pub fn origination_number(&self) -> std::option::Option<&str> {
        self.origination_number.as_deref()
    }
    /// <p>The sender ID to display on recipients' devices when they receive the SMS message.</p>
    pub fn sender_id(&self) -> std::option::Option<&str> {
        self.sender_id.as_deref()
    }
    /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
    pub fn entity_id(&self) -> std::option::Option<&str> {
        self.entity_id.as_deref()
    }
    /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
    pub fn template_id(&self) -> std::option::Option<&str> {
        self.template_id.as_deref()
    }
}
/// See [`CampaignSmsMessage`](crate::model::CampaignSmsMessage).
pub mod campaign_sms_message {

    /// A builder for [`CampaignSmsMessage`](crate::model::CampaignSmsMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) message_type: std::option::Option<crate::model::MessageType>,
        pub(crate) origination_number: std::option::Option<std::string::String>,
        pub(crate) sender_id: std::option::Option<std::string::String>,
        pub(crate) entity_id: std::option::Option<std::string::String>,
        pub(crate) template_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The body of the SMS message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the SMS message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
        pub fn message_type(mut self, input: crate::model::MessageType) -> Self {
            self.message_type = Some(input);
            self
        }
        /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
        pub fn set_message_type(
            mut self,
            input: std::option::Option<crate::model::MessageType>,
        ) -> Self {
            self.message_type = input;
            self
        }
        /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
        pub fn origination_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.origination_number = Some(input.into());
            self
        }
        /// <p>The long code to send the SMS message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code using an E.164 format to ensure prompt and accurate delivery of the message. For example, +12065550100.</p>
        pub fn set_origination_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.origination_number = input;
            self
        }
        /// <p>The sender ID to display on recipients' devices when they receive the SMS message.</p>
        pub fn sender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.sender_id = Some(input.into());
            self
        }
        /// <p>The sender ID to display on recipients' devices when they receive the SMS message.</p>
        pub fn set_sender_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sender_id = input;
            self
        }
        /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
        pub fn entity_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.entity_id = Some(input.into());
            self
        }
        /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
        pub fn set_entity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.entity_id = input;
            self
        }
        /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
        pub fn template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_id = Some(input.into());
            self
        }
        /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
        pub fn set_template_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.template_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignSmsMessage`](crate::model::CampaignSmsMessage).
        pub fn build(self) -> crate::model::CampaignSmsMessage {
            crate::model::CampaignSmsMessage {
                body: self.body,
                message_type: self.message_type,
                origination_number: self.origination_number,
                sender_id: self.sender_id,
                entity_id: self.entity_id,
                template_id: self.template_id,
            }
        }
    }
}
impl CampaignSmsMessage {
    /// Creates a new builder-style object to manufacture [`CampaignSmsMessage`](crate::model::CampaignSmsMessage).
    pub fn builder() -> crate::model::campaign_sms_message::Builder {
        crate::model::campaign_sms_message::Builder::default()
    }
}

/// <p>Specifies the content and settings for a push notification that's sent to recipients of a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Message {
    /// <p>The action to occur if a recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of iOS and Android.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The body of the notification message. The maximum number of characters is 200.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The URL of the image to display as the push-notification icon, such as the icon for the app.</p>
    #[doc(hidden)]
    pub image_icon_url: std::option::Option<std::string::String>,
    /// <p>The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the app.</p>
    #[doc(hidden)]
    pub image_small_icon_url: std::option::Option<std::string::String>,
    /// <p>The URL of an image to display in the push notification.</p>
    #[doc(hidden)]
    pub image_url: std::option::Option<std::string::String>,
    /// <p>The JSON payload to use for a silent push notification.</p>
    #[doc(hidden)]
    pub json_body: std::option::Option<std::string::String>,
    /// <p>The URL of the image or video to display in the push notification.</p>
    #[doc(hidden)]
    pub media_url: std::option::Option<std::string::String>,
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration, displaying messages in an in-app message center, or supporting phone home functionality.</p>
    #[doc(hidden)]
    pub silent_push: bool,
    /// <p>The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
    /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
    #[doc(hidden)]
    pub time_to_live: i32,
    /// <p>The title to display above the notification message on a recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl Message {
    /// <p>The action to occur if a recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of iOS and Android.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The body of the notification message. The maximum number of characters is 200.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The URL of the image to display as the push-notification icon, such as the icon for the app.</p>
    pub fn image_icon_url(&self) -> std::option::Option<&str> {
        self.image_icon_url.as_deref()
    }
    /// <p>The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the app.</p>
    pub fn image_small_icon_url(&self) -> std::option::Option<&str> {
        self.image_small_icon_url.as_deref()
    }
    /// <p>The URL of an image to display in the push notification.</p>
    pub fn image_url(&self) -> std::option::Option<&str> {
        self.image_url.as_deref()
    }
    /// <p>The JSON payload to use for a silent push notification.</p>
    pub fn json_body(&self) -> std::option::Option<&str> {
        self.json_body.as_deref()
    }
    /// <p>The URL of the image or video to display in the push notification.</p>
    pub fn media_url(&self) -> std::option::Option<&str> {
        self.media_url.as_deref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration, displaying messages in an in-app message center, or supporting phone home functionality.</p>
    pub fn silent_push(&self) -> bool {
        self.silent_push
    }
    /// <p>The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
    /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
    pub fn time_to_live(&self) -> i32 {
        self.time_to_live
    }
    /// <p>The title to display above the notification message on a recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`Message`](crate::model::Message).
pub mod message {

    /// A builder for [`Message`](crate::model::Message).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) image_icon_url: std::option::Option<std::string::String>,
        pub(crate) image_small_icon_url: std::option::Option<std::string::String>,
        pub(crate) image_url: std::option::Option<std::string::String>,
        pub(crate) json_body: std::option::Option<std::string::String>,
        pub(crate) media_url: std::option::Option<std::string::String>,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) silent_push: std::option::Option<bool>,
        pub(crate) time_to_live: std::option::Option<i32>,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The action to occur if a recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of iOS and Android.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if a recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of iOS and Android.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The body of the notification message. The maximum number of characters is 200.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the notification message. The maximum number of characters is 200.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The URL of the image to display as the push-notification icon, such as the icon for the app.</p>
        pub fn image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the image to display as the push-notification icon, such as the icon for the app.</p>
        pub fn set_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_icon_url = input;
            self
        }
        /// <p>The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the app.</p>
        pub fn image_small_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_small_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the app.</p>
        pub fn set_image_small_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_small_icon_url = input;
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn image_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_url = Some(input.into());
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn set_image_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_url = input;
            self
        }
        /// <p>The JSON payload to use for a silent push notification.</p>
        pub fn json_body(mut self, input: impl Into<std::string::String>) -> Self {
            self.json_body = Some(input.into());
            self
        }
        /// <p>The JSON payload to use for a silent push notification.</p>
        pub fn set_json_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.json_body = input;
            self
        }
        /// <p>The URL of the image or video to display in the push notification.</p>
        pub fn media_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.media_url = Some(input.into());
            self
        }
        /// <p>The URL of the image or video to display in the push notification.</p>
        pub fn set_media_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.media_url = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration, displaying messages in an in-app message center, or supporting phone home functionality.</p>
        pub fn silent_push(mut self, input: bool) -> Self {
            self.silent_push = Some(input);
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration, displaying messages in an in-app message center, or supporting phone home functionality.</p>
        pub fn set_silent_push(mut self, input: std::option::Option<bool>) -> Self {
            self.silent_push = input;
            self
        }
        /// <p>The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
        /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
        pub fn time_to_live(mut self, input: i32) -> Self {
            self.time_to_live = Some(input);
            self
        }
        /// <p>The number of seconds that the push-notification service should keep the message, if the service is unable to deliver the notification the first time. This value is converted to an expiration value when it's sent to a push-notification service. If this value is 0, the service treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
        /// <p>This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service.</p>
        pub fn set_time_to_live(mut self, input: std::option::Option<i32>) -> Self {
            self.time_to_live = input;
            self
        }
        /// <p>The title to display above the notification message on a recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to display above the notification message on a recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`Message`](crate::model::Message).
        pub fn build(self) -> crate::model::Message {
            crate::model::Message {
                action: self.action,
                body: self.body,
                image_icon_url: self.image_icon_url,
                image_small_icon_url: self.image_small_icon_url,
                image_url: self.image_url,
                json_body: self.json_body,
                media_url: self.media_url,
                raw_content: self.raw_content,
                silent_push: self.silent_push.unwrap_or_default(),
                time_to_live: self.time_to_live.unwrap_or_default(),
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl Message {
    /// Creates a new builder-style object to manufacture [`Message`](crate::model::Message).
    pub fn builder() -> crate::model::message::Builder {
        crate::model::message::Builder::default()
    }
}

/// <p>Specifies the content and "From" address for an email message that's sent to recipients of a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignEmailMessage {
    /// <p>The body of the email for recipients whose email clients don't render HTML content.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The verified email address to send the email from. The default address is the FromAddress specified for the email channel for the application.</p>
    #[doc(hidden)]
    pub from_address: std::option::Option<std::string::String>,
    /// <p>The body of the email, in HTML format, for recipients whose email clients render HTML content.</p>
    #[doc(hidden)]
    pub html_body: std::option::Option<std::string::String>,
    /// <p>The subject line, or title, of the email.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
}
impl CampaignEmailMessage {
    /// <p>The body of the email for recipients whose email clients don't render HTML content.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The verified email address to send the email from. The default address is the FromAddress specified for the email channel for the application.</p>
    pub fn from_address(&self) -> std::option::Option<&str> {
        self.from_address.as_deref()
    }
    /// <p>The body of the email, in HTML format, for recipients whose email clients render HTML content.</p>
    pub fn html_body(&self) -> std::option::Option<&str> {
        self.html_body.as_deref()
    }
    /// <p>The subject line, or title, of the email.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
}
/// See [`CampaignEmailMessage`](crate::model::CampaignEmailMessage).
pub mod campaign_email_message {

    /// A builder for [`CampaignEmailMessage`](crate::model::CampaignEmailMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) from_address: std::option::Option<std::string::String>,
        pub(crate) html_body: std::option::Option<std::string::String>,
        pub(crate) title: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The body of the email for recipients whose email clients don't render HTML content.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the email for recipients whose email clients don't render HTML content.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The verified email address to send the email from. The default address is the FromAddress specified for the email channel for the application.</p>
        pub fn from_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.from_address = Some(input.into());
            self
        }
        /// <p>The verified email address to send the email from. The default address is the FromAddress specified for the email channel for the application.</p>
        pub fn set_from_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.from_address = input;
            self
        }
        /// <p>The body of the email, in HTML format, for recipients whose email clients render HTML content.</p>
        pub fn html_body(mut self, input: impl Into<std::string::String>) -> Self {
            self.html_body = Some(input.into());
            self
        }
        /// <p>The body of the email, in HTML format, for recipients whose email clients render HTML content.</p>
        pub fn set_html_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.html_body = input;
            self
        }
        /// <p>The subject line, or title, of the email.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The subject line, or title, of the email.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignEmailMessage`](crate::model::CampaignEmailMessage).
        pub fn build(self) -> crate::model::CampaignEmailMessage {
            crate::model::CampaignEmailMessage {
                body: self.body,
                from_address: self.from_address,
                html_body: self.html_body,
                title: self.title,
            }
        }
    }
}
impl CampaignEmailMessage {
    /// Creates a new builder-style object to manufacture [`CampaignEmailMessage`](crate::model::CampaignEmailMessage).
    pub fn builder() -> crate::model::campaign_email_message::Builder {
        crate::model::campaign_email_message::Builder::default()
    }
}

/// <p>Specifies the contents of a message that's sent through a custom channel to recipients of a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignCustomMessage {
    /// <p>The raw, JSON-formatted string to use as the payload for the message. The maximum size is 5 KB.</p>
    #[doc(hidden)]
    pub data: std::option::Option<std::string::String>,
}
impl CampaignCustomMessage {
    /// <p>The raw, JSON-formatted string to use as the payload for the message. The maximum size is 5 KB.</p>
    pub fn data(&self) -> std::option::Option<&str> {
        self.data.as_deref()
    }
}
/// See [`CampaignCustomMessage`](crate::model::CampaignCustomMessage).
pub mod campaign_custom_message {

    /// A builder for [`CampaignCustomMessage`](crate::model::CampaignCustomMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) data: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The raw, JSON-formatted string to use as the payload for the message. The maximum size is 5 KB.</p>
        pub fn data(mut self, input: impl Into<std::string::String>) -> Self {
            self.data = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the message. The maximum size is 5 KB.</p>
        pub fn set_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.data = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignCustomMessage`](crate::model::CampaignCustomMessage).
        pub fn build(self) -> crate::model::CampaignCustomMessage {
            crate::model::CampaignCustomMessage { data: self.data }
        }
    }
}
impl CampaignCustomMessage {
    /// Creates a new builder-style object to manufacture [`CampaignCustomMessage`](crate::model::CampaignCustomMessage).
    pub fn builder() -> crate::model::campaign_custom_message::Builder {
        crate::model::campaign_custom_message::Builder::default()
    }
}

/// <p>For a campaign, specifies limits on the messages that the campaign can send. For an application, specifies the default limits for messages that campaigns in the application can send.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignLimits {
    /// <p>The maximum number of messages that a campaign can send to a single endpoint during a 24-hour period. For an application, this value specifies the default limit for the number of messages that campaigns and journeys can send to a single endpoint during a 24-hour period. The maximum value is 100.</p>
    #[doc(hidden)]
    pub daily: i32,
    /// <p>The maximum amount of time, in seconds, that a campaign can attempt to deliver a message after the scheduled start time for the campaign. The minimum value is 60 seconds.</p>
    #[doc(hidden)]
    pub maximum_duration: i32,
    /// <p>The maximum number of messages that a campaign can send each second. For an application, this value specifies the default limit for the number of messages that campaigns can send each second. The minimum value is 50. The maximum value is 20,000.</p>
    #[doc(hidden)]
    pub messages_per_second: i32,
    /// <p>The maximum number of messages that a campaign can send to a single endpoint during the course of the campaign. If a campaign recurs, this setting applies to all runs of the campaign. The maximum value is 100.</p>
    #[doc(hidden)]
    pub total: i32,
    /// <p>The maximum total number of messages that the campaign can send per user session.</p>
    #[doc(hidden)]
    pub session: i32,
}
impl CampaignLimits {
    /// <p>The maximum number of messages that a campaign can send to a single endpoint during a 24-hour period. For an application, this value specifies the default limit for the number of messages that campaigns and journeys can send to a single endpoint during a 24-hour period. The maximum value is 100.</p>
    pub fn daily(&self) -> i32 {
        self.daily
    }
    /// <p>The maximum amount of time, in seconds, that a campaign can attempt to deliver a message after the scheduled start time for the campaign. The minimum value is 60 seconds.</p>
    pub fn maximum_duration(&self) -> i32 {
        self.maximum_duration
    }
    /// <p>The maximum number of messages that a campaign can send each second. For an application, this value specifies the default limit for the number of messages that campaigns can send each second. The minimum value is 50. The maximum value is 20,000.</p>
    pub fn messages_per_second(&self) -> i32 {
        self.messages_per_second
    }
    /// <p>The maximum number of messages that a campaign can send to a single endpoint during the course of the campaign. If a campaign recurs, this setting applies to all runs of the campaign. The maximum value is 100.</p>
    pub fn total(&self) -> i32 {
        self.total
    }
    /// <p>The maximum total number of messages that the campaign can send per user session.</p>
    pub fn session(&self) -> i32 {
        self.session
    }
}
/// See [`CampaignLimits`](crate::model::CampaignLimits).
pub mod campaign_limits {

    /// A builder for [`CampaignLimits`](crate::model::CampaignLimits).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) daily: std::option::Option<i32>,
        pub(crate) maximum_duration: std::option::Option<i32>,
        pub(crate) messages_per_second: std::option::Option<i32>,
        pub(crate) total: std::option::Option<i32>,
        pub(crate) session: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The maximum number of messages that a campaign can send to a single endpoint during a 24-hour period. For an application, this value specifies the default limit for the number of messages that campaigns and journeys can send to a single endpoint during a 24-hour period. The maximum value is 100.</p>
        pub fn daily(mut self, input: i32) -> Self {
            self.daily = Some(input);
            self
        }
        /// <p>The maximum number of messages that a campaign can send to a single endpoint during a 24-hour period. For an application, this value specifies the default limit for the number of messages that campaigns and journeys can send to a single endpoint during a 24-hour period. The maximum value is 100.</p>
        pub fn set_daily(mut self, input: std::option::Option<i32>) -> Self {
            self.daily = input;
            self
        }
        /// <p>The maximum amount of time, in seconds, that a campaign can attempt to deliver a message after the scheduled start time for the campaign. The minimum value is 60 seconds.</p>
        pub fn maximum_duration(mut self, input: i32) -> Self {
            self.maximum_duration = Some(input);
            self
        }
        /// <p>The maximum amount of time, in seconds, that a campaign can attempt to deliver a message after the scheduled start time for the campaign. The minimum value is 60 seconds.</p>
        pub fn set_maximum_duration(mut self, input: std::option::Option<i32>) -> Self {
            self.maximum_duration = input;
            self
        }
        /// <p>The maximum number of messages that a campaign can send each second. For an application, this value specifies the default limit for the number of messages that campaigns can send each second. The minimum value is 50. The maximum value is 20,000.</p>
        pub fn messages_per_second(mut self, input: i32) -> Self {
            self.messages_per_second = Some(input);
            self
        }
        /// <p>The maximum number of messages that a campaign can send each second. For an application, this value specifies the default limit for the number of messages that campaigns can send each second. The minimum value is 50. The maximum value is 20,000.</p>
        pub fn set_messages_per_second(mut self, input: std::option::Option<i32>) -> Self {
            self.messages_per_second = input;
            self
        }
        /// <p>The maximum number of messages that a campaign can send to a single endpoint during the course of the campaign. If a campaign recurs, this setting applies to all runs of the campaign. The maximum value is 100.</p>
        pub fn total(mut self, input: i32) -> Self {
            self.total = Some(input);
            self
        }
        /// <p>The maximum number of messages that a campaign can send to a single endpoint during the course of the campaign. If a campaign recurs, this setting applies to all runs of the campaign. The maximum value is 100.</p>
        pub fn set_total(mut self, input: std::option::Option<i32>) -> Self {
            self.total = input;
            self
        }
        /// <p>The maximum total number of messages that the campaign can send per user session.</p>
        pub fn session(mut self, input: i32) -> Self {
            self.session = Some(input);
            self
        }
        /// <p>The maximum total number of messages that the campaign can send per user session.</p>
        pub fn set_session(mut self, input: std::option::Option<i32>) -> Self {
            self.session = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignLimits`](crate::model::CampaignLimits).
        pub fn build(self) -> crate::model::CampaignLimits {
            crate::model::CampaignLimits {
                daily: self.daily.unwrap_or_default(),
                maximum_duration: self.maximum_duration.unwrap_or_default(),
                messages_per_second: self.messages_per_second.unwrap_or_default(),
                total: self.total.unwrap_or_default(),
                session: self.session.unwrap_or_default(),
            }
        }
    }
}
impl CampaignLimits {
    /// Creates a new builder-style object to manufacture [`CampaignLimits`](crate::model::CampaignLimits).
    pub fn builder() -> crate::model::campaign_limits::Builder {
        crate::model::campaign_limits::Builder::default()
    }
}

/// <p>Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignHook {
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to customize a segment for a campaign.</p>
    #[doc(hidden)]
    pub lambda_function_name: std::option::Option<std::string::String>,
    /// <p>The mode that Amazon Pinpoint uses to invoke the AWS Lambda function. Possible values are:</p>
    /// <ul>
    /// <li><p>FILTER - Invoke the function to customize the segment that's used by a campaign.</p></li>
    /// <li><p>DELIVERY - (Deprecated) Previously, invoked the function to send a campaign through a custom channel. This functionality is not supported anymore. To send a campaign through a custom channel, use the CustomDeliveryConfiguration and CampaignCustomMessage objects of the campaign.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub mode: std::option::Option<crate::model::Mode>,
    /// <p>The web URL that Amazon Pinpoint calls to invoke the AWS Lambda function over HTTPS.</p>
    #[doc(hidden)]
    pub web_url: std::option::Option<std::string::String>,
}
impl CampaignHook {
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to customize a segment for a campaign.</p>
    pub fn lambda_function_name(&self) -> std::option::Option<&str> {
        self.lambda_function_name.as_deref()
    }
    /// <p>The mode that Amazon Pinpoint uses to invoke the AWS Lambda function. Possible values are:</p>
    /// <ul>
    /// <li><p>FILTER - Invoke the function to customize the segment that's used by a campaign.</p></li>
    /// <li><p>DELIVERY - (Deprecated) Previously, invoked the function to send a campaign through a custom channel. This functionality is not supported anymore. To send a campaign through a custom channel, use the CustomDeliveryConfiguration and CampaignCustomMessage objects of the campaign.</p></li>
    /// </ul>
    pub fn mode(&self) -> std::option::Option<&crate::model::Mode> {
        self.mode.as_ref()
    }
    /// <p>The web URL that Amazon Pinpoint calls to invoke the AWS Lambda function over HTTPS.</p>
    pub fn web_url(&self) -> std::option::Option<&str> {
        self.web_url.as_deref()
    }
}
/// See [`CampaignHook`](crate::model::CampaignHook).
pub mod campaign_hook {

    /// A builder for [`CampaignHook`](crate::model::CampaignHook).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) lambda_function_name: std::option::Option<std::string::String>,
        pub(crate) mode: std::option::Option<crate::model::Mode>,
        pub(crate) web_url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to customize a segment for a campaign.</p>
        pub fn lambda_function_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.lambda_function_name = Some(input.into());
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to customize a segment for a campaign.</p>
        pub fn set_lambda_function_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.lambda_function_name = input;
            self
        }
        /// <p>The mode that Amazon Pinpoint uses to invoke the AWS Lambda function. Possible values are:</p>
        /// <ul>
        /// <li><p>FILTER - Invoke the function to customize the segment that's used by a campaign.</p></li>
        /// <li><p>DELIVERY - (Deprecated) Previously, invoked the function to send a campaign through a custom channel. This functionality is not supported anymore. To send a campaign through a custom channel, use the CustomDeliveryConfiguration and CampaignCustomMessage objects of the campaign.</p></li>
        /// </ul>
        pub fn mode(mut self, input: crate::model::Mode) -> Self {
            self.mode = Some(input);
            self
        }
        /// <p>The mode that Amazon Pinpoint uses to invoke the AWS Lambda function. Possible values are:</p>
        /// <ul>
        /// <li><p>FILTER - Invoke the function to customize the segment that's used by a campaign.</p></li>
        /// <li><p>DELIVERY - (Deprecated) Previously, invoked the function to send a campaign through a custom channel. This functionality is not supported anymore. To send a campaign through a custom channel, use the CustomDeliveryConfiguration and CampaignCustomMessage objects of the campaign.</p></li>
        /// </ul>
        pub fn set_mode(mut self, input: std::option::Option<crate::model::Mode>) -> Self {
            self.mode = input;
            self
        }
        /// <p>The web URL that Amazon Pinpoint calls to invoke the AWS Lambda function over HTTPS.</p>
        pub fn web_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.web_url = Some(input.into());
            self
        }
        /// <p>The web URL that Amazon Pinpoint calls to invoke the AWS Lambda function over HTTPS.</p>
        pub fn set_web_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.web_url = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignHook`](crate::model::CampaignHook).
        pub fn build(self) -> crate::model::CampaignHook {
            crate::model::CampaignHook {
                lambda_function_name: self.lambda_function_name,
                mode: self.mode,
                web_url: self.web_url,
            }
        }
    }
}
impl CampaignHook {
    /// Creates a new builder-style object to manufacture [`CampaignHook`](crate::model::CampaignHook).
    pub fn builder() -> crate::model::campaign_hook::Builder {
        crate::model::campaign_hook::Builder::default()
    }
}

/// When writing a match expression against `Mode`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let mode = unimplemented!();
/// match mode {
///     Mode::Delivery => { /* ... */ },
///     Mode::Filter => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `mode` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Mode::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Mode::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Mode::NewFeature` is defined.
/// Specifically, when `mode` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Mode::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum Mode {
    #[allow(missing_docs)] // documentation missing in model
    Delivery,
    #[allow(missing_docs)] // documentation missing in model
    Filter,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Mode {
    fn from(s: &str) -> Self {
        match s {
            "DELIVERY" => Mode::Delivery,
            "FILTER" => Mode::Filter,
            other => Mode::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for Mode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Mode::from(s))
    }
}
impl Mode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Mode::Delivery => "DELIVERY",
            Mode::Filter => "FILTER",
            Mode::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["DELIVERY", "FILTER"]
    }
}
impl AsRef<str> for Mode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the delivery configuration settings for sending a campaign or campaign treatment through a custom channel. This object is required if you use the CampaignCustomMessage object to define the message to send for the campaign or campaign treatment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CustomDeliveryConfiguration {
    /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
    /// <ul>
    /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
    /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub delivery_uri: std::option::Option<std::string::String>,
    /// <p>The types of endpoints to send the campaign or treatment to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
    #[doc(hidden)]
    pub endpoint_types: std::option::Option<std::vec::Vec<crate::model::EndpointTypesElement>>,
}
impl CustomDeliveryConfiguration {
    /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
    /// <ul>
    /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
    /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
    /// </ul>
    pub fn delivery_uri(&self) -> std::option::Option<&str> {
        self.delivery_uri.as_deref()
    }
    /// <p>The types of endpoints to send the campaign or treatment to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
    pub fn endpoint_types(&self) -> std::option::Option<&[crate::model::EndpointTypesElement]> {
        self.endpoint_types.as_deref()
    }
}
/// See [`CustomDeliveryConfiguration`](crate::model::CustomDeliveryConfiguration).
pub mod custom_delivery_configuration {

    /// A builder for [`CustomDeliveryConfiguration`](crate::model::CustomDeliveryConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) delivery_uri: std::option::Option<std::string::String>,
        pub(crate) endpoint_types:
            std::option::Option<std::vec::Vec<crate::model::EndpointTypesElement>>,
    }
    impl Builder {
        /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
        /// <ul>
        /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
        /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
        /// </ul>
        pub fn delivery_uri(mut self, input: impl Into<std::string::String>) -> Self {
            self.delivery_uri = Some(input.into());
            self
        }
        /// <p>The destination to send the campaign or treatment to. This value can be one of the following:</p>
        /// <ul>
        /// <li><p>The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.</p></li>
        /// <li><p>The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.</p></li>
        /// </ul>
        pub fn set_delivery_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.delivery_uri = input;
            self
        }
        /// Appends an item to `endpoint_types`.
        ///
        /// To override the contents of this collection use [`set_endpoint_types`](Self::set_endpoint_types).
        ///
        /// <p>The types of endpoints to send the campaign or treatment to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
        pub fn endpoint_types(mut self, input: crate::model::EndpointTypesElement) -> Self {
            let mut v = self.endpoint_types.unwrap_or_default();
            v.push(input);
            self.endpoint_types = Some(v);
            self
        }
        /// <p>The types of endpoints to send the campaign or treatment to. Each valid value maps to a type of channel that you can associate with an endpoint by using the ChannelType property of an endpoint.</p>
        pub fn set_endpoint_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::EndpointTypesElement>>,
        ) -> Self {
            self.endpoint_types = input;
            self
        }
        /// Consumes the builder and constructs a [`CustomDeliveryConfiguration`](crate::model::CustomDeliveryConfiguration).
        pub fn build(self) -> crate::model::CustomDeliveryConfiguration {
            crate::model::CustomDeliveryConfiguration {
                delivery_uri: self.delivery_uri,
                endpoint_types: self.endpoint_types,
            }
        }
    }
}
impl CustomDeliveryConfiguration {
    /// Creates a new builder-style object to manufacture [`CustomDeliveryConfiguration`](crate::model::CustomDeliveryConfiguration).
    pub fn builder() -> crate::model::custom_delivery_configuration::Builder {
        crate::model::custom_delivery_configuration::Builder::default()
    }
}

/// <p>Specifies the settings for a campaign treatment. A <i>treatment</i> is a variation of a campaign that's used for A/B testing of a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TreatmentResource {
    /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
    #[doc(hidden)]
    pub custom_delivery_configuration:
        std::option::Option<crate::model::CustomDeliveryConfiguration>,
    /// <p>The unique identifier for the treatment.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The message configuration settings for the treatment.</p>
    #[doc(hidden)]
    pub message_configuration: std::option::Option<crate::model::MessageConfiguration>,
    /// <p>The schedule settings for the treatment.</p>
    #[doc(hidden)]
    pub schedule: std::option::Option<crate::model::Schedule>,
    /// <p>The allocated percentage of users (segment members) that the treatment is sent to.</p>
    #[doc(hidden)]
    pub size_percent: i32,
    /// <p>The current status of the treatment.</p>
    #[doc(hidden)]
    pub state: std::option::Option<crate::model::CampaignState>,
    /// <p>The message template to use for the treatment.</p>
    #[doc(hidden)]
    pub template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
    /// <p>The custom description of the treatment.</p>
    #[doc(hidden)]
    pub treatment_description: std::option::Option<std::string::String>,
    /// <p>The custom name of the treatment.</p>
    #[doc(hidden)]
    pub treatment_name: std::option::Option<std::string::String>,
}
impl TreatmentResource {
    /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
    pub fn custom_delivery_configuration(
        &self,
    ) -> std::option::Option<&crate::model::CustomDeliveryConfiguration> {
        self.custom_delivery_configuration.as_ref()
    }
    /// <p>The unique identifier for the treatment.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The message configuration settings for the treatment.</p>
    pub fn message_configuration(
        &self,
    ) -> std::option::Option<&crate::model::MessageConfiguration> {
        self.message_configuration.as_ref()
    }
    /// <p>The schedule settings for the treatment.</p>
    pub fn schedule(&self) -> std::option::Option<&crate::model::Schedule> {
        self.schedule.as_ref()
    }
    /// <p>The allocated percentage of users (segment members) that the treatment is sent to.</p>
    pub fn size_percent(&self) -> i32 {
        self.size_percent
    }
    /// <p>The current status of the treatment.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::CampaignState> {
        self.state.as_ref()
    }
    /// <p>The message template to use for the treatment.</p>
    pub fn template_configuration(
        &self,
    ) -> std::option::Option<&crate::model::TemplateConfiguration> {
        self.template_configuration.as_ref()
    }
    /// <p>The custom description of the treatment.</p>
    pub fn treatment_description(&self) -> std::option::Option<&str> {
        self.treatment_description.as_deref()
    }
    /// <p>The custom name of the treatment.</p>
    pub fn treatment_name(&self) -> std::option::Option<&str> {
        self.treatment_name.as_deref()
    }
}
/// See [`TreatmentResource`](crate::model::TreatmentResource).
pub mod treatment_resource {

    /// A builder for [`TreatmentResource`](crate::model::TreatmentResource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) custom_delivery_configuration:
            std::option::Option<crate::model::CustomDeliveryConfiguration>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) message_configuration: std::option::Option<crate::model::MessageConfiguration>,
        pub(crate) schedule: std::option::Option<crate::model::Schedule>,
        pub(crate) size_percent: std::option::Option<i32>,
        pub(crate) state: std::option::Option<crate::model::CampaignState>,
        pub(crate) template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
        pub(crate) treatment_description: std::option::Option<std::string::String>,
        pub(crate) treatment_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
        pub fn custom_delivery_configuration(
            mut self,
            input: crate::model::CustomDeliveryConfiguration,
        ) -> Self {
            self.custom_delivery_configuration = Some(input);
            self
        }
        /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
        pub fn set_custom_delivery_configuration(
            mut self,
            input: std::option::Option<crate::model::CustomDeliveryConfiguration>,
        ) -> Self {
            self.custom_delivery_configuration = input;
            self
        }
        /// <p>The unique identifier for the treatment.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the treatment.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The message configuration settings for the treatment.</p>
        pub fn message_configuration(mut self, input: crate::model::MessageConfiguration) -> Self {
            self.message_configuration = Some(input);
            self
        }
        /// <p>The message configuration settings for the treatment.</p>
        pub fn set_message_configuration(
            mut self,
            input: std::option::Option<crate::model::MessageConfiguration>,
        ) -> Self {
            self.message_configuration = input;
            self
        }
        /// <p>The schedule settings for the treatment.</p>
        pub fn schedule(mut self, input: crate::model::Schedule) -> Self {
            self.schedule = Some(input);
            self
        }
        /// <p>The schedule settings for the treatment.</p>
        pub fn set_schedule(mut self, input: std::option::Option<crate::model::Schedule>) -> Self {
            self.schedule = input;
            self
        }
        /// <p>The allocated percentage of users (segment members) that the treatment is sent to.</p>
        pub fn size_percent(mut self, input: i32) -> Self {
            self.size_percent = Some(input);
            self
        }
        /// <p>The allocated percentage of users (segment members) that the treatment is sent to.</p>
        pub fn set_size_percent(mut self, input: std::option::Option<i32>) -> Self {
            self.size_percent = input;
            self
        }
        /// <p>The current status of the treatment.</p>
        pub fn state(mut self, input: crate::model::CampaignState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The current status of the treatment.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::CampaignState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The message template to use for the treatment.</p>
        pub fn template_configuration(
            mut self,
            input: crate::model::TemplateConfiguration,
        ) -> Self {
            self.template_configuration = Some(input);
            self
        }
        /// <p>The message template to use for the treatment.</p>
        pub fn set_template_configuration(
            mut self,
            input: std::option::Option<crate::model::TemplateConfiguration>,
        ) -> Self {
            self.template_configuration = input;
            self
        }
        /// <p>The custom description of the treatment.</p>
        pub fn treatment_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_description = Some(input.into());
            self
        }
        /// <p>The custom description of the treatment.</p>
        pub fn set_treatment_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_description = input;
            self
        }
        /// <p>The custom name of the treatment.</p>
        pub fn treatment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_name = Some(input.into());
            self
        }
        /// <p>The custom name of the treatment.</p>
        pub fn set_treatment_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_name = input;
            self
        }
        /// Consumes the builder and constructs a [`TreatmentResource`](crate::model::TreatmentResource).
        pub fn build(self) -> crate::model::TreatmentResource {
            crate::model::TreatmentResource {
                custom_delivery_configuration: self.custom_delivery_configuration,
                id: self.id,
                message_configuration: self.message_configuration,
                schedule: self.schedule,
                size_percent: self.size_percent.unwrap_or_default(),
                state: self.state,
                template_configuration: self.template_configuration,
                treatment_description: self.treatment_description,
                treatment_name: self.treatment_name,
            }
        }
    }
}
impl TreatmentResource {
    /// Creates a new builder-style object to manufacture [`TreatmentResource`](crate::model::TreatmentResource).
    pub fn builder() -> crate::model::treatment_resource::Builder {
        crate::model::treatment_resource::Builder::default()
    }
}

/// <p>Specifies the configuration and other settings for a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WriteCampaignRequest {
    /// <p>An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.</p>
    #[doc(hidden)]
    pub additional_treatments:
        std::option::Option<std::vec::Vec<crate::model::WriteTreatmentResource>>,
    /// <p>The delivery configuration settings for sending the campaign through a custom channel. This object is required if the MessageConfiguration object for the campaign specifies a CustomMessage object.</p>
    #[doc(hidden)]
    pub custom_delivery_configuration:
        std::option::Option<crate::model::CustomDeliveryConfiguration>,
    /// <p>A custom description of the campaign.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
    #[doc(hidden)]
    pub holdout_percent: i32,
    /// <p>The settings for the AWS Lambda function to invoke as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
    #[doc(hidden)]
    pub hook: std::option::Option<crate::model::CampaignHook>,
    /// <p>Specifies whether to pause the campaign. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
    #[doc(hidden)]
    pub is_paused: bool,
    /// <p>The messaging limits for the campaign.</p>
    #[doc(hidden)]
    pub limits: std::option::Option<crate::model::CampaignLimits>,
    /// <p>The message configuration settings for the campaign.</p>
    #[doc(hidden)]
    pub message_configuration: std::option::Option<crate::model::MessageConfiguration>,
    /// <p>A custom name for the campaign.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The schedule settings for the campaign.</p>
    #[doc(hidden)]
    pub schedule: std::option::Option<crate::model::Schedule>,
    /// <p>The unique identifier for the segment to associate with the campaign.</p>
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
    /// <p>The version of the segment to associate with the campaign.</p>
    #[doc(hidden)]
    pub segment_version: i32,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The message template to use for the campaign.</p>
    #[doc(hidden)]
    pub template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
    /// <p>A custom description of the default treatment for the campaign.</p>
    #[doc(hidden)]
    pub treatment_description: std::option::Option<std::string::String>,
    /// <p>A custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
    #[doc(hidden)]
    pub treatment_name: std::option::Option<std::string::String>,
    /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
    #[doc(hidden)]
    pub priority: i32,
}
impl WriteCampaignRequest {
    /// <p>An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.</p>
    pub fn additional_treatments(
        &self,
    ) -> std::option::Option<&[crate::model::WriteTreatmentResource]> {
        self.additional_treatments.as_deref()
    }
    /// <p>The delivery configuration settings for sending the campaign through a custom channel. This object is required if the MessageConfiguration object for the campaign specifies a CustomMessage object.</p>
    pub fn custom_delivery_configuration(
        &self,
    ) -> std::option::Option<&crate::model::CustomDeliveryConfiguration> {
        self.custom_delivery_configuration.as_ref()
    }
    /// <p>A custom description of the campaign.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
    pub fn holdout_percent(&self) -> i32 {
        self.holdout_percent
    }
    /// <p>The settings for the AWS Lambda function to invoke as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
    pub fn hook(&self) -> std::option::Option<&crate::model::CampaignHook> {
        self.hook.as_ref()
    }
    /// <p>Specifies whether to pause the campaign. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
    pub fn is_paused(&self) -> bool {
        self.is_paused
    }
    /// <p>The messaging limits for the campaign.</p>
    pub fn limits(&self) -> std::option::Option<&crate::model::CampaignLimits> {
        self.limits.as_ref()
    }
    /// <p>The message configuration settings for the campaign.</p>
    pub fn message_configuration(
        &self,
    ) -> std::option::Option<&crate::model::MessageConfiguration> {
        self.message_configuration.as_ref()
    }
    /// <p>A custom name for the campaign.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The schedule settings for the campaign.</p>
    pub fn schedule(&self) -> std::option::Option<&crate::model::Schedule> {
        self.schedule.as_ref()
    }
    /// <p>The unique identifier for the segment to associate with the campaign.</p>
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
    /// <p>The version of the segment to associate with the campaign.</p>
    pub fn segment_version(&self) -> i32 {
        self.segment_version
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The message template to use for the campaign.</p>
    pub fn template_configuration(
        &self,
    ) -> std::option::Option<&crate::model::TemplateConfiguration> {
        self.template_configuration.as_ref()
    }
    /// <p>A custom description of the default treatment for the campaign.</p>
    pub fn treatment_description(&self) -> std::option::Option<&str> {
        self.treatment_description.as_deref()
    }
    /// <p>A custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
    pub fn treatment_name(&self) -> std::option::Option<&str> {
        self.treatment_name.as_deref()
    }
    /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
    pub fn priority(&self) -> i32 {
        self.priority
    }
}
/// See [`WriteCampaignRequest`](crate::model::WriteCampaignRequest).
pub mod write_campaign_request {

    /// A builder for [`WriteCampaignRequest`](crate::model::WriteCampaignRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) additional_treatments:
            std::option::Option<std::vec::Vec<crate::model::WriteTreatmentResource>>,
        pub(crate) custom_delivery_configuration:
            std::option::Option<crate::model::CustomDeliveryConfiguration>,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) holdout_percent: std::option::Option<i32>,
        pub(crate) hook: std::option::Option<crate::model::CampaignHook>,
        pub(crate) is_paused: std::option::Option<bool>,
        pub(crate) limits: std::option::Option<crate::model::CampaignLimits>,
        pub(crate) message_configuration: std::option::Option<crate::model::MessageConfiguration>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) schedule: std::option::Option<crate::model::Schedule>,
        pub(crate) segment_id: std::option::Option<std::string::String>,
        pub(crate) segment_version: std::option::Option<i32>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
        pub(crate) treatment_description: std::option::Option<std::string::String>,
        pub(crate) treatment_name: std::option::Option<std::string::String>,
        pub(crate) priority: std::option::Option<i32>,
    }
    impl Builder {
        /// Appends an item to `additional_treatments`.
        ///
        /// To override the contents of this collection use [`set_additional_treatments`](Self::set_additional_treatments).
        ///
        /// <p>An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.</p>
        pub fn additional_treatments(
            mut self,
            input: crate::model::WriteTreatmentResource,
        ) -> Self {
            let mut v = self.additional_treatments.unwrap_or_default();
            v.push(input);
            self.additional_treatments = Some(v);
            self
        }
        /// <p>An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.</p>
        pub fn set_additional_treatments(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::WriteTreatmentResource>>,
        ) -> Self {
            self.additional_treatments = input;
            self
        }
        /// <p>The delivery configuration settings for sending the campaign through a custom channel. This object is required if the MessageConfiguration object for the campaign specifies a CustomMessage object.</p>
        pub fn custom_delivery_configuration(
            mut self,
            input: crate::model::CustomDeliveryConfiguration,
        ) -> Self {
            self.custom_delivery_configuration = Some(input);
            self
        }
        /// <p>The delivery configuration settings for sending the campaign through a custom channel. This object is required if the MessageConfiguration object for the campaign specifies a CustomMessage object.</p>
        pub fn set_custom_delivery_configuration(
            mut self,
            input: std::option::Option<crate::model::CustomDeliveryConfiguration>,
        ) -> Self {
            self.custom_delivery_configuration = input;
            self
        }
        /// <p>A custom description of the campaign.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A custom description of the campaign.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
        pub fn holdout_percent(mut self, input: i32) -> Self {
            self.holdout_percent = Some(input);
            self
        }
        /// <p>The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.</p>
        pub fn set_holdout_percent(mut self, input: std::option::Option<i32>) -> Self {
            self.holdout_percent = input;
            self
        }
        /// <p>The settings for the AWS Lambda function to invoke as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
        pub fn hook(mut self, input: crate::model::CampaignHook) -> Self {
            self.hook = Some(input);
            self
        }
        /// <p>The settings for the AWS Lambda function to invoke as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign.</p>
        pub fn set_hook(mut self, input: std::option::Option<crate::model::CampaignHook>) -> Self {
            self.hook = input;
            self
        }
        /// <p>Specifies whether to pause the campaign. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
        pub fn is_paused(mut self, input: bool) -> Self {
            self.is_paused = Some(input);
            self
        }
        /// <p>Specifies whether to pause the campaign. A paused campaign doesn't run unless you resume it by changing this value to false.</p>
        pub fn set_is_paused(mut self, input: std::option::Option<bool>) -> Self {
            self.is_paused = input;
            self
        }
        /// <p>The messaging limits for the campaign.</p>
        pub fn limits(mut self, input: crate::model::CampaignLimits) -> Self {
            self.limits = Some(input);
            self
        }
        /// <p>The messaging limits for the campaign.</p>
        pub fn set_limits(
            mut self,
            input: std::option::Option<crate::model::CampaignLimits>,
        ) -> Self {
            self.limits = input;
            self
        }
        /// <p>The message configuration settings for the campaign.</p>
        pub fn message_configuration(mut self, input: crate::model::MessageConfiguration) -> Self {
            self.message_configuration = Some(input);
            self
        }
        /// <p>The message configuration settings for the campaign.</p>
        pub fn set_message_configuration(
            mut self,
            input: std::option::Option<crate::model::MessageConfiguration>,
        ) -> Self {
            self.message_configuration = input;
            self
        }
        /// <p>A custom name for the campaign.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>A custom name for the campaign.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The schedule settings for the campaign.</p>
        pub fn schedule(mut self, input: crate::model::Schedule) -> Self {
            self.schedule = Some(input);
            self
        }
        /// <p>The schedule settings for the campaign.</p>
        pub fn set_schedule(mut self, input: std::option::Option<crate::model::Schedule>) -> Self {
            self.schedule = input;
            self
        }
        /// <p>The unique identifier for the segment to associate with the campaign.</p>
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the segment to associate with the campaign.</p>
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// <p>The version of the segment to associate with the campaign.</p>
        pub fn segment_version(mut self, input: i32) -> Self {
            self.segment_version = Some(input);
            self
        }
        /// <p>The version of the segment to associate with the campaign.</p>
        pub fn set_segment_version(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_version = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the campaign. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The message template to use for the campaign.</p>
        pub fn template_configuration(
            mut self,
            input: crate::model::TemplateConfiguration,
        ) -> Self {
            self.template_configuration = Some(input);
            self
        }
        /// <p>The message template to use for the campaign.</p>
        pub fn set_template_configuration(
            mut self,
            input: std::option::Option<crate::model::TemplateConfiguration>,
        ) -> Self {
            self.template_configuration = input;
            self
        }
        /// <p>A custom description of the default treatment for the campaign.</p>
        pub fn treatment_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_description = Some(input.into());
            self
        }
        /// <p>A custom description of the default treatment for the campaign.</p>
        pub fn set_treatment_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_description = input;
            self
        }
        /// <p>A custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
        pub fn treatment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_name = Some(input.into());
            self
        }
        /// <p>A custom name of the default treatment for the campaign, if the campaign has multiple treatments. A <i>treatment</i> is a variation of a campaign that's used for A/B testing.</p>
        pub fn set_treatment_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_name = input;
            self
        }
        /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
        pub fn priority(mut self, input: i32) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>Defines the priority of the campaign, used to decide the order of messages displayed to user if there are multiple messages scheduled to be displayed at the same moment.</p>
        pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
            self.priority = input;
            self
        }
        /// Consumes the builder and constructs a [`WriteCampaignRequest`](crate::model::WriteCampaignRequest).
        pub fn build(self) -> crate::model::WriteCampaignRequest {
            crate::model::WriteCampaignRequest {
                additional_treatments: self.additional_treatments,
                custom_delivery_configuration: self.custom_delivery_configuration,
                description: self.description,
                holdout_percent: self.holdout_percent.unwrap_or_default(),
                hook: self.hook,
                is_paused: self.is_paused.unwrap_or_default(),
                limits: self.limits,
                message_configuration: self.message_configuration,
                name: self.name,
                schedule: self.schedule,
                segment_id: self.segment_id,
                segment_version: self.segment_version.unwrap_or_default(),
                tags: self.tags,
                template_configuration: self.template_configuration,
                treatment_description: self.treatment_description,
                treatment_name: self.treatment_name,
                priority: self.priority.unwrap_or_default(),
            }
        }
    }
}
impl WriteCampaignRequest {
    /// Creates a new builder-style object to manufacture [`WriteCampaignRequest`](crate::model::WriteCampaignRequest).
    pub fn builder() -> crate::model::write_campaign_request::Builder {
        crate::model::write_campaign_request::Builder::default()
    }
}

/// <p>Specifies the settings for a campaign treatment. A <i>treatment</i> is a variation of a campaign that's used for A/B testing of a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WriteTreatmentResource {
    /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
    #[doc(hidden)]
    pub custom_delivery_configuration:
        std::option::Option<crate::model::CustomDeliveryConfiguration>,
    /// <p>The message configuration settings for the treatment.</p>
    #[doc(hidden)]
    pub message_configuration: std::option::Option<crate::model::MessageConfiguration>,
    /// <p>The schedule settings for the treatment.</p>
    #[doc(hidden)]
    pub schedule: std::option::Option<crate::model::Schedule>,
    /// <p>The allocated percentage of users (segment members) to send the treatment to.</p>
    #[doc(hidden)]
    pub size_percent: i32,
    /// <p>The message template to use for the treatment.</p>
    #[doc(hidden)]
    pub template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
    /// <p>A custom description of the treatment.</p>
    #[doc(hidden)]
    pub treatment_description: std::option::Option<std::string::String>,
    /// <p>A custom name for the treatment.</p>
    #[doc(hidden)]
    pub treatment_name: std::option::Option<std::string::String>,
}
impl WriteTreatmentResource {
    /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
    pub fn custom_delivery_configuration(
        &self,
    ) -> std::option::Option<&crate::model::CustomDeliveryConfiguration> {
        self.custom_delivery_configuration.as_ref()
    }
    /// <p>The message configuration settings for the treatment.</p>
    pub fn message_configuration(
        &self,
    ) -> std::option::Option<&crate::model::MessageConfiguration> {
        self.message_configuration.as_ref()
    }
    /// <p>The schedule settings for the treatment.</p>
    pub fn schedule(&self) -> std::option::Option<&crate::model::Schedule> {
        self.schedule.as_ref()
    }
    /// <p>The allocated percentage of users (segment members) to send the treatment to.</p>
    pub fn size_percent(&self) -> i32 {
        self.size_percent
    }
    /// <p>The message template to use for the treatment.</p>
    pub fn template_configuration(
        &self,
    ) -> std::option::Option<&crate::model::TemplateConfiguration> {
        self.template_configuration.as_ref()
    }
    /// <p>A custom description of the treatment.</p>
    pub fn treatment_description(&self) -> std::option::Option<&str> {
        self.treatment_description.as_deref()
    }
    /// <p>A custom name for the treatment.</p>
    pub fn treatment_name(&self) -> std::option::Option<&str> {
        self.treatment_name.as_deref()
    }
}
/// See [`WriteTreatmentResource`](crate::model::WriteTreatmentResource).
pub mod write_treatment_resource {

    /// A builder for [`WriteTreatmentResource`](crate::model::WriteTreatmentResource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) custom_delivery_configuration:
            std::option::Option<crate::model::CustomDeliveryConfiguration>,
        pub(crate) message_configuration: std::option::Option<crate::model::MessageConfiguration>,
        pub(crate) schedule: std::option::Option<crate::model::Schedule>,
        pub(crate) size_percent: std::option::Option<i32>,
        pub(crate) template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
        pub(crate) treatment_description: std::option::Option<std::string::String>,
        pub(crate) treatment_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
        pub fn custom_delivery_configuration(
            mut self,
            input: crate::model::CustomDeliveryConfiguration,
        ) -> Self {
            self.custom_delivery_configuration = Some(input);
            self
        }
        /// <p>The delivery configuration settings for sending the treatment through a custom channel. This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.</p>
        pub fn set_custom_delivery_configuration(
            mut self,
            input: std::option::Option<crate::model::CustomDeliveryConfiguration>,
        ) -> Self {
            self.custom_delivery_configuration = input;
            self
        }
        /// <p>The message configuration settings for the treatment.</p>
        pub fn message_configuration(mut self, input: crate::model::MessageConfiguration) -> Self {
            self.message_configuration = Some(input);
            self
        }
        /// <p>The message configuration settings for the treatment.</p>
        pub fn set_message_configuration(
            mut self,
            input: std::option::Option<crate::model::MessageConfiguration>,
        ) -> Self {
            self.message_configuration = input;
            self
        }
        /// <p>The schedule settings for the treatment.</p>
        pub fn schedule(mut self, input: crate::model::Schedule) -> Self {
            self.schedule = Some(input);
            self
        }
        /// <p>The schedule settings for the treatment.</p>
        pub fn set_schedule(mut self, input: std::option::Option<crate::model::Schedule>) -> Self {
            self.schedule = input;
            self
        }
        /// <p>The allocated percentage of users (segment members) to send the treatment to.</p>
        pub fn size_percent(mut self, input: i32) -> Self {
            self.size_percent = Some(input);
            self
        }
        /// <p>The allocated percentage of users (segment members) to send the treatment to.</p>
        pub fn set_size_percent(mut self, input: std::option::Option<i32>) -> Self {
            self.size_percent = input;
            self
        }
        /// <p>The message template to use for the treatment.</p>
        pub fn template_configuration(
            mut self,
            input: crate::model::TemplateConfiguration,
        ) -> Self {
            self.template_configuration = Some(input);
            self
        }
        /// <p>The message template to use for the treatment.</p>
        pub fn set_template_configuration(
            mut self,
            input: std::option::Option<crate::model::TemplateConfiguration>,
        ) -> Self {
            self.template_configuration = input;
            self
        }
        /// <p>A custom description of the treatment.</p>
        pub fn treatment_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_description = Some(input.into());
            self
        }
        /// <p>A custom description of the treatment.</p>
        pub fn set_treatment_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_description = input;
            self
        }
        /// <p>A custom name for the treatment.</p>
        pub fn treatment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_name = Some(input.into());
            self
        }
        /// <p>A custom name for the treatment.</p>
        pub fn set_treatment_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.treatment_name = input;
            self
        }
        /// Consumes the builder and constructs a [`WriteTreatmentResource`](crate::model::WriteTreatmentResource).
        pub fn build(self) -> crate::model::WriteTreatmentResource {
            crate::model::WriteTreatmentResource {
                custom_delivery_configuration: self.custom_delivery_configuration,
                message_configuration: self.message_configuration,
                schedule: self.schedule,
                size_percent: self.size_percent.unwrap_or_default(),
                template_configuration: self.template_configuration,
                treatment_description: self.treatment_description,
                treatment_name: self.treatment_name,
            }
        }
    }
}
impl WriteTreatmentResource {
    /// Creates a new builder-style object to manufacture [`WriteTreatmentResource`](crate::model::WriteTreatmentResource).
    pub fn builder() -> crate::model::write_treatment_resource::Builder {
        crate::model::write_treatment_resource::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the Baidu (Baidu Cloud Push) channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BaiduChannelResponse {
    /// <p>The unique identifier for the application that the Baidu channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the Baidu channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
    #[doc(hidden)]
    pub credential: std::option::Option<std::string::String>,
    /// <p>Specifies whether the Baidu channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>(Deprecated) An identifier for the Baidu channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the Baidu channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the Baidu channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time when the Baidu channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the Baidu channel, this value is BAIDU.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the Baidu channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl BaiduChannelResponse {
    /// <p>The unique identifier for the application that the Baidu channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time when the Baidu channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
    pub fn credential(&self) -> std::option::Option<&str> {
        self.credential.as_deref()
    }
    /// <p>Specifies whether the Baidu channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>(Deprecated) An identifier for the Baidu channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the Baidu channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the Baidu channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time when the Baidu channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the Baidu channel, this value is BAIDU.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the Baidu channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`BaiduChannelResponse`](crate::model::BaiduChannelResponse).
pub mod baidu_channel_response {

    /// A builder for [`BaiduChannelResponse`](crate::model::BaiduChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) credential: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the Baidu channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the Baidu channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time when the Baidu channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the Baidu channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
        pub fn credential(mut self, input: impl Into<std::string::String>) -> Self {
            self.credential = Some(input.into());
            self
        }
        /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
        pub fn set_credential(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.credential = input;
            self
        }
        /// <p>Specifies whether the Baidu channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the Baidu channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>(Deprecated) An identifier for the Baidu channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the Baidu channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the Baidu channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the Baidu channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the Baidu channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the Baidu channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time when the Baidu channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the Baidu channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the Baidu channel, this value is BAIDU.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the Baidu channel, this value is BAIDU.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the Baidu channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the Baidu channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`BaiduChannelResponse`](crate::model::BaiduChannelResponse).
        pub fn build(self) -> crate::model::BaiduChannelResponse {
            crate::model::BaiduChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                credential: self.credential,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl BaiduChannelResponse {
    /// Creates a new builder-style object to manufacture [`BaiduChannelResponse`](crate::model::BaiduChannelResponse).
    pub fn builder() -> crate::model::baidu_channel_response::Builder {
        crate::model::baidu_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the Baidu (Baidu Cloud Push) channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BaiduChannelRequest {
    /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
    #[doc(hidden)]
    pub api_key: std::option::Option<std::string::String>,
    /// <p>Specifies whether to enable the Baidu channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The secret key that you received from the Baidu Cloud Push service to communicate with the service.</p>
    #[doc(hidden)]
    pub secret_key: std::option::Option<std::string::String>,
}
impl BaiduChannelRequest {
    /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
    pub fn api_key(&self) -> std::option::Option<&str> {
        self.api_key.as_deref()
    }
    /// <p>Specifies whether to enable the Baidu channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The secret key that you received from the Baidu Cloud Push service to communicate with the service.</p>
    pub fn secret_key(&self) -> std::option::Option<&str> {
        self.secret_key.as_deref()
    }
}
/// See [`BaiduChannelRequest`](crate::model::BaiduChannelRequest).
pub mod baidu_channel_request {

    /// A builder for [`BaiduChannelRequest`](crate::model::BaiduChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) api_key: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) secret_key: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
        pub fn api_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.api_key = Some(input.into());
            self
        }
        /// <p>The API key that you received from the Baidu Cloud Push service to communicate with the service.</p>
        pub fn set_api_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.api_key = input;
            self
        }
        /// <p>Specifies whether to enable the Baidu channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the Baidu channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The secret key that you received from the Baidu Cloud Push service to communicate with the service.</p>
        pub fn secret_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.secret_key = Some(input.into());
            self
        }
        /// <p>The secret key that you received from the Baidu Cloud Push service to communicate with the service.</p>
        pub fn set_secret_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.secret_key = input;
            self
        }
        /// Consumes the builder and constructs a [`BaiduChannelRequest`](crate::model::BaiduChannelRequest).
        pub fn build(self) -> crate::model::BaiduChannelRequest {
            crate::model::BaiduChannelRequest {
                api_key: self.api_key,
                enabled: self.enabled.unwrap_or_default(),
                secret_key: self.secret_key,
            }
        }
    }
}
impl BaiduChannelRequest {
    /// Creates a new builder-style object to manufacture [`BaiduChannelRequest`](crate::model::BaiduChannelRequest).
    pub fn builder() -> crate::model::baidu_channel_request::Builder {
        crate::model::baidu_channel_request::Builder::default()
    }
}

/// <p>Provides information about an application, including the default settings for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApplicationSettingsResource {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
    #[doc(hidden)]
    pub campaign_hook: std::option::Option<crate::model::CampaignHook>,
    /// <p>The date and time, in ISO 8601 format, when the application's settings were last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The default sending limits for campaigns in the application.</p>
    #[doc(hidden)]
    pub limits: std::option::Option<crate::model::CampaignLimits>,
    /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
    /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
    #[doc(hidden)]
    pub quiet_time: std::option::Option<crate::model::QuietTime>,
}
impl ApplicationSettingsResource {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
    pub fn campaign_hook(&self) -> std::option::Option<&crate::model::CampaignHook> {
        self.campaign_hook.as_ref()
    }
    /// <p>The date and time, in ISO 8601 format, when the application's settings were last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The default sending limits for campaigns in the application.</p>
    pub fn limits(&self) -> std::option::Option<&crate::model::CampaignLimits> {
        self.limits.as_ref()
    }
    /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
    /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
    pub fn quiet_time(&self) -> std::option::Option<&crate::model::QuietTime> {
        self.quiet_time.as_ref()
    }
}
/// See [`ApplicationSettingsResource`](crate::model::ApplicationSettingsResource).
pub mod application_settings_resource {

    /// A builder for [`ApplicationSettingsResource`](crate::model::ApplicationSettingsResource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) campaign_hook: std::option::Option<crate::model::CampaignHook>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) limits: std::option::Option<crate::model::CampaignLimits>,
        pub(crate) quiet_time: std::option::Option<crate::model::QuietTime>,
    }
    impl Builder {
        /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
        pub fn campaign_hook(mut self, input: crate::model::CampaignHook) -> Self {
            self.campaign_hook = Some(input);
            self
        }
        /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
        pub fn set_campaign_hook(
            mut self,
            input: std::option::Option<crate::model::CampaignHook>,
        ) -> Self {
            self.campaign_hook = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the application's settings were last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the application's settings were last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The default sending limits for campaigns in the application.</p>
        pub fn limits(mut self, input: crate::model::CampaignLimits) -> Self {
            self.limits = Some(input);
            self
        }
        /// <p>The default sending limits for campaigns in the application.</p>
        pub fn set_limits(
            mut self,
            input: std::option::Option<crate::model::CampaignLimits>,
        ) -> Self {
            self.limits = input;
            self
        }
        /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
        /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
        pub fn quiet_time(mut self, input: crate::model::QuietTime) -> Self {
            self.quiet_time = Some(input);
            self
        }
        /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
        /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
        pub fn set_quiet_time(
            mut self,
            input: std::option::Option<crate::model::QuietTime>,
        ) -> Self {
            self.quiet_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ApplicationSettingsResource`](crate::model::ApplicationSettingsResource).
        pub fn build(self) -> crate::model::ApplicationSettingsResource {
            crate::model::ApplicationSettingsResource {
                application_id: self.application_id,
                campaign_hook: self.campaign_hook,
                last_modified_date: self.last_modified_date,
                limits: self.limits,
                quiet_time: self.quiet_time,
            }
        }
    }
}
impl ApplicationSettingsResource {
    /// Creates a new builder-style object to manufacture [`ApplicationSettingsResource`](crate::model::ApplicationSettingsResource).
    pub fn builder() -> crate::model::application_settings_resource::Builder {
        crate::model::application_settings_resource::Builder::default()
    }
}

/// <p>Specifies the default settings for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WriteApplicationSettingsRequest {
    /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
    /// <p>To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the
    /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource.</p>
    #[doc(hidden)]
    pub campaign_hook: std::option::Option<crate::model::CampaignHook>,
    /// <p>Specifies whether to enable application-related alarms in Amazon CloudWatch.</p>
    #[doc(hidden)]
    pub cloud_watch_metrics_enabled: bool,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub event_tagging_enabled: bool,
    /// <p>The default sending limits for campaigns in the application. To override these limits and define custom limits for a specific campaign or journey, use the
    /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
    /// <link linkend="apps-application-id-journeys-journey-id">Journey resource, respectively.</p>
    #[doc(hidden)]
    pub limits: std::option::Option<crate::model::CampaignLimits>,
    /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
    /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
    /// <p>To override the default quiet time settings for a specific campaign or journey, use the
    /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
    /// <link linkend="apps-application-id-journeys-journey-id">Journey resource to define a custom quiet time for the campaign or journey.</p>
    #[doc(hidden)]
    pub quiet_time: std::option::Option<crate::model::QuietTime>,
}
impl WriteApplicationSettingsRequest {
    /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
    /// <p>To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the
    /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource.</p>
    pub fn campaign_hook(&self) -> std::option::Option<&crate::model::CampaignHook> {
        self.campaign_hook.as_ref()
    }
    /// <p>Specifies whether to enable application-related alarms in Amazon CloudWatch.</p>
    pub fn cloud_watch_metrics_enabled(&self) -> bool {
        self.cloud_watch_metrics_enabled
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn event_tagging_enabled(&self) -> bool {
        self.event_tagging_enabled
    }
    /// <p>The default sending limits for campaigns in the application. To override these limits and define custom limits for a specific campaign or journey, use the
    /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
    /// <link linkend="apps-application-id-journeys-journey-id">Journey resource, respectively.</p>
    pub fn limits(&self) -> std::option::Option<&crate::model::CampaignLimits> {
        self.limits.as_ref()
    }
    /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
    /// <ul>
    /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
    /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
    /// </ul>
    /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
    /// <p>To override the default quiet time settings for a specific campaign or journey, use the
    /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
    /// <link linkend="apps-application-id-journeys-journey-id">Journey resource to define a custom quiet time for the campaign or journey.</p>
    pub fn quiet_time(&self) -> std::option::Option<&crate::model::QuietTime> {
        self.quiet_time.as_ref()
    }
}
/// See [`WriteApplicationSettingsRequest`](crate::model::WriteApplicationSettingsRequest).
pub mod write_application_settings_request {

    /// A builder for [`WriteApplicationSettingsRequest`](crate::model::WriteApplicationSettingsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) campaign_hook: std::option::Option<crate::model::CampaignHook>,
        pub(crate) cloud_watch_metrics_enabled: std::option::Option<bool>,
        pub(crate) event_tagging_enabled: std::option::Option<bool>,
        pub(crate) limits: std::option::Option<crate::model::CampaignLimits>,
        pub(crate) quiet_time: std::option::Option<crate::model::QuietTime>,
    }
    impl Builder {
        /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
        /// <p>To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the
        /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource.</p>
        pub fn campaign_hook(mut self, input: crate::model::CampaignHook) -> Self {
            self.campaign_hook = Some(input);
            self
        }
        /// <p>The settings for the AWS Lambda function to invoke by default as a code hook for campaigns in the application. You can use this hook to customize segments that are used by campaigns in the application.</p>
        /// <p>To override these settings and define custom settings for a specific campaign, use the CampaignHook object of the
        /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource.</p>
        pub fn set_campaign_hook(
            mut self,
            input: std::option::Option<crate::model::CampaignHook>,
        ) -> Self {
            self.campaign_hook = input;
            self
        }
        /// <p>Specifies whether to enable application-related alarms in Amazon CloudWatch.</p>
        pub fn cloud_watch_metrics_enabled(mut self, input: bool) -> Self {
            self.cloud_watch_metrics_enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable application-related alarms in Amazon CloudWatch.</p>
        pub fn set_cloud_watch_metrics_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.cloud_watch_metrics_enabled = input;
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn event_tagging_enabled(mut self, input: bool) -> Self {
            self.event_tagging_enabled = Some(input);
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn set_event_tagging_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.event_tagging_enabled = input;
            self
        }
        /// <p>The default sending limits for campaigns in the application. To override these limits and define custom limits for a specific campaign or journey, use the
        /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
        /// <link linkend="apps-application-id-journeys-journey-id">Journey resource, respectively.</p>
        pub fn limits(mut self, input: crate::model::CampaignLimits) -> Self {
            self.limits = Some(input);
            self
        }
        /// <p>The default sending limits for campaigns in the application. To override these limits and define custom limits for a specific campaign or journey, use the
        /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
        /// <link linkend="apps-application-id-journeys-journey-id">Journey resource, respectively.</p>
        pub fn set_limits(
            mut self,
            input: std::option::Option<crate::model::CampaignLimits>,
        ) -> Self {
            self.limits = input;
            self
        }
        /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
        /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
        /// <p>To override the default quiet time settings for a specific campaign or journey, use the
        /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
        /// <link linkend="apps-application-id-journeys-journey-id">Journey resource to define a custom quiet time for the campaign or journey.</p>
        pub fn quiet_time(mut self, input: crate::model::QuietTime) -> Self {
            self.quiet_time = Some(input);
            self
        }
        /// <p>The default quiet time for campaigns in the application. Quiet time is a specific time range when messages aren't sent to endpoints, if all the following conditions are met:</p>
        /// <ul>
        /// <li><p>The EndpointDemographic.Timezone property of the endpoint is set to a valid value.</p></li>
        /// <li><p>The current time in the endpoint's time zone is later than or equal to the time specified by the QuietTime.Start property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// <li><p>The current time in the endpoint's time zone is earlier than or equal to the time specified by the QuietTime.End property for the application (or a campaign or journey that has custom quiet time settings).</p></li>
        /// </ul>
        /// <p>If any of the preceding conditions isn't met, the endpoint will receive messages from a campaign or journey, even if quiet time is enabled.</p>
        /// <p>To override the default quiet time settings for a specific campaign or journey, use the
        /// <link linkend="apps-application-id-campaigns-campaign-id">Campaign resource or the
        /// <link linkend="apps-application-id-journeys-journey-id">Journey resource to define a custom quiet time for the campaign or journey.</p>
        pub fn set_quiet_time(
            mut self,
            input: std::option::Option<crate::model::QuietTime>,
        ) -> Self {
            self.quiet_time = input;
            self
        }
        /// Consumes the builder and constructs a [`WriteApplicationSettingsRequest`](crate::model::WriteApplicationSettingsRequest).
        pub fn build(self) -> crate::model::WriteApplicationSettingsRequest {
            crate::model::WriteApplicationSettingsRequest {
                campaign_hook: self.campaign_hook,
                cloud_watch_metrics_enabled: self.cloud_watch_metrics_enabled.unwrap_or_default(),
                event_tagging_enabled: self.event_tagging_enabled.unwrap_or_default(),
                limits: self.limits,
                quiet_time: self.quiet_time,
            }
        }
    }
}
impl WriteApplicationSettingsRequest {
    /// Creates a new builder-style object to manufacture [`WriteApplicationSettingsRequest`](crate::model::WriteApplicationSettingsRequest).
    pub fn builder() -> crate::model::write_application_settings_request::Builder {
        crate::model::write_application_settings_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the APNs (Apple Push Notification service) VoIP sandbox channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsVoipSandboxChannelResponse {
    /// <p>The unique identifier for the application that the APNs VoIP sandbox channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs VoIP sandbox channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>Specifies whether the APNs VoIP sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    #[doc(hidden)]
    pub has_token_key: bool,
    /// <p>(Deprecated) An identifier for the APNs VoIP sandbox channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs VoIP sandbox channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the APNs VoIP sandbox channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs VoIP sandbox channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP sandbox channel, this value is APNS_VOIP_SANDBOX.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the APNs VoIP sandbox channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl ApnsVoipSandboxChannelResponse {
    /// <p>The unique identifier for the application that the APNs VoIP sandbox channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time when the APNs VoIP sandbox channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>Specifies whether the APNs VoIP sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    pub fn has_token_key(&self) -> bool {
        self.has_token_key
    }
    /// <p>(Deprecated) An identifier for the APNs VoIP sandbox channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the APNs VoIP sandbox channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the APNs VoIP sandbox channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time when the APNs VoIP sandbox channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP sandbox channel, this value is APNS_VOIP_SANDBOX.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the APNs VoIP sandbox channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`ApnsVoipSandboxChannelResponse`](crate::model::ApnsVoipSandboxChannelResponse).
pub mod apns_voip_sandbox_channel_response {

    /// A builder for [`ApnsVoipSandboxChannelResponse`](crate::model::ApnsVoipSandboxChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) has_token_key: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the APNs VoIP sandbox channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the APNs VoIP sandbox channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time when the APNs VoIP sandbox channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs VoIP sandbox channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn has_token_key(mut self, input: bool) -> Self {
            self.has_token_key = Some(input);
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn set_has_token_key(mut self, input: std::option::Option<bool>) -> Self {
            self.has_token_key = input;
            self
        }
        /// <p>(Deprecated) An identifier for the APNs VoIP sandbox channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the APNs VoIP sandbox channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the APNs VoIP sandbox channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the APNs VoIP sandbox channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time when the APNs VoIP sandbox channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs VoIP sandbox channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP sandbox channel, this value is APNS_VOIP_SANDBOX.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP sandbox channel, this value is APNS_VOIP_SANDBOX.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the APNs VoIP sandbox channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the APNs VoIP sandbox channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsVoipSandboxChannelResponse`](crate::model::ApnsVoipSandboxChannelResponse).
        pub fn build(self) -> crate::model::ApnsVoipSandboxChannelResponse {
            crate::model::ApnsVoipSandboxChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                has_token_key: self.has_token_key.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl ApnsVoipSandboxChannelResponse {
    /// Creates a new builder-style object to manufacture [`ApnsVoipSandboxChannelResponse`](crate::model::ApnsVoipSandboxChannelResponse).
    pub fn builder() -> crate::model::apns_voip_sandbox_channel_response::Builder {
        crate::model::apns_voip_sandbox_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the APNs (Apple Push Notification service) VoIP sandbox channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsVoipSandboxChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub bundle_id: std::option::Option<std::string::String>,
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
    #[doc(hidden)]
    pub certificate: std::option::Option<std::string::String>,
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment for this channel, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
    #[doc(hidden)]
    pub private_key: std::option::Option<std::string::String>,
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub team_id: std::option::Option<std::string::String>,
    /// <p>The authentication key to use for APNs tokens.</p>
    #[doc(hidden)]
    pub token_key: std::option::Option<std::string::String>,
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
    #[doc(hidden)]
    pub token_key_id: std::option::Option<std::string::String>,
}
impl ApnsVoipSandboxChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    pub fn bundle_id(&self) -> std::option::Option<&str> {
        self.bundle_id.as_deref()
    }
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
    pub fn certificate(&self) -> std::option::Option<&str> {
        self.certificate.as_deref()
    }
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment for this channel, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
    pub fn private_key(&self) -> std::option::Option<&str> {
        self.private_key.as_deref()
    }
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    pub fn team_id(&self) -> std::option::Option<&str> {
        self.team_id.as_deref()
    }
    /// <p>The authentication key to use for APNs tokens.</p>
    pub fn token_key(&self) -> std::option::Option<&str> {
        self.token_key.as_deref()
    }
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
    pub fn token_key_id(&self) -> std::option::Option<&str> {
        self.token_key_id.as_deref()
    }
}
/// See [`ApnsVoipSandboxChannelRequest`](crate::model::ApnsVoipSandboxChannelRequest).
pub mod apns_voip_sandbox_channel_request {

    /// A builder for [`ApnsVoipSandboxChannelRequest`](crate::model::ApnsVoipSandboxChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bundle_id: std::option::Option<std::string::String>,
        pub(crate) certificate: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) private_key: std::option::Option<std::string::String>,
        pub(crate) team_id: std::option::Option<std::string::String>,
        pub(crate) token_key: std::option::Option<std::string::String>,
        pub(crate) token_key_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn bundle_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.bundle_id = Some(input.into());
            self
        }
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn set_bundle_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bundle_id = input;
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
        pub fn certificate(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate = Some(input.into());
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
        pub fn set_certificate(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.certificate = input;
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment for this channel, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment for this channel, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the APNs VoIP sandbox channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
        pub fn private_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_key = Some(input.into());
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
        pub fn set_private_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.private_key = input;
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn team_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.team_id = Some(input.into());
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn set_team_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.team_id = input;
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn token_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key = Some(input.into());
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn set_token_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key = input;
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
        pub fn token_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key_id = Some(input.into());
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
        pub fn set_token_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsVoipSandboxChannelRequest`](crate::model::ApnsVoipSandboxChannelRequest).
        pub fn build(self) -> crate::model::ApnsVoipSandboxChannelRequest {
            crate::model::ApnsVoipSandboxChannelRequest {
                bundle_id: self.bundle_id,
                certificate: self.certificate,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                private_key: self.private_key,
                team_id: self.team_id,
                token_key: self.token_key,
                token_key_id: self.token_key_id,
            }
        }
    }
}
impl ApnsVoipSandboxChannelRequest {
    /// Creates a new builder-style object to manufacture [`ApnsVoipSandboxChannelRequest`](crate::model::ApnsVoipSandboxChannelRequest).
    pub fn builder() -> crate::model::apns_voip_sandbox_channel_request::Builder {
        crate::model::apns_voip_sandbox_channel_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the APNs (Apple Push Notification service) VoIP channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsVoipChannelResponse {
    /// <p>The unique identifier for the application that the APNs VoIP channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs VoIP channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs VoIP channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>Specifies whether the APNs VoIP channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    #[doc(hidden)]
    pub has_token_key: bool,
    /// <p>(Deprecated) An identifier for the APNs VoIP channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs VoIP channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the APNs VoIP channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs VoIP channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP channel, this value is APNS_VOIP.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the APNs VoIP channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl ApnsVoipChannelResponse {
    /// <p>The unique identifier for the application that the APNs VoIP channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time when the APNs VoIP channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether the APNs VoIP channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>Specifies whether the APNs VoIP channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    pub fn has_token_key(&self) -> bool {
        self.has_token_key
    }
    /// <p>(Deprecated) An identifier for the APNs VoIP channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the APNs VoIP channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the APNs VoIP channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time when the APNs VoIP channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP channel, this value is APNS_VOIP.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the APNs VoIP channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`ApnsVoipChannelResponse`](crate::model::ApnsVoipChannelResponse).
pub mod apns_voip_channel_response {

    /// A builder for [`ApnsVoipChannelResponse`](crate::model::ApnsVoipChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) has_token_key: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the APNs VoIP channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the APNs VoIP channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time when the APNs VoIP channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs VoIP channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether the APNs VoIP channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the APNs VoIP channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>Specifies whether the APNs VoIP channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn has_token_key(mut self, input: bool) -> Self {
            self.has_token_key = Some(input);
            self
        }
        /// <p>Specifies whether the APNs VoIP channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn set_has_token_key(mut self, input: std::option::Option<bool>) -> Self {
            self.has_token_key = input;
            self
        }
        /// <p>(Deprecated) An identifier for the APNs VoIP channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the APNs VoIP channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the APNs VoIP channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the APNs VoIP channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the APNs VoIP channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the APNs VoIP channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time when the APNs VoIP channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs VoIP channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP channel, this value is APNS_VOIP.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs VoIP channel, this value is APNS_VOIP.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the APNs VoIP channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the APNs VoIP channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsVoipChannelResponse`](crate::model::ApnsVoipChannelResponse).
        pub fn build(self) -> crate::model::ApnsVoipChannelResponse {
            crate::model::ApnsVoipChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                has_token_key: self.has_token_key.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl ApnsVoipChannelResponse {
    /// Creates a new builder-style object to manufacture [`ApnsVoipChannelResponse`](crate::model::ApnsVoipChannelResponse).
    pub fn builder() -> crate::model::apns_voip_channel_response::Builder {
        crate::model::apns_voip_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the APNs (Apple Push Notification service) VoIP channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsVoipChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub bundle_id: std::option::Option<std::string::String>,
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
    #[doc(hidden)]
    pub certificate: std::option::Option<std::string::String>,
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether to enable the APNs VoIP channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
    #[doc(hidden)]
    pub private_key: std::option::Option<std::string::String>,
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub team_id: std::option::Option<std::string::String>,
    /// <p>The authentication key to use for APNs tokens.</p>
    #[doc(hidden)]
    pub token_key: std::option::Option<std::string::String>,
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
    #[doc(hidden)]
    pub token_key_id: std::option::Option<std::string::String>,
}
impl ApnsVoipChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    pub fn bundle_id(&self) -> std::option::Option<&str> {
        self.bundle_id.as_deref()
    }
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
    pub fn certificate(&self) -> std::option::Option<&str> {
        self.certificate.as_deref()
    }
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether to enable the APNs VoIP channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
    pub fn private_key(&self) -> std::option::Option<&str> {
        self.private_key.as_deref()
    }
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    pub fn team_id(&self) -> std::option::Option<&str> {
        self.team_id.as_deref()
    }
    /// <p>The authentication key to use for APNs tokens.</p>
    pub fn token_key(&self) -> std::option::Option<&str> {
        self.token_key.as_deref()
    }
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
    pub fn token_key_id(&self) -> std::option::Option<&str> {
        self.token_key_id.as_deref()
    }
}
/// See [`ApnsVoipChannelRequest`](crate::model::ApnsVoipChannelRequest).
pub mod apns_voip_channel_request {

    /// A builder for [`ApnsVoipChannelRequest`](crate::model::ApnsVoipChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bundle_id: std::option::Option<std::string::String>,
        pub(crate) certificate: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) private_key: std::option::Option<std::string::String>,
        pub(crate) team_id: std::option::Option<std::string::String>,
        pub(crate) token_key: std::option::Option<std::string::String>,
        pub(crate) token_key_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn bundle_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.bundle_id = Some(input.into());
            self
        }
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn set_bundle_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bundle_id = input;
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
        pub fn certificate(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate = Some(input.into());
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
        pub fn set_certificate(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.certificate = input;
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether to enable the APNs VoIP channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the APNs VoIP channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
        pub fn private_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_key = Some(input.into());
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
        pub fn set_private_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.private_key = input;
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn team_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.team_id = Some(input.into());
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn set_team_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.team_id = input;
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn token_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key = Some(input.into());
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn set_token_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key = input;
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
        pub fn token_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key_id = Some(input.into());
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
        pub fn set_token_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsVoipChannelRequest`](crate::model::ApnsVoipChannelRequest).
        pub fn build(self) -> crate::model::ApnsVoipChannelRequest {
            crate::model::ApnsVoipChannelRequest {
                bundle_id: self.bundle_id,
                certificate: self.certificate,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                private_key: self.private_key,
                team_id: self.team_id,
                token_key: self.token_key,
                token_key_id: self.token_key_id,
            }
        }
    }
}
impl ApnsVoipChannelRequest {
    /// Creates a new builder-style object to manufacture [`ApnsVoipChannelRequest`](crate::model::ApnsVoipChannelRequest).
    pub fn builder() -> crate::model::apns_voip_channel_request::Builder {
        crate::model::apns_voip_channel_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the APNs (Apple Push Notification service) sandbox channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsSandboxChannelResponse {
    /// <p>The unique identifier for the application that the APNs sandbox channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs sandbox channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs sandbox channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>Specifies whether the APNs sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    #[doc(hidden)]
    pub has_token_key: bool,
    /// <p>(Deprecated) An identifier for the APNs sandbox channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs sandbox channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the APNs sandbox channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs sandbox channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the APNs sandbox channel, this value is APNS_SANDBOX.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the APNs sandbox channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl ApnsSandboxChannelResponse {
    /// <p>The unique identifier for the application that the APNs sandbox channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time when the APNs sandbox channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether the APNs sandbox channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>Specifies whether the APNs sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    pub fn has_token_key(&self) -> bool {
        self.has_token_key
    }
    /// <p>(Deprecated) An identifier for the APNs sandbox channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the APNs sandbox channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the APNs sandbox channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time when the APNs sandbox channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the APNs sandbox channel, this value is APNS_SANDBOX.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the APNs sandbox channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`ApnsSandboxChannelResponse`](crate::model::ApnsSandboxChannelResponse).
pub mod apns_sandbox_channel_response {

    /// A builder for [`ApnsSandboxChannelResponse`](crate::model::ApnsSandboxChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) has_token_key: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the APNs sandbox channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the APNs sandbox channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time when the APNs sandbox channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs sandbox channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with the APNs sandbox environment for this channel, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether the APNs sandbox channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the APNs sandbox channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>Specifies whether the APNs sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn has_token_key(mut self, input: bool) -> Self {
            self.has_token_key = Some(input);
            self
        }
        /// <p>Specifies whether the APNs sandbox channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn set_has_token_key(mut self, input: std::option::Option<bool>) -> Self {
            self.has_token_key = input;
            self
        }
        /// <p>(Deprecated) An identifier for the APNs sandbox channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the APNs sandbox channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the APNs sandbox channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the APNs sandbox channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the APNs sandbox channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the APNs sandbox channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time when the APNs sandbox channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs sandbox channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs sandbox channel, this value is APNS_SANDBOX.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs sandbox channel, this value is APNS_SANDBOX.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the APNs sandbox channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the APNs sandbox channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsSandboxChannelResponse`](crate::model::ApnsSandboxChannelResponse).
        pub fn build(self) -> crate::model::ApnsSandboxChannelResponse {
            crate::model::ApnsSandboxChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                has_token_key: self.has_token_key.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl ApnsSandboxChannelResponse {
    /// Creates a new builder-style object to manufacture [`ApnsSandboxChannelResponse`](crate::model::ApnsSandboxChannelResponse).
    pub fn builder() -> crate::model::apns_sandbox_channel_response::Builder {
        crate::model::apns_sandbox_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the APNs (Apple Push Notification service) sandbox channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsSandboxChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub bundle_id: std::option::Option<std::string::String>,
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
    #[doc(hidden)]
    pub certificate: std::option::Option<std::string::String>,
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether to enable the APNs sandbox channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
    #[doc(hidden)]
    pub private_key: std::option::Option<std::string::String>,
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub team_id: std::option::Option<std::string::String>,
    /// <p>The authentication key to use for APNs tokens.</p>
    #[doc(hidden)]
    pub token_key: std::option::Option<std::string::String>,
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
    #[doc(hidden)]
    pub token_key_id: std::option::Option<std::string::String>,
}
impl ApnsSandboxChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    pub fn bundle_id(&self) -> std::option::Option<&str> {
        self.bundle_id.as_deref()
    }
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
    pub fn certificate(&self) -> std::option::Option<&str> {
        self.certificate.as_deref()
    }
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether to enable the APNs sandbox channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
    pub fn private_key(&self) -> std::option::Option<&str> {
        self.private_key.as_deref()
    }
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    pub fn team_id(&self) -> std::option::Option<&str> {
        self.team_id.as_deref()
    }
    /// <p>The authentication key to use for APNs tokens.</p>
    pub fn token_key(&self) -> std::option::Option<&str> {
        self.token_key.as_deref()
    }
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
    pub fn token_key_id(&self) -> std::option::Option<&str> {
        self.token_key_id.as_deref()
    }
}
/// See [`ApnsSandboxChannelRequest`](crate::model::ApnsSandboxChannelRequest).
pub mod apns_sandbox_channel_request {

    /// A builder for [`ApnsSandboxChannelRequest`](crate::model::ApnsSandboxChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bundle_id: std::option::Option<std::string::String>,
        pub(crate) certificate: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) private_key: std::option::Option<std::string::String>,
        pub(crate) team_id: std::option::Option<std::string::String>,
        pub(crate) token_key: std::option::Option<std::string::String>,
        pub(crate) token_key_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn bundle_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.bundle_id = Some(input.into());
            self
        }
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn set_bundle_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bundle_id = input;
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
        pub fn certificate(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate = Some(input.into());
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using an APNs certificate.</p>
        pub fn set_certificate(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.certificate = input;
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with the APNs sandbox environment, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether to enable the APNs sandbox channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the APNs sandbox channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
        pub fn private_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_key = Some(input.into());
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with the APNs sandbox environment.</p>
        pub fn set_private_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.private_key = input;
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn team_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.team_id = Some(input.into());
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn set_team_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.team_id = input;
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn token_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key = Some(input.into());
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn set_token_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key = input;
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
        pub fn token_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key_id = Some(input.into());
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with the APNs sandbox environment by using APNs tokens.</p>
        pub fn set_token_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsSandboxChannelRequest`](crate::model::ApnsSandboxChannelRequest).
        pub fn build(self) -> crate::model::ApnsSandboxChannelRequest {
            crate::model::ApnsSandboxChannelRequest {
                bundle_id: self.bundle_id,
                certificate: self.certificate,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                private_key: self.private_key,
                team_id: self.team_id,
                token_key: self.token_key,
                token_key_id: self.token_key_id,
            }
        }
    }
}
impl ApnsSandboxChannelRequest {
    /// Creates a new builder-style object to manufacture [`ApnsSandboxChannelRequest`](crate::model::ApnsSandboxChannelRequest).
    pub fn builder() -> crate::model::apns_sandbox_channel_request::Builder {
        crate::model::apns_sandbox_channel_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the APNs (Apple Push Notification service) channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsChannelResponse {
    /// <p>The unique identifier for the application that the APNs channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>Specifies whether the APNs channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    #[doc(hidden)]
    pub has_token_key: bool,
    /// <p>(Deprecated) An identifier for the APNs channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the APNs channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the APNs channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time when the APNs channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the APNs channel, this value is APNS.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the APNs channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl ApnsChannelResponse {
    /// <p>The unique identifier for the application that the APNs channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time when the APNs channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether the APNs channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>Specifies whether the APNs channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
    pub fn has_token_key(&self) -> bool {
        self.has_token_key
    }
    /// <p>(Deprecated) An identifier for the APNs channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the APNs channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the APNs channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time when the APNs channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the APNs channel, this value is APNS.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the APNs channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`ApnsChannelResponse`](crate::model::ApnsChannelResponse).
pub mod apns_channel_response {

    /// A builder for [`ApnsChannelResponse`](crate::model::ApnsChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) has_token_key: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the APNs channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the APNs channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time when the APNs channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that Amazon Pinpoint uses to authenticate with APNs for this channel, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether the APNs channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the APNs channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>Specifies whether the APNs channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn has_token_key(mut self, input: bool) -> Self {
            self.has_token_key = Some(input);
            self
        }
        /// <p>Specifies whether the APNs channel is configured to communicate with APNs by using APNs tokens. To provide an authentication key for APNs tokens, set the TokenKey property of the channel.</p>
        pub fn set_has_token_key(mut self, input: std::option::Option<bool>) -> Self {
            self.has_token_key = input;
            self
        }
        /// <p>(Deprecated) An identifier for the APNs channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the APNs channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the APNs channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the APNs channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the APNs channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the APNs channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time when the APNs channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the APNs channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs channel, this value is APNS.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the APNs channel, this value is APNS.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the APNs channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the APNs channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsChannelResponse`](crate::model::ApnsChannelResponse).
        pub fn build(self) -> crate::model::ApnsChannelResponse {
            crate::model::ApnsChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                has_token_key: self.has_token_key.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl ApnsChannelResponse {
    /// Creates a new builder-style object to manufacture [`ApnsChannelResponse`](crate::model::ApnsChannelResponse).
    pub fn builder() -> crate::model::apns_channel_response::Builder {
        crate::model::apns_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the APNs (Apple Push Notification service) channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub bundle_id: std::option::Option<std::string::String>,
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
    #[doc(hidden)]
    pub certificate: std::option::Option<std::string::String>,
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
    #[doc(hidden)]
    pub default_authentication_method: std::option::Option<std::string::String>,
    /// <p>Specifies whether to enable the APNs channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
    #[doc(hidden)]
    pub private_key: std::option::Option<std::string::String>,
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    #[doc(hidden)]
    pub team_id: std::option::Option<std::string::String>,
    /// <p>The authentication key to use for APNs tokens.</p>
    #[doc(hidden)]
    pub token_key: std::option::Option<std::string::String>,
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
    #[doc(hidden)]
    pub token_key_id: std::option::Option<std::string::String>,
}
impl ApnsChannelRequest {
    /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
    pub fn bundle_id(&self) -> std::option::Option<&str> {
        self.bundle_id.as_deref()
    }
    /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
    pub fn certificate(&self) -> std::option::Option<&str> {
        self.certificate.as_deref()
    }
    /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
    pub fn default_authentication_method(&self) -> std::option::Option<&str> {
        self.default_authentication_method.as_deref()
    }
    /// <p>Specifies whether to enable the APNs channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
    pub fn private_key(&self) -> std::option::Option<&str> {
        self.private_key.as_deref()
    }
    /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
    pub fn team_id(&self) -> std::option::Option<&str> {
        self.team_id.as_deref()
    }
    /// <p>The authentication key to use for APNs tokens.</p>
    pub fn token_key(&self) -> std::option::Option<&str> {
        self.token_key.as_deref()
    }
    /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
    pub fn token_key_id(&self) -> std::option::Option<&str> {
        self.token_key_id.as_deref()
    }
}
/// See [`ApnsChannelRequest`](crate::model::ApnsChannelRequest).
pub mod apns_channel_request {

    /// A builder for [`ApnsChannelRequest`](crate::model::ApnsChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bundle_id: std::option::Option<std::string::String>,
        pub(crate) certificate: std::option::Option<std::string::String>,
        pub(crate) default_authentication_method: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) private_key: std::option::Option<std::string::String>,
        pub(crate) team_id: std::option::Option<std::string::String>,
        pub(crate) token_key: std::option::Option<std::string::String>,
        pub(crate) token_key_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn bundle_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.bundle_id = Some(input.into());
            self
        }
        /// <p>The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens.</p>
        pub fn set_bundle_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bundle_id = input;
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
        pub fn certificate(mut self, input: impl Into<std::string::String>) -> Self {
            self.certificate = Some(input.into());
            self
        }
        /// <p>The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate.</p>
        pub fn set_certificate(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.certificate = input;
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
        pub fn default_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.default_authentication_method = Some(input.into());
            self
        }
        /// <p>The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate.</p>
        pub fn set_default_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_authentication_method = input;
            self
        }
        /// <p>Specifies whether to enable the APNs channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the APNs channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
        pub fn private_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_key = Some(input.into());
            self
        }
        /// <p>The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs.</p>
        pub fn set_private_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.private_key = input;
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn team_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.team_id = Some(input.into());
            self
        }
        /// <p>The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens.</p>
        pub fn set_team_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.team_id = input;
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn token_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key = Some(input.into());
            self
        }
        /// <p>The authentication key to use for APNs tokens.</p>
        pub fn set_token_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key = input;
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
        pub fn token_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.token_key_id = Some(input.into());
            self
        }
        /// <p>The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens.</p>
        pub fn set_token_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.token_key_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsChannelRequest`](crate::model::ApnsChannelRequest).
        pub fn build(self) -> crate::model::ApnsChannelRequest {
            crate::model::ApnsChannelRequest {
                bundle_id: self.bundle_id,
                certificate: self.certificate,
                default_authentication_method: self.default_authentication_method,
                enabled: self.enabled.unwrap_or_default(),
                private_key: self.private_key,
                team_id: self.team_id,
                token_key: self.token_key,
                token_key_id: self.token_key_id,
            }
        }
    }
}
impl ApnsChannelRequest {
    /// Creates a new builder-style object to manufacture [`ApnsChannelRequest`](crate::model::ApnsChannelRequest).
    pub fn builder() -> crate::model::apns_channel_request::Builder {
        crate::model::apns_channel_request::Builder::default()
    }
}

/// <p>Provides information about the status and settings of the ADM (Amazon Device Messaging) channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AdmChannelResponse {
    /// <p>The unique identifier for the application that the ADM channel applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time when the ADM channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether the ADM channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>(Deprecated) An identifier for the ADM channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the ADM channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the ADM channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time when the ADM channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The type of messaging or notification platform for the channel. For the ADM channel, this value is ADM.</p>
    #[doc(hidden)]
    pub platform: std::option::Option<std::string::String>,
    /// <p>The current version of the ADM channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl AdmChannelResponse {
    /// <p>The unique identifier for the application that the ADM channel applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time when the ADM channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>Specifies whether the ADM channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>(Deprecated) An identifier for the ADM channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the ADM channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the ADM channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time when the ADM channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The type of messaging or notification platform for the channel. For the ADM channel, this value is ADM.</p>
    pub fn platform(&self) -> std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The current version of the ADM channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`AdmChannelResponse`](crate::model::AdmChannelResponse).
pub mod adm_channel_response {

    /// A builder for [`AdmChannelResponse`](crate::model::AdmChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) platform: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the ADM channel applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the ADM channel applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time when the ADM channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the ADM channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>Specifies whether the ADM channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the ADM channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>(Deprecated) An identifier for the ADM channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the ADM channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the ADM channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the ADM channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the ADM channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the ADM channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time when the ADM channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time when the ADM channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the ADM channel, this value is ADM.</p>
        pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
            self.platform = Some(input.into());
            self
        }
        /// <p>The type of messaging or notification platform for the channel. For the ADM channel, this value is ADM.</p>
        pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.platform = input;
            self
        }
        /// <p>The current version of the ADM channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the ADM channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`AdmChannelResponse`](crate::model::AdmChannelResponse).
        pub fn build(self) -> crate::model::AdmChannelResponse {
            crate::model::AdmChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                platform: self.platform,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl AdmChannelResponse {
    /// Creates a new builder-style object to manufacture [`AdmChannelResponse`](crate::model::AdmChannelResponse).
    pub fn builder() -> crate::model::adm_channel_response::Builder {
        crate::model::adm_channel_response::Builder::default()
    }
}

/// <p>Specifies the status and settings of the ADM (Amazon Device Messaging) channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AdmChannelRequest {
    /// <p>The Client ID that you received from Amazon to send messages by using ADM.</p>
    #[doc(hidden)]
    pub client_id: std::option::Option<std::string::String>,
    /// <p>The Client Secret that you received from Amazon to send messages by using ADM.</p>
    #[doc(hidden)]
    pub client_secret: std::option::Option<std::string::String>,
    /// <p>Specifies whether to enable the ADM channel for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
}
impl AdmChannelRequest {
    /// <p>The Client ID that you received from Amazon to send messages by using ADM.</p>
    pub fn client_id(&self) -> std::option::Option<&str> {
        self.client_id.as_deref()
    }
    /// <p>The Client Secret that you received from Amazon to send messages by using ADM.</p>
    pub fn client_secret(&self) -> std::option::Option<&str> {
        self.client_secret.as_deref()
    }
    /// <p>Specifies whether to enable the ADM channel for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
}
/// See [`AdmChannelRequest`](crate::model::AdmChannelRequest).
pub mod adm_channel_request {

    /// A builder for [`AdmChannelRequest`](crate::model::AdmChannelRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) client_id: std::option::Option<std::string::String>,
        pub(crate) client_secret: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The Client ID that you received from Amazon to send messages by using ADM.</p>
        pub fn client_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_id = Some(input.into());
            self
        }
        /// <p>The Client ID that you received from Amazon to send messages by using ADM.</p>
        pub fn set_client_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.client_id = input;
            self
        }
        /// <p>The Client Secret that you received from Amazon to send messages by using ADM.</p>
        pub fn client_secret(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_secret = Some(input.into());
            self
        }
        /// <p>The Client Secret that you received from Amazon to send messages by using ADM.</p>
        pub fn set_client_secret(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_secret = input;
            self
        }
        /// <p>Specifies whether to enable the ADM channel for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether to enable the ADM channel for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// Consumes the builder and constructs a [`AdmChannelRequest`](crate::model::AdmChannelRequest).
        pub fn build(self) -> crate::model::AdmChannelRequest {
            crate::model::AdmChannelRequest {
                client_id: self.client_id,
                client_secret: self.client_secret,
                enabled: self.enabled.unwrap_or_default(),
            }
        }
    }
}
impl AdmChannelRequest {
    /// Creates a new builder-style object to manufacture [`AdmChannelRequest`](crate::model::AdmChannelRequest).
    pub fn builder() -> crate::model::adm_channel_request::Builder {
        crate::model::adm_channel_request::Builder::default()
    }
}

/// <p>Specifies the tags (keys and values) for an application, campaign, message template, or segment.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagsModel {
    /// <p>A string-to-string map of key-value pairs that defines the tags for an application, campaign, message template, or segment. Each of these resources can have a maximum of 50 tags.</p>
    /// <p>Each tag consists of a required tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagsModel {
    /// <p>A string-to-string map of key-value pairs that defines the tags for an application, campaign, message template, or segment. Each of these resources can have a maximum of 50 tags.</p>
    /// <p>Each tag consists of a required tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
/// See [`TagsModel`](crate::model::TagsModel).
pub mod tags_model {

    /// A builder for [`TagsModel`](crate::model::TagsModel).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags for an application, campaign, message template, or segment. Each of these resources can have a maximum of 50 tags.</p>
        /// <p>Each tag consists of a required tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags for an application, campaign, message template, or segment. Each of these resources can have a maximum of 50 tags.</p>
        /// <p>Each tag consists of a required tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TagsModel`](crate::model::TagsModel).
        pub fn build(self) -> crate::model::TagsModel {
            crate::model::TagsModel { tags: self.tags }
        }
    }
}
impl TagsModel {
    /// Creates a new builder-style object to manufacture [`TagsModel`](crate::model::TagsModel).
    pub fn builder() -> crate::model::tags_model::Builder {
        crate::model::tags_model::Builder::default()
    }
}

/// <p>Provides information about which users and endpoints a message was sent to.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendUsersMessageResponse {
    /// <p>The unique identifier for the application that was used to send the message.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The unique identifier that was assigned to the message request.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// <p>An object that indicates which endpoints the message was sent to, for each user. The object lists user IDs and, for each user ID, provides the endpoint IDs that the message was sent to. For each endpoint ID, it provides an EndpointMessageResult object.</p>
    #[doc(hidden)]
    pub result: std::option::Option<
        std::collections::HashMap<
            std::string::String,
            std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
        >,
    >,
}
impl SendUsersMessageResponse {
    /// <p>The unique identifier for the application that was used to send the message.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The unique identifier that was assigned to the message request.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>An object that indicates which endpoints the message was sent to, for each user. The object lists user IDs and, for each user ID, provides the endpoint IDs that the message was sent to. For each endpoint ID, it provides an EndpointMessageResult object.</p>
    pub fn result(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<
            std::string::String,
            std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
        >,
    > {
        self.result.as_ref()
    }
}
/// See [`SendUsersMessageResponse`](crate::model::SendUsersMessageResponse).
pub mod send_users_message_response {

    /// A builder for [`SendUsersMessageResponse`](crate::model::SendUsersMessageResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
        pub(crate) result: std::option::Option<
            std::collections::HashMap<
                std::string::String,
                std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
            >,
        >,
    }
    impl Builder {
        /// <p>The unique identifier for the application that was used to send the message.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that was used to send the message.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The unique identifier that was assigned to the message request.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier that was assigned to the message request.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// Adds a key-value pair to `result`.
        ///
        /// To override the contents of this collection use [`set_result`](Self::set_result).
        ///
        /// <p>An object that indicates which endpoints the message was sent to, for each user. The object lists user IDs and, for each user ID, provides the endpoint IDs that the message was sent to. For each endpoint ID, it provides an EndpointMessageResult object.</p>
        pub fn result(
            mut self,
            k: impl Into<std::string::String>,
            v: std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
        ) -> Self {
            let mut hash_map = self.result.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.result = Some(hash_map);
            self
        }
        /// <p>An object that indicates which endpoints the message was sent to, for each user. The object lists user IDs and, for each user ID, provides the endpoint IDs that the message was sent to. For each endpoint ID, it provides an EndpointMessageResult object.</p>
        pub fn set_result(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    std::string::String,
                    std::collections::HashMap<
                        std::string::String,
                        crate::model::EndpointMessageResult,
                    >,
                >,
            >,
        ) -> Self {
            self.result = input;
            self
        }
        /// Consumes the builder and constructs a [`SendUsersMessageResponse`](crate::model::SendUsersMessageResponse).
        pub fn build(self) -> crate::model::SendUsersMessageResponse {
            crate::model::SendUsersMessageResponse {
                application_id: self.application_id,
                request_id: self.request_id,
                result: self.result,
            }
        }
    }
}
impl SendUsersMessageResponse {
    /// Creates a new builder-style object to manufacture [`SendUsersMessageResponse`](crate::model::SendUsersMessageResponse).
    pub fn builder() -> crate::model::send_users_message_response::Builder {
        crate::model::send_users_message_response::Builder::default()
    }
}

/// <p>Provides information about the delivery status and results of sending a message directly to an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointMessageResult {
    /// <p>The endpoint address that the message was delivered to.</p>
    #[doc(hidden)]
    pub address: std::option::Option<std::string::String>,
    /// <p>The delivery status of the message. Possible values are:</p>
    /// <ul>
    /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>OPT_OUT - The user who's associated with the endpoint has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint.</p></li>
    /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint.</p></li>
    /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
    /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub delivery_status: std::option::Option<crate::model::DeliveryStatus>,
    /// <p>The unique identifier for the message that was sent.</p>
    #[doc(hidden)]
    pub message_id: std::option::Option<std::string::String>,
    /// <p>The downstream service status code for delivering the message.</p>
    #[doc(hidden)]
    pub status_code: i32,
    /// <p>The status message for delivering the message.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
    #[doc(hidden)]
    pub updated_token: std::option::Option<std::string::String>,
}
impl EndpointMessageResult {
    /// <p>The endpoint address that the message was delivered to.</p>
    pub fn address(&self) -> std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>The delivery status of the message. Possible values are:</p>
    /// <ul>
    /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>OPT_OUT - The user who's associated with the endpoint has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint.</p></li>
    /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint.</p></li>
    /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
    /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
    /// </ul>
    pub fn delivery_status(&self) -> std::option::Option<&crate::model::DeliveryStatus> {
        self.delivery_status.as_ref()
    }
    /// <p>The unique identifier for the message that was sent.</p>
    pub fn message_id(&self) -> std::option::Option<&str> {
        self.message_id.as_deref()
    }
    /// <p>The downstream service status code for delivering the message.</p>
    pub fn status_code(&self) -> i32 {
        self.status_code
    }
    /// <p>The status message for delivering the message.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
    pub fn updated_token(&self) -> std::option::Option<&str> {
        self.updated_token.as_deref()
    }
}
/// See [`EndpointMessageResult`](crate::model::EndpointMessageResult).
pub mod endpoint_message_result {

    /// A builder for [`EndpointMessageResult`](crate::model::EndpointMessageResult).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) address: std::option::Option<std::string::String>,
        pub(crate) delivery_status: std::option::Option<crate::model::DeliveryStatus>,
        pub(crate) message_id: std::option::Option<std::string::String>,
        pub(crate) status_code: std::option::Option<i32>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) updated_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The endpoint address that the message was delivered to.</p>
        pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
            self.address = Some(input.into());
            self
        }
        /// <p>The endpoint address that the message was delivered to.</p>
        pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.address = input;
            self
        }
        /// <p>The delivery status of the message. Possible values are:</p>
        /// <ul>
        /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>OPT_OUT - The user who's associated with the endpoint has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint.</p></li>
        /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint.</p></li>
        /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
        /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
        /// </ul>
        pub fn delivery_status(mut self, input: crate::model::DeliveryStatus) -> Self {
            self.delivery_status = Some(input);
            self
        }
        /// <p>The delivery status of the message. Possible values are:</p>
        /// <ul>
        /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>OPT_OUT - The user who's associated with the endpoint has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint.</p></li>
        /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint.</p></li>
        /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
        /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
        /// </ul>
        pub fn set_delivery_status(
            mut self,
            input: std::option::Option<crate::model::DeliveryStatus>,
        ) -> Self {
            self.delivery_status = input;
            self
        }
        /// <p>The unique identifier for the message that was sent.</p>
        pub fn message_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.message_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the message that was sent.</p>
        pub fn set_message_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message_id = input;
            self
        }
        /// <p>The downstream service status code for delivering the message.</p>
        pub fn status_code(mut self, input: i32) -> Self {
            self.status_code = Some(input);
            self
        }
        /// <p>The downstream service status code for delivering the message.</p>
        pub fn set_status_code(mut self, input: std::option::Option<i32>) -> Self {
            self.status_code = input;
            self
        }
        /// <p>The status message for delivering the message.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message for delivering the message.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
        pub fn updated_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.updated_token = Some(input.into());
            self
        }
        /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
        pub fn set_updated_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.updated_token = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointMessageResult`](crate::model::EndpointMessageResult).
        pub fn build(self) -> crate::model::EndpointMessageResult {
            crate::model::EndpointMessageResult {
                address: self.address,
                delivery_status: self.delivery_status,
                message_id: self.message_id,
                status_code: self.status_code.unwrap_or_default(),
                status_message: self.status_message,
                updated_token: self.updated_token,
            }
        }
    }
}
impl EndpointMessageResult {
    /// Creates a new builder-style object to manufacture [`EndpointMessageResult`](crate::model::EndpointMessageResult).
    pub fn builder() -> crate::model::endpoint_message_result::Builder {
        crate::model::endpoint_message_result::Builder::default()
    }
}

/// When writing a match expression against `DeliveryStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let deliverystatus = unimplemented!();
/// match deliverystatus {
///     DeliveryStatus::Duplicate => { /* ... */ },
///     DeliveryStatus::OptOut => { /* ... */ },
///     DeliveryStatus::PermanentFailure => { /* ... */ },
///     DeliveryStatus::Successful => { /* ... */ },
///     DeliveryStatus::TemporaryFailure => { /* ... */ },
///     DeliveryStatus::Throttled => { /* ... */ },
///     DeliveryStatus::UnknownFailure => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `deliverystatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `DeliveryStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `DeliveryStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `DeliveryStatus::NewFeature` is defined.
/// Specifically, when `deliverystatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `DeliveryStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum DeliveryStatus {
    #[allow(missing_docs)] // documentation missing in model
    Duplicate,
    #[allow(missing_docs)] // documentation missing in model
    OptOut,
    #[allow(missing_docs)] // documentation missing in model
    PermanentFailure,
    #[allow(missing_docs)] // documentation missing in model
    Successful,
    #[allow(missing_docs)] // documentation missing in model
    TemporaryFailure,
    #[allow(missing_docs)] // documentation missing in model
    Throttled,
    #[allow(missing_docs)] // documentation missing in model
    UnknownFailure,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DeliveryStatus {
    fn from(s: &str) -> Self {
        match s {
            "DUPLICATE" => DeliveryStatus::Duplicate,
            "OPT_OUT" => DeliveryStatus::OptOut,
            "PERMANENT_FAILURE" => DeliveryStatus::PermanentFailure,
            "SUCCESSFUL" => DeliveryStatus::Successful,
            "TEMPORARY_FAILURE" => DeliveryStatus::TemporaryFailure,
            "THROTTLED" => DeliveryStatus::Throttled,
            "UNKNOWN_FAILURE" => DeliveryStatus::UnknownFailure,
            other => DeliveryStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for DeliveryStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(DeliveryStatus::from(s))
    }
}
impl DeliveryStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            DeliveryStatus::Duplicate => "DUPLICATE",
            DeliveryStatus::OptOut => "OPT_OUT",
            DeliveryStatus::PermanentFailure => "PERMANENT_FAILURE",
            DeliveryStatus::Successful => "SUCCESSFUL",
            DeliveryStatus::TemporaryFailure => "TEMPORARY_FAILURE",
            DeliveryStatus::Throttled => "THROTTLED",
            DeliveryStatus::UnknownFailure => "UNKNOWN_FAILURE",
            DeliveryStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "DUPLICATE",
            "OPT_OUT",
            "PERMANENT_FAILURE",
            "SUCCESSFUL",
            "TEMPORARY_FAILURE",
            "THROTTLED",
            "UNKNOWN_FAILURE",
        ]
    }
}
impl AsRef<str> for DeliveryStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Specifies the configuration and other settings for a message to send to all the endpoints that are associated with a list of users.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendUsersMessageRequest {
    /// <p>A map of custom attribute-value pairs. For a push notification, Amazon Pinpoint adds these attributes to the data.pinpoint object in the body of the notification payload. Amazon Pinpoint also provides these attributes in the events that it generates for users-messages deliveries.</p>
    #[doc(hidden)]
    pub context:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
    #[doc(hidden)]
    pub message_configuration: std::option::Option<crate::model::DirectMessageConfiguration>,
    /// <p>The message template to use for the message.</p>
    #[doc(hidden)]
    pub template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
    /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
    #[doc(hidden)]
    pub trace_id: std::option::Option<std::string::String>,
    /// <p>A map that associates user IDs with <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> objects. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for a user by specifying settings such as content overrides and message variables.</p>
    #[doc(hidden)]
    pub users: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::EndpointSendConfiguration>,
    >,
}
impl SendUsersMessageRequest {
    /// <p>A map of custom attribute-value pairs. For a push notification, Amazon Pinpoint adds these attributes to the data.pinpoint object in the body of the notification payload. Amazon Pinpoint also provides these attributes in the events that it generates for users-messages deliveries.</p>
    pub fn context(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.context.as_ref()
    }
    /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
    pub fn message_configuration(
        &self,
    ) -> std::option::Option<&crate::model::DirectMessageConfiguration> {
        self.message_configuration.as_ref()
    }
    /// <p>The message template to use for the message.</p>
    pub fn template_configuration(
        &self,
    ) -> std::option::Option<&crate::model::TemplateConfiguration> {
        self.template_configuration.as_ref()
    }
    /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
    pub fn trace_id(&self) -> std::option::Option<&str> {
        self.trace_id.as_deref()
    }
    /// <p>A map that associates user IDs with <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> objects. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for a user by specifying settings such as content overrides and message variables.</p>
    pub fn users(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::EndpointSendConfiguration>,
    > {
        self.users.as_ref()
    }
}
/// See [`SendUsersMessageRequest`](crate::model::SendUsersMessageRequest).
pub mod send_users_message_request {

    /// A builder for [`SendUsersMessageRequest`](crate::model::SendUsersMessageRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) context: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) message_configuration:
            std::option::Option<crate::model::DirectMessageConfiguration>,
        pub(crate) template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
        pub(crate) trace_id: std::option::Option<std::string::String>,
        pub(crate) users: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::EndpointSendConfiguration>,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `context`.
        ///
        /// To override the contents of this collection use [`set_context`](Self::set_context).
        ///
        /// <p>A map of custom attribute-value pairs. For a push notification, Amazon Pinpoint adds these attributes to the data.pinpoint object in the body of the notification payload. Amazon Pinpoint also provides these attributes in the events that it generates for users-messages deliveries.</p>
        pub fn context(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.context.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.context = Some(hash_map);
            self
        }
        /// <p>A map of custom attribute-value pairs. For a push notification, Amazon Pinpoint adds these attributes to the data.pinpoint object in the body of the notification payload. Amazon Pinpoint also provides these attributes in the events that it generates for users-messages deliveries.</p>
        pub fn set_context(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.context = input;
            self
        }
        /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
        pub fn message_configuration(
            mut self,
            input: crate::model::DirectMessageConfiguration,
        ) -> Self {
            self.message_configuration = Some(input);
            self
        }
        /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
        pub fn set_message_configuration(
            mut self,
            input: std::option::Option<crate::model::DirectMessageConfiguration>,
        ) -> Self {
            self.message_configuration = input;
            self
        }
        /// <p>The message template to use for the message.</p>
        pub fn template_configuration(
            mut self,
            input: crate::model::TemplateConfiguration,
        ) -> Self {
            self.template_configuration = Some(input);
            self
        }
        /// <p>The message template to use for the message.</p>
        pub fn set_template_configuration(
            mut self,
            input: std::option::Option<crate::model::TemplateConfiguration>,
        ) -> Self {
            self.template_configuration = input;
            self
        }
        /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
        pub fn trace_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.trace_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
        pub fn set_trace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.trace_id = input;
            self
        }
        /// Adds a key-value pair to `users`.
        ///
        /// To override the contents of this collection use [`set_users`](Self::set_users).
        ///
        /// <p>A map that associates user IDs with <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> objects. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for a user by specifying settings such as content overrides and message variables.</p>
        pub fn users(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::EndpointSendConfiguration,
        ) -> Self {
            let mut hash_map = self.users.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.users = Some(hash_map);
            self
        }
        /// <p>A map that associates user IDs with <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> objects. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for a user by specifying settings such as content overrides and message variables.</p>
        pub fn set_users(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    std::string::String,
                    crate::model::EndpointSendConfiguration,
                >,
            >,
        ) -> Self {
            self.users = input;
            self
        }
        /// Consumes the builder and constructs a [`SendUsersMessageRequest`](crate::model::SendUsersMessageRequest).
        pub fn build(self) -> crate::model::SendUsersMessageRequest {
            crate::model::SendUsersMessageRequest {
                context: self.context,
                message_configuration: self.message_configuration,
                template_configuration: self.template_configuration,
                trace_id: self.trace_id,
                users: self.users,
            }
        }
    }
}
impl SendUsersMessageRequest {
    /// Creates a new builder-style object to manufacture [`SendUsersMessageRequest`](crate::model::SendUsersMessageRequest).
    pub fn builder() -> crate::model::send_users_message_request::Builder {
        crate::model::send_users_message_request::Builder::default()
    }
}

/// <p>Specifies the content, including message variables and attributes, to use in a message that's sent directly to an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointSendConfiguration {
    /// <p>The body of the message. If specified, this value overrides the default message body.</p>
    #[doc(hidden)]
    pub body_override: std::option::Option<std::string::String>,
    /// <p>A map of custom attributes to attach to the message for the address. Attribute names are case sensitive.</p>
    /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
    #[doc(hidden)]
    pub context:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>A map of the message variables to merge with the variables specified for the default message (DefaultMessage.Substitutions). The variables specified in this map take precedence over all other variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The title or subject line of the message. If specified, this value overrides the default message title or subject line.</p>
    #[doc(hidden)]
    pub title_override: std::option::Option<std::string::String>,
}
impl EndpointSendConfiguration {
    /// <p>The body of the message. If specified, this value overrides the default message body.</p>
    pub fn body_override(&self) -> std::option::Option<&str> {
        self.body_override.as_deref()
    }
    /// <p>A map of custom attributes to attach to the message for the address. Attribute names are case sensitive.</p>
    /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
    pub fn context(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.context.as_ref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>A map of the message variables to merge with the variables specified for the default message (DefaultMessage.Substitutions). The variables specified in this map take precedence over all other variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The title or subject line of the message. If specified, this value overrides the default message title or subject line.</p>
    pub fn title_override(&self) -> std::option::Option<&str> {
        self.title_override.as_deref()
    }
}
/// See [`EndpointSendConfiguration`](crate::model::EndpointSendConfiguration).
pub mod endpoint_send_configuration {

    /// A builder for [`EndpointSendConfiguration`](crate::model::EndpointSendConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body_override: std::option::Option<std::string::String>,
        pub(crate) context: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) title_override: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The body of the message. If specified, this value overrides the default message body.</p>
        pub fn body_override(mut self, input: impl Into<std::string::String>) -> Self {
            self.body_override = Some(input.into());
            self
        }
        /// <p>The body of the message. If specified, this value overrides the default message body.</p>
        pub fn set_body_override(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.body_override = input;
            self
        }
        /// Adds a key-value pair to `context`.
        ///
        /// To override the contents of this collection use [`set_context`](Self::set_context).
        ///
        /// <p>A map of custom attributes to attach to the message for the address. Attribute names are case sensitive.</p>
        /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
        pub fn context(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.context.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.context = Some(hash_map);
            self
        }
        /// <p>A map of custom attributes to attach to the message for the address. Attribute names are case sensitive.</p>
        /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
        pub fn set_context(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.context = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>A map of the message variables to merge with the variables specified for the default message (DefaultMessage.Substitutions). The variables specified in this map take precedence over all other variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>A map of the message variables to merge with the variables specified for the default message (DefaultMessage.Substitutions). The variables specified in this map take precedence over all other variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The title or subject line of the message. If specified, this value overrides the default message title or subject line.</p>
        pub fn title_override(mut self, input: impl Into<std::string::String>) -> Self {
            self.title_override = Some(input.into());
            self
        }
        /// <p>The title or subject line of the message. If specified, this value overrides the default message title or subject line.</p>
        pub fn set_title_override(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.title_override = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointSendConfiguration`](crate::model::EndpointSendConfiguration).
        pub fn build(self) -> crate::model::EndpointSendConfiguration {
            crate::model::EndpointSendConfiguration {
                body_override: self.body_override,
                context: self.context,
                raw_content: self.raw_content,
                substitutions: self.substitutions,
                title_override: self.title_override,
            }
        }
    }
}
impl EndpointSendConfiguration {
    /// Creates a new builder-style object to manufacture [`EndpointSendConfiguration`](crate::model::EndpointSendConfiguration).
    pub fn builder() -> crate::model::endpoint_send_configuration::Builder {
        crate::model::endpoint_send_configuration::Builder::default()
    }
}

/// <p>Specifies the settings and content for the default message and any default messages that you tailored for specific channels.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DirectMessageConfiguration {
    /// <p>The default push notification message for the ADM (Amazon Device Messaging) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    #[doc(hidden)]
    pub adm_message: std::option::Option<crate::model::AdmMessage>,
    /// <p>The default push notification message for the APNs (Apple Push Notification service) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    #[doc(hidden)]
    pub apns_message: std::option::Option<crate::model::ApnsMessage>,
    /// <p>The default push notification message for the Baidu (Baidu Cloud Push) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    #[doc(hidden)]
    pub baidu_message: std::option::Option<crate::model::BaiduMessage>,
    /// <p>The default message for all channels.</p>
    #[doc(hidden)]
    pub default_message: std::option::Option<crate::model::DefaultMessage>,
    /// <p>The default push notification message for all push notification channels.</p>
    #[doc(hidden)]
    pub default_push_notification_message:
        std::option::Option<crate::model::DefaultPushNotificationMessage>,
    /// <p>The default message for the email channel. This message overrides the default message (DefaultMessage).</p>
    #[doc(hidden)]
    pub email_message: std::option::Option<crate::model::EmailMessage>,
    /// <p>The default push notification message for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    #[doc(hidden)]
    pub gcm_message: std::option::Option<crate::model::GcmMessage>,
    /// <p>The default message for the SMS channel. This message overrides the default message (DefaultMessage).</p>
    #[doc(hidden)]
    pub sms_message: std::option::Option<crate::model::SmsMessage>,
    /// <p>The default message for the voice channel. This message overrides the default message (DefaultMessage).</p>
    #[doc(hidden)]
    pub voice_message: std::option::Option<crate::model::VoiceMessage>,
}
impl DirectMessageConfiguration {
    /// <p>The default push notification message for the ADM (Amazon Device Messaging) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    pub fn adm_message(&self) -> std::option::Option<&crate::model::AdmMessage> {
        self.adm_message.as_ref()
    }
    /// <p>The default push notification message for the APNs (Apple Push Notification service) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    pub fn apns_message(&self) -> std::option::Option<&crate::model::ApnsMessage> {
        self.apns_message.as_ref()
    }
    /// <p>The default push notification message for the Baidu (Baidu Cloud Push) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    pub fn baidu_message(&self) -> std::option::Option<&crate::model::BaiduMessage> {
        self.baidu_message.as_ref()
    }
    /// <p>The default message for all channels.</p>
    pub fn default_message(&self) -> std::option::Option<&crate::model::DefaultMessage> {
        self.default_message.as_ref()
    }
    /// <p>The default push notification message for all push notification channels.</p>
    pub fn default_push_notification_message(
        &self,
    ) -> std::option::Option<&crate::model::DefaultPushNotificationMessage> {
        self.default_push_notification_message.as_ref()
    }
    /// <p>The default message for the email channel. This message overrides the default message (DefaultMessage).</p>
    pub fn email_message(&self) -> std::option::Option<&crate::model::EmailMessage> {
        self.email_message.as_ref()
    }
    /// <p>The default push notification message for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
    pub fn gcm_message(&self) -> std::option::Option<&crate::model::GcmMessage> {
        self.gcm_message.as_ref()
    }
    /// <p>The default message for the SMS channel. This message overrides the default message (DefaultMessage).</p>
    pub fn sms_message(&self) -> std::option::Option<&crate::model::SmsMessage> {
        self.sms_message.as_ref()
    }
    /// <p>The default message for the voice channel. This message overrides the default message (DefaultMessage).</p>
    pub fn voice_message(&self) -> std::option::Option<&crate::model::VoiceMessage> {
        self.voice_message.as_ref()
    }
}
/// See [`DirectMessageConfiguration`](crate::model::DirectMessageConfiguration).
pub mod direct_message_configuration {

    /// A builder for [`DirectMessageConfiguration`](crate::model::DirectMessageConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) adm_message: std::option::Option<crate::model::AdmMessage>,
        pub(crate) apns_message: std::option::Option<crate::model::ApnsMessage>,
        pub(crate) baidu_message: std::option::Option<crate::model::BaiduMessage>,
        pub(crate) default_message: std::option::Option<crate::model::DefaultMessage>,
        pub(crate) default_push_notification_message:
            std::option::Option<crate::model::DefaultPushNotificationMessage>,
        pub(crate) email_message: std::option::Option<crate::model::EmailMessage>,
        pub(crate) gcm_message: std::option::Option<crate::model::GcmMessage>,
        pub(crate) sms_message: std::option::Option<crate::model::SmsMessage>,
        pub(crate) voice_message: std::option::Option<crate::model::VoiceMessage>,
    }
    impl Builder {
        /// <p>The default push notification message for the ADM (Amazon Device Messaging) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn adm_message(mut self, input: crate::model::AdmMessage) -> Self {
            self.adm_message = Some(input);
            self
        }
        /// <p>The default push notification message for the ADM (Amazon Device Messaging) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn set_adm_message(
            mut self,
            input: std::option::Option<crate::model::AdmMessage>,
        ) -> Self {
            self.adm_message = input;
            self
        }
        /// <p>The default push notification message for the APNs (Apple Push Notification service) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn apns_message(mut self, input: crate::model::ApnsMessage) -> Self {
            self.apns_message = Some(input);
            self
        }
        /// <p>The default push notification message for the APNs (Apple Push Notification service) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn set_apns_message(
            mut self,
            input: std::option::Option<crate::model::ApnsMessage>,
        ) -> Self {
            self.apns_message = input;
            self
        }
        /// <p>The default push notification message for the Baidu (Baidu Cloud Push) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn baidu_message(mut self, input: crate::model::BaiduMessage) -> Self {
            self.baidu_message = Some(input);
            self
        }
        /// <p>The default push notification message for the Baidu (Baidu Cloud Push) channel. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn set_baidu_message(
            mut self,
            input: std::option::Option<crate::model::BaiduMessage>,
        ) -> Self {
            self.baidu_message = input;
            self
        }
        /// <p>The default message for all channels.</p>
        pub fn default_message(mut self, input: crate::model::DefaultMessage) -> Self {
            self.default_message = Some(input);
            self
        }
        /// <p>The default message for all channels.</p>
        pub fn set_default_message(
            mut self,
            input: std::option::Option<crate::model::DefaultMessage>,
        ) -> Self {
            self.default_message = input;
            self
        }
        /// <p>The default push notification message for all push notification channels.</p>
        pub fn default_push_notification_message(
            mut self,
            input: crate::model::DefaultPushNotificationMessage,
        ) -> Self {
            self.default_push_notification_message = Some(input);
            self
        }
        /// <p>The default push notification message for all push notification channels.</p>
        pub fn set_default_push_notification_message(
            mut self,
            input: std::option::Option<crate::model::DefaultPushNotificationMessage>,
        ) -> Self {
            self.default_push_notification_message = input;
            self
        }
        /// <p>The default message for the email channel. This message overrides the default message (DefaultMessage).</p>
        pub fn email_message(mut self, input: crate::model::EmailMessage) -> Self {
            self.email_message = Some(input);
            self
        }
        /// <p>The default message for the email channel. This message overrides the default message (DefaultMessage).</p>
        pub fn set_email_message(
            mut self,
            input: std::option::Option<crate::model::EmailMessage>,
        ) -> Self {
            self.email_message = input;
            self
        }
        /// <p>The default push notification message for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn gcm_message(mut self, input: crate::model::GcmMessage) -> Self {
            self.gcm_message = Some(input);
            self
        }
        /// <p>The default push notification message for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message overrides the default push notification message (DefaultPushNotificationMessage).</p>
        pub fn set_gcm_message(
            mut self,
            input: std::option::Option<crate::model::GcmMessage>,
        ) -> Self {
            self.gcm_message = input;
            self
        }
        /// <p>The default message for the SMS channel. This message overrides the default message (DefaultMessage).</p>
        pub fn sms_message(mut self, input: crate::model::SmsMessage) -> Self {
            self.sms_message = Some(input);
            self
        }
        /// <p>The default message for the SMS channel. This message overrides the default message (DefaultMessage).</p>
        pub fn set_sms_message(
            mut self,
            input: std::option::Option<crate::model::SmsMessage>,
        ) -> Self {
            self.sms_message = input;
            self
        }
        /// <p>The default message for the voice channel. This message overrides the default message (DefaultMessage).</p>
        pub fn voice_message(mut self, input: crate::model::VoiceMessage) -> Self {
            self.voice_message = Some(input);
            self
        }
        /// <p>The default message for the voice channel. This message overrides the default message (DefaultMessage).</p>
        pub fn set_voice_message(
            mut self,
            input: std::option::Option<crate::model::VoiceMessage>,
        ) -> Self {
            self.voice_message = input;
            self
        }
        /// Consumes the builder and constructs a [`DirectMessageConfiguration`](crate::model::DirectMessageConfiguration).
        pub fn build(self) -> crate::model::DirectMessageConfiguration {
            crate::model::DirectMessageConfiguration {
                adm_message: self.adm_message,
                apns_message: self.apns_message,
                baidu_message: self.baidu_message,
                default_message: self.default_message,
                default_push_notification_message: self.default_push_notification_message,
                email_message: self.email_message,
                gcm_message: self.gcm_message,
                sms_message: self.sms_message,
                voice_message: self.voice_message,
            }
        }
    }
}
impl DirectMessageConfiguration {
    /// Creates a new builder-style object to manufacture [`DirectMessageConfiguration`](crate::model::DirectMessageConfiguration).
    pub fn builder() -> crate::model::direct_message_configuration::Builder {
        crate::model::direct_message_configuration::Builder::default()
    }
}

/// <p>Specifies the settings for a one-time voice message that's sent directly to an endpoint through the voice channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VoiceMessage {
    /// <p>The text of the script to use for the voice message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The code for the language to use when synthesizing the text of the message script. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    #[doc(hidden)]
    pub language_code: std::option::Option<std::string::String>,
    /// <p>The long code to send the voice message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code in E.164 format, for example +12065550100, to ensure prompt and accurate delivery of the message.</p>
    #[doc(hidden)]
    pub origination_number: std::option::Option<std::string::String>,
    /// <p>The default message variables to use in the voice message. You can override the default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The name of the voice to use when delivering the message. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    #[doc(hidden)]
    pub voice_id: std::option::Option<std::string::String>,
}
impl VoiceMessage {
    /// <p>The text of the script to use for the voice message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The code for the language to use when synthesizing the text of the message script. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    pub fn language_code(&self) -> std::option::Option<&str> {
        self.language_code.as_deref()
    }
    /// <p>The long code to send the voice message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code in E.164 format, for example +12065550100, to ensure prompt and accurate delivery of the message.</p>
    pub fn origination_number(&self) -> std::option::Option<&str> {
        self.origination_number.as_deref()
    }
    /// <p>The default message variables to use in the voice message. You can override the default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The name of the voice to use when delivering the message. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    pub fn voice_id(&self) -> std::option::Option<&str> {
        self.voice_id.as_deref()
    }
}
/// See [`VoiceMessage`](crate::model::VoiceMessage).
pub mod voice_message {

    /// A builder for [`VoiceMessage`](crate::model::VoiceMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) language_code: std::option::Option<std::string::String>,
        pub(crate) origination_number: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) voice_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The text of the script to use for the voice message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The text of the script to use for the voice message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The code for the language to use when synthesizing the text of the message script. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn language_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.language_code = Some(input.into());
            self
        }
        /// <p>The code for the language to use when synthesizing the text of the message script. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn set_language_code(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.language_code = input;
            self
        }
        /// <p>The long code to send the voice message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code in E.164 format, for example +12065550100, to ensure prompt and accurate delivery of the message.</p>
        pub fn origination_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.origination_number = Some(input.into());
            self
        }
        /// <p>The long code to send the voice message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code in E.164 format, for example +12065550100, to ensure prompt and accurate delivery of the message.</p>
        pub fn set_origination_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.origination_number = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the voice message. You can override the default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the voice message. You can override the default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The name of the voice to use when delivering the message. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn voice_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.voice_id = Some(input.into());
            self
        }
        /// <p>The name of the voice to use when delivering the message. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn set_voice_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.voice_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VoiceMessage`](crate::model::VoiceMessage).
        pub fn build(self) -> crate::model::VoiceMessage {
            crate::model::VoiceMessage {
                body: self.body,
                language_code: self.language_code,
                origination_number: self.origination_number,
                substitutions: self.substitutions,
                voice_id: self.voice_id,
            }
        }
    }
}
impl VoiceMessage {
    /// Creates a new builder-style object to manufacture [`VoiceMessage`](crate::model::VoiceMessage).
    pub fn builder() -> crate::model::voice_message::Builder {
        crate::model::voice_message::Builder::default()
    }
}

/// <p>Specifies the default settings for a one-time SMS message that's sent directly to an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SmsMessage {
    /// <p>The body of the SMS message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The SMS program name that you provided to AWS Support when you requested your dedicated number.</p>
    #[doc(hidden)]
    pub keyword: std::option::Option<std::string::String>,
    /// <p>This field is reserved for future use.</p>
    #[doc(hidden)]
    pub media_url: std::option::Option<std::string::String>,
    /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
    #[doc(hidden)]
    pub message_type: std::option::Option<crate::model::MessageType>,
    /// <p>The number to send the SMS message from. This value should be one of the dedicated long or short codes that's assigned to your AWS account. If you don't specify a long or short code, Amazon Pinpoint assigns a random long code to the SMS message and sends the message from that code.</p>
    #[doc(hidden)]
    pub origination_number: std::option::Option<std::string::String>,
    /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region.</p>
    #[doc(hidden)]
    pub sender_id: std::option::Option<std::string::String>,
    /// <p>The message variables to use in the SMS message. You can override the default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
    #[doc(hidden)]
    pub entity_id: std::option::Option<std::string::String>,
    /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
    #[doc(hidden)]
    pub template_id: std::option::Option<std::string::String>,
}
impl SmsMessage {
    /// <p>The body of the SMS message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The SMS program name that you provided to AWS Support when you requested your dedicated number.</p>
    pub fn keyword(&self) -> std::option::Option<&str> {
        self.keyword.as_deref()
    }
    /// <p>This field is reserved for future use.</p>
    pub fn media_url(&self) -> std::option::Option<&str> {
        self.media_url.as_deref()
    }
    /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
    pub fn message_type(&self) -> std::option::Option<&crate::model::MessageType> {
        self.message_type.as_ref()
    }
    /// <p>The number to send the SMS message from. This value should be one of the dedicated long or short codes that's assigned to your AWS account. If you don't specify a long or short code, Amazon Pinpoint assigns a random long code to the SMS message and sends the message from that code.</p>
    pub fn origination_number(&self) -> std::option::Option<&str> {
        self.origination_number.as_deref()
    }
    /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region.</p>
    pub fn sender_id(&self) -> std::option::Option<&str> {
        self.sender_id.as_deref()
    }
    /// <p>The message variables to use in the SMS message. You can override the default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
    pub fn entity_id(&self) -> std::option::Option<&str> {
        self.entity_id.as_deref()
    }
    /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
    pub fn template_id(&self) -> std::option::Option<&str> {
        self.template_id.as_deref()
    }
}
/// See [`SmsMessage`](crate::model::SmsMessage).
pub mod sms_message {

    /// A builder for [`SmsMessage`](crate::model::SmsMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) keyword: std::option::Option<std::string::String>,
        pub(crate) media_url: std::option::Option<std::string::String>,
        pub(crate) message_type: std::option::Option<crate::model::MessageType>,
        pub(crate) origination_number: std::option::Option<std::string::String>,
        pub(crate) sender_id: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) entity_id: std::option::Option<std::string::String>,
        pub(crate) template_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The body of the SMS message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the SMS message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The SMS program name that you provided to AWS Support when you requested your dedicated number.</p>
        pub fn keyword(mut self, input: impl Into<std::string::String>) -> Self {
            self.keyword = Some(input.into());
            self
        }
        /// <p>The SMS program name that you provided to AWS Support when you requested your dedicated number.</p>
        pub fn set_keyword(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.keyword = input;
            self
        }
        /// <p>This field is reserved for future use.</p>
        pub fn media_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.media_url = Some(input.into());
            self
        }
        /// <p>This field is reserved for future use.</p>
        pub fn set_media_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.media_url = input;
            self
        }
        /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
        pub fn message_type(mut self, input: crate::model::MessageType) -> Self {
            self.message_type = Some(input);
            self
        }
        /// <p>The SMS message type. Valid values are TRANSACTIONAL (for messages that are critical or time-sensitive, such as a one-time passwords) and PROMOTIONAL (for messsages that aren't critical or time-sensitive, such as marketing messages).</p>
        pub fn set_message_type(
            mut self,
            input: std::option::Option<crate::model::MessageType>,
        ) -> Self {
            self.message_type = input;
            self
        }
        /// <p>The number to send the SMS message from. This value should be one of the dedicated long or short codes that's assigned to your AWS account. If you don't specify a long or short code, Amazon Pinpoint assigns a random long code to the SMS message and sends the message from that code.</p>
        pub fn origination_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.origination_number = Some(input.into());
            self
        }
        /// <p>The number to send the SMS message from. This value should be one of the dedicated long or short codes that's assigned to your AWS account. If you don't specify a long or short code, Amazon Pinpoint assigns a random long code to the SMS message and sends the message from that code.</p>
        pub fn set_origination_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.origination_number = input;
            self
        }
        /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region.</p>
        pub fn sender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.sender_id = Some(input.into());
            self
        }
        /// <p>The sender ID to display as the sender of the message on a recipient's device. Support for sender IDs varies by country or region.</p>
        pub fn set_sender_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sender_id = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The message variables to use in the SMS message. You can override the default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The message variables to use in the SMS message. You can override the default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
        pub fn entity_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.entity_id = Some(input.into());
            self
        }
        /// <p>The entity ID or Principal Entity (PE) id received from the regulatory body for sending SMS in your country.</p>
        pub fn set_entity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.entity_id = input;
            self
        }
        /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
        pub fn template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_id = Some(input.into());
            self
        }
        /// <p>The template ID received from the regulatory body for sending SMS in your country.</p>
        pub fn set_template_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.template_id = input;
            self
        }
        /// Consumes the builder and constructs a [`SmsMessage`](crate::model::SmsMessage).
        pub fn build(self) -> crate::model::SmsMessage {
            crate::model::SmsMessage {
                body: self.body,
                keyword: self.keyword,
                media_url: self.media_url,
                message_type: self.message_type,
                origination_number: self.origination_number,
                sender_id: self.sender_id,
                substitutions: self.substitutions,
                entity_id: self.entity_id,
                template_id: self.template_id,
            }
        }
    }
}
impl SmsMessage {
    /// Creates a new builder-style object to manufacture [`SmsMessage`](crate::model::SmsMessage).
    pub fn builder() -> crate::model::sms_message::Builder {
        crate::model::sms_message::Builder::default()
    }
}

/// <p>Specifies the settings for a one-time message that's sent directly to an endpoint through the GCM channel. The GCM channel enables Amazon Pinpoint to send messages to the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GcmMessage {
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The body of the notification message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>An arbitrary string that identifies a group of messages that can be collapsed to ensure that only the last message is sent when delivery can resume. This helps avoid sending too many instances of the same messages when the recipient's device comes online again or becomes active.</p>
    /// <p>Amazon Pinpoint specifies this value in the Firebase Cloud Messaging (FCM) collapse_key parameter when it sends the notification message to FCM.</p>
    #[doc(hidden)]
    pub collapse_key: std::option::Option<std::string::String>,
    /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    #[doc(hidden)]
    pub data:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The icon image name of the asset saved in your app.</p>
    #[doc(hidden)]
    pub icon_reference: std::option::Option<std::string::String>,
    /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
    #[doc(hidden)]
    pub image_icon_url: std::option::Option<std::string::String>,
    /// <p>The URL of an image to display in the push notification.</p>
    #[doc(hidden)]
    pub image_url: std::option::Option<std::string::String>,
    /// <p>para&gt;normal - The notification might be delayed. Delivery is optimized for battery usage on the recipient's device. Use this value unless immediate delivery is required.</p>/listitem&gt;
    /// <li><p>high - The notification is sent immediately and might wake a sleeping device.</p></li>/para&gt;
    /// <p>Amazon Pinpoint specifies this value in the FCM priority parameter when it sends the notification message to FCM.</p>
    /// <p>The equivalent values for Apple Push Notification service (APNs) are 5, for normal, and 10, for high. If you specify an APNs value for this property, Amazon Pinpoint accepts and converts the value to the corresponding FCM value.</p>
    #[doc(hidden)]
    pub priority: std::option::Option<std::string::String>,
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>The package name of the application where registration tokens must match in order for the recipient to receive the message.</p>
    #[doc(hidden)]
    pub restricted_package_name: std::option::Option<std::string::String>,
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
    #[doc(hidden)]
    pub silent_push: bool,
    /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
    #[doc(hidden)]
    pub small_image_icon_url: std::option::Option<std::string::String>,
    /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    #[doc(hidden)]
    pub sound: std::option::Option<std::string::String>,
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The amount of time, in seconds, that FCM should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If you don't specify this value, FCM defaults to the maximum value, which is 2,419,200 seconds (28 days).</p>
    /// <p>Amazon Pinpoint specifies this value in the FCM time_to_live parameter when it sends the notification message to FCM.</p>
    #[doc(hidden)]
    pub time_to_live: i32,
    /// <p>The title to display above the notification message on the recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl GcmMessage {
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The body of the notification message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>An arbitrary string that identifies a group of messages that can be collapsed to ensure that only the last message is sent when delivery can resume. This helps avoid sending too many instances of the same messages when the recipient's device comes online again or becomes active.</p>
    /// <p>Amazon Pinpoint specifies this value in the Firebase Cloud Messaging (FCM) collapse_key parameter when it sends the notification message to FCM.</p>
    pub fn collapse_key(&self) -> std::option::Option<&str> {
        self.collapse_key.as_deref()
    }
    /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    pub fn data(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.data.as_ref()
    }
    /// <p>The icon image name of the asset saved in your app.</p>
    pub fn icon_reference(&self) -> std::option::Option<&str> {
        self.icon_reference.as_deref()
    }
    /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
    pub fn image_icon_url(&self) -> std::option::Option<&str> {
        self.image_icon_url.as_deref()
    }
    /// <p>The URL of an image to display in the push notification.</p>
    pub fn image_url(&self) -> std::option::Option<&str> {
        self.image_url.as_deref()
    }
    /// <p>para&gt;normal - The notification might be delayed. Delivery is optimized for battery usage on the recipient's device. Use this value unless immediate delivery is required.</p>/listitem&gt;
    /// <li><p>high - The notification is sent immediately and might wake a sleeping device.</p></li>/para&gt;
    /// <p>Amazon Pinpoint specifies this value in the FCM priority parameter when it sends the notification message to FCM.</p>
    /// <p>The equivalent values for Apple Push Notification service (APNs) are 5, for normal, and 10, for high. If you specify an APNs value for this property, Amazon Pinpoint accepts and converts the value to the corresponding FCM value.</p>
    pub fn priority(&self) -> std::option::Option<&str> {
        self.priority.as_deref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>The package name of the application where registration tokens must match in order for the recipient to receive the message.</p>
    pub fn restricted_package_name(&self) -> std::option::Option<&str> {
        self.restricted_package_name.as_deref()
    }
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
    pub fn silent_push(&self) -> bool {
        self.silent_push
    }
    /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
    pub fn small_image_icon_url(&self) -> std::option::Option<&str> {
        self.small_image_icon_url.as_deref()
    }
    /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    pub fn sound(&self) -> std::option::Option<&str> {
        self.sound.as_deref()
    }
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The amount of time, in seconds, that FCM should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If you don't specify this value, FCM defaults to the maximum value, which is 2,419,200 seconds (28 days).</p>
    /// <p>Amazon Pinpoint specifies this value in the FCM time_to_live parameter when it sends the notification message to FCM.</p>
    pub fn time_to_live(&self) -> i32 {
        self.time_to_live
    }
    /// <p>The title to display above the notification message on the recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`GcmMessage`](crate::model::GcmMessage).
pub mod gcm_message {

    /// A builder for [`GcmMessage`](crate::model::GcmMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) collapse_key: std::option::Option<std::string::String>,
        pub(crate) data: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) icon_reference: std::option::Option<std::string::String>,
        pub(crate) image_icon_url: std::option::Option<std::string::String>,
        pub(crate) image_url: std::option::Option<std::string::String>,
        pub(crate) priority: std::option::Option<std::string::String>,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) restricted_package_name: std::option::Option<std::string::String>,
        pub(crate) silent_push: std::option::Option<bool>,
        pub(crate) small_image_icon_url: std::option::Option<std::string::String>,
        pub(crate) sound: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) time_to_live: std::option::Option<i32>,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>An arbitrary string that identifies a group of messages that can be collapsed to ensure that only the last message is sent when delivery can resume. This helps avoid sending too many instances of the same messages when the recipient's device comes online again or becomes active.</p>
        /// <p>Amazon Pinpoint specifies this value in the Firebase Cloud Messaging (FCM) collapse_key parameter when it sends the notification message to FCM.</p>
        pub fn collapse_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.collapse_key = Some(input.into());
            self
        }
        /// <p>An arbitrary string that identifies a group of messages that can be collapsed to ensure that only the last message is sent when delivery can resume. This helps avoid sending too many instances of the same messages when the recipient's device comes online again or becomes active.</p>
        /// <p>Amazon Pinpoint specifies this value in the Firebase Cloud Messaging (FCM) collapse_key parameter when it sends the notification message to FCM.</p>
        pub fn set_collapse_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.collapse_key = input;
            self
        }
        /// Adds a key-value pair to `data`.
        ///
        /// To override the contents of this collection use [`set_data`](Self::set_data).
        ///
        /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn data(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.data.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.data = Some(hash_map);
            self
        }
        /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn set_data(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.data = input;
            self
        }
        /// <p>The icon image name of the asset saved in your app.</p>
        pub fn icon_reference(mut self, input: impl Into<std::string::String>) -> Self {
            self.icon_reference = Some(input.into());
            self
        }
        /// <p>The icon image name of the asset saved in your app.</p>
        pub fn set_icon_reference(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.icon_reference = input;
            self
        }
        /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
        pub fn image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
        pub fn set_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_icon_url = input;
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn image_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_url = Some(input.into());
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn set_image_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_url = input;
            self
        }
        /// <p>para&gt;normal - The notification might be delayed. Delivery is optimized for battery usage on the recipient's device. Use this value unless immediate delivery is required.</p>/listitem&gt;
        /// <li><p>high - The notification is sent immediately and might wake a sleeping device.</p></li>/para&gt;
        /// <p>Amazon Pinpoint specifies this value in the FCM priority parameter when it sends the notification message to FCM.</p>
        /// <p>The equivalent values for Apple Push Notification service (APNs) are 5, for normal, and 10, for high. If you specify an APNs value for this property, Amazon Pinpoint accepts and converts the value to the corresponding FCM value.</p>
        pub fn priority(mut self, input: impl Into<std::string::String>) -> Self {
            self.priority = Some(input.into());
            self
        }
        /// <p>para&gt;normal - The notification might be delayed. Delivery is optimized for battery usage on the recipient's device. Use this value unless immediate delivery is required.</p>/listitem&gt;
        /// <li><p>high - The notification is sent immediately and might wake a sleeping device.</p></li>/para&gt;
        /// <p>Amazon Pinpoint specifies this value in the FCM priority parameter when it sends the notification message to FCM.</p>
        /// <p>The equivalent values for Apple Push Notification service (APNs) are 5, for normal, and 10, for high. If you specify an APNs value for this property, Amazon Pinpoint accepts and converts the value to the corresponding FCM value.</p>
        pub fn set_priority(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.priority = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// <p>The package name of the application where registration tokens must match in order for the recipient to receive the message.</p>
        pub fn restricted_package_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.restricted_package_name = Some(input.into());
            self
        }
        /// <p>The package name of the application where registration tokens must match in order for the recipient to receive the message.</p>
        pub fn set_restricted_package_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.restricted_package_name = input;
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
        pub fn silent_push(mut self, input: bool) -> Self {
            self.silent_push = Some(input);
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
        pub fn set_silent_push(mut self, input: std::option::Option<bool>) -> Self {
            self.silent_push = input;
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
        pub fn small_image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.small_image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
        pub fn set_small_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.small_image_icon_url = input;
            self
        }
        /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn sound(mut self, input: impl Into<std::string::String>) -> Self {
            self.sound = Some(input.into());
            self
        }
        /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn set_sound(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sound = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The amount of time, in seconds, that FCM should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If you don't specify this value, FCM defaults to the maximum value, which is 2,419,200 seconds (28 days).</p>
        /// <p>Amazon Pinpoint specifies this value in the FCM time_to_live parameter when it sends the notification message to FCM.</p>
        pub fn time_to_live(mut self, input: i32) -> Self {
            self.time_to_live = Some(input);
            self
        }
        /// <p>The amount of time, in seconds, that FCM should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If you don't specify this value, FCM defaults to the maximum value, which is 2,419,200 seconds (28 days).</p>
        /// <p>Amazon Pinpoint specifies this value in the FCM time_to_live parameter when it sends the notification message to FCM.</p>
        pub fn set_time_to_live(mut self, input: std::option::Option<i32>) -> Self {
            self.time_to_live = input;
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`GcmMessage`](crate::model::GcmMessage).
        pub fn build(self) -> crate::model::GcmMessage {
            crate::model::GcmMessage {
                action: self.action,
                body: self.body,
                collapse_key: self.collapse_key,
                data: self.data,
                icon_reference: self.icon_reference,
                image_icon_url: self.image_icon_url,
                image_url: self.image_url,
                priority: self.priority,
                raw_content: self.raw_content,
                restricted_package_name: self.restricted_package_name,
                silent_push: self.silent_push.unwrap_or_default(),
                small_image_icon_url: self.small_image_icon_url,
                sound: self.sound,
                substitutions: self.substitutions,
                time_to_live: self.time_to_live.unwrap_or_default(),
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl GcmMessage {
    /// Creates a new builder-style object to manufacture [`GcmMessage`](crate::model::GcmMessage).
    pub fn builder() -> crate::model::gcm_message::Builder {
        crate::model::gcm_message::Builder::default()
    }
}

/// <p>Specifies the default settings and content for a one-time email message that's sent directly to an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmailMessage {
    /// <p>The body of the email message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The email address to forward bounces and complaints to, if feedback forwarding is enabled.</p>
    #[doc(hidden)]
    pub feedback_forwarding_address: std::option::Option<std::string::String>,
    /// <p>The verified email address to send the email message from. The default value is the FromAddress specified for the email channel.</p>
    #[doc(hidden)]
    pub from_address: std::option::Option<std::string::String>,
    /// <p>The email message, represented as a raw MIME message.</p>
    #[doc(hidden)]
    pub raw_email: std::option::Option<crate::model::RawEmail>,
    /// <p>The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.</p>
    #[doc(hidden)]
    pub reply_to_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The email message, composed of a subject, a text part, and an HTML part.</p>
    #[doc(hidden)]
    pub simple_email: std::option::Option<crate::model::SimpleEmail>,
    /// <p>The default message variables to use in the email message. You can override the default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
}
impl EmailMessage {
    /// <p>The body of the email message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The email address to forward bounces and complaints to, if feedback forwarding is enabled.</p>
    pub fn feedback_forwarding_address(&self) -> std::option::Option<&str> {
        self.feedback_forwarding_address.as_deref()
    }
    /// <p>The verified email address to send the email message from. The default value is the FromAddress specified for the email channel.</p>
    pub fn from_address(&self) -> std::option::Option<&str> {
        self.from_address.as_deref()
    }
    /// <p>The email message, represented as a raw MIME message.</p>
    pub fn raw_email(&self) -> std::option::Option<&crate::model::RawEmail> {
        self.raw_email.as_ref()
    }
    /// <p>The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.</p>
    pub fn reply_to_addresses(&self) -> std::option::Option<&[std::string::String]> {
        self.reply_to_addresses.as_deref()
    }
    /// <p>The email message, composed of a subject, a text part, and an HTML part.</p>
    pub fn simple_email(&self) -> std::option::Option<&crate::model::SimpleEmail> {
        self.simple_email.as_ref()
    }
    /// <p>The default message variables to use in the email message. You can override the default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
}
/// See [`EmailMessage`](crate::model::EmailMessage).
pub mod email_message {

    /// A builder for [`EmailMessage`](crate::model::EmailMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) feedback_forwarding_address: std::option::Option<std::string::String>,
        pub(crate) from_address: std::option::Option<std::string::String>,
        pub(crate) raw_email: std::option::Option<crate::model::RawEmail>,
        pub(crate) reply_to_addresses: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) simple_email: std::option::Option<crate::model::SimpleEmail>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
    }
    impl Builder {
        /// <p>The body of the email message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the email message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The email address to forward bounces and complaints to, if feedback forwarding is enabled.</p>
        pub fn feedback_forwarding_address(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.feedback_forwarding_address = Some(input.into());
            self
        }
        /// <p>The email address to forward bounces and complaints to, if feedback forwarding is enabled.</p>
        pub fn set_feedback_forwarding_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.feedback_forwarding_address = input;
            self
        }
        /// <p>The verified email address to send the email message from. The default value is the FromAddress specified for the email channel.</p>
        pub fn from_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.from_address = Some(input.into());
            self
        }
        /// <p>The verified email address to send the email message from. The default value is the FromAddress specified for the email channel.</p>
        pub fn set_from_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.from_address = input;
            self
        }
        /// <p>The email message, represented as a raw MIME message.</p>
        pub fn raw_email(mut self, input: crate::model::RawEmail) -> Self {
            self.raw_email = Some(input);
            self
        }
        /// <p>The email message, represented as a raw MIME message.</p>
        pub fn set_raw_email(mut self, input: std::option::Option<crate::model::RawEmail>) -> Self {
            self.raw_email = input;
            self
        }
        /// Appends an item to `reply_to_addresses`.
        ///
        /// To override the contents of this collection use [`set_reply_to_addresses`](Self::set_reply_to_addresses).
        ///
        /// <p>The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.</p>
        pub fn reply_to_addresses(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.reply_to_addresses.unwrap_or_default();
            v.push(input.into());
            self.reply_to_addresses = Some(v);
            self
        }
        /// <p>The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address receives the reply.</p>
        pub fn set_reply_to_addresses(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.reply_to_addresses = input;
            self
        }
        /// <p>The email message, composed of a subject, a text part, and an HTML part.</p>
        pub fn simple_email(mut self, input: crate::model::SimpleEmail) -> Self {
            self.simple_email = Some(input);
            self
        }
        /// <p>The email message, composed of a subject, a text part, and an HTML part.</p>
        pub fn set_simple_email(
            mut self,
            input: std::option::Option<crate::model::SimpleEmail>,
        ) -> Self {
            self.simple_email = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the email message. You can override the default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the email message. You can override the default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// Consumes the builder and constructs a [`EmailMessage`](crate::model::EmailMessage).
        pub fn build(self) -> crate::model::EmailMessage {
            crate::model::EmailMessage {
                body: self.body,
                feedback_forwarding_address: self.feedback_forwarding_address,
                from_address: self.from_address,
                raw_email: self.raw_email,
                reply_to_addresses: self.reply_to_addresses,
                simple_email: self.simple_email,
                substitutions: self.substitutions,
            }
        }
    }
}
impl EmailMessage {
    /// Creates a new builder-style object to manufacture [`EmailMessage`](crate::model::EmailMessage).
    pub fn builder() -> crate::model::email_message::Builder {
        crate::model::email_message::Builder::default()
    }
}

/// <p>Specifies the contents of an email message, composed of a subject, a text part, and an HTML part.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SimpleEmail {
    /// <p>The body of the email message, in HTML format. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
    #[doc(hidden)]
    pub html_part: std::option::Option<crate::model::SimpleEmailPart>,
    /// <p>The subject line, or title, of the email.</p>
    #[doc(hidden)]
    pub subject: std::option::Option<crate::model::SimpleEmailPart>,
    /// <p>The body of the email message, in plain text format. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
    #[doc(hidden)]
    pub text_part: std::option::Option<crate::model::SimpleEmailPart>,
}
impl SimpleEmail {
    /// <p>The body of the email message, in HTML format. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
    pub fn html_part(&self) -> std::option::Option<&crate::model::SimpleEmailPart> {
        self.html_part.as_ref()
    }
    /// <p>The subject line, or title, of the email.</p>
    pub fn subject(&self) -> std::option::Option<&crate::model::SimpleEmailPart> {
        self.subject.as_ref()
    }
    /// <p>The body of the email message, in plain text format. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
    pub fn text_part(&self) -> std::option::Option<&crate::model::SimpleEmailPart> {
        self.text_part.as_ref()
    }
}
/// See [`SimpleEmail`](crate::model::SimpleEmail).
pub mod simple_email {

    /// A builder for [`SimpleEmail`](crate::model::SimpleEmail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) html_part: std::option::Option<crate::model::SimpleEmailPart>,
        pub(crate) subject: std::option::Option<crate::model::SimpleEmailPart>,
        pub(crate) text_part: std::option::Option<crate::model::SimpleEmailPart>,
    }
    impl Builder {
        /// <p>The body of the email message, in HTML format. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
        pub fn html_part(mut self, input: crate::model::SimpleEmailPart) -> Self {
            self.html_part = Some(input);
            self
        }
        /// <p>The body of the email message, in HTML format. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
        pub fn set_html_part(
            mut self,
            input: std::option::Option<crate::model::SimpleEmailPart>,
        ) -> Self {
            self.html_part = input;
            self
        }
        /// <p>The subject line, or title, of the email.</p>
        pub fn subject(mut self, input: crate::model::SimpleEmailPart) -> Self {
            self.subject = Some(input);
            self
        }
        /// <p>The subject line, or title, of the email.</p>
        pub fn set_subject(
            mut self,
            input: std::option::Option<crate::model::SimpleEmailPart>,
        ) -> Self {
            self.subject = input;
            self
        }
        /// <p>The body of the email message, in plain text format. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
        pub fn text_part(mut self, input: crate::model::SimpleEmailPart) -> Self {
            self.text_part = Some(input);
            self
        }
        /// <p>The body of the email message, in plain text format. We recommend using plain text format for email clients that don't render HTML content and clients that are connected to high-latency networks, such as mobile devices.</p>
        pub fn set_text_part(
            mut self,
            input: std::option::Option<crate::model::SimpleEmailPart>,
        ) -> Self {
            self.text_part = input;
            self
        }
        /// Consumes the builder and constructs a [`SimpleEmail`](crate::model::SimpleEmail).
        pub fn build(self) -> crate::model::SimpleEmail {
            crate::model::SimpleEmail {
                html_part: self.html_part,
                subject: self.subject,
                text_part: self.text_part,
            }
        }
    }
}
impl SimpleEmail {
    /// Creates a new builder-style object to manufacture [`SimpleEmail`](crate::model::SimpleEmail).
    pub fn builder() -> crate::model::simple_email::Builder {
        crate::model::simple_email::Builder::default()
    }
}

/// <p>Specifies the subject or body of an email message, represented as textual email data and the applicable character set.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SimpleEmailPart {
    /// <p>The applicable character set for the message content.</p>
    #[doc(hidden)]
    pub charset: std::option::Option<std::string::String>,
    /// <p>The textual data of the message content.</p>
    #[doc(hidden)]
    pub data: std::option::Option<std::string::String>,
}
impl SimpleEmailPart {
    /// <p>The applicable character set for the message content.</p>
    pub fn charset(&self) -> std::option::Option<&str> {
        self.charset.as_deref()
    }
    /// <p>The textual data of the message content.</p>
    pub fn data(&self) -> std::option::Option<&str> {
        self.data.as_deref()
    }
}
/// See [`SimpleEmailPart`](crate::model::SimpleEmailPart).
pub mod simple_email_part {

    /// A builder for [`SimpleEmailPart`](crate::model::SimpleEmailPart).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) charset: std::option::Option<std::string::String>,
        pub(crate) data: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The applicable character set for the message content.</p>
        pub fn charset(mut self, input: impl Into<std::string::String>) -> Self {
            self.charset = Some(input.into());
            self
        }
        /// <p>The applicable character set for the message content.</p>
        pub fn set_charset(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.charset = input;
            self
        }
        /// <p>The textual data of the message content.</p>
        pub fn data(mut self, input: impl Into<std::string::String>) -> Self {
            self.data = Some(input.into());
            self
        }
        /// <p>The textual data of the message content.</p>
        pub fn set_data(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.data = input;
            self
        }
        /// Consumes the builder and constructs a [`SimpleEmailPart`](crate::model::SimpleEmailPart).
        pub fn build(self) -> crate::model::SimpleEmailPart {
            crate::model::SimpleEmailPart {
                charset: self.charset,
                data: self.data,
            }
        }
    }
}
impl SimpleEmailPart {
    /// Creates a new builder-style object to manufacture [`SimpleEmailPart`](crate::model::SimpleEmailPart).
    pub fn builder() -> crate::model::simple_email_part::Builder {
        crate::model::simple_email_part::Builder::default()
    }
}

/// <p>Specifies the contents of an email message, represented as a raw MIME message.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RawEmail {
    /// <p>The email message, represented as a raw MIME message. The entire message must be base64 encoded.</p>
    #[doc(hidden)]
    pub data: std::option::Option<aws_smithy_types::Blob>,
}
impl RawEmail {
    /// <p>The email message, represented as a raw MIME message. The entire message must be base64 encoded.</p>
    pub fn data(&self) -> std::option::Option<&aws_smithy_types::Blob> {
        self.data.as_ref()
    }
}
/// See [`RawEmail`](crate::model::RawEmail).
pub mod raw_email {

    /// A builder for [`RawEmail`](crate::model::RawEmail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) data: std::option::Option<aws_smithy_types::Blob>,
    }
    impl Builder {
        /// <p>The email message, represented as a raw MIME message. The entire message must be base64 encoded.</p>
        pub fn data(mut self, input: aws_smithy_types::Blob) -> Self {
            self.data = Some(input);
            self
        }
        /// <p>The email message, represented as a raw MIME message. The entire message must be base64 encoded.</p>
        pub fn set_data(mut self, input: std::option::Option<aws_smithy_types::Blob>) -> Self {
            self.data = input;
            self
        }
        /// Consumes the builder and constructs a [`RawEmail`](crate::model::RawEmail).
        pub fn build(self) -> crate::model::RawEmail {
            crate::model::RawEmail { data: self.data }
        }
    }
}
impl RawEmail {
    /// Creates a new builder-style object to manufacture [`RawEmail`](crate::model::RawEmail).
    pub fn builder() -> crate::model::raw_email::Builder {
        crate::model::raw_email::Builder::default()
    }
}

/// <p>Specifies the default settings and content for a push notification that's sent directly to an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DefaultPushNotificationMessage {
    /// <p>The default action to occur if a recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The default body of the notification message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The JSON data payload to use for the default push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    #[doc(hidden)]
    pub data:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>Specifies whether the default notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or delivering messages to an in-app notification center.</p>
    #[doc(hidden)]
    pub silent_push: bool,
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The default title to display above the notification message on a recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The default URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl DefaultPushNotificationMessage {
    /// <p>The default action to occur if a recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The default body of the notification message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The JSON data payload to use for the default push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    pub fn data(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.data.as_ref()
    }
    /// <p>Specifies whether the default notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or delivering messages to an in-app notification center.</p>
    pub fn silent_push(&self) -> bool {
        self.silent_push
    }
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The default title to display above the notification message on a recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The default URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`DefaultPushNotificationMessage`](crate::model::DefaultPushNotificationMessage).
pub mod default_push_notification_message {

    /// A builder for [`DefaultPushNotificationMessage`](crate::model::DefaultPushNotificationMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) data: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) silent_push: std::option::Option<bool>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The default action to occur if a recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The default action to occur if a recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The default body of the notification message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The default body of the notification message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// Adds a key-value pair to `data`.
        ///
        /// To override the contents of this collection use [`set_data`](Self::set_data).
        ///
        /// <p>The JSON data payload to use for the default push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn data(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.data.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.data = Some(hash_map);
            self
        }
        /// <p>The JSON data payload to use for the default push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn set_data(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.data = input;
            self
        }
        /// <p>Specifies whether the default notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or delivering messages to an in-app notification center.</p>
        pub fn silent_push(mut self, input: bool) -> Self {
            self.silent_push = Some(input);
            self
        }
        /// <p>Specifies whether the default notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or delivering messages to an in-app notification center.</p>
        pub fn set_silent_push(mut self, input: std::option::Option<bool>) -> Self {
            self.silent_push = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The default title to display above the notification message on a recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The default title to display above the notification message on a recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The default URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The default URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`DefaultPushNotificationMessage`](crate::model::DefaultPushNotificationMessage).
        pub fn build(self) -> crate::model::DefaultPushNotificationMessage {
            crate::model::DefaultPushNotificationMessage {
                action: self.action,
                body: self.body,
                data: self.data,
                silent_push: self.silent_push.unwrap_or_default(),
                substitutions: self.substitutions,
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl DefaultPushNotificationMessage {
    /// Creates a new builder-style object to manufacture [`DefaultPushNotificationMessage`](crate::model::DefaultPushNotificationMessage).
    pub fn builder() -> crate::model::default_push_notification_message::Builder {
        crate::model::default_push_notification_message::Builder::default()
    }
}

/// <p>Specifies the default message for all channels.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DefaultMessage {
    /// <p>The default body of the message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The default message variables to use in the message. You can override these default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
}
impl DefaultMessage {
    /// <p>The default body of the message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The default message variables to use in the message. You can override these default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
}
/// See [`DefaultMessage`](crate::model::DefaultMessage).
pub mod default_message {

    /// A builder for [`DefaultMessage`](crate::model::DefaultMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
    }
    impl Builder {
        /// <p>The default body of the message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The default body of the message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the message. You can override these default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the message. You can override these default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// Consumes the builder and constructs a [`DefaultMessage`](crate::model::DefaultMessage).
        pub fn build(self) -> crate::model::DefaultMessage {
            crate::model::DefaultMessage {
                body: self.body,
                substitutions: self.substitutions,
            }
        }
    }
}
impl DefaultMessage {
    /// Creates a new builder-style object to manufacture [`DefaultMessage`](crate::model::DefaultMessage).
    pub fn builder() -> crate::model::default_message::Builder {
        crate::model::default_message::Builder::default()
    }
}

/// <p>Specifies the settings for a one-time message that's sent directly to an endpoint through the Baidu (Baidu Cloud Push) channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BaiduMessage {
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The body of the notification message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    #[doc(hidden)]
    pub data:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The icon image name of the asset saved in your app.</p>
    #[doc(hidden)]
    pub icon_reference: std::option::Option<std::string::String>,
    /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
    #[doc(hidden)]
    pub image_icon_url: std::option::Option<std::string::String>,
    /// <p>The URL of an image to display in the push notification.</p>
    #[doc(hidden)]
    pub image_url: std::option::Option<std::string::String>,
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
    #[doc(hidden)]
    pub silent_push: bool,
    /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
    #[doc(hidden)]
    pub small_image_icon_url: std::option::Option<std::string::String>,
    /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    #[doc(hidden)]
    pub sound: std::option::Option<std::string::String>,
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).</p>
    #[doc(hidden)]
    pub time_to_live: i32,
    /// <p>The title to display above the notification message on the recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl BaiduMessage {
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The body of the notification message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    pub fn data(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.data.as_ref()
    }
    /// <p>The icon image name of the asset saved in your app.</p>
    pub fn icon_reference(&self) -> std::option::Option<&str> {
        self.icon_reference.as_deref()
    }
    /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
    pub fn image_icon_url(&self) -> std::option::Option<&str> {
        self.image_icon_url.as_deref()
    }
    /// <p>The URL of an image to display in the push notification.</p>
    pub fn image_url(&self) -> std::option::Option<&str> {
        self.image_url.as_deref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
    pub fn silent_push(&self) -> bool {
        self.silent_push
    }
    /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
    pub fn small_image_icon_url(&self) -> std::option::Option<&str> {
        self.small_image_icon_url.as_deref()
    }
    /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    pub fn sound(&self) -> std::option::Option<&str> {
        self.sound.as_deref()
    }
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).</p>
    pub fn time_to_live(&self) -> i32 {
        self.time_to_live
    }
    /// <p>The title to display above the notification message on the recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`BaiduMessage`](crate::model::BaiduMessage).
pub mod baidu_message {

    /// A builder for [`BaiduMessage`](crate::model::BaiduMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) data: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) icon_reference: std::option::Option<std::string::String>,
        pub(crate) image_icon_url: std::option::Option<std::string::String>,
        pub(crate) image_url: std::option::Option<std::string::String>,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) silent_push: std::option::Option<bool>,
        pub(crate) small_image_icon_url: std::option::Option<std::string::String>,
        pub(crate) sound: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) time_to_live: std::option::Option<i32>,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// Adds a key-value pair to `data`.
        ///
        /// To override the contents of this collection use [`set_data`](Self::set_data).
        ///
        /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn data(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.data.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.data = Some(hash_map);
            self
        }
        /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn set_data(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.data = input;
            self
        }
        /// <p>The icon image name of the asset saved in your app.</p>
        pub fn icon_reference(mut self, input: impl Into<std::string::String>) -> Self {
            self.icon_reference = Some(input.into());
            self
        }
        /// <p>The icon image name of the asset saved in your app.</p>
        pub fn set_icon_reference(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.icon_reference = input;
            self
        }
        /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
        pub fn image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
        pub fn set_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_icon_url = input;
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn image_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_url = Some(input.into());
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn set_image_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_url = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
        pub fn silent_push(mut self, input: bool) -> Self {
            self.silent_push = Some(input);
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
        pub fn set_silent_push(mut self, input: std::option::Option<bool>) -> Self {
            self.silent_push = input;
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
        pub fn small_image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.small_image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
        pub fn set_small_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.small_image_icon_url = input;
            self
        }
        /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn sound(mut self, input: impl Into<std::string::String>) -> Self {
            self.sound = Some(input.into());
            self
        }
        /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn set_sound(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sound = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).</p>
        pub fn time_to_live(mut self, input: i32) -> Self {
            self.time_to_live = Some(input);
            self
        }
        /// <p>The amount of time, in seconds, that the Baidu Cloud Push service should store the message if the recipient's device is offline. The default value and maximum supported time is 604,800 seconds (7 days).</p>
        pub fn set_time_to_live(mut self, input: std::option::Option<i32>) -> Self {
            self.time_to_live = input;
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`BaiduMessage`](crate::model::BaiduMessage).
        pub fn build(self) -> crate::model::BaiduMessage {
            crate::model::BaiduMessage {
                action: self.action,
                body: self.body,
                data: self.data,
                icon_reference: self.icon_reference,
                image_icon_url: self.image_icon_url,
                image_url: self.image_url,
                raw_content: self.raw_content,
                silent_push: self.silent_push.unwrap_or_default(),
                small_image_icon_url: self.small_image_icon_url,
                sound: self.sound,
                substitutions: self.substitutions,
                time_to_live: self.time_to_live.unwrap_or_default(),
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl BaiduMessage {
    /// Creates a new builder-style object to manufacture [`BaiduMessage`](crate::model::BaiduMessage).
    pub fn builder() -> crate::model::baidu_message::Builder {
        crate::model::baidu_message::Builder::default()
    }
}

/// <p>Specifies the settings for a one-time message that's sent directly to an endpoint through the APNs (Apple Push Notification service) channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApnsMessage {
    /// <p>The type of push notification to send. Valid values are:</p>
    /// <ul>
    /// <li><p>alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact with the notification.</p></li>
    /// <li><p>background - For a silent notification that delivers content in the background and isn't displayed on recipients' devices.</p></li>
    /// <li><p>complication - For a notification that contains update information for an app’s complication timeline.</p></li>
    /// <li><p>fileprovider - For a notification that signals changes to a File Provider extension.</p></li>
    /// <li><p>mdm - For a notification that tells managed devices to contact the MDM server.</p></li>
    /// <li><p>voip - For a notification that provides information about an incoming VoIP call.</p></li>
    /// </ul>
    /// <p>Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background automatically, based on the value that you specify for the SilentPush or RawContent property of the message.</p>
    /// <p>For more information about the apns-push-type request header, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns">Sending Notification Requests to APNs</a> on the Apple Developer website.</p>
    #[doc(hidden)]
    pub apns_push_type: std::option::Option<std::string::String>,
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, set this value to 0.</p>
    #[doc(hidden)]
    pub badge: i32,
    /// <p>The body of the notification message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The key that indicates the notification type for the push notification. This key is a value that's defined by the identifier property of one of your app's registered categories.</p>
    #[doc(hidden)]
    pub category: std::option::Option<std::string::String>,
    /// <p>An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single push notification instead of delivering each message individually. This value can't exceed 64 bytes.</p>
    /// <p>Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification message to APNs.</p>
    #[doc(hidden)]
    pub collapse_id: std::option::Option<std::string::String>,
    /// <p>The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    #[doc(hidden)]
    pub data:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The URL of an image or video to display in the push notification.</p>
    #[doc(hidden)]
    pub media_url: std::option::Option<std::string::String>,
    /// <p>The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or TOKEN.</p>
    #[doc(hidden)]
    pub preferred_authentication_method: std::option::Option<std::string::String>,
    /// <p>para&gt;5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled.</p>/listitem&gt;
    /// <li><p>10 - High priority, the notification is sent immediately. This is the default value. A high priority notification should trigger an alert, play a sound, or badge your app's icon on the recipient's device.</p></li>/para&gt;
    /// <p>Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message to APNs.</p>
    /// <p>The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the value to the corresponding APNs value.</p>
    #[doc(hidden)]
    pub priority: std::option::Option<std::string::String>,
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p> <note>
    /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If you're sending a standard notification, set the value of content-available to 0. If you're sending a silent (background) notification, set the value of content-available to 1. Additionally, silent notification payloads can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
    /// </note>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>Specifies whether the notification is a silent push notification. A silent (or background) push notification isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, or to display messages in an in-app message center.</p>
    /// <p>Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets the value for the apns-push-type header field to background.</p> <note>
    /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. For silent (background) notifications, set the value of content-available to 1. Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
    /// <p>Apple has indicated that they will throttle "excessive" background notifications based on current traffic volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push notifications to each recipient per hour.</p>
    /// </note>
    #[doc(hidden)]
    pub silent_push: bool,
    /// <p>The key for the sound to play when the recipient receives the push notification. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
    #[doc(hidden)]
    pub sound: std::option::Option<std::string::String>,
    /// <p>The default message variables to use in the notification message. You can override these default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The key that represents your app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.</p>
    #[doc(hidden)]
    pub thread_id: std::option::Option<std::string::String>,
    /// <p>The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
    /// <p>Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message to APNs.</p>
    #[doc(hidden)]
    pub time_to_live: i32,
    /// <p>The title to display above the notification message on the recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl ApnsMessage {
    /// <p>The type of push notification to send. Valid values are:</p>
    /// <ul>
    /// <li><p>alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact with the notification.</p></li>
    /// <li><p>background - For a silent notification that delivers content in the background and isn't displayed on recipients' devices.</p></li>
    /// <li><p>complication - For a notification that contains update information for an app’s complication timeline.</p></li>
    /// <li><p>fileprovider - For a notification that signals changes to a File Provider extension.</p></li>
    /// <li><p>mdm - For a notification that tells managed devices to contact the MDM server.</p></li>
    /// <li><p>voip - For a notification that provides information about an incoming VoIP call.</p></li>
    /// </ul>
    /// <p>Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background automatically, based on the value that you specify for the SilentPush or RawContent property of the message.</p>
    /// <p>For more information about the apns-push-type request header, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns">Sending Notification Requests to APNs</a> on the Apple Developer website.</p>
    pub fn apns_push_type(&self) -> std::option::Option<&str> {
        self.apns_push_type.as_deref()
    }
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, set this value to 0.</p>
    pub fn badge(&self) -> i32 {
        self.badge
    }
    /// <p>The body of the notification message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The key that indicates the notification type for the push notification. This key is a value that's defined by the identifier property of one of your app's registered categories.</p>
    pub fn category(&self) -> std::option::Option<&str> {
        self.category.as_deref()
    }
    /// <p>An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single push notification instead of delivering each message individually. This value can't exceed 64 bytes.</p>
    /// <p>Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification message to APNs.</p>
    pub fn collapse_id(&self) -> std::option::Option<&str> {
        self.collapse_id.as_deref()
    }
    /// <p>The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    pub fn data(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.data.as_ref()
    }
    /// <p>The URL of an image or video to display in the push notification.</p>
    pub fn media_url(&self) -> std::option::Option<&str> {
        self.media_url.as_deref()
    }
    /// <p>The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or TOKEN.</p>
    pub fn preferred_authentication_method(&self) -> std::option::Option<&str> {
        self.preferred_authentication_method.as_deref()
    }
    /// <p>para&gt;5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled.</p>/listitem&gt;
    /// <li><p>10 - High priority, the notification is sent immediately. This is the default value. A high priority notification should trigger an alert, play a sound, or badge your app's icon on the recipient's device.</p></li>/para&gt;
    /// <p>Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message to APNs.</p>
    /// <p>The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the value to the corresponding APNs value.</p>
    pub fn priority(&self) -> std::option::Option<&str> {
        self.priority.as_deref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p> <note>
    /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If you're sending a standard notification, set the value of content-available to 0. If you're sending a silent (background) notification, set the value of content-available to 1. Additionally, silent notification payloads can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
    /// </note>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>Specifies whether the notification is a silent push notification. A silent (or background) push notification isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, or to display messages in an in-app message center.</p>
    /// <p>Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets the value for the apns-push-type header field to background.</p> <note>
    /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. For silent (background) notifications, set the value of content-available to 1. Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
    /// <p>Apple has indicated that they will throttle "excessive" background notifications based on current traffic volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push notifications to each recipient per hour.</p>
    /// </note>
    pub fn silent_push(&self) -> bool {
        self.silent_push
    }
    /// <p>The key for the sound to play when the recipient receives the push notification. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
    pub fn sound(&self) -> std::option::Option<&str> {
        self.sound.as_deref()
    }
    /// <p>The default message variables to use in the notification message. You can override these default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The key that represents your app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.</p>
    pub fn thread_id(&self) -> std::option::Option<&str> {
        self.thread_id.as_deref()
    }
    /// <p>The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
    /// <p>Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message to APNs.</p>
    pub fn time_to_live(&self) -> i32 {
        self.time_to_live
    }
    /// <p>The title to display above the notification message on the recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`ApnsMessage`](crate::model::ApnsMessage).
pub mod apns_message {

    /// A builder for [`ApnsMessage`](crate::model::ApnsMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) apns_push_type: std::option::Option<std::string::String>,
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) badge: std::option::Option<i32>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) category: std::option::Option<std::string::String>,
        pub(crate) collapse_id: std::option::Option<std::string::String>,
        pub(crate) data: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) media_url: std::option::Option<std::string::String>,
        pub(crate) preferred_authentication_method: std::option::Option<std::string::String>,
        pub(crate) priority: std::option::Option<std::string::String>,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) silent_push: std::option::Option<bool>,
        pub(crate) sound: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) thread_id: std::option::Option<std::string::String>,
        pub(crate) time_to_live: std::option::Option<i32>,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The type of push notification to send. Valid values are:</p>
        /// <ul>
        /// <li><p>alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact with the notification.</p></li>
        /// <li><p>background - For a silent notification that delivers content in the background and isn't displayed on recipients' devices.</p></li>
        /// <li><p>complication - For a notification that contains update information for an app’s complication timeline.</p></li>
        /// <li><p>fileprovider - For a notification that signals changes to a File Provider extension.</p></li>
        /// <li><p>mdm - For a notification that tells managed devices to contact the MDM server.</p></li>
        /// <li><p>voip - For a notification that provides information about an incoming VoIP call.</p></li>
        /// </ul>
        /// <p>Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background automatically, based on the value that you specify for the SilentPush or RawContent property of the message.</p>
        /// <p>For more information about the apns-push-type request header, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns">Sending Notification Requests to APNs</a> on the Apple Developer website.</p>
        pub fn apns_push_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.apns_push_type = Some(input.into());
            self
        }
        /// <p>The type of push notification to send. Valid values are:</p>
        /// <ul>
        /// <li><p>alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact with the notification.</p></li>
        /// <li><p>background - For a silent notification that delivers content in the background and isn't displayed on recipients' devices.</p></li>
        /// <li><p>complication - For a notification that contains update information for an app’s complication timeline.</p></li>
        /// <li><p>fileprovider - For a notification that signals changes to a File Provider extension.</p></li>
        /// <li><p>mdm - For a notification that tells managed devices to contact the MDM server.</p></li>
        /// <li><p>voip - For a notification that provides information about an incoming VoIP call.</p></li>
        /// </ul>
        /// <p>Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background automatically, based on the value that you specify for the SilentPush or RawContent property of the message.</p>
        /// <p>For more information about the apns-push-type request header, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns">Sending Notification Requests to APNs</a> on the Apple Developer website.</p>
        pub fn set_apns_push_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.apns_push_type = input;
            self
        }
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, set this value to 0.</p>
        pub fn badge(mut self, input: i32) -> Self {
            self.badge = Some(input);
            self
        }
        /// <p>The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, set this value to 0.</p>
        pub fn set_badge(mut self, input: std::option::Option<i32>) -> Self {
            self.badge = input;
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The key that indicates the notification type for the push notification. This key is a value that's defined by the identifier property of one of your app's registered categories.</p>
        pub fn category(mut self, input: impl Into<std::string::String>) -> Self {
            self.category = Some(input.into());
            self
        }
        /// <p>The key that indicates the notification type for the push notification. This key is a value that's defined by the identifier property of one of your app's registered categories.</p>
        pub fn set_category(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.category = input;
            self
        }
        /// <p>An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single push notification instead of delivering each message individually. This value can't exceed 64 bytes.</p>
        /// <p>Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification message to APNs.</p>
        pub fn collapse_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.collapse_id = Some(input.into());
            self
        }
        /// <p>An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single push notification instead of delivering each message individually. This value can't exceed 64 bytes.</p>
        /// <p>Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification message to APNs.</p>
        pub fn set_collapse_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.collapse_id = input;
            self
        }
        /// Adds a key-value pair to `data`.
        ///
        /// To override the contents of this collection use [`set_data`](Self::set_data).
        ///
        /// <p>The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn data(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.data.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.data = Some(hash_map);
            self
        }
        /// <p>The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn set_data(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.data = input;
            self
        }
        /// <p>The URL of an image or video to display in the push notification.</p>
        pub fn media_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.media_url = Some(input.into());
            self
        }
        /// <p>The URL of an image or video to display in the push notification.</p>
        pub fn set_media_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.media_url = input;
            self
        }
        /// <p>The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or TOKEN.</p>
        pub fn preferred_authentication_method(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.preferred_authentication_method = Some(input.into());
            self
        }
        /// <p>The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or TOKEN.</p>
        pub fn set_preferred_authentication_method(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.preferred_authentication_method = input;
            self
        }
        /// <p>para&gt;5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled.</p>/listitem&gt;
        /// <li><p>10 - High priority, the notification is sent immediately. This is the default value. A high priority notification should trigger an alert, play a sound, or badge your app's icon on the recipient's device.</p></li>/para&gt;
        /// <p>Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message to APNs.</p>
        /// <p>The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the value to the corresponding APNs value.</p>
        pub fn priority(mut self, input: impl Into<std::string::String>) -> Self {
            self.priority = Some(input.into());
            self
        }
        /// <p>para&gt;5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled.</p>/listitem&gt;
        /// <li><p>10 - High priority, the notification is sent immediately. This is the default value. A high priority notification should trigger an alert, play a sound, or badge your app's icon on the recipient's device.</p></li>/para&gt;
        /// <p>Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message to APNs.</p>
        /// <p>The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the value to the corresponding APNs value.</p>
        pub fn set_priority(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.priority = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p> <note>
        /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If you're sending a standard notification, set the value of content-available to 0. If you're sending a silent (background) notification, set the value of content-available to 1. Additionally, silent notification payloads can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
        /// </note>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p> <note>
        /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If you're sending a standard notification, set the value of content-available to 0. If you're sending a silent (background) notification, set the value of content-available to 1. Additionally, silent notification payloads can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
        /// </note>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// <p>Specifies whether the notification is a silent push notification. A silent (or background) push notification isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, or to display messages in an in-app message center.</p>
        /// <p>Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets the value for the apns-push-type header field to background.</p> <note>
        /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. For silent (background) notifications, set the value of content-available to 1. Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
        /// <p>Apple has indicated that they will throttle "excessive" background notifications based on current traffic volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push notifications to each recipient per hour.</p>
        /// </note>
        pub fn silent_push(mut self, input: bool) -> Self {
            self.silent_push = Some(input);
            self
        }
        /// <p>Specifies whether the notification is a silent push notification. A silent (or background) push notification isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, or to display messages in an in-app message center.</p>
        /// <p>Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets the value for the apns-push-type header field to background.</p> <note>
        /// <p>If you specify the raw content of an APNs push notification, the message payload has to include the content-available key. For silent (background) notifications, set the value of content-available to 1. Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For more information, see <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification">Generating a Remote Notification</a> and <a href="https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app">Pushing Background Updates to Your App</a> on the Apple Developer website.</p>
        /// <p>Apple has indicated that they will throttle "excessive" background notifications based on current traffic volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push notifications to each recipient per hour.</p>
        /// </note>
        pub fn set_silent_push(mut self, input: std::option::Option<bool>) -> Self {
            self.silent_push = input;
            self
        }
        /// <p>The key for the sound to play when the recipient receives the push notification. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
        pub fn sound(mut self, input: impl Into<std::string::String>) -> Self {
            self.sound = Some(input.into());
            self
        }
        /// <p>The key for the sound to play when the recipient receives the push notification. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.</p>
        pub fn set_sound(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sound = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the notification message. You can override these default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the notification message. You can override these default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The key that represents your app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.</p>
        pub fn thread_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.thread_id = Some(input.into());
            self
        }
        /// <p>The key that represents your app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.</p>
        pub fn set_thread_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.thread_id = input;
            self
        }
        /// <p>The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
        /// <p>Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message to APNs.</p>
        pub fn time_to_live(mut self, input: i32) -> Self {
            self.time_to_live = Some(input);
            self
        }
        /// <p>The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.</p>
        /// <p>Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message to APNs.</p>
        pub fn set_time_to_live(mut self, input: std::option::Option<i32>) -> Self {
            self.time_to_live = input;
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`ApnsMessage`](crate::model::ApnsMessage).
        pub fn build(self) -> crate::model::ApnsMessage {
            crate::model::ApnsMessage {
                apns_push_type: self.apns_push_type,
                action: self.action,
                badge: self.badge.unwrap_or_default(),
                body: self.body,
                category: self.category,
                collapse_id: self.collapse_id,
                data: self.data,
                media_url: self.media_url,
                preferred_authentication_method: self.preferred_authentication_method,
                priority: self.priority,
                raw_content: self.raw_content,
                silent_push: self.silent_push.unwrap_or_default(),
                sound: self.sound,
                substitutions: self.substitutions,
                thread_id: self.thread_id,
                time_to_live: self.time_to_live.unwrap_or_default(),
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl ApnsMessage {
    /// Creates a new builder-style object to manufacture [`ApnsMessage`](crate::model::ApnsMessage).
    pub fn builder() -> crate::model::apns_message::Builder {
        crate::model::apns_message::Builder::default()
    }
}

/// <p>Specifies the settings for a one-time message that's sent directly to an endpoint through the ADM (Amazon Device Messaging) channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AdmMessage {
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub action: std::option::Option<crate::model::Action>,
    /// <p>The body of the notification message.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message.</p>
    #[doc(hidden)]
    pub consolidation_key: std::option::Option<std::string::String>,
    /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    #[doc(hidden)]
    pub data:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The amount of time, in seconds, that ADM should store the message if the recipient's device is offline. Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message to ADM.</p>
    #[doc(hidden)]
    pub expires_after: std::option::Option<std::string::String>,
    /// <p>The icon image name of the asset saved in your app.</p>
    #[doc(hidden)]
    pub icon_reference: std::option::Option<std::string::String>,
    /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
    #[doc(hidden)]
    pub image_icon_url: std::option::Option<std::string::String>,
    /// <p>The URL of an image to display in the push notification.</p>
    #[doc(hidden)]
    pub image_url: std::option::Option<std::string::String>,
    /// <p>The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to verify the integrity of the data.</p>
    #[doc(hidden)]
    pub md5: std::option::Option<std::string::String>,
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
    #[doc(hidden)]
    pub silent_push: bool,
    /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
    #[doc(hidden)]
    pub small_image_icon_url: std::option::Option<std::string::String>,
    /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    #[doc(hidden)]
    pub sound: std::option::Option<std::string::String>,
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The title to display above the notification message on the recipient's device.</p>
    #[doc(hidden)]
    pub title: std::option::Option<std::string::String>,
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    #[doc(hidden)]
    pub url: std::option::Option<std::string::String>,
}
impl AdmMessage {
    /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
    /// <ul>
    /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
    /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
    /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
    /// </ul>
    pub fn action(&self) -> std::option::Option<&crate::model::Action> {
        self.action.as_ref()
    }
    /// <p>The body of the notification message.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message.</p>
    pub fn consolidation_key(&self) -> std::option::Option<&str> {
        self.consolidation_key.as_deref()
    }
    /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
    pub fn data(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.data.as_ref()
    }
    /// <p>The amount of time, in seconds, that ADM should store the message if the recipient's device is offline. Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message to ADM.</p>
    pub fn expires_after(&self) -> std::option::Option<&str> {
        self.expires_after.as_deref()
    }
    /// <p>The icon image name of the asset saved in your app.</p>
    pub fn icon_reference(&self) -> std::option::Option<&str> {
        self.icon_reference.as_deref()
    }
    /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
    pub fn image_icon_url(&self) -> std::option::Option<&str> {
        self.image_icon_url.as_deref()
    }
    /// <p>The URL of an image to display in the push notification.</p>
    pub fn image_url(&self) -> std::option::Option<&str> {
        self.image_url.as_deref()
    }
    /// <p>The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to verify the integrity of the data.</p>
    pub fn md5(&self) -> std::option::Option<&str> {
        self.md5.as_deref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
    pub fn silent_push(&self) -> bool {
        self.silent_push
    }
    /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
    pub fn small_image_icon_url(&self) -> std::option::Option<&str> {
        self.small_image_icon_url.as_deref()
    }
    /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
    pub fn sound(&self) -> std::option::Option<&str> {
        self.sound.as_deref()
    }
    /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The title to display above the notification message on the recipient's device.</p>
    pub fn title(&self) -> std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
    pub fn url(&self) -> std::option::Option<&str> {
        self.url.as_deref()
    }
}
/// See [`AdmMessage`](crate::model::AdmMessage).
pub mod adm_message {

    /// A builder for [`AdmMessage`](crate::model::AdmMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) action: std::option::Option<crate::model::Action>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) consolidation_key: std::option::Option<std::string::String>,
        pub(crate) data: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) expires_after: std::option::Option<std::string::String>,
        pub(crate) icon_reference: std::option::Option<std::string::String>,
        pub(crate) image_icon_url: std::option::Option<std::string::String>,
        pub(crate) image_url: std::option::Option<std::string::String>,
        pub(crate) md5: std::option::Option<std::string::String>,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) silent_push: std::option::Option<bool>,
        pub(crate) small_image_icon_url: std::option::Option<std::string::String>,
        pub(crate) sound: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) title: std::option::Option<std::string::String>,
        pub(crate) url: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn action(mut self, input: crate::model::Action) -> Self {
            self.action = Some(input);
            self
        }
        /// <p>The action to occur if the recipient taps the push notification. Valid values are:</p>
        /// <ul>
        /// <li><p>OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.</p></li>
        /// <li><p>DEEP_LINK - Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.</p></li>
        /// <li><p>URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.</p></li>
        /// </ul>
        pub fn set_action(mut self, input: std::option::Option<crate::model::Action>) -> Self {
            self.action = input;
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The body of the notification message.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message.</p>
        pub fn consolidation_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.consolidation_key = Some(input.into());
            self
        }
        /// <p>An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message.</p>
        pub fn set_consolidation_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.consolidation_key = input;
            self
        }
        /// Adds a key-value pair to `data`.
        ///
        /// To override the contents of this collection use [`set_data`](Self::set_data).
        ///
        /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn data(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.data.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.data = Some(hash_map);
            self
        }
        /// <p>The JSON data payload to use for the push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.</p>
        pub fn set_data(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.data = input;
            self
        }
        /// <p>The amount of time, in seconds, that ADM should store the message if the recipient's device is offline. Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message to ADM.</p>
        pub fn expires_after(mut self, input: impl Into<std::string::String>) -> Self {
            self.expires_after = Some(input.into());
            self
        }
        /// <p>The amount of time, in seconds, that ADM should store the message if the recipient's device is offline. Amazon Pinpoint specifies this value in the expiresAfter parameter when it sends the notification message to ADM.</p>
        pub fn set_expires_after(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.expires_after = input;
            self
        }
        /// <p>The icon image name of the asset saved in your app.</p>
        pub fn icon_reference(mut self, input: impl Into<std::string::String>) -> Self {
            self.icon_reference = Some(input.into());
            self
        }
        /// <p>The icon image name of the asset saved in your app.</p>
        pub fn set_icon_reference(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.icon_reference = input;
            self
        }
        /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
        pub fn image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the large icon image to display in the content view of the push notification.</p>
        pub fn set_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.image_icon_url = input;
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn image_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_url = Some(input.into());
            self
        }
        /// <p>The URL of an image to display in the push notification.</p>
        pub fn set_image_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_url = input;
            self
        }
        /// <p>The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to verify the integrity of the data.</p>
        pub fn md5(mut self, input: impl Into<std::string::String>) -> Self {
            self.md5 = Some(input.into());
            self
        }
        /// <p>The base64-encoded, MD5 checksum of the value specified by the Data property. ADM uses the MD5 value to verify the integrity of the data.</p>
        pub fn set_md5(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.md5 = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
        pub fn silent_push(mut self, input: bool) -> Self {
            self.silent_push = Some(input);
            self
        }
        /// <p>Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or supporting phone home functionality.</p>
        pub fn set_silent_push(mut self, input: std::option::Option<bool>) -> Self {
            self.silent_push = input;
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
        pub fn small_image_icon_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.small_image_icon_url = Some(input.into());
            self
        }
        /// <p>The URL of the small icon image to display in the status bar and the content view of the push notification.</p>
        pub fn set_small_image_icon_url(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.small_image_icon_url = input;
            self
        }
        /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn sound(mut self, input: impl Into<std::string::String>) -> Self {
            self.sound = Some(input.into());
            self
        }
        /// <p>The sound to play when the recipient receives the push notification. You can use the default stream or specify the file name of a sound resource that's bundled in your app. On an Android platform, the sound file must reside in /res/raw/.</p>
        pub fn set_sound(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sound = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>The default message variables to use in the notification message. You can override the default variables with individual address variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
            self.title = Some(input.into());
            self
        }
        /// <p>The title to display above the notification message on the recipient's device.</p>
        pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.title = input;
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
            self.url = Some(input.into());
            self
        }
        /// <p>The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.</p>
        pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.url = input;
            self
        }
        /// Consumes the builder and constructs a [`AdmMessage`](crate::model::AdmMessage).
        pub fn build(self) -> crate::model::AdmMessage {
            crate::model::AdmMessage {
                action: self.action,
                body: self.body,
                consolidation_key: self.consolidation_key,
                data: self.data,
                expires_after: self.expires_after,
                icon_reference: self.icon_reference,
                image_icon_url: self.image_icon_url,
                image_url: self.image_url,
                md5: self.md5,
                raw_content: self.raw_content,
                silent_push: self.silent_push.unwrap_or_default(),
                small_image_icon_url: self.small_image_icon_url,
                sound: self.sound,
                substitutions: self.substitutions,
                title: self.title,
                url: self.url,
            }
        }
    }
}
impl AdmMessage {
    /// Creates a new builder-style object to manufacture [`AdmMessage`](crate::model::AdmMessage).
    pub fn builder() -> crate::model::adm_message::Builder {
        crate::model::adm_message::Builder::default()
    }
}

/// <p>Provides information about the results of a request to send a message to an endpoint address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MessageResponse {
    /// <p>The unique identifier for the application that was used to send the message.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>A map that contains a multipart response for each address that the message was sent to. In the map, the endpoint ID is the key and the result is the value.</p>
    #[doc(hidden)]
    pub endpoint_result: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
    >,
    /// <p>The identifier for the original request that the message was delivered for.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// <p>A map that contains a multipart response for each address (email address, phone number, or push notification token) that the message was sent to. In the map, the address is the key and the result is the value.</p>
    #[doc(hidden)]
    pub result: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::MessageResult>,
    >,
}
impl MessageResponse {
    /// <p>The unique identifier for the application that was used to send the message.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>A map that contains a multipart response for each address that the message was sent to. In the map, the endpoint ID is the key and the result is the value.</p>
    pub fn endpoint_result(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
    > {
        self.endpoint_result.as_ref()
    }
    /// <p>The identifier for the original request that the message was delivered for.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>A map that contains a multipart response for each address (email address, phone number, or push notification token) that the message was sent to. In the map, the address is the key and the result is the value.</p>
    pub fn result(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::MessageResult>,
    > {
        self.result.as_ref()
    }
}
/// See [`MessageResponse`](crate::model::MessageResponse).
pub mod message_response {

    /// A builder for [`MessageResponse`](crate::model::MessageResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) endpoint_result: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
        >,
        pub(crate) request_id: std::option::Option<std::string::String>,
        pub(crate) result: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::MessageResult>,
        >,
    }
    impl Builder {
        /// <p>The unique identifier for the application that was used to send the message.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that was used to send the message.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// Adds a key-value pair to `endpoint_result`.
        ///
        /// To override the contents of this collection use [`set_endpoint_result`](Self::set_endpoint_result).
        ///
        /// <p>A map that contains a multipart response for each address that the message was sent to. In the map, the endpoint ID is the key and the result is the value.</p>
        pub fn endpoint_result(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::EndpointMessageResult,
        ) -> Self {
            let mut hash_map = self.endpoint_result.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.endpoint_result = Some(hash_map);
            self
        }
        /// <p>A map that contains a multipart response for each address that the message was sent to. In the map, the endpoint ID is the key and the result is the value.</p>
        pub fn set_endpoint_result(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::EndpointMessageResult>,
            >,
        ) -> Self {
            self.endpoint_result = input;
            self
        }
        /// <p>The identifier for the original request that the message was delivered for.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The identifier for the original request that the message was delivered for.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// Adds a key-value pair to `result`.
        ///
        /// To override the contents of this collection use [`set_result`](Self::set_result).
        ///
        /// <p>A map that contains a multipart response for each address (email address, phone number, or push notification token) that the message was sent to. In the map, the address is the key and the result is the value.</p>
        pub fn result(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::MessageResult,
        ) -> Self {
            let mut hash_map = self.result.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.result = Some(hash_map);
            self
        }
        /// <p>A map that contains a multipart response for each address (email address, phone number, or push notification token) that the message was sent to. In the map, the address is the key and the result is the value.</p>
        pub fn set_result(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::MessageResult>,
            >,
        ) -> Self {
            self.result = input;
            self
        }
        /// Consumes the builder and constructs a [`MessageResponse`](crate::model::MessageResponse).
        pub fn build(self) -> crate::model::MessageResponse {
            crate::model::MessageResponse {
                application_id: self.application_id,
                endpoint_result: self.endpoint_result,
                request_id: self.request_id,
                result: self.result,
            }
        }
    }
}
impl MessageResponse {
    /// Creates a new builder-style object to manufacture [`MessageResponse`](crate::model::MessageResponse).
    pub fn builder() -> crate::model::message_response::Builder {
        crate::model::message_response::Builder::default()
    }
}

/// <p>Provides information about the results of sending a message directly to an endpoint address.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MessageResult {
    /// <p>The delivery status of the message. Possible values are:</p>
    /// <ul>
    /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>OPT_OUT - The user who's associated with the endpoint address has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint address.</p></li>
    /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint address.</p></li>
    /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
    /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub delivery_status: std::option::Option<crate::model::DeliveryStatus>,
    /// <p>The unique identifier for the message that was sent.</p>
    #[doc(hidden)]
    pub message_id: std::option::Option<std::string::String>,
    /// <p>The downstream service status code for delivering the message.</p>
    #[doc(hidden)]
    pub status_code: i32,
    /// <p>The status message for delivering the message.</p>
    #[doc(hidden)]
    pub status_message: std::option::Option<std::string::String>,
    /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
    #[doc(hidden)]
    pub updated_token: std::option::Option<std::string::String>,
}
impl MessageResult {
    /// <p>The delivery status of the message. Possible values are:</p>
    /// <ul>
    /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>OPT_OUT - The user who's associated with the endpoint address has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint address.</p></li>
    /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
    /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint address.</p></li>
    /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
    /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
    /// </ul>
    pub fn delivery_status(&self) -> std::option::Option<&crate::model::DeliveryStatus> {
        self.delivery_status.as_ref()
    }
    /// <p>The unique identifier for the message that was sent.</p>
    pub fn message_id(&self) -> std::option::Option<&str> {
        self.message_id.as_deref()
    }
    /// <p>The downstream service status code for delivering the message.</p>
    pub fn status_code(&self) -> i32 {
        self.status_code
    }
    /// <p>The status message for delivering the message.</p>
    pub fn status_message(&self) -> std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
    pub fn updated_token(&self) -> std::option::Option<&str> {
        self.updated_token.as_deref()
    }
}
/// See [`MessageResult`](crate::model::MessageResult).
pub mod message_result {

    /// A builder for [`MessageResult`](crate::model::MessageResult).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) delivery_status: std::option::Option<crate::model::DeliveryStatus>,
        pub(crate) message_id: std::option::Option<std::string::String>,
        pub(crate) status_code: std::option::Option<i32>,
        pub(crate) status_message: std::option::Option<std::string::String>,
        pub(crate) updated_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The delivery status of the message. Possible values are:</p>
        /// <ul>
        /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>OPT_OUT - The user who's associated with the endpoint address has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint address.</p></li>
        /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint address.</p></li>
        /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
        /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
        /// </ul>
        pub fn delivery_status(mut self, input: crate::model::DeliveryStatus) -> Self {
            self.delivery_status = Some(input);
            self
        }
        /// <p>The delivery status of the message. Possible values are:</p>
        /// <ul>
        /// <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>OPT_OUT - The user who's associated with the endpoint address has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>SUCCESSFUL - The message was successfully delivered to the endpoint address.</p></li>
        /// <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li>
        /// <li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint address.</p></li>
        /// <li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li>
        /// <li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li>
        /// </ul>
        pub fn set_delivery_status(
            mut self,
            input: std::option::Option<crate::model::DeliveryStatus>,
        ) -> Self {
            self.delivery_status = input;
            self
        }
        /// <p>The unique identifier for the message that was sent.</p>
        pub fn message_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.message_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the message that was sent.</p>
        pub fn set_message_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message_id = input;
            self
        }
        /// <p>The downstream service status code for delivering the message.</p>
        pub fn status_code(mut self, input: i32) -> Self {
            self.status_code = Some(input);
            self
        }
        /// <p>The downstream service status code for delivering the message.</p>
        pub fn set_status_code(mut self, input: std::option::Option<i32>) -> Self {
            self.status_code = input;
            self
        }
        /// <p>The status message for delivering the message.</p>
        pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.status_message = Some(input.into());
            self
        }
        /// <p>The status message for delivering the message.</p>
        pub fn set_status_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.status_message = input;
            self
        }
        /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
        pub fn updated_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.updated_token = Some(input.into());
            self
        }
        /// <p>For push notifications that are sent through the GCM channel, specifies whether the endpoint's device registration token was updated as part of delivering the message.</p>
        pub fn set_updated_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.updated_token = input;
            self
        }
        /// Consumes the builder and constructs a [`MessageResult`](crate::model::MessageResult).
        pub fn build(self) -> crate::model::MessageResult {
            crate::model::MessageResult {
                delivery_status: self.delivery_status,
                message_id: self.message_id,
                status_code: self.status_code.unwrap_or_default(),
                status_message: self.status_message,
                updated_token: self.updated_token,
            }
        }
    }
}
impl MessageResult {
    /// Creates a new builder-style object to manufacture [`MessageResult`](crate::model::MessageResult).
    pub fn builder() -> crate::model::message_result::Builder {
        crate::model::message_result::Builder::default()
    }
}

/// <p>Send OTP message request parameters.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendOtpMessageRequestParameters {
    /// <p>The attempts allowed to validate an OTP.</p>
    #[doc(hidden)]
    pub allowed_attempts: i32,
    /// <p>The brand name that will be substituted into the OTP message body. Should be owned by calling AWS account.</p>
    #[doc(hidden)]
    pub brand_name: std::option::Option<std::string::String>,
    /// <p>Channel type for the OTP message. Supported values: [SMS].</p>
    #[doc(hidden)]
    pub channel: std::option::Option<std::string::String>,
    /// <p>The number of characters in the generated OTP.</p>
    #[doc(hidden)]
    pub code_length: i32,
    /// <p>The destination identity to send OTP to.</p>
    #[doc(hidden)]
    pub destination_identity: std::option::Option<std::string::String>,
    /// <p>A unique Entity ID received from DLT after entity registration is approved.</p>
    #[doc(hidden)]
    pub entity_id: std::option::Option<std::string::String>,
    /// <p>The language to be used for the outgoing message body containing the OTP.</p>
    #[doc(hidden)]
    pub language: std::option::Option<std::string::String>,
    /// <p>The origination identity used to send OTP from.</p>
    #[doc(hidden)]
    pub origination_identity: std::option::Option<std::string::String>,
    /// <p>Developer-specified reference identifier. Required to match during OTP verification.</p>
    #[doc(hidden)]
    pub reference_id: std::option::Option<std::string::String>,
    /// <p>A unique Template ID received from DLT after entity registration is approved.</p>
    #[doc(hidden)]
    pub template_id: std::option::Option<std::string::String>,
    /// <p>The time in minutes before the OTP is no longer valid.</p>
    #[doc(hidden)]
    pub validity_period: i32,
}
impl SendOtpMessageRequestParameters {
    /// <p>The attempts allowed to validate an OTP.</p>
    pub fn allowed_attempts(&self) -> i32 {
        self.allowed_attempts
    }
    /// <p>The brand name that will be substituted into the OTP message body. Should be owned by calling AWS account.</p>
    pub fn brand_name(&self) -> std::option::Option<&str> {
        self.brand_name.as_deref()
    }
    /// <p>Channel type for the OTP message. Supported values: [SMS].</p>
    pub fn channel(&self) -> std::option::Option<&str> {
        self.channel.as_deref()
    }
    /// <p>The number of characters in the generated OTP.</p>
    pub fn code_length(&self) -> i32 {
        self.code_length
    }
    /// <p>The destination identity to send OTP to.</p>
    pub fn destination_identity(&self) -> std::option::Option<&str> {
        self.destination_identity.as_deref()
    }
    /// <p>A unique Entity ID received from DLT after entity registration is approved.</p>
    pub fn entity_id(&self) -> std::option::Option<&str> {
        self.entity_id.as_deref()
    }
    /// <p>The language to be used for the outgoing message body containing the OTP.</p>
    pub fn language(&self) -> std::option::Option<&str> {
        self.language.as_deref()
    }
    /// <p>The origination identity used to send OTP from.</p>
    pub fn origination_identity(&self) -> std::option::Option<&str> {
        self.origination_identity.as_deref()
    }
    /// <p>Developer-specified reference identifier. Required to match during OTP verification.</p>
    pub fn reference_id(&self) -> std::option::Option<&str> {
        self.reference_id.as_deref()
    }
    /// <p>A unique Template ID received from DLT after entity registration is approved.</p>
    pub fn template_id(&self) -> std::option::Option<&str> {
        self.template_id.as_deref()
    }
    /// <p>The time in minutes before the OTP is no longer valid.</p>
    pub fn validity_period(&self) -> i32 {
        self.validity_period
    }
}
/// See [`SendOtpMessageRequestParameters`](crate::model::SendOtpMessageRequestParameters).
pub mod send_otp_message_request_parameters {

    /// A builder for [`SendOtpMessageRequestParameters`](crate::model::SendOtpMessageRequestParameters).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) allowed_attempts: std::option::Option<i32>,
        pub(crate) brand_name: std::option::Option<std::string::String>,
        pub(crate) channel: std::option::Option<std::string::String>,
        pub(crate) code_length: std::option::Option<i32>,
        pub(crate) destination_identity: std::option::Option<std::string::String>,
        pub(crate) entity_id: std::option::Option<std::string::String>,
        pub(crate) language: std::option::Option<std::string::String>,
        pub(crate) origination_identity: std::option::Option<std::string::String>,
        pub(crate) reference_id: std::option::Option<std::string::String>,
        pub(crate) template_id: std::option::Option<std::string::String>,
        pub(crate) validity_period: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The attempts allowed to validate an OTP.</p>
        pub fn allowed_attempts(mut self, input: i32) -> Self {
            self.allowed_attempts = Some(input);
            self
        }
        /// <p>The attempts allowed to validate an OTP.</p>
        pub fn set_allowed_attempts(mut self, input: std::option::Option<i32>) -> Self {
            self.allowed_attempts = input;
            self
        }
        /// <p>The brand name that will be substituted into the OTP message body. Should be owned by calling AWS account.</p>
        pub fn brand_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.brand_name = Some(input.into());
            self
        }
        /// <p>The brand name that will be substituted into the OTP message body. Should be owned by calling AWS account.</p>
        pub fn set_brand_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.brand_name = input;
            self
        }
        /// <p>Channel type for the OTP message. Supported values: [SMS].</p>
        pub fn channel(mut self, input: impl Into<std::string::String>) -> Self {
            self.channel = Some(input.into());
            self
        }
        /// <p>Channel type for the OTP message. Supported values: [SMS].</p>
        pub fn set_channel(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.channel = input;
            self
        }
        /// <p>The number of characters in the generated OTP.</p>
        pub fn code_length(mut self, input: i32) -> Self {
            self.code_length = Some(input);
            self
        }
        /// <p>The number of characters in the generated OTP.</p>
        pub fn set_code_length(mut self, input: std::option::Option<i32>) -> Self {
            self.code_length = input;
            self
        }
        /// <p>The destination identity to send OTP to.</p>
        pub fn destination_identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_identity = Some(input.into());
            self
        }
        /// <p>The destination identity to send OTP to.</p>
        pub fn set_destination_identity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_identity = input;
            self
        }
        /// <p>A unique Entity ID received from DLT after entity registration is approved.</p>
        pub fn entity_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.entity_id = Some(input.into());
            self
        }
        /// <p>A unique Entity ID received from DLT after entity registration is approved.</p>
        pub fn set_entity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.entity_id = input;
            self
        }
        /// <p>The language to be used for the outgoing message body containing the OTP.</p>
        pub fn language(mut self, input: impl Into<std::string::String>) -> Self {
            self.language = Some(input.into());
            self
        }
        /// <p>The language to be used for the outgoing message body containing the OTP.</p>
        pub fn set_language(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.language = input;
            self
        }
        /// <p>The origination identity used to send OTP from.</p>
        pub fn origination_identity(mut self, input: impl Into<std::string::String>) -> Self {
            self.origination_identity = Some(input.into());
            self
        }
        /// <p>The origination identity used to send OTP from.</p>
        pub fn set_origination_identity(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.origination_identity = input;
            self
        }
        /// <p>Developer-specified reference identifier. Required to match during OTP verification.</p>
        pub fn reference_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.reference_id = Some(input.into());
            self
        }
        /// <p>Developer-specified reference identifier. Required to match during OTP verification.</p>
        pub fn set_reference_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.reference_id = input;
            self
        }
        /// <p>A unique Template ID received from DLT after entity registration is approved.</p>
        pub fn template_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_id = Some(input.into());
            self
        }
        /// <p>A unique Template ID received from DLT after entity registration is approved.</p>
        pub fn set_template_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.template_id = input;
            self
        }
        /// <p>The time in minutes before the OTP is no longer valid.</p>
        pub fn validity_period(mut self, input: i32) -> Self {
            self.validity_period = Some(input);
            self
        }
        /// <p>The time in minutes before the OTP is no longer valid.</p>
        pub fn set_validity_period(mut self, input: std::option::Option<i32>) -> Self {
            self.validity_period = input;
            self
        }
        /// Consumes the builder and constructs a [`SendOtpMessageRequestParameters`](crate::model::SendOtpMessageRequestParameters).
        pub fn build(self) -> crate::model::SendOtpMessageRequestParameters {
            crate::model::SendOtpMessageRequestParameters {
                allowed_attempts: self.allowed_attempts.unwrap_or_default(),
                brand_name: self.brand_name,
                channel: self.channel,
                code_length: self.code_length.unwrap_or_default(),
                destination_identity: self.destination_identity,
                entity_id: self.entity_id,
                language: self.language,
                origination_identity: self.origination_identity,
                reference_id: self.reference_id,
                template_id: self.template_id,
                validity_period: self.validity_period.unwrap_or_default(),
            }
        }
    }
}
impl SendOtpMessageRequestParameters {
    /// Creates a new builder-style object to manufacture [`SendOtpMessageRequestParameters`](crate::model::SendOtpMessageRequestParameters).
    pub fn builder() -> crate::model::send_otp_message_request_parameters::Builder {
        crate::model::send_otp_message_request_parameters::Builder::default()
    }
}

/// <p>Specifies the configuration and other settings for a message.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MessageRequest {
    /// <p>A map of key-value pairs, where each key is an address and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object. An address can be a push notification token, a phone number, or an email address. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object to tailor the message for an address by specifying settings such as content overrides and message variables.</p>
    #[doc(hidden)]
    pub addresses: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::AddressConfiguration>,
    >,
    /// <p>A map of custom attributes to attach to the message. For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
    #[doc(hidden)]
    pub context:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>A map of key-value pairs, where each key is an endpoint ID and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for an endpoint by specifying settings such as content overrides and message variables.</p>
    #[doc(hidden)]
    pub endpoints: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::EndpointSendConfiguration>,
    >,
    /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
    #[doc(hidden)]
    pub message_configuration: std::option::Option<crate::model::DirectMessageConfiguration>,
    /// <p>The message template to use for the message.</p>
    #[doc(hidden)]
    pub template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
    /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
    #[doc(hidden)]
    pub trace_id: std::option::Option<std::string::String>,
}
impl MessageRequest {
    /// <p>A map of key-value pairs, where each key is an address and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object. An address can be a push notification token, a phone number, or an email address. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object to tailor the message for an address by specifying settings such as content overrides and message variables.</p>
    pub fn addresses(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::AddressConfiguration>,
    > {
        self.addresses.as_ref()
    }
    /// <p>A map of custom attributes to attach to the message. For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
    pub fn context(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.context.as_ref()
    }
    /// <p>A map of key-value pairs, where each key is an endpoint ID and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for an endpoint by specifying settings such as content overrides and message variables.</p>
    pub fn endpoints(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::EndpointSendConfiguration>,
    > {
        self.endpoints.as_ref()
    }
    /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
    pub fn message_configuration(
        &self,
    ) -> std::option::Option<&crate::model::DirectMessageConfiguration> {
        self.message_configuration.as_ref()
    }
    /// <p>The message template to use for the message.</p>
    pub fn template_configuration(
        &self,
    ) -> std::option::Option<&crate::model::TemplateConfiguration> {
        self.template_configuration.as_ref()
    }
    /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
    pub fn trace_id(&self) -> std::option::Option<&str> {
        self.trace_id.as_deref()
    }
}
/// See [`MessageRequest`](crate::model::MessageRequest).
pub mod message_request {

    /// A builder for [`MessageRequest`](crate::model::MessageRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) addresses: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::AddressConfiguration>,
        >,
        pub(crate) context: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) endpoints: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::EndpointSendConfiguration>,
        >,
        pub(crate) message_configuration:
            std::option::Option<crate::model::DirectMessageConfiguration>,
        pub(crate) template_configuration: std::option::Option<crate::model::TemplateConfiguration>,
        pub(crate) trace_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Adds a key-value pair to `addresses`.
        ///
        /// To override the contents of this collection use [`set_addresses`](Self::set_addresses).
        ///
        /// <p>A map of key-value pairs, where each key is an address and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object. An address can be a push notification token, a phone number, or an email address. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object to tailor the message for an address by specifying settings such as content overrides and message variables.</p>
        pub fn addresses(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::AddressConfiguration,
        ) -> Self {
            let mut hash_map = self.addresses.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.addresses = Some(hash_map);
            self
        }
        /// <p>A map of key-value pairs, where each key is an address and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object. An address can be a push notification token, a phone number, or an email address. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-addressconfiguration">AddressConfiguration</a> object to tailor the message for an address by specifying settings such as content overrides and message variables.</p>
        pub fn set_addresses(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::AddressConfiguration>,
            >,
        ) -> Self {
            self.addresses = input;
            self
        }
        /// Adds a key-value pair to `context`.
        ///
        /// To override the contents of this collection use [`set_context`](Self::set_context).
        ///
        /// <p>A map of custom attributes to attach to the message. For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
        pub fn context(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.context.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.context = Some(hash_map);
            self
        }
        /// <p>A map of custom attributes to attach to the message. For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
        pub fn set_context(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.context = input;
            self
        }
        /// Adds a key-value pair to `endpoints`.
        ///
        /// To override the contents of this collection use [`set_endpoints`](Self::set_endpoints).
        ///
        /// <p>A map of key-value pairs, where each key is an endpoint ID and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for an endpoint by specifying settings such as content overrides and message variables.</p>
        pub fn endpoints(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::EndpointSendConfiguration,
        ) -> Self {
            let mut hash_map = self.endpoints.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.endpoints = Some(hash_map);
            self
        }
        /// <p>A map of key-value pairs, where each key is an endpoint ID and each value is an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object. You can use an <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-messages.html#apps-application-id-messages-model-endpointsendconfiguration">EndpointSendConfiguration</a> object to tailor the message for an endpoint by specifying settings such as content overrides and message variables.</p>
        pub fn set_endpoints(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    std::string::String,
                    crate::model::EndpointSendConfiguration,
                >,
            >,
        ) -> Self {
            self.endpoints = input;
            self
        }
        /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
        pub fn message_configuration(
            mut self,
            input: crate::model::DirectMessageConfiguration,
        ) -> Self {
            self.message_configuration = Some(input);
            self
        }
        /// <p>The settings and content for the default message and any default messages that you defined for specific channels.</p>
        pub fn set_message_configuration(
            mut self,
            input: std::option::Option<crate::model::DirectMessageConfiguration>,
        ) -> Self {
            self.message_configuration = input;
            self
        }
        /// <p>The message template to use for the message.</p>
        pub fn template_configuration(
            mut self,
            input: crate::model::TemplateConfiguration,
        ) -> Self {
            self.template_configuration = Some(input);
            self
        }
        /// <p>The message template to use for the message.</p>
        pub fn set_template_configuration(
            mut self,
            input: std::option::Option<crate::model::TemplateConfiguration>,
        ) -> Self {
            self.template_configuration = input;
            self
        }
        /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
        pub fn trace_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.trace_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for tracing the message. This identifier is visible to message recipients.</p>
        pub fn set_trace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.trace_id = input;
            self
        }
        /// Consumes the builder and constructs a [`MessageRequest`](crate::model::MessageRequest).
        pub fn build(self) -> crate::model::MessageRequest {
            crate::model::MessageRequest {
                addresses: self.addresses,
                context: self.context,
                endpoints: self.endpoints,
                message_configuration: self.message_configuration,
                template_configuration: self.template_configuration,
                trace_id: self.trace_id,
            }
        }
    }
}
impl MessageRequest {
    /// Creates a new builder-style object to manufacture [`MessageRequest`](crate::model::MessageRequest).
    pub fn builder() -> crate::model::message_request::Builder {
        crate::model::message_request::Builder::default()
    }
}

/// <p>Specifies address-based configuration settings for a message that's sent directly to an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddressConfiguration {
    /// <p>The message body to use instead of the default message body. This value overrides the default message body.</p>
    #[doc(hidden)]
    pub body_override: std::option::Option<std::string::String>,
    /// <p>The channel to use when sending the message.</p>
    #[doc(hidden)]
    pub channel_type: std::option::Option<crate::model::ChannelType>,
    /// <p>An object that maps custom attributes to attributes for the address and is attached to the message. Attribute names are case sensitive.</p>
    /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
    #[doc(hidden)]
    pub context:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
    #[doc(hidden)]
    pub raw_content: std::option::Option<std::string::String>,
    /// <p>A map of the message variables to merge with the variables specified by properties of the DefaultMessage object. The variables specified in this map take precedence over all other variables.</p>
    #[doc(hidden)]
    pub substitutions: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The message title to use instead of the default message title. This value overrides the default message title.</p>
    #[doc(hidden)]
    pub title_override: std::option::Option<std::string::String>,
}
impl AddressConfiguration {
    /// <p>The message body to use instead of the default message body. This value overrides the default message body.</p>
    pub fn body_override(&self) -> std::option::Option<&str> {
        self.body_override.as_deref()
    }
    /// <p>The channel to use when sending the message.</p>
    pub fn channel_type(&self) -> std::option::Option<&crate::model::ChannelType> {
        self.channel_type.as_ref()
    }
    /// <p>An object that maps custom attributes to attributes for the address and is attached to the message. Attribute names are case sensitive.</p>
    /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
    pub fn context(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.context.as_ref()
    }
    /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
    pub fn raw_content(&self) -> std::option::Option<&str> {
        self.raw_content.as_deref()
    }
    /// <p>A map of the message variables to merge with the variables specified by properties of the DefaultMessage object. The variables specified in this map take precedence over all other variables.</p>
    pub fn substitutions(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.substitutions.as_ref()
    }
    /// <p>The message title to use instead of the default message title. This value overrides the default message title.</p>
    pub fn title_override(&self) -> std::option::Option<&str> {
        self.title_override.as_deref()
    }
}
/// See [`AddressConfiguration`](crate::model::AddressConfiguration).
pub mod address_configuration {

    /// A builder for [`AddressConfiguration`](crate::model::AddressConfiguration).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) body_override: std::option::Option<std::string::String>,
        pub(crate) channel_type: std::option::Option<crate::model::ChannelType>,
        pub(crate) context: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) raw_content: std::option::Option<std::string::String>,
        pub(crate) substitutions: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) title_override: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The message body to use instead of the default message body. This value overrides the default message body.</p>
        pub fn body_override(mut self, input: impl Into<std::string::String>) -> Self {
            self.body_override = Some(input.into());
            self
        }
        /// <p>The message body to use instead of the default message body. This value overrides the default message body.</p>
        pub fn set_body_override(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.body_override = input;
            self
        }
        /// <p>The channel to use when sending the message.</p>
        pub fn channel_type(mut self, input: crate::model::ChannelType) -> Self {
            self.channel_type = Some(input);
            self
        }
        /// <p>The channel to use when sending the message.</p>
        pub fn set_channel_type(
            mut self,
            input: std::option::Option<crate::model::ChannelType>,
        ) -> Self {
            self.channel_type = input;
            self
        }
        /// Adds a key-value pair to `context`.
        ///
        /// To override the contents of this collection use [`set_context`](Self::set_context).
        ///
        /// <p>An object that maps custom attributes to attributes for the address and is attached to the message. Attribute names are case sensitive.</p>
        /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
        pub fn context(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.context.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.context = Some(hash_map);
            self
        }
        /// <p>An object that maps custom attributes to attributes for the address and is attached to the message. Attribute names are case sensitive.</p>
        /// <p>For a push notification, this payload is added to the data.pinpoint object. For an email or text message, this payload is added to email/SMS delivery receipt event attributes.</p>
        pub fn set_context(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.context = input;
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
        pub fn raw_content(mut self, input: impl Into<std::string::String>) -> Self {
            self.raw_content = Some(input.into());
            self
        }
        /// <p>The raw, JSON-formatted string to use as the payload for the message. If specified, this value overrides all other values for the message.</p>
        pub fn set_raw_content(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.raw_content = input;
            self
        }
        /// Adds a key-value pair to `substitutions`.
        ///
        /// To override the contents of this collection use [`set_substitutions`](Self::set_substitutions).
        ///
        /// <p>A map of the message variables to merge with the variables specified by properties of the DefaultMessage object. The variables specified in this map take precedence over all other variables.</p>
        pub fn substitutions(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.substitutions.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.substitutions = Some(hash_map);
            self
        }
        /// <p>A map of the message variables to merge with the variables specified by properties of the DefaultMessage object. The variables specified in this map take precedence over all other variables.</p>
        pub fn set_substitutions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.substitutions = input;
            self
        }
        /// <p>The message title to use instead of the default message title. This value overrides the default message title.</p>
        pub fn title_override(mut self, input: impl Into<std::string::String>) -> Self {
            self.title_override = Some(input.into());
            self
        }
        /// <p>The message title to use instead of the default message title. This value overrides the default message title.</p>
        pub fn set_title_override(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.title_override = input;
            self
        }
        /// Consumes the builder and constructs a [`AddressConfiguration`](crate::model::AddressConfiguration).
        pub fn build(self) -> crate::model::AddressConfiguration {
            crate::model::AddressConfiguration {
                body_override: self.body_override,
                channel_type: self.channel_type,
                context: self.context,
                raw_content: self.raw_content,
                substitutions: self.substitutions,
                title_override: self.title_override,
            }
        }
    }
}
impl AddressConfiguration {
    /// Creates a new builder-style object to manufacture [`AddressConfiguration`](crate::model::AddressConfiguration).
    pub fn builder() -> crate::model::address_configuration::Builder {
        crate::model::address_configuration::Builder::default()
    }
}

/// <p>Provides information about the type and the names of attributes that were removed from all the endpoints that are associated with an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AttributesResource {
    /// <p>The unique identifier for the application.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The type of attribute or attributes that were removed from the endpoints. Valid values are:</p>
    /// <ul>
    /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints.</p></li>
    /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints.</p></li>
    /// <li><p>endpoint-user-attributes - Custom attributes that describe users.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub attribute_type: std::option::Option<std::string::String>,
    /// <p>An array that specifies the names of the attributes that were removed from the endpoints.</p>
    #[doc(hidden)]
    pub attributes: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl AttributesResource {
    /// <p>The unique identifier for the application.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The type of attribute or attributes that were removed from the endpoints. Valid values are:</p>
    /// <ul>
    /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints.</p></li>
    /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints.</p></li>
    /// <li><p>endpoint-user-attributes - Custom attributes that describe users.</p></li>
    /// </ul>
    pub fn attribute_type(&self) -> std::option::Option<&str> {
        self.attribute_type.as_deref()
    }
    /// <p>An array that specifies the names of the attributes that were removed from the endpoints.</p>
    pub fn attributes(&self) -> std::option::Option<&[std::string::String]> {
        self.attributes.as_deref()
    }
}
/// See [`AttributesResource`](crate::model::AttributesResource).
pub mod attributes_resource {

    /// A builder for [`AttributesResource`](crate::model::AttributesResource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) attribute_type: std::option::Option<std::string::String>,
        pub(crate) attributes: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The unique identifier for the application.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The type of attribute or attributes that were removed from the endpoints. Valid values are:</p>
        /// <ul>
        /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints.</p></li>
        /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints.</p></li>
        /// <li><p>endpoint-user-attributes - Custom attributes that describe users.</p></li>
        /// </ul>
        pub fn attribute_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.attribute_type = Some(input.into());
            self
        }
        /// <p>The type of attribute or attributes that were removed from the endpoints. Valid values are:</p>
        /// <ul>
        /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints.</p></li>
        /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints.</p></li>
        /// <li><p>endpoint-user-attributes - Custom attributes that describe users.</p></li>
        /// </ul>
        pub fn set_attribute_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.attribute_type = input;
            self
        }
        /// Appends an item to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>An array that specifies the names of the attributes that were removed from the endpoints.</p>
        pub fn attributes(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.attributes.unwrap_or_default();
            v.push(input.into());
            self.attributes = Some(v);
            self
        }
        /// <p>An array that specifies the names of the attributes that were removed from the endpoints.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// Consumes the builder and constructs a [`AttributesResource`](crate::model::AttributesResource).
        pub fn build(self) -> crate::model::AttributesResource {
            crate::model::AttributesResource {
                application_id: self.application_id,
                attribute_type: self.attribute_type,
                attributes: self.attributes,
            }
        }
    }
}
impl AttributesResource {
    /// Creates a new builder-style object to manufacture [`AttributesResource`](crate::model::AttributesResource).
    pub fn builder() -> crate::model::attributes_resource::Builder {
        crate::model::attributes_resource::Builder::default()
    }
}

/// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateAttributesRequest {
    /// <p>An array of the attributes to remove from all the endpoints that are associated with the application. The array can specify the complete, exact name of each attribute to remove or it can specify a glob pattern that an attribute name must match in order for the attribute to be removed.</p>
    #[doc(hidden)]
    pub blacklist: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UpdateAttributesRequest {
    /// <p>An array of the attributes to remove from all the endpoints that are associated with the application. The array can specify the complete, exact name of each attribute to remove or it can specify a glob pattern that an attribute name must match in order for the attribute to be removed.</p>
    pub fn blacklist(&self) -> std::option::Option<&[std::string::String]> {
        self.blacklist.as_deref()
    }
}
/// See [`UpdateAttributesRequest`](crate::model::UpdateAttributesRequest).
pub mod update_attributes_request {

    /// A builder for [`UpdateAttributesRequest`](crate::model::UpdateAttributesRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) blacklist: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// Appends an item to `blacklist`.
        ///
        /// To override the contents of this collection use [`set_blacklist`](Self::set_blacklist).
        ///
        /// <p>An array of the attributes to remove from all the endpoints that are associated with the application. The array can specify the complete, exact name of each attribute to remove or it can specify a glob pattern that an attribute name must match in order for the attribute to be removed.</p>
        pub fn blacklist(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.blacklist.unwrap_or_default();
            v.push(input.into());
            self.blacklist = Some(v);
            self
        }
        /// <p>An array of the attributes to remove from all the endpoints that are associated with the application. The array can specify the complete, exact name of each attribute to remove or it can specify a glob pattern that an attribute name must match in order for the attribute to be removed.</p>
        pub fn set_blacklist(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.blacklist = input;
            self
        }
        /// Consumes the builder and constructs a [`UpdateAttributesRequest`](crate::model::UpdateAttributesRequest).
        pub fn build(self) -> crate::model::UpdateAttributesRequest {
            crate::model::UpdateAttributesRequest {
                blacklist: self.blacklist,
            }
        }
    }
}
impl UpdateAttributesRequest {
    /// Creates a new builder-style object to manufacture [`UpdateAttributesRequest`](crate::model::UpdateAttributesRequest).
    pub fn builder() -> crate::model::update_attributes_request::Builder {
        crate::model::update_attributes_request::Builder::default()
    }
}

/// <p>Specifies settings for publishing event data to an Amazon Kinesis data stream or an Amazon Kinesis Data Firehose delivery stream.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventStream {
    /// <p>The unique identifier for the application to publish event data for.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream to publish event data to.</p>
    /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:stream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:deliverystream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    #[doc(hidden)]
    pub destination_stream_arn: std::option::Option<std::string::String>,
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when publishing event data, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    #[doc(hidden)]
    pub external_id: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the event stream was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The IAM user who last modified the event stream.</p>
    #[doc(hidden)]
    pub last_updated_by: std::option::Option<std::string::String>,
    /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
}
impl EventStream {
    /// <p>The unique identifier for the application to publish event data for.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream to publish event data to.</p>
    /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:stream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:deliverystream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    pub fn destination_stream_arn(&self) -> std::option::Option<&str> {
        self.destination_stream_arn.as_deref()
    }
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when publishing event data, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    pub fn external_id(&self) -> std::option::Option<&str> {
        self.external_id.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the event stream was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The IAM user who last modified the event stream.</p>
    pub fn last_updated_by(&self) -> std::option::Option<&str> {
        self.last_updated_by.as_deref()
    }
    /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
}
/// See [`EventStream`](crate::model::EventStream).
pub mod event_stream {

    /// A builder for [`EventStream`](crate::model::EventStream).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) destination_stream_arn: std::option::Option<std::string::String>,
        pub(crate) external_id: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) last_updated_by: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier for the application to publish event data for.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application to publish event data for.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream to publish event data to.</p>
        /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:stream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:deliverystream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        pub fn destination_stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_stream_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream to publish event data to.</p>
        /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:stream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:deliverystream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        pub fn set_destination_stream_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_stream_arn = input;
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when publishing event data, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn external_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.external_id = Some(input.into());
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when publishing event data, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn set_external_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.external_id = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the event stream was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the event stream was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The IAM user who last modified the event stream.</p>
        pub fn last_updated_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_updated_by = Some(input.into());
            self
        }
        /// <p>The IAM user who last modified the event stream.</p>
        pub fn set_last_updated_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_updated_by = input;
            self
        }
        /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`EventStream`](crate::model::EventStream).
        pub fn build(self) -> crate::model::EventStream {
            crate::model::EventStream {
                application_id: self.application_id,
                destination_stream_arn: self.destination_stream_arn,
                external_id: self.external_id,
                last_modified_date: self.last_modified_date,
                last_updated_by: self.last_updated_by,
                role_arn: self.role_arn,
            }
        }
    }
}
impl EventStream {
    /// Creates a new builder-style object to manufacture [`EventStream`](crate::model::EventStream).
    pub fn builder() -> crate::model::event_stream::Builder {
        crate::model::event_stream::Builder::default()
    }
}

/// <p>Specifies the Amazon Resource Name (ARN) of an event stream to publish events to and the AWS Identity and Access Management (IAM) role to use when publishing those events.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WriteEventStream {
    /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream that you want to publish event data to.</p>
    /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:stream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:deliverystream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    #[doc(hidden)]
    pub destination_stream_arn: std::option::Option<std::string::String>,
    /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
}
impl WriteEventStream {
    /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream that you want to publish event data to.</p>
    /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:stream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
    /// region
    /// </replaceable>:<replaceable>
    /// account-id
    /// </replaceable>:deliverystream/<replaceable>
    /// stream_name
    /// </replaceable> </p>
    pub fn destination_stream_arn(&self) -> std::option::Option<&str> {
        self.destination_stream_arn.as_deref()
    }
    /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
}
/// See [`WriteEventStream`](crate::model::WriteEventStream).
pub mod write_event_stream {

    /// A builder for [`WriteEventStream`](crate::model::WriteEventStream).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_stream_arn: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream that you want to publish event data to.</p>
        /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:stream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:deliverystream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        pub fn destination_stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_stream_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the Amazon Kinesis data stream or Amazon Kinesis Data Firehose delivery stream that you want to publish event data to.</p>
        /// <p>For a Kinesis data stream, the ARN format is: arn:aws:kinesis:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:stream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        /// <p>For a Kinesis Data Firehose delivery stream, the ARN format is: arn:aws:firehose:<replaceable>
        /// region
        /// </replaceable>:<replaceable>
        /// account-id
        /// </replaceable>:deliverystream/<replaceable>
        /// stream_name
        /// </replaceable> </p>
        pub fn set_destination_stream_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_stream_arn = input;
            self
        }
        /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to publish event data to the stream in your AWS account.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`WriteEventStream`](crate::model::WriteEventStream).
        pub fn build(self) -> crate::model::WriteEventStream {
            crate::model::WriteEventStream {
                destination_stream_arn: self.destination_stream_arn,
                role_arn: self.role_arn,
            }
        }
    }
}
impl WriteEventStream {
    /// Creates a new builder-style object to manufacture [`WriteEventStream`](crate::model::WriteEventStream).
    pub fn builder() -> crate::model::write_event_stream::Builder {
        crate::model::write_event_stream::Builder::default()
    }
}

/// <p>Provides information about endpoints and the events that they're associated with.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventsResponse {
    /// <p>A map that contains a multipart response for each endpoint. For each item in this object, the endpoint ID is the key and the item response is the value. If no item response exists, the value can also be one of the following: 202, the request was processed successfully; or 400, the payload wasn't valid or required fields were missing.</p>
    #[doc(hidden)]
    pub results: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::ItemResponse>,
    >,
}
impl EventsResponse {
    /// <p>A map that contains a multipart response for each endpoint. For each item in this object, the endpoint ID is the key and the item response is the value. If no item response exists, the value can also be one of the following: 202, the request was processed successfully; or 400, the payload wasn't valid or required fields were missing.</p>
    pub fn results(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::ItemResponse>,
    > {
        self.results.as_ref()
    }
}
/// See [`EventsResponse`](crate::model::EventsResponse).
pub mod events_response {

    /// A builder for [`EventsResponse`](crate::model::EventsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) results: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::ItemResponse>,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `results`.
        ///
        /// To override the contents of this collection use [`set_results`](Self::set_results).
        ///
        /// <p>A map that contains a multipart response for each endpoint. For each item in this object, the endpoint ID is the key and the item response is the value. If no item response exists, the value can also be one of the following: 202, the request was processed successfully; or 400, the payload wasn't valid or required fields were missing.</p>
        pub fn results(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::ItemResponse,
        ) -> Self {
            let mut hash_map = self.results.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.results = Some(hash_map);
            self
        }
        /// <p>A map that contains a multipart response for each endpoint. For each item in this object, the endpoint ID is the key and the item response is the value. If no item response exists, the value can also be one of the following: 202, the request was processed successfully; or 400, the payload wasn't valid or required fields were missing.</p>
        pub fn set_results(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::ItemResponse>,
            >,
        ) -> Self {
            self.results = input;
            self
        }
        /// Consumes the builder and constructs a [`EventsResponse`](crate::model::EventsResponse).
        pub fn build(self) -> crate::model::EventsResponse {
            crate::model::EventsResponse {
                results: self.results,
            }
        }
    }
}
impl EventsResponse {
    /// Creates a new builder-style object to manufacture [`EventsResponse`](crate::model::EventsResponse).
    pub fn builder() -> crate::model::events_response::Builder {
        crate::model::events_response::Builder::default()
    }
}

/// <p>Provides information about the results of a request to create or update an endpoint that's associated with an event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ItemResponse {
    /// <p>The response that was received after the endpoint data was accepted.</p>
    #[doc(hidden)]
    pub endpoint_item_response: std::option::Option<crate::model::EndpointItemResponse>,
    /// <p>A multipart response object that contains a key and a value for each event in the request. In each object, the event ID is the key and an EventItemResponse object is the value.</p>
    #[doc(hidden)]
    pub events_item_response: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::EventItemResponse>,
    >,
}
impl ItemResponse {
    /// <p>The response that was received after the endpoint data was accepted.</p>
    pub fn endpoint_item_response(
        &self,
    ) -> std::option::Option<&crate::model::EndpointItemResponse> {
        self.endpoint_item_response.as_ref()
    }
    /// <p>A multipart response object that contains a key and a value for each event in the request. In each object, the event ID is the key and an EventItemResponse object is the value.</p>
    pub fn events_item_response(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::EventItemResponse>,
    > {
        self.events_item_response.as_ref()
    }
}
/// See [`ItemResponse`](crate::model::ItemResponse).
pub mod item_response {

    /// A builder for [`ItemResponse`](crate::model::ItemResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) endpoint_item_response: std::option::Option<crate::model::EndpointItemResponse>,
        pub(crate) events_item_response: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::EventItemResponse>,
        >,
    }
    impl Builder {
        /// <p>The response that was received after the endpoint data was accepted.</p>
        pub fn endpoint_item_response(mut self, input: crate::model::EndpointItemResponse) -> Self {
            self.endpoint_item_response = Some(input);
            self
        }
        /// <p>The response that was received after the endpoint data was accepted.</p>
        pub fn set_endpoint_item_response(
            mut self,
            input: std::option::Option<crate::model::EndpointItemResponse>,
        ) -> Self {
            self.endpoint_item_response = input;
            self
        }
        /// Adds a key-value pair to `events_item_response`.
        ///
        /// To override the contents of this collection use [`set_events_item_response`](Self::set_events_item_response).
        ///
        /// <p>A multipart response object that contains a key and a value for each event in the request. In each object, the event ID is the key and an EventItemResponse object is the value.</p>
        pub fn events_item_response(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::EventItemResponse,
        ) -> Self {
            let mut hash_map = self.events_item_response.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.events_item_response = Some(hash_map);
            self
        }
        /// <p>A multipart response object that contains a key and a value for each event in the request. In each object, the event ID is the key and an EventItemResponse object is the value.</p>
        pub fn set_events_item_response(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::EventItemResponse>,
            >,
        ) -> Self {
            self.events_item_response = input;
            self
        }
        /// Consumes the builder and constructs a [`ItemResponse`](crate::model::ItemResponse).
        pub fn build(self) -> crate::model::ItemResponse {
            crate::model::ItemResponse {
                endpoint_item_response: self.endpoint_item_response,
                events_item_response: self.events_item_response,
            }
        }
    }
}
impl ItemResponse {
    /// Creates a new builder-style object to manufacture [`ItemResponse`](crate::model::ItemResponse).
    pub fn builder() -> crate::model::item_response::Builder {
        crate::model::item_response::Builder::default()
    }
}

/// <p>Provides the status code and message that result from processing an event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventItemResponse {
    /// <p>A custom message that's returned in the response as a result of processing the event.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The status code that's returned in the response as a result of processing the event. Possible values are: 202, for events that were accepted; and, 400, for events that weren't valid.</p>
    #[doc(hidden)]
    pub status_code: i32,
}
impl EventItemResponse {
    /// <p>A custom message that's returned in the response as a result of processing the event.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The status code that's returned in the response as a result of processing the event. Possible values are: 202, for events that were accepted; and, 400, for events that weren't valid.</p>
    pub fn status_code(&self) -> i32 {
        self.status_code
    }
}
/// See [`EventItemResponse`](crate::model::EventItemResponse).
pub mod event_item_response {

    /// A builder for [`EventItemResponse`](crate::model::EventItemResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) status_code: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>A custom message that's returned in the response as a result of processing the event.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>A custom message that's returned in the response as a result of processing the event.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The status code that's returned in the response as a result of processing the event. Possible values are: 202, for events that were accepted; and, 400, for events that weren't valid.</p>
        pub fn status_code(mut self, input: i32) -> Self {
            self.status_code = Some(input);
            self
        }
        /// <p>The status code that's returned in the response as a result of processing the event. Possible values are: 202, for events that were accepted; and, 400, for events that weren't valid.</p>
        pub fn set_status_code(mut self, input: std::option::Option<i32>) -> Self {
            self.status_code = input;
            self
        }
        /// Consumes the builder and constructs a [`EventItemResponse`](crate::model::EventItemResponse).
        pub fn build(self) -> crate::model::EventItemResponse {
            crate::model::EventItemResponse {
                message: self.message,
                status_code: self.status_code.unwrap_or_default(),
            }
        }
    }
}
impl EventItemResponse {
    /// Creates a new builder-style object to manufacture [`EventItemResponse`](crate::model::EventItemResponse).
    pub fn builder() -> crate::model::event_item_response::Builder {
        crate::model::event_item_response::Builder::default()
    }
}

/// <p>Provides the status code and message that result from processing data for an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointItemResponse {
    /// <p>The custom message that's returned in the response as a result of processing the endpoint data.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The status code that's returned in the response as a result of processing the endpoint data.</p>
    #[doc(hidden)]
    pub status_code: i32,
}
impl EndpointItemResponse {
    /// <p>The custom message that's returned in the response as a result of processing the endpoint data.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The status code that's returned in the response as a result of processing the endpoint data.</p>
    pub fn status_code(&self) -> i32 {
        self.status_code
    }
}
/// See [`EndpointItemResponse`](crate::model::EndpointItemResponse).
pub mod endpoint_item_response {

    /// A builder for [`EndpointItemResponse`](crate::model::EndpointItemResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) status_code: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The custom message that's returned in the response as a result of processing the endpoint data.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The custom message that's returned in the response as a result of processing the endpoint data.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The status code that's returned in the response as a result of processing the endpoint data.</p>
        pub fn status_code(mut self, input: i32) -> Self {
            self.status_code = Some(input);
            self
        }
        /// <p>The status code that's returned in the response as a result of processing the endpoint data.</p>
        pub fn set_status_code(mut self, input: std::option::Option<i32>) -> Self {
            self.status_code = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointItemResponse`](crate::model::EndpointItemResponse).
        pub fn build(self) -> crate::model::EndpointItemResponse {
            crate::model::EndpointItemResponse {
                message: self.message,
                status_code: self.status_code.unwrap_or_default(),
            }
        }
    }
}
impl EndpointItemResponse {
    /// Creates a new builder-style object to manufacture [`EndpointItemResponse`](crate::model::EndpointItemResponse).
    pub fn builder() -> crate::model::endpoint_item_response::Builder {
        crate::model::endpoint_item_response::Builder::default()
    }
}

/// <p>Specifies a batch of events to process.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventsRequest {
    /// <p>The batch of events to process. For each item in a batch, the endpoint ID acts as a key that has an EventsBatch object as its value.</p>
    #[doc(hidden)]
    pub batch_item: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::EventsBatch>,
    >,
}
impl EventsRequest {
    /// <p>The batch of events to process. For each item in a batch, the endpoint ID acts as a key that has an EventsBatch object as its value.</p>
    pub fn batch_item(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::EventsBatch>,
    > {
        self.batch_item.as_ref()
    }
}
/// See [`EventsRequest`](crate::model::EventsRequest).
pub mod events_request {

    /// A builder for [`EventsRequest`](crate::model::EventsRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) batch_item: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::EventsBatch>,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `batch_item`.
        ///
        /// To override the contents of this collection use [`set_batch_item`](Self::set_batch_item).
        ///
        /// <p>The batch of events to process. For each item in a batch, the endpoint ID acts as a key that has an EventsBatch object as its value.</p>
        pub fn batch_item(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::EventsBatch,
        ) -> Self {
            let mut hash_map = self.batch_item.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.batch_item = Some(hash_map);
            self
        }
        /// <p>The batch of events to process. For each item in a batch, the endpoint ID acts as a key that has an EventsBatch object as its value.</p>
        pub fn set_batch_item(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::EventsBatch>,
            >,
        ) -> Self {
            self.batch_item = input;
            self
        }
        /// Consumes the builder and constructs a [`EventsRequest`](crate::model::EventsRequest).
        pub fn build(self) -> crate::model::EventsRequest {
            crate::model::EventsRequest {
                batch_item: self.batch_item,
            }
        }
    }
}
impl EventsRequest {
    /// Creates a new builder-style object to manufacture [`EventsRequest`](crate::model::EventsRequest).
    pub fn builder() -> crate::model::events_request::Builder {
        crate::model::events_request::Builder::default()
    }
}

/// <p>Specifies a batch of endpoints and events to process.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EventsBatch {
    /// <p>A set of properties and attributes that are associated with the endpoint.</p>
    #[doc(hidden)]
    pub endpoint: std::option::Option<crate::model::PublicEndpoint>,
    /// <p>A set of properties that are associated with the event.</p>
    #[doc(hidden)]
    pub events:
        std::option::Option<std::collections::HashMap<std::string::String, crate::model::Event>>,
}
impl EventsBatch {
    /// <p>A set of properties and attributes that are associated with the endpoint.</p>
    pub fn endpoint(&self) -> std::option::Option<&crate::model::PublicEndpoint> {
        self.endpoint.as_ref()
    }
    /// <p>A set of properties that are associated with the event.</p>
    pub fn events(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, crate::model::Event>>
    {
        self.events.as_ref()
    }
}
/// See [`EventsBatch`](crate::model::EventsBatch).
pub mod events_batch {

    /// A builder for [`EventsBatch`](crate::model::EventsBatch).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) endpoint: std::option::Option<crate::model::PublicEndpoint>,
        pub(crate) events: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::Event>,
        >,
    }
    impl Builder {
        /// <p>A set of properties and attributes that are associated with the endpoint.</p>
        pub fn endpoint(mut self, input: crate::model::PublicEndpoint) -> Self {
            self.endpoint = Some(input);
            self
        }
        /// <p>A set of properties and attributes that are associated with the endpoint.</p>
        pub fn set_endpoint(
            mut self,
            input: std::option::Option<crate::model::PublicEndpoint>,
        ) -> Self {
            self.endpoint = input;
            self
        }
        /// Adds a key-value pair to `events`.
        ///
        /// To override the contents of this collection use [`set_events`](Self::set_events).
        ///
        /// <p>A set of properties that are associated with the event.</p>
        pub fn events(mut self, k: impl Into<std::string::String>, v: crate::model::Event) -> Self {
            let mut hash_map = self.events.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.events = Some(hash_map);
            self
        }
        /// <p>A set of properties that are associated with the event.</p>
        pub fn set_events(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::Event>,
            >,
        ) -> Self {
            self.events = input;
            self
        }
        /// Consumes the builder and constructs a [`EventsBatch`](crate::model::EventsBatch).
        pub fn build(self) -> crate::model::EventsBatch {
            crate::model::EventsBatch {
                endpoint: self.endpoint,
                events: self.events,
            }
        }
    }
}
impl EventsBatch {
    /// Creates a new builder-style object to manufacture [`EventsBatch`](crate::model::EventsBatch).
    pub fn builder() -> crate::model::events_batch::Builder {
        crate::model::events_batch::Builder::default()
    }
}

/// <p>Specifies information about an event that reports data to Amazon Pinpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Event {
    /// <p>The package name of the app that's recording the event.</p>
    #[doc(hidden)]
    pub app_package_name: std::option::Option<std::string::String>,
    /// <p>The title of the app that's recording the event.</p>
    #[doc(hidden)]
    pub app_title: std::option::Option<std::string::String>,
    /// <p>The version number of the app that's recording the event.</p>
    #[doc(hidden)]
    pub app_version_code: std::option::Option<std::string::String>,
    /// <p>One or more custom attributes that are associated with the event.</p>
    #[doc(hidden)]
    pub attributes:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The version of the SDK that's running on the client device.</p>
    #[doc(hidden)]
    pub client_sdk_version: std::option::Option<std::string::String>,
    /// <p>The name of the event.</p>
    #[doc(hidden)]
    pub event_type: std::option::Option<std::string::String>,
    /// <p>One or more custom metrics that are associated with the event.</p>
    #[doc(hidden)]
    pub metrics: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
    /// <p>The name of the SDK that's being used to record the event.</p>
    #[doc(hidden)]
    pub sdk_name: std::option::Option<std::string::String>,
    /// <p>Information about the session in which the event occurred.</p>
    #[doc(hidden)]
    pub session: std::option::Option<crate::model::Session>,
    /// <p>The date and time, in ISO 8601 format, when the event occurred.</p>
    #[doc(hidden)]
    pub timestamp: std::option::Option<std::string::String>,
}
impl Event {
    /// <p>The package name of the app that's recording the event.</p>
    pub fn app_package_name(&self) -> std::option::Option<&str> {
        self.app_package_name.as_deref()
    }
    /// <p>The title of the app that's recording the event.</p>
    pub fn app_title(&self) -> std::option::Option<&str> {
        self.app_title.as_deref()
    }
    /// <p>The version number of the app that's recording the event.</p>
    pub fn app_version_code(&self) -> std::option::Option<&str> {
        self.app_version_code.as_deref()
    }
    /// <p>One or more custom attributes that are associated with the event.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.attributes.as_ref()
    }
    /// <p>The version of the SDK that's running on the client device.</p>
    pub fn client_sdk_version(&self) -> std::option::Option<&str> {
        self.client_sdk_version.as_deref()
    }
    /// <p>The name of the event.</p>
    pub fn event_type(&self) -> std::option::Option<&str> {
        self.event_type.as_deref()
    }
    /// <p>One or more custom metrics that are associated with the event.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, f64>> {
        self.metrics.as_ref()
    }
    /// <p>The name of the SDK that's being used to record the event.</p>
    pub fn sdk_name(&self) -> std::option::Option<&str> {
        self.sdk_name.as_deref()
    }
    /// <p>Information about the session in which the event occurred.</p>
    pub fn session(&self) -> std::option::Option<&crate::model::Session> {
        self.session.as_ref()
    }
    /// <p>The date and time, in ISO 8601 format, when the event occurred.</p>
    pub fn timestamp(&self) -> std::option::Option<&str> {
        self.timestamp.as_deref()
    }
}
/// See [`Event`](crate::model::Event).
pub mod event {

    /// A builder for [`Event`](crate::model::Event).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) app_package_name: std::option::Option<std::string::String>,
        pub(crate) app_title: std::option::Option<std::string::String>,
        pub(crate) app_version_code: std::option::Option<std::string::String>,
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) client_sdk_version: std::option::Option<std::string::String>,
        pub(crate) event_type: std::option::Option<std::string::String>,
        pub(crate) metrics:
            std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        pub(crate) sdk_name: std::option::Option<std::string::String>,
        pub(crate) session: std::option::Option<crate::model::Session>,
        pub(crate) timestamp: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The package name of the app that's recording the event.</p>
        pub fn app_package_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.app_package_name = Some(input.into());
            self
        }
        /// <p>The package name of the app that's recording the event.</p>
        pub fn set_app_package_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.app_package_name = input;
            self
        }
        /// <p>The title of the app that's recording the event.</p>
        pub fn app_title(mut self, input: impl Into<std::string::String>) -> Self {
            self.app_title = Some(input.into());
            self
        }
        /// <p>The title of the app that's recording the event.</p>
        pub fn set_app_title(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.app_title = input;
            self
        }
        /// <p>The version number of the app that's recording the event.</p>
        pub fn app_version_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.app_version_code = Some(input.into());
            self
        }
        /// <p>The version number of the app that's recording the event.</p>
        pub fn set_app_version_code(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.app_version_code = input;
            self
        }
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>One or more custom attributes that are associated with the event.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes that are associated with the event.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The version of the SDK that's running on the client device.</p>
        pub fn client_sdk_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.client_sdk_version = Some(input.into());
            self
        }
        /// <p>The version of the SDK that's running on the client device.</p>
        pub fn set_client_sdk_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.client_sdk_version = input;
            self
        }
        /// <p>The name of the event.</p>
        pub fn event_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_type = Some(input.into());
            self
        }
        /// <p>The name of the event.</p>
        pub fn set_event_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.event_type = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>One or more custom metrics that are associated with the event.</p>
        pub fn metrics(mut self, k: impl Into<std::string::String>, v: f64) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.metrics = Some(hash_map);
            self
        }
        /// <p>One or more custom metrics that are associated with the event.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// <p>The name of the SDK that's being used to record the event.</p>
        pub fn sdk_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.sdk_name = Some(input.into());
            self
        }
        /// <p>The name of the SDK that's being used to record the event.</p>
        pub fn set_sdk_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.sdk_name = input;
            self
        }
        /// <p>Information about the session in which the event occurred.</p>
        pub fn session(mut self, input: crate::model::Session) -> Self {
            self.session = Some(input);
            self
        }
        /// <p>Information about the session in which the event occurred.</p>
        pub fn set_session(mut self, input: std::option::Option<crate::model::Session>) -> Self {
            self.session = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the event occurred.</p>
        pub fn timestamp(mut self, input: impl Into<std::string::String>) -> Self {
            self.timestamp = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the event occurred.</p>
        pub fn set_timestamp(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.timestamp = input;
            self
        }
        /// Consumes the builder and constructs a [`Event`](crate::model::Event).
        pub fn build(self) -> crate::model::Event {
            crate::model::Event {
                app_package_name: self.app_package_name,
                app_title: self.app_title,
                app_version_code: self.app_version_code,
                attributes: self.attributes,
                client_sdk_version: self.client_sdk_version,
                event_type: self.event_type,
                metrics: self.metrics,
                sdk_name: self.sdk_name,
                session: self.session,
                timestamp: self.timestamp,
            }
        }
    }
}
impl Event {
    /// Creates a new builder-style object to manufacture [`Event`](crate::model::Event).
    pub fn builder() -> crate::model::event::Builder {
        crate::model::event::Builder::default()
    }
}

/// <p>Provides information about a session.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Session {
    /// <p>The duration of the session, in milliseconds.</p>
    #[doc(hidden)]
    pub duration: i32,
    /// <p>The unique identifier for the session.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The date and time when the session began.</p>
    #[doc(hidden)]
    pub start_timestamp: std::option::Option<std::string::String>,
    /// <p>The date and time when the session ended.</p>
    #[doc(hidden)]
    pub stop_timestamp: std::option::Option<std::string::String>,
}
impl Session {
    /// <p>The duration of the session, in milliseconds.</p>
    pub fn duration(&self) -> i32 {
        self.duration
    }
    /// <p>The unique identifier for the session.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The date and time when the session began.</p>
    pub fn start_timestamp(&self) -> std::option::Option<&str> {
        self.start_timestamp.as_deref()
    }
    /// <p>The date and time when the session ended.</p>
    pub fn stop_timestamp(&self) -> std::option::Option<&str> {
        self.stop_timestamp.as_deref()
    }
}
/// See [`Session`](crate::model::Session).
pub mod session {

    /// A builder for [`Session`](crate::model::Session).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) duration: std::option::Option<i32>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) start_timestamp: std::option::Option<std::string::String>,
        pub(crate) stop_timestamp: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The duration of the session, in milliseconds.</p>
        pub fn duration(mut self, input: i32) -> Self {
            self.duration = Some(input);
            self
        }
        /// <p>The duration of the session, in milliseconds.</p>
        pub fn set_duration(mut self, input: std::option::Option<i32>) -> Self {
            self.duration = input;
            self
        }
        /// <p>The unique identifier for the session.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the session.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The date and time when the session began.</p>
        pub fn start_timestamp(mut self, input: impl Into<std::string::String>) -> Self {
            self.start_timestamp = Some(input.into());
            self
        }
        /// <p>The date and time when the session began.</p>
        pub fn set_start_timestamp(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.start_timestamp = input;
            self
        }
        /// <p>The date and time when the session ended.</p>
        pub fn stop_timestamp(mut self, input: impl Into<std::string::String>) -> Self {
            self.stop_timestamp = Some(input.into());
            self
        }
        /// <p>The date and time when the session ended.</p>
        pub fn set_stop_timestamp(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.stop_timestamp = input;
            self
        }
        /// Consumes the builder and constructs a [`Session`](crate::model::Session).
        pub fn build(self) -> crate::model::Session {
            crate::model::Session {
                duration: self.duration.unwrap_or_default(),
                id: self.id,
                start_timestamp: self.start_timestamp,
                stop_timestamp: self.stop_timestamp,
            }
        }
    }
}
impl Session {
    /// Creates a new builder-style object to manufacture [`Session`](crate::model::Session).
    pub fn builder() -> crate::model::session::Builder {
        crate::model::session::Builder::default()
    }
}

/// <p>Specifies the properties and attributes of an endpoint that's associated with an event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PublicEndpoint {
    /// <p>The unique identifier for the recipient, such as a device token, email address, or mobile phone number.</p>
    #[doc(hidden)]
    pub address: std::option::Option<std::string::String>,
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. You can use these attributes as filter criteria when you create segments.</p>
    #[doc(hidden)]
    pub attributes: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
    #[doc(hidden)]
    pub channel_type: std::option::Option<crate::model::ChannelType>,
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    #[doc(hidden)]
    pub demographic: std::option::Option<crate::model::EndpointDemographic>,
    /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
    #[doc(hidden)]
    pub effective_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    #[doc(hidden)]
    pub endpoint_status: std::option::Option<std::string::String>,
    /// <p>The geographic information for the endpoint.</p>
    #[doc(hidden)]
    pub location: std::option::Option<crate::model::EndpointLocation>,
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    #[doc(hidden)]
    pub metrics: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    #[doc(hidden)]
    pub opt_out: std::option::Option<std::string::String>,
    /// <p>A unique identifier that's generated each time the endpoint is updated.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
    #[doc(hidden)]
    pub user: std::option::Option<crate::model::EndpointUser>,
}
impl PublicEndpoint {
    /// <p>The unique identifier for the recipient, such as a device token, email address, or mobile phone number.</p>
    pub fn address(&self) -> std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. You can use these attributes as filter criteria when you create segments.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.attributes.as_ref()
    }
    /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
    pub fn channel_type(&self) -> std::option::Option<&crate::model::ChannelType> {
        self.channel_type.as_ref()
    }
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    pub fn demographic(&self) -> std::option::Option<&crate::model::EndpointDemographic> {
        self.demographic.as_ref()
    }
    /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
    pub fn effective_date(&self) -> std::option::Option<&str> {
        self.effective_date.as_deref()
    }
    /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    pub fn endpoint_status(&self) -> std::option::Option<&str> {
        self.endpoint_status.as_deref()
    }
    /// <p>The geographic information for the endpoint.</p>
    pub fn location(&self) -> std::option::Option<&crate::model::EndpointLocation> {
        self.location.as_ref()
    }
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, f64>> {
        self.metrics.as_ref()
    }
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    pub fn opt_out(&self) -> std::option::Option<&str> {
        self.opt_out.as_deref()
    }
    /// <p>A unique identifier that's generated each time the endpoint is updated.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
    pub fn user(&self) -> std::option::Option<&crate::model::EndpointUser> {
        self.user.as_ref()
    }
}
/// See [`PublicEndpoint`](crate::model::PublicEndpoint).
pub mod public_endpoint {

    /// A builder for [`PublicEndpoint`](crate::model::PublicEndpoint).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) address: std::option::Option<std::string::String>,
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) channel_type: std::option::Option<crate::model::ChannelType>,
        pub(crate) demographic: std::option::Option<crate::model::EndpointDemographic>,
        pub(crate) effective_date: std::option::Option<std::string::String>,
        pub(crate) endpoint_status: std::option::Option<std::string::String>,
        pub(crate) location: std::option::Option<crate::model::EndpointLocation>,
        pub(crate) metrics:
            std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        pub(crate) opt_out: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
        pub(crate) user: std::option::Option<crate::model::EndpointUser>,
    }
    impl Builder {
        /// <p>The unique identifier for the recipient, such as a device token, email address, or mobile phone number.</p>
        pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
            self.address = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recipient, such as a device token, email address, or mobile phone number.</p>
        pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.address = input;
            self
        }
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. You can use these attributes as filter criteria when you create segments.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. You can use these attributes as filter criteria when you create segments.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
        pub fn channel_type(mut self, input: crate::model::ChannelType) -> Self {
            self.channel_type = Some(input);
            self
        }
        /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
        pub fn set_channel_type(
            mut self,
            input: std::option::Option<crate::model::ChannelType>,
        ) -> Self {
            self.channel_type = input;
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn demographic(mut self, input: crate::model::EndpointDemographic) -> Self {
            self.demographic = Some(input);
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn set_demographic(
            mut self,
            input: std::option::Option<crate::model::EndpointDemographic>,
        ) -> Self {
            self.demographic = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
        pub fn effective_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.effective_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
        pub fn set_effective_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.effective_date = input;
            self
        }
        /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn endpoint_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.endpoint_status = Some(input.into());
            self
        }
        /// <p>Specifies whether to send messages or push notifications to the endpoint. Valid values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn set_endpoint_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.endpoint_status = input;
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn location(mut self, input: crate::model::EndpointLocation) -> Self {
            self.location = Some(input);
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn set_location(
            mut self,
            input: std::option::Option<crate::model::EndpointLocation>,
        ) -> Self {
            self.location = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn metrics(mut self, k: impl Into<std::string::String>, v: f64) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.metrics = Some(hash_map);
            self
        }
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn opt_out(mut self, input: impl Into<std::string::String>) -> Self {
            self.opt_out = Some(input.into());
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn set_opt_out(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.opt_out = input;
            self
        }
        /// <p>A unique identifier that's generated each time the endpoint is updated.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>A unique identifier that's generated each time the endpoint is updated.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
        pub fn user(mut self, input: crate::model::EndpointUser) -> Self {
            self.user = Some(input);
            self
        }
        /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
        pub fn set_user(mut self, input: std::option::Option<crate::model::EndpointUser>) -> Self {
            self.user = input;
            self
        }
        /// Consumes the builder and constructs a [`PublicEndpoint`](crate::model::PublicEndpoint).
        pub fn build(self) -> crate::model::PublicEndpoint {
            crate::model::PublicEndpoint {
                address: self.address,
                attributes: self.attributes,
                channel_type: self.channel_type,
                demographic: self.demographic,
                effective_date: self.effective_date,
                endpoint_status: self.endpoint_status,
                location: self.location,
                metrics: self.metrics,
                opt_out: self.opt_out,
                request_id: self.request_id,
                user: self.user,
            }
        }
    }
}
impl PublicEndpoint {
    /// Creates a new builder-style object to manufacture [`PublicEndpoint`](crate::model::PublicEndpoint).
    pub fn builder() -> crate::model::public_endpoint::Builder {
        crate::model::public_endpoint::Builder::default()
    }
}

/// <p>Provides information about a phone number.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NumberValidateResponse {
    /// <p>The carrier or service provider that the phone number is currently registered with. In some countries and regions, this value may be the carrier or service provider that the phone number was originally registered with.</p>
    #[doc(hidden)]
    pub carrier: std::option::Option<std::string::String>,
    /// <p>The name of the city where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub city: std::option::Option<std::string::String>,
    /// <p>The cleansed phone number, in E.164 format, for the location where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub cleansed_phone_number_e164: std::option::Option<std::string::String>,
    /// <p>The cleansed phone number, in the format for the location where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub cleansed_phone_number_national: std::option::Option<std::string::String>,
    /// <p>The name of the country or region where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub country: std::option::Option<std::string::String>,
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub country_code_iso2: std::option::Option<std::string::String>,
    /// <p>The numeric code for the country or region where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub country_code_numeric: std::option::Option<std::string::String>,
    /// <p>The name of the county where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub county: std::option::Option<std::string::String>,
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, that was sent in the request body.</p>
    #[doc(hidden)]
    pub original_country_code_iso2: std::option::Option<std::string::String>,
    /// <p>The phone number that was sent in the request body.</p>
    #[doc(hidden)]
    pub original_phone_number: std::option::Option<std::string::String>,
    /// <p>The description of the phone type. Valid values are: MOBILE, LANDLINE, VOIP, INVALID, PREPAID, and OTHER.</p>
    #[doc(hidden)]
    pub phone_type: std::option::Option<std::string::String>,
    /// <p>The phone type, represented by an integer. Valid values are: 0 (mobile), 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).</p>
    #[doc(hidden)]
    pub phone_type_code: i32,
    /// <p>The time zone for the location where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub timezone: std::option::Option<std::string::String>,
    /// <p>The postal or ZIP code for the location where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub zip_code: std::option::Option<std::string::String>,
}
impl NumberValidateResponse {
    /// <p>The carrier or service provider that the phone number is currently registered with. In some countries and regions, this value may be the carrier or service provider that the phone number was originally registered with.</p>
    pub fn carrier(&self) -> std::option::Option<&str> {
        self.carrier.as_deref()
    }
    /// <p>The name of the city where the phone number was originally registered.</p>
    pub fn city(&self) -> std::option::Option<&str> {
        self.city.as_deref()
    }
    /// <p>The cleansed phone number, in E.164 format, for the location where the phone number was originally registered.</p>
    pub fn cleansed_phone_number_e164(&self) -> std::option::Option<&str> {
        self.cleansed_phone_number_e164.as_deref()
    }
    /// <p>The cleansed phone number, in the format for the location where the phone number was originally registered.</p>
    pub fn cleansed_phone_number_national(&self) -> std::option::Option<&str> {
        self.cleansed_phone_number_national.as_deref()
    }
    /// <p>The name of the country or region where the phone number was originally registered.</p>
    pub fn country(&self) -> std::option::Option<&str> {
        self.country.as_deref()
    }
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
    pub fn country_code_iso2(&self) -> std::option::Option<&str> {
        self.country_code_iso2.as_deref()
    }
    /// <p>The numeric code for the country or region where the phone number was originally registered.</p>
    pub fn country_code_numeric(&self) -> std::option::Option<&str> {
        self.country_code_numeric.as_deref()
    }
    /// <p>The name of the county where the phone number was originally registered.</p>
    pub fn county(&self) -> std::option::Option<&str> {
        self.county.as_deref()
    }
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, that was sent in the request body.</p>
    pub fn original_country_code_iso2(&self) -> std::option::Option<&str> {
        self.original_country_code_iso2.as_deref()
    }
    /// <p>The phone number that was sent in the request body.</p>
    pub fn original_phone_number(&self) -> std::option::Option<&str> {
        self.original_phone_number.as_deref()
    }
    /// <p>The description of the phone type. Valid values are: MOBILE, LANDLINE, VOIP, INVALID, PREPAID, and OTHER.</p>
    pub fn phone_type(&self) -> std::option::Option<&str> {
        self.phone_type.as_deref()
    }
    /// <p>The phone type, represented by an integer. Valid values are: 0 (mobile), 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).</p>
    pub fn phone_type_code(&self) -> i32 {
        self.phone_type_code
    }
    /// <p>The time zone for the location where the phone number was originally registered.</p>
    pub fn timezone(&self) -> std::option::Option<&str> {
        self.timezone.as_deref()
    }
    /// <p>The postal or ZIP code for the location where the phone number was originally registered.</p>
    pub fn zip_code(&self) -> std::option::Option<&str> {
        self.zip_code.as_deref()
    }
}
/// See [`NumberValidateResponse`](crate::model::NumberValidateResponse).
pub mod number_validate_response {

    /// A builder for [`NumberValidateResponse`](crate::model::NumberValidateResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) carrier: std::option::Option<std::string::String>,
        pub(crate) city: std::option::Option<std::string::String>,
        pub(crate) cleansed_phone_number_e164: std::option::Option<std::string::String>,
        pub(crate) cleansed_phone_number_national: std::option::Option<std::string::String>,
        pub(crate) country: std::option::Option<std::string::String>,
        pub(crate) country_code_iso2: std::option::Option<std::string::String>,
        pub(crate) country_code_numeric: std::option::Option<std::string::String>,
        pub(crate) county: std::option::Option<std::string::String>,
        pub(crate) original_country_code_iso2: std::option::Option<std::string::String>,
        pub(crate) original_phone_number: std::option::Option<std::string::String>,
        pub(crate) phone_type: std::option::Option<std::string::String>,
        pub(crate) phone_type_code: std::option::Option<i32>,
        pub(crate) timezone: std::option::Option<std::string::String>,
        pub(crate) zip_code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The carrier or service provider that the phone number is currently registered with. In some countries and regions, this value may be the carrier or service provider that the phone number was originally registered with.</p>
        pub fn carrier(mut self, input: impl Into<std::string::String>) -> Self {
            self.carrier = Some(input.into());
            self
        }
        /// <p>The carrier or service provider that the phone number is currently registered with. In some countries and regions, this value may be the carrier or service provider that the phone number was originally registered with.</p>
        pub fn set_carrier(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.carrier = input;
            self
        }
        /// <p>The name of the city where the phone number was originally registered.</p>
        pub fn city(mut self, input: impl Into<std::string::String>) -> Self {
            self.city = Some(input.into());
            self
        }
        /// <p>The name of the city where the phone number was originally registered.</p>
        pub fn set_city(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.city = input;
            self
        }
        /// <p>The cleansed phone number, in E.164 format, for the location where the phone number was originally registered.</p>
        pub fn cleansed_phone_number_e164(mut self, input: impl Into<std::string::String>) -> Self {
            self.cleansed_phone_number_e164 = Some(input.into());
            self
        }
        /// <p>The cleansed phone number, in E.164 format, for the location where the phone number was originally registered.</p>
        pub fn set_cleansed_phone_number_e164(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cleansed_phone_number_e164 = input;
            self
        }
        /// <p>The cleansed phone number, in the format for the location where the phone number was originally registered.</p>
        pub fn cleansed_phone_number_national(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.cleansed_phone_number_national = Some(input.into());
            self
        }
        /// <p>The cleansed phone number, in the format for the location where the phone number was originally registered.</p>
        pub fn set_cleansed_phone_number_national(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.cleansed_phone_number_national = input;
            self
        }
        /// <p>The name of the country or region where the phone number was originally registered.</p>
        pub fn country(mut self, input: impl Into<std::string::String>) -> Self {
            self.country = Some(input.into());
            self
        }
        /// <p>The name of the country or region where the phone number was originally registered.</p>
        pub fn set_country(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.country = input;
            self
        }
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
        pub fn country_code_iso2(mut self, input: impl Into<std::string::String>) -> Self {
            self.country_code_iso2 = Some(input.into());
            self
        }
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
        pub fn set_country_code_iso2(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.country_code_iso2 = input;
            self
        }
        /// <p>The numeric code for the country or region where the phone number was originally registered.</p>
        pub fn country_code_numeric(mut self, input: impl Into<std::string::String>) -> Self {
            self.country_code_numeric = Some(input.into());
            self
        }
        /// <p>The numeric code for the country or region where the phone number was originally registered.</p>
        pub fn set_country_code_numeric(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.country_code_numeric = input;
            self
        }
        /// <p>The name of the county where the phone number was originally registered.</p>
        pub fn county(mut self, input: impl Into<std::string::String>) -> Self {
            self.county = Some(input.into());
            self
        }
        /// <p>The name of the county where the phone number was originally registered.</p>
        pub fn set_county(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.county = input;
            self
        }
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, that was sent in the request body.</p>
        pub fn original_country_code_iso2(mut self, input: impl Into<std::string::String>) -> Self {
            self.original_country_code_iso2 = Some(input.into());
            self
        }
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, that was sent in the request body.</p>
        pub fn set_original_country_code_iso2(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.original_country_code_iso2 = input;
            self
        }
        /// <p>The phone number that was sent in the request body.</p>
        pub fn original_phone_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.original_phone_number = Some(input.into());
            self
        }
        /// <p>The phone number that was sent in the request body.</p>
        pub fn set_original_phone_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.original_phone_number = input;
            self
        }
        /// <p>The description of the phone type. Valid values are: MOBILE, LANDLINE, VOIP, INVALID, PREPAID, and OTHER.</p>
        pub fn phone_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.phone_type = Some(input.into());
            self
        }
        /// <p>The description of the phone type. Valid values are: MOBILE, LANDLINE, VOIP, INVALID, PREPAID, and OTHER.</p>
        pub fn set_phone_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.phone_type = input;
            self
        }
        /// <p>The phone type, represented by an integer. Valid values are: 0 (mobile), 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).</p>
        pub fn phone_type_code(mut self, input: i32) -> Self {
            self.phone_type_code = Some(input);
            self
        }
        /// <p>The phone type, represented by an integer. Valid values are: 0 (mobile), 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).</p>
        pub fn set_phone_type_code(mut self, input: std::option::Option<i32>) -> Self {
            self.phone_type_code = input;
            self
        }
        /// <p>The time zone for the location where the phone number was originally registered.</p>
        pub fn timezone(mut self, input: impl Into<std::string::String>) -> Self {
            self.timezone = Some(input.into());
            self
        }
        /// <p>The time zone for the location where the phone number was originally registered.</p>
        pub fn set_timezone(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.timezone = input;
            self
        }
        /// <p>The postal or ZIP code for the location where the phone number was originally registered.</p>
        pub fn zip_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.zip_code = Some(input.into());
            self
        }
        /// <p>The postal or ZIP code for the location where the phone number was originally registered.</p>
        pub fn set_zip_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.zip_code = input;
            self
        }
        /// Consumes the builder and constructs a [`NumberValidateResponse`](crate::model::NumberValidateResponse).
        pub fn build(self) -> crate::model::NumberValidateResponse {
            crate::model::NumberValidateResponse {
                carrier: self.carrier,
                city: self.city,
                cleansed_phone_number_e164: self.cleansed_phone_number_e164,
                cleansed_phone_number_national: self.cleansed_phone_number_national,
                country: self.country,
                country_code_iso2: self.country_code_iso2,
                country_code_numeric: self.country_code_numeric,
                county: self.county,
                original_country_code_iso2: self.original_country_code_iso2,
                original_phone_number: self.original_phone_number,
                phone_type: self.phone_type,
                phone_type_code: self.phone_type_code.unwrap_or_default(),
                timezone: self.timezone,
                zip_code: self.zip_code,
            }
        }
    }
}
impl NumberValidateResponse {
    /// Creates a new builder-style object to manufacture [`NumberValidateResponse`](crate::model::NumberValidateResponse).
    pub fn builder() -> crate::model::number_validate_response::Builder {
        crate::model::number_validate_response::Builder::default()
    }
}

/// <p>Specifies a phone number to validate and retrieve information about.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NumberValidateRequest {
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
    #[doc(hidden)]
    pub iso_country_code: std::option::Option<std::string::String>,
    /// <p>The phone number to retrieve information about. The phone number that you provide should include a valid numeric country code. Otherwise, the operation might result in an error.</p>
    #[doc(hidden)]
    pub phone_number: std::option::Option<std::string::String>,
}
impl NumberValidateRequest {
    /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
    pub fn iso_country_code(&self) -> std::option::Option<&str> {
        self.iso_country_code.as_deref()
    }
    /// <p>The phone number to retrieve information about. The phone number that you provide should include a valid numeric country code. Otherwise, the operation might result in an error.</p>
    pub fn phone_number(&self) -> std::option::Option<&str> {
        self.phone_number.as_deref()
    }
}
/// See [`NumberValidateRequest`](crate::model::NumberValidateRequest).
pub mod number_validate_request {

    /// A builder for [`NumberValidateRequest`](crate::model::NumberValidateRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) iso_country_code: std::option::Option<std::string::String>,
        pub(crate) phone_number: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
        pub fn iso_country_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.iso_country_code = Some(input.into());
            self
        }
        /// <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or region where the phone number was originally registered.</p>
        pub fn set_iso_country_code(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.iso_country_code = input;
            self
        }
        /// <p>The phone number to retrieve information about. The phone number that you provide should include a valid numeric country code. Otherwise, the operation might result in an error.</p>
        pub fn phone_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.phone_number = Some(input.into());
            self
        }
        /// <p>The phone number to retrieve information about. The phone number that you provide should include a valid numeric country code. Otherwise, the operation might result in an error.</p>
        pub fn set_phone_number(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.phone_number = input;
            self
        }
        /// Consumes the builder and constructs a [`NumberValidateRequest`](crate::model::NumberValidateRequest).
        pub fn build(self) -> crate::model::NumberValidateRequest {
            crate::model::NumberValidateRequest {
                iso_country_code: self.iso_country_code,
                phone_number: self.phone_number,
            }
        }
    }
}
impl NumberValidateRequest {
    /// Creates a new builder-style object to manufacture [`NumberValidateRequest`](crate::model::NumberValidateRequest).
    pub fn builder() -> crate::model::number_validate_request::Builder {
        crate::model::number_validate_request::Builder::default()
    }
}

/// <p>Provides information about all the versions of a specific message template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateVersionsResponse {
    /// <p>An array of responses, one for each version of the message template.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::TemplateVersionResponse>>,
    /// <p>The message that's returned from the API for the request to retrieve information about all the versions of the message template.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the request to retrieve information about all the versions of the message template.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
}
impl TemplateVersionsResponse {
    /// <p>An array of responses, one for each version of the message template.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::TemplateVersionResponse]> {
        self.item.as_deref()
    }
    /// <p>The message that's returned from the API for the request to retrieve information about all the versions of the message template.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The unique identifier for the request to retrieve information about all the versions of the message template.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
}
/// See [`TemplateVersionsResponse`](crate::model::TemplateVersionsResponse).
pub mod template_versions_response {

    /// A builder for [`TemplateVersionsResponse`](crate::model::TemplateVersionsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::TemplateVersionResponse>>,
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) next_token: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each version of the message template.</p>
        pub fn item(mut self, input: crate::model::TemplateVersionResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each version of the message template.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TemplateVersionResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The message that's returned from the API for the request to retrieve information about all the versions of the message template.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message that's returned from the API for the request to retrieve information about all the versions of the message template.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// <p>The unique identifier for the request to retrieve information about all the versions of the message template.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the request to retrieve information about all the versions of the message template.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TemplateVersionsResponse`](crate::model::TemplateVersionsResponse).
        pub fn build(self) -> crate::model::TemplateVersionsResponse {
            crate::model::TemplateVersionsResponse {
                item: self.item,
                message: self.message,
                next_token: self.next_token,
                request_id: self.request_id,
            }
        }
    }
}
impl TemplateVersionsResponse {
    /// Creates a new builder-style object to manufacture [`TemplateVersionsResponse`](crate::model::TemplateVersionsResponse).
    pub fn builder() -> crate::model::template_versions_response::Builder {
        crate::model::template_versions_response::Builder::default()
    }
}

/// <p>Provides information about a specific version of a message template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateVersionResponse {
    /// <p>The date, in ISO 8601 format, when the version of the message template was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>A JSON object that specifies the default values that are used for message variables in the version of the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the version of the message template was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The custom description of the version of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
    #[doc(hidden)]
    pub template_type: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the version of the message template. This value is an integer that Amazon Pinpoint automatically increments and assigns to each new version of a template.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl TemplateVersionResponse {
    /// <p>The date, in ISO 8601 format, when the version of the message template was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>A JSON object that specifies the default values that are used for message variables in the version of the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the version of the message template was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The custom description of the version of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
    pub fn template_type(&self) -> std::option::Option<&str> {
        self.template_type.as_deref()
    }
    /// <p>The unique identifier for the version of the message template. This value is an integer that Amazon Pinpoint automatically increments and assigns to each new version of a template.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`TemplateVersionResponse`](crate::model::TemplateVersionResponse).
pub mod template_version_response {

    /// A builder for [`TemplateVersionResponse`](crate::model::TemplateVersionResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_type: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The date, in ISO 8601 format, when the version of the message template was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the version of the message template was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>A JSON object that specifies the default values that are used for message variables in the version of the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>A JSON object that specifies the default values that are used for message variables in the version of the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the version of the message template was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the version of the message template was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The custom description of the version of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The custom description of the version of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
        pub fn template_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_type = Some(input.into());
            self
        }
        /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
        pub fn set_template_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_type = input;
            self
        }
        /// <p>The unique identifier for the version of the message template. This value is an integer that Amazon Pinpoint automatically increments and assigns to each new version of a template.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The unique identifier for the version of the message template. This value is an integer that Amazon Pinpoint automatically increments and assigns to each new version of a template.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`TemplateVersionResponse`](crate::model::TemplateVersionResponse).
        pub fn build(self) -> crate::model::TemplateVersionResponse {
            crate::model::TemplateVersionResponse {
                creation_date: self.creation_date,
                default_substitutions: self.default_substitutions,
                last_modified_date: self.last_modified_date,
                template_description: self.template_description,
                template_name: self.template_name,
                template_type: self.template_type,
                version: self.version,
            }
        }
    }
}
impl TemplateVersionResponse {
    /// Creates a new builder-style object to manufacture [`TemplateVersionResponse`](crate::model::TemplateVersionResponse).
    pub fn builder() -> crate::model::template_version_response::Builder {
        crate::model::template_version_response::Builder::default()
    }
}

/// <p>Provides information about all the message templates that are associated with your Amazon Pinpoint account.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplatesResponse {
    /// <p>An array of responses, one for each message template that's associated with your Amazon Pinpoint account and meets any filter criteria that you specified in the request.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::TemplateResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl TemplatesResponse {
    /// <p>An array of responses, one for each message template that's associated with your Amazon Pinpoint account and meets any filter criteria that you specified in the request.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::TemplateResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`TemplatesResponse`](crate::model::TemplatesResponse).
pub mod templates_response {

    /// A builder for [`TemplatesResponse`](crate::model::TemplatesResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::TemplateResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each message template that's associated with your Amazon Pinpoint account and meets any filter criteria that you specified in the request.</p>
        pub fn item(mut self, input: crate::model::TemplateResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each message template that's associated with your Amazon Pinpoint account and meets any filter criteria that you specified in the request.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TemplateResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`TemplatesResponse`](crate::model::TemplatesResponse).
        pub fn build(self) -> crate::model::TemplatesResponse {
            crate::model::TemplatesResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl TemplatesResponse {
    /// Creates a new builder-style object to manufacture [`TemplatesResponse`](crate::model::TemplatesResponse).
    pub fn builder() -> crate::model::templates_response::Builder {
        crate::model::templates_response::Builder::default()
    }
}

/// <p>Provides information about a message template that's associated with your Amazon Pinpoint account.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template. This value isn't included in a TemplateResponse object. To retrieve the ARN of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the ARN for.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>A map of key-value pairs that identifies the tags that are associated with the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The custom description of the message template. This value isn't included in a TemplateResponse object. To retrieve the description of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the description for.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
    #[doc(hidden)]
    pub template_type: std::option::Option<crate::model::TemplateType>,
    /// <p>The unique identifier, as an integer, for the active version of the message template.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl TemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template. This value isn't included in a TemplateResponse object. To retrieve the ARN of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the ARN for.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>A map of key-value pairs that identifies the tags that are associated with the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The custom description of the message template. This value isn't included in a TemplateResponse object. To retrieve the description of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the description for.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
    pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
        self.template_type.as_ref()
    }
    /// <p>The unique identifier, as an integer, for the active version of the message template.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`TemplateResponse`](crate::model::TemplateResponse).
pub mod template_response {

    /// A builder for [`TemplateResponse`](crate::model::TemplateResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the message template. This value isn't included in a TemplateResponse object. To retrieve the ARN of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the ARN for.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template. This value isn't included in a TemplateResponse object. To retrieve the ARN of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the ARN for.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A map of key-value pairs that identifies the tags that are associated with the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A map of key-value pairs that identifies the tags that are associated with the message template. This object isn't included in a TemplateResponse object. To retrieve this object for a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the object for.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The custom description of the message template. This value isn't included in a TemplateResponse object. To retrieve the description of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the description for.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The custom description of the message template. This value isn't included in a TemplateResponse object. To retrieve the description of a template, use the GetEmailTemplate, GetPushTemplate, GetSmsTemplate, or GetVoiceTemplate operation, depending on the type of template that you want to retrieve the description for.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
        pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
            self.template_type = Some(input);
            self
        }
        /// <p>The type of channel that the message template is designed for. Possible values are: EMAIL, PUSH, SMS, and VOICE.</p>
        pub fn set_template_type(
            mut self,
            input: std::option::Option<crate::model::TemplateType>,
        ) -> Self {
            self.template_type = input;
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`TemplateResponse`](crate::model::TemplateResponse).
        pub fn build(self) -> crate::model::TemplateResponse {
            crate::model::TemplateResponse {
                arn: self.arn,
                creation_date: self.creation_date,
                default_substitutions: self.default_substitutions,
                last_modified_date: self.last_modified_date,
                tags: self.tags,
                template_description: self.template_description,
                template_name: self.template_name,
                template_type: self.template_type,
                version: self.version,
            }
        }
    }
}
impl TemplateResponse {
    /// Creates a new builder-style object to manufacture [`TemplateResponse`](crate::model::TemplateResponse).
    pub fn builder() -> crate::model::template_response::Builder {
        crate::model::template_response::Builder::default()
    }
}

/// When writing a match expression against `TemplateType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let templatetype = unimplemented!();
/// match templatetype {
///     TemplateType::Email => { /* ... */ },
///     TemplateType::Inapp => { /* ... */ },
///     TemplateType::Push => { /* ... */ },
///     TemplateType::Sms => { /* ... */ },
///     TemplateType::Voice => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `templatetype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TemplateType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TemplateType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TemplateType::NewFeature` is defined.
/// Specifically, when `templatetype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TemplateType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum TemplateType {
    #[allow(missing_docs)] // documentation missing in model
    Email,
    #[allow(missing_docs)] // documentation missing in model
    Inapp,
    #[allow(missing_docs)] // documentation missing in model
    Push,
    #[allow(missing_docs)] // documentation missing in model
    Sms,
    #[allow(missing_docs)] // documentation missing in model
    Voice,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TemplateType {
    fn from(s: &str) -> Self {
        match s {
            "EMAIL" => TemplateType::Email,
            "INAPP" => TemplateType::Inapp,
            "PUSH" => TemplateType::Push,
            "SMS" => TemplateType::Sms,
            "VOICE" => TemplateType::Voice,
            other => TemplateType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for TemplateType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TemplateType::from(s))
    }
}
impl TemplateType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TemplateType::Email => "EMAIL",
            TemplateType::Inapp => "INAPP",
            TemplateType::Push => "PUSH",
            TemplateType::Sms => "SMS",
            TemplateType::Voice => "VOICE",
            TemplateType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &["EMAIL", "INAPP", "PUSH", "SMS", "VOICE"]
    }
}
impl AsRef<str> for TemplateType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Provides information about the status, configuration, and other settings for all the journeys that are associated with an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneysResponse {
    /// <p>An array of responses, one for each journey that's associated with the application.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::JourneyResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl JourneysResponse {
    /// <p>An array of responses, one for each journey that's associated with the application.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::JourneyResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`JourneysResponse`](crate::model::JourneysResponse).
pub mod journeys_response {

    /// A builder for [`JourneysResponse`](crate::model::JourneysResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::JourneyResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each journey that's associated with the application.</p>
        pub fn item(mut self, input: crate::model::JourneyResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each journey that's associated with the application.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::JourneyResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneysResponse`](crate::model::JourneysResponse).
        pub fn build(self) -> crate::model::JourneysResponse {
            crate::model::JourneysResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl JourneysResponse {
    /// Creates a new builder-style object to manufacture [`JourneysResponse`](crate::model::JourneysResponse).
    pub fn builder() -> crate::model::journeys_response::Builder {
        crate::model::journeys_response::Builder::default()
    }
}

/// <p>Provides information about the content and settings for a message template that can be used in messages that are sent through the voice channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VoiceTemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    #[doc(hidden)]
    pub language_code: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
    #[doc(hidden)]
    pub template_type: std::option::Option<crate::model::TemplateType>,
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
    /// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    #[doc(hidden)]
    pub voice_id: std::option::Option<std::string::String>,
}
impl VoiceTemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    pub fn language_code(&self) -> std::option::Option<&str> {
        self.language_code.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
    pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
        self.template_type.as_ref()
    }
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
    /// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
    pub fn voice_id(&self) -> std::option::Option<&str> {
        self.voice_id.as_deref()
    }
}
/// See [`VoiceTemplateResponse`](crate::model::VoiceTemplateResponse).
pub mod voice_template_response {

    /// A builder for [`VoiceTemplateResponse`](crate::model::VoiceTemplateResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) language_code: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
        pub(crate) version: std::option::Option<std::string::String>,
        pub(crate) voice_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The text of the script that's used in messages that are based on the message template, in plain text format.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn language_code(mut self, input: impl Into<std::string::String>) -> Self {
            self.language_code = Some(input.into());
            self
        }
        /// <p>The code for the language that's used when synthesizing the text of the script in messages that are based on the message template. For a list of supported languages and the code for each one, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn set_language_code(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.language_code = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
        pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
            self.template_type = Some(input);
            self
        }
        /// <p>The type of channel that the message template is designed for. For a voice template, this value is VOICE.</p>
        pub fn set_template_type(
            mut self,
            input: std::option::Option<crate::model::TemplateType>,
        ) -> Self {
            self.template_type = input;
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn voice_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.voice_id = Some(input.into());
            self
        }
        /// <p>The name of the voice that's used when delivering messages that are based on the message template. For a list of supported voices, see the <a href="https://docs.aws.amazon.com/polly/latest/dg/what-is.html">Amazon Polly Developer Guide</a>.</p>
        pub fn set_voice_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.voice_id = input;
            self
        }
        /// Consumes the builder and constructs a [`VoiceTemplateResponse`](crate::model::VoiceTemplateResponse).
        pub fn build(self) -> crate::model::VoiceTemplateResponse {
            crate::model::VoiceTemplateResponse {
                arn: self.arn,
                body: self.body,
                creation_date: self.creation_date,
                default_substitutions: self.default_substitutions,
                language_code: self.language_code,
                last_modified_date: self.last_modified_date,
                tags: self.tags,
                template_description: self.template_description,
                template_name: self.template_name,
                template_type: self.template_type,
                version: self.version,
                voice_id: self.voice_id,
            }
        }
    }
}
impl VoiceTemplateResponse {
    /// Creates a new builder-style object to manufacture [`VoiceTemplateResponse`](crate::model::VoiceTemplateResponse).
    pub fn builder() -> crate::model::voice_template_response::Builder {
        crate::model::voice_template_response::Builder::default()
    }
}

/// <p>Provides information about all the endpoints that are associated with a user ID.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointsResponse {
    /// <p>An array of responses, one for each endpoint that's associated with the user ID.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::EndpointResponse>>,
}
impl EndpointsResponse {
    /// <p>An array of responses, one for each endpoint that's associated with the user ID.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::EndpointResponse]> {
        self.item.as_deref()
    }
}
/// See [`EndpointsResponse`](crate::model::EndpointsResponse).
pub mod endpoints_response {

    /// A builder for [`EndpointsResponse`](crate::model::EndpointsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::EndpointResponse>>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each endpoint that's associated with the user ID.</p>
        pub fn item(mut self, input: crate::model::EndpointResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each endpoint that's associated with the user ID.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::EndpointResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointsResponse`](crate::model::EndpointsResponse).
        pub fn build(self) -> crate::model::EndpointsResponse {
            crate::model::EndpointsResponse { item: self.item }
        }
    }
}
impl EndpointsResponse {
    /// Creates a new builder-style object to manufacture [`EndpointsResponse`](crate::model::EndpointsResponse).
    pub fn builder() -> crate::model::endpoints_response::Builder {
        crate::model::endpoints_response::Builder::default()
    }
}

/// <p>Provides information about the channel type and other settings for an endpoint.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointResponse {
    /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For example, the address for a push-notification channel is typically the token provided by a push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. The address for the SMS channel is a phone number in E.164 format, such as +12065550100. The address for the email channel is an email address.</p>
    #[doc(hidden)]
    pub address: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the application that's associated with the endpoint.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments.</p>
    #[doc(hidden)]
    pub attributes: std::option::Option<
        std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    >,
    /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
    #[doc(hidden)]
    pub channel_type: std::option::Option<crate::model::ChannelType>,
    /// <p>A number from 0-99 that represents the cohort that the endpoint is assigned to. Endpoints are grouped into cohorts randomly, and each cohort contains approximately 1 percent of the endpoints for an application. Amazon Pinpoint assigns cohorts to the holdout or treatment allocations for campaigns.</p>
    #[doc(hidden)]
    pub cohort_id: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the endpoint was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    #[doc(hidden)]
    pub demographic: std::option::Option<crate::model::EndpointDemographic>,
    /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
    #[doc(hidden)]
    pub effective_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether messages or push notifications are sent to the endpoint. Possible values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    #[doc(hidden)]
    pub endpoint_status: std::option::Option<std::string::String>,
    /// <p>The unique identifier that you assigned to the endpoint. The identifier should be a globally unique identifier (GUID) to ensure that it doesn't conflict with other endpoint identifiers that are associated with the application.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The geographic information for the endpoint.</p>
    #[doc(hidden)]
    pub location: std::option::Option<crate::model::EndpointLocation>,
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    #[doc(hidden)]
    pub metrics: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    #[doc(hidden)]
    pub opt_out: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the most recent request to update the endpoint.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
    #[doc(hidden)]
    pub user: std::option::Option<crate::model::EndpointUser>,
}
impl EndpointResponse {
    /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For example, the address for a push-notification channel is typically the token provided by a push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. The address for the SMS channel is a phone number in E.164 format, such as +12065550100. The address for the email channel is an email address.</p>
    pub fn address(&self) -> std::option::Option<&str> {
        self.address.as_deref()
    }
    /// <p>The unique identifier for the application that's associated with the endpoint.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
    > {
        self.attributes.as_ref()
    }
    /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
    pub fn channel_type(&self) -> std::option::Option<&crate::model::ChannelType> {
        self.channel_type.as_ref()
    }
    /// <p>A number from 0-99 that represents the cohort that the endpoint is assigned to. Endpoints are grouped into cohorts randomly, and each cohort contains approximately 1 percent of the endpoints for an application. Amazon Pinpoint assigns cohorts to the holdout or treatment allocations for campaigns.</p>
    pub fn cohort_id(&self) -> std::option::Option<&str> {
        self.cohort_id.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the endpoint was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
    pub fn demographic(&self) -> std::option::Option<&crate::model::EndpointDemographic> {
        self.demographic.as_ref()
    }
    /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
    pub fn effective_date(&self) -> std::option::Option<&str> {
        self.effective_date.as_deref()
    }
    /// <p>Specifies whether messages or push notifications are sent to the endpoint. Possible values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
    /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
    pub fn endpoint_status(&self) -> std::option::Option<&str> {
        self.endpoint_status.as_deref()
    }
    /// <p>The unique identifier that you assigned to the endpoint. The identifier should be a globally unique identifier (GUID) to ensure that it doesn't conflict with other endpoint identifiers that are associated with the application.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The geographic information for the endpoint.</p>
    pub fn location(&self) -> std::option::Option<&crate::model::EndpointLocation> {
        self.location.as_ref()
    }
    /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, f64>> {
        self.metrics.as_ref()
    }
    /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
    pub fn opt_out(&self) -> std::option::Option<&str> {
        self.opt_out.as_deref()
    }
    /// <p>The unique identifier for the most recent request to update the endpoint.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
    pub fn user(&self) -> std::option::Option<&crate::model::EndpointUser> {
        self.user.as_ref()
    }
}
/// See [`EndpointResponse`](crate::model::EndpointResponse).
pub mod endpoint_response {

    /// A builder for [`EndpointResponse`](crate::model::EndpointResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) address: std::option::Option<std::string::String>,
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
        >,
        pub(crate) channel_type: std::option::Option<crate::model::ChannelType>,
        pub(crate) cohort_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) demographic: std::option::Option<crate::model::EndpointDemographic>,
        pub(crate) effective_date: std::option::Option<std::string::String>,
        pub(crate) endpoint_status: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) location: std::option::Option<crate::model::EndpointLocation>,
        pub(crate) metrics:
            std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        pub(crate) opt_out: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
        pub(crate) user: std::option::Option<crate::model::EndpointUser>,
    }
    impl Builder {
        /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For example, the address for a push-notification channel is typically the token provided by a push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. The address for the SMS channel is a phone number in E.164 format, such as +12065550100. The address for the email channel is an email address.</p>
        pub fn address(mut self, input: impl Into<std::string::String>) -> Self {
            self.address = Some(input.into());
            self
        }
        /// <p>The destination address for messages or push notifications that you send to the endpoint. The address varies by channel. For example, the address for a push-notification channel is typically the token provided by a push notification service, such as an Apple Push Notification service (APNs) device token or a Firebase Cloud Messaging (FCM) registration token. The address for the SMS channel is a phone number in E.164 format, such as +12065550100. The address for the email channel is an email address.</p>
        pub fn set_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.address = input;
            self
        }
        /// <p>The unique identifier for the application that's associated with the endpoint.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that's associated with the endpoint.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: std::vec::Vec<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.attributes = Some(hash_map);
            self
        }
        /// <p>One or more custom attributes that describe the endpoint by associating a name with an array of values. For example, the value of a custom attribute named Interests might be: ["Science", "Music", "Travel"]. You can use these attributes as filter criteria when you create segments.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::vec::Vec<std::string::String>>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
        pub fn channel_type(mut self, input: crate::model::ChannelType) -> Self {
            self.channel_type = Some(input);
            self
        }
        /// <p>The channel that's used when sending messages or push notifications to the endpoint.</p>
        pub fn set_channel_type(
            mut self,
            input: std::option::Option<crate::model::ChannelType>,
        ) -> Self {
            self.channel_type = input;
            self
        }
        /// <p>A number from 0-99 that represents the cohort that the endpoint is assigned to. Endpoints are grouped into cohorts randomly, and each cohort contains approximately 1 percent of the endpoints for an application. Amazon Pinpoint assigns cohorts to the holdout or treatment allocations for campaigns.</p>
        pub fn cohort_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.cohort_id = Some(input.into());
            self
        }
        /// <p>A number from 0-99 that represents the cohort that the endpoint is assigned to. Endpoints are grouped into cohorts randomly, and each cohort contains approximately 1 percent of the endpoints for an application. Amazon Pinpoint assigns cohorts to the holdout or treatment allocations for campaigns.</p>
        pub fn set_cohort_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.cohort_id = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn demographic(mut self, input: crate::model::EndpointDemographic) -> Self {
            self.demographic = Some(input);
            self
        }
        /// <p>The demographic information for the endpoint, such as the time zone and platform.</p>
        pub fn set_demographic(
            mut self,
            input: std::option::Option<crate::model::EndpointDemographic>,
        ) -> Self {
            self.demographic = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
        pub fn effective_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.effective_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the endpoint was last updated.</p>
        pub fn set_effective_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.effective_date = input;
            self
        }
        /// <p>Specifies whether messages or push notifications are sent to the endpoint. Possible values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn endpoint_status(mut self, input: impl Into<std::string::String>) -> Self {
            self.endpoint_status = Some(input.into());
            self
        }
        /// <p>Specifies whether messages or push notifications are sent to the endpoint. Possible values are: ACTIVE, messages are sent to the endpoint; and, INACTIVE, messages aren’t sent to the endpoint.</p>
        /// <p>Amazon Pinpoint automatically sets this value to ACTIVE when you create an endpoint or update an existing endpoint. Amazon Pinpoint automatically sets this value to INACTIVE if you update another endpoint that has the same address specified by the Address property.</p>
        pub fn set_endpoint_status(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.endpoint_status = input;
            self
        }
        /// <p>The unique identifier that you assigned to the endpoint. The identifier should be a globally unique identifier (GUID) to ensure that it doesn't conflict with other endpoint identifiers that are associated with the application.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier that you assigned to the endpoint. The identifier should be a globally unique identifier (GUID) to ensure that it doesn't conflict with other endpoint identifiers that are associated with the application.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn location(mut self, input: crate::model::EndpointLocation) -> Self {
            self.location = Some(input);
            self
        }
        /// <p>The geographic information for the endpoint.</p>
        pub fn set_location(
            mut self,
            input: std::option::Option<crate::model::EndpointLocation>,
        ) -> Self {
            self.location = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn metrics(mut self, k: impl Into<std::string::String>, v: f64) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.metrics = Some(hash_map);
            self
        }
        /// <p>One or more custom metrics that your app reports to Amazon Pinpoint for the endpoint.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<std::collections::HashMap<std::string::String, f64>>,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn opt_out(mut self, input: impl Into<std::string::String>) -> Self {
            self.opt_out = Some(input.into());
            self
        }
        /// <p>Specifies whether the user who's associated with the endpoint has opted out of receiving messages and push notifications from you. Possible values are: ALL, the user has opted out and doesn't want to receive any messages or push notifications; and, NONE, the user hasn't opted out and wants to receive all messages and push notifications.</p>
        pub fn set_opt_out(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.opt_out = input;
            self
        }
        /// <p>The unique identifier for the most recent request to update the endpoint.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the most recent request to update the endpoint.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
        pub fn user(mut self, input: crate::model::EndpointUser) -> Self {
            self.user = Some(input);
            self
        }
        /// <p>One or more custom user attributes that your app reports to Amazon Pinpoint for the user who's associated with the endpoint.</p>
        pub fn set_user(mut self, input: std::option::Option<crate::model::EndpointUser>) -> Self {
            self.user = input;
            self
        }
        /// Consumes the builder and constructs a [`EndpointResponse`](crate::model::EndpointResponse).
        pub fn build(self) -> crate::model::EndpointResponse {
            crate::model::EndpointResponse {
                address: self.address,
                application_id: self.application_id,
                attributes: self.attributes,
                channel_type: self.channel_type,
                cohort_id: self.cohort_id,
                creation_date: self.creation_date,
                demographic: self.demographic,
                effective_date: self.effective_date,
                endpoint_status: self.endpoint_status,
                id: self.id,
                location: self.location,
                metrics: self.metrics,
                opt_out: self.opt_out,
                request_id: self.request_id,
                user: self.user,
            }
        }
    }
}
impl EndpointResponse {
    /// Creates a new builder-style object to manufacture [`EndpointResponse`](crate::model::EndpointResponse).
    pub fn builder() -> crate::model::endpoint_response::Builder {
        crate::model::endpoint_response::Builder::default()
    }
}

/// <p>Provides information about the content and settings for a message template that can be used in text messages that are sent through the SMS channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SmsTemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The message body that's used in text messages that are based on the message template.</p>
    #[doc(hidden)]
    pub body: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the recommender model that's used by the message template.</p>
    #[doc(hidden)]
    pub recommender_id: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The type of channel that the message template is designed for. For an SMS template, this value is SMS.</p>
    #[doc(hidden)]
    pub template_type: std::option::Option<crate::model::TemplateType>,
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl SmsTemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The message body that's used in text messages that are based on the message template.</p>
    pub fn body(&self) -> std::option::Option<&str> {
        self.body.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The unique identifier for the recommender model that's used by the message template.</p>
    pub fn recommender_id(&self) -> std::option::Option<&str> {
        self.recommender_id.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The type of channel that the message template is designed for. For an SMS template, this value is SMS.</p>
    pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
        self.template_type.as_ref()
    }
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`SmsTemplateResponse`](crate::model::SmsTemplateResponse).
pub mod sms_template_response {

    /// A builder for [`SmsTemplateResponse`](crate::model::SmsTemplateResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) body: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) recommender_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The message body that's used in text messages that are based on the message template.</p>
        pub fn body(mut self, input: impl Into<std::string::String>) -> Self {
            self.body = Some(input.into());
            self
        }
        /// <p>The message body that's used in text messages that are based on the message template.</p>
        pub fn set_body(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.body = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The unique identifier for the recommender model that's used by the message template.</p>
        pub fn recommender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.recommender_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recommender model that's used by the message template.</p>
        pub fn set_recommender_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommender_id = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The type of channel that the message template is designed for. For an SMS template, this value is SMS.</p>
        pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
            self.template_type = Some(input);
            self
        }
        /// <p>The type of channel that the message template is designed for. For an SMS template, this value is SMS.</p>
        pub fn set_template_type(
            mut self,
            input: std::option::Option<crate::model::TemplateType>,
        ) -> Self {
            self.template_type = input;
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`SmsTemplateResponse`](crate::model::SmsTemplateResponse).
        pub fn build(self) -> crate::model::SmsTemplateResponse {
            crate::model::SmsTemplateResponse {
                arn: self.arn,
                body: self.body,
                creation_date: self.creation_date,
                default_substitutions: self.default_substitutions,
                last_modified_date: self.last_modified_date,
                recommender_id: self.recommender_id,
                tags: self.tags,
                template_description: self.template_description,
                template_name: self.template_name,
                template_type: self.template_type,
                version: self.version,
            }
        }
    }
}
impl SmsTemplateResponse {
    /// Creates a new builder-style object to manufacture [`SmsTemplateResponse`](crate::model::SmsTemplateResponse).
    pub fn builder() -> crate::model::sms_template_response::Builder {
        crate::model::sms_template_response::Builder::default()
    }
}

/// <p>Provides information about all the segments that are associated with an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SegmentsResponse {
    /// <p>An array of responses, one for each segment that's associated with the application (Segments resource) or each version of a segment that's associated with the application (Segment Versions resource).</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::SegmentResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl SegmentsResponse {
    /// <p>An array of responses, one for each segment that's associated with the application (Segments resource) or each version of a segment that's associated with the application (Segment Versions resource).</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::SegmentResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`SegmentsResponse`](crate::model::SegmentsResponse).
pub mod segments_response {

    /// A builder for [`SegmentsResponse`](crate::model::SegmentsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::SegmentResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each segment that's associated with the application (Segments resource) or each version of a segment that's associated with the application (Segment Versions resource).</p>
        pub fn item(mut self, input: crate::model::SegmentResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each segment that's associated with the application (Segments resource) or each version of a segment that's associated with the application (Segment Versions resource).</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SegmentResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`SegmentsResponse`](crate::model::SegmentsResponse).
        pub fn build(self) -> crate::model::SegmentsResponse {
            crate::model::SegmentsResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl SegmentsResponse {
    /// Creates a new builder-style object to manufacture [`SegmentsResponse`](crate::model::SegmentsResponse).
    pub fn builder() -> crate::model::segments_response::Builder {
        crate::model::segments_response::Builder::default()
    }
}

/// <p>Provides information about the status and settings of all the import jobs that are associated with an application or segment. An import job is a job that imports endpoint definitions from one or more files.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportJobsResponse {
    /// <p>An array of responses, one for each import job that's associated with the application (Import Jobs resource) or segment (Segment Import Jobs resource).</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::ImportJobResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ImportJobsResponse {
    /// <p>An array of responses, one for each import job that's associated with the application (Import Jobs resource) or segment (Segment Import Jobs resource).</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::ImportJobResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`ImportJobsResponse`](crate::model::ImportJobsResponse).
pub mod import_jobs_response {

    /// A builder for [`ImportJobsResponse`](crate::model::ImportJobsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::ImportJobResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each import job that's associated with the application (Import Jobs resource) or segment (Segment Import Jobs resource).</p>
        pub fn item(mut self, input: crate::model::ImportJobResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each import job that's associated with the application (Import Jobs resource) or segment (Segment Import Jobs resource).</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ImportJobResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportJobsResponse`](crate::model::ImportJobsResponse).
        pub fn build(self) -> crate::model::ImportJobsResponse {
            crate::model::ImportJobsResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl ImportJobsResponse {
    /// Creates a new builder-style object to manufacture [`ImportJobsResponse`](crate::model::ImportJobsResponse).
    pub fn builder() -> crate::model::import_jobs_response::Builder {
        crate::model::import_jobs_response::Builder::default()
    }
}

/// <p>Provides information about the status and settings of a job that imports endpoint definitions from one or more files. The files can be stored in an Amazon Simple Storage Service (Amazon S3) bucket or uploaded directly from a computer by using the Amazon Pinpoint console.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportJobResponse {
    /// <p>The unique identifier for the application that's associated with the import job.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The number of pieces that were processed successfully (completed) by the import job, as of the time of the request.</p>
    #[doc(hidden)]
    pub completed_pieces: i32,
    /// <p>The date, in ISO 8601 format, when the import job was completed.</p>
    #[doc(hidden)]
    pub completion_date: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the import job was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The resource settings that apply to the import job.</p>
    #[doc(hidden)]
    pub definition: std::option::Option<crate::model::ImportJobResource>,
    /// <p>The number of pieces that weren't processed successfully (failed) by the import job, as of the time of the request.</p>
    #[doc(hidden)]
    pub failed_pieces: i32,
    /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the import job, if any.</p>
    #[doc(hidden)]
    pub failures: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The unique identifier for the import job.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The status of the import job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
    #[doc(hidden)]
    pub job_status: std::option::Option<crate::model::JobStatus>,
    /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the import job, typically because an error, such as a syntax error, occurred.</p>
    #[doc(hidden)]
    pub total_failures: i32,
    /// <p>The total number of pieces that must be processed to complete the import job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the import job.</p>
    #[doc(hidden)]
    pub total_pieces: i32,
    /// <p>The total number of endpoint definitions that were processed by the import job.</p>
    #[doc(hidden)]
    pub total_processed: i32,
    /// <p>The job type. This value is IMPORT for import jobs.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
}
impl ImportJobResponse {
    /// <p>The unique identifier for the application that's associated with the import job.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The number of pieces that were processed successfully (completed) by the import job, as of the time of the request.</p>
    pub fn completed_pieces(&self) -> i32 {
        self.completed_pieces
    }
    /// <p>The date, in ISO 8601 format, when the import job was completed.</p>
    pub fn completion_date(&self) -> std::option::Option<&str> {
        self.completion_date.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the import job was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The resource settings that apply to the import job.</p>
    pub fn definition(&self) -> std::option::Option<&crate::model::ImportJobResource> {
        self.definition.as_ref()
    }
    /// <p>The number of pieces that weren't processed successfully (failed) by the import job, as of the time of the request.</p>
    pub fn failed_pieces(&self) -> i32 {
        self.failed_pieces
    }
    /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the import job, if any.</p>
    pub fn failures(&self) -> std::option::Option<&[std::string::String]> {
        self.failures.as_deref()
    }
    /// <p>The unique identifier for the import job.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The status of the import job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
    pub fn job_status(&self) -> std::option::Option<&crate::model::JobStatus> {
        self.job_status.as_ref()
    }
    /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the import job, typically because an error, such as a syntax error, occurred.</p>
    pub fn total_failures(&self) -> i32 {
        self.total_failures
    }
    /// <p>The total number of pieces that must be processed to complete the import job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the import job.</p>
    pub fn total_pieces(&self) -> i32 {
        self.total_pieces
    }
    /// <p>The total number of endpoint definitions that were processed by the import job.</p>
    pub fn total_processed(&self) -> i32 {
        self.total_processed
    }
    /// <p>The job type. This value is IMPORT for import jobs.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
}
/// See [`ImportJobResponse`](crate::model::ImportJobResponse).
pub mod import_job_response {

    /// A builder for [`ImportJobResponse`](crate::model::ImportJobResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) completed_pieces: std::option::Option<i32>,
        pub(crate) completion_date: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) definition: std::option::Option<crate::model::ImportJobResource>,
        pub(crate) failed_pieces: std::option::Option<i32>,
        pub(crate) failures: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) job_status: std::option::Option<crate::model::JobStatus>,
        pub(crate) total_failures: std::option::Option<i32>,
        pub(crate) total_pieces: std::option::Option<i32>,
        pub(crate) total_processed: std::option::Option<i32>,
        pub(crate) r#type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that's associated with the import job.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that's associated with the import job.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The number of pieces that were processed successfully (completed) by the import job, as of the time of the request.</p>
        pub fn completed_pieces(mut self, input: i32) -> Self {
            self.completed_pieces = Some(input);
            self
        }
        /// <p>The number of pieces that were processed successfully (completed) by the import job, as of the time of the request.</p>
        pub fn set_completed_pieces(mut self, input: std::option::Option<i32>) -> Self {
            self.completed_pieces = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the import job was completed.</p>
        pub fn completion_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.completion_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the import job was completed.</p>
        pub fn set_completion_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.completion_date = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the import job was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the import job was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The resource settings that apply to the import job.</p>
        pub fn definition(mut self, input: crate::model::ImportJobResource) -> Self {
            self.definition = Some(input);
            self
        }
        /// <p>The resource settings that apply to the import job.</p>
        pub fn set_definition(
            mut self,
            input: std::option::Option<crate::model::ImportJobResource>,
        ) -> Self {
            self.definition = input;
            self
        }
        /// <p>The number of pieces that weren't processed successfully (failed) by the import job, as of the time of the request.</p>
        pub fn failed_pieces(mut self, input: i32) -> Self {
            self.failed_pieces = Some(input);
            self
        }
        /// <p>The number of pieces that weren't processed successfully (failed) by the import job, as of the time of the request.</p>
        pub fn set_failed_pieces(mut self, input: std::option::Option<i32>) -> Self {
            self.failed_pieces = input;
            self
        }
        /// Appends an item to `failures`.
        ///
        /// To override the contents of this collection use [`set_failures`](Self::set_failures).
        ///
        /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the import job, if any.</p>
        pub fn failures(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.failures.unwrap_or_default();
            v.push(input.into());
            self.failures = Some(v);
            self
        }
        /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the import job, if any.</p>
        pub fn set_failures(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.failures = input;
            self
        }
        /// <p>The unique identifier for the import job.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the import job.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The status of the import job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
        pub fn job_status(mut self, input: crate::model::JobStatus) -> Self {
            self.job_status = Some(input);
            self
        }
        /// <p>The status of the import job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
        pub fn set_job_status(
            mut self,
            input: std::option::Option<crate::model::JobStatus>,
        ) -> Self {
            self.job_status = input;
            self
        }
        /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the import job, typically because an error, such as a syntax error, occurred.</p>
        pub fn total_failures(mut self, input: i32) -> Self {
            self.total_failures = Some(input);
            self
        }
        /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the import job, typically because an error, such as a syntax error, occurred.</p>
        pub fn set_total_failures(mut self, input: std::option::Option<i32>) -> Self {
            self.total_failures = input;
            self
        }
        /// <p>The total number of pieces that must be processed to complete the import job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the import job.</p>
        pub fn total_pieces(mut self, input: i32) -> Self {
            self.total_pieces = Some(input);
            self
        }
        /// <p>The total number of pieces that must be processed to complete the import job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the import job.</p>
        pub fn set_total_pieces(mut self, input: std::option::Option<i32>) -> Self {
            self.total_pieces = input;
            self
        }
        /// <p>The total number of endpoint definitions that were processed by the import job.</p>
        pub fn total_processed(mut self, input: i32) -> Self {
            self.total_processed = Some(input);
            self
        }
        /// <p>The total number of endpoint definitions that were processed by the import job.</p>
        pub fn set_total_processed(mut self, input: std::option::Option<i32>) -> Self {
            self.total_processed = input;
            self
        }
        /// <p>The job type. This value is IMPORT for import jobs.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The job type. This value is IMPORT for import jobs.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportJobResponse`](crate::model::ImportJobResponse).
        pub fn build(self) -> crate::model::ImportJobResponse {
            crate::model::ImportJobResponse {
                application_id: self.application_id,
                completed_pieces: self.completed_pieces.unwrap_or_default(),
                completion_date: self.completion_date,
                creation_date: self.creation_date,
                definition: self.definition,
                failed_pieces: self.failed_pieces.unwrap_or_default(),
                failures: self.failures,
                id: self.id,
                job_status: self.job_status,
                total_failures: self.total_failures.unwrap_or_default(),
                total_pieces: self.total_pieces.unwrap_or_default(),
                total_processed: self.total_processed.unwrap_or_default(),
                r#type: self.r#type,
            }
        }
    }
}
impl ImportJobResponse {
    /// Creates a new builder-style object to manufacture [`ImportJobResponse`](crate::model::ImportJobResponse).
    pub fn builder() -> crate::model::import_job_response::Builder {
        crate::model::import_job_response::Builder::default()
    }
}

/// When writing a match expression against `JobStatus`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let jobstatus = unimplemented!();
/// match jobstatus {
///     JobStatus::Completed => { /* ... */ },
///     JobStatus::Completing => { /* ... */ },
///     JobStatus::Created => { /* ... */ },
///     JobStatus::Failed => { /* ... */ },
///     JobStatus::Failing => { /* ... */ },
///     JobStatus::Initializing => { /* ... */ },
///     JobStatus::PendingJob => { /* ... */ },
///     JobStatus::PreparingForInitialization => { /* ... */ },
///     JobStatus::Processing => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `jobstatus` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `JobStatus::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `JobStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `JobStatus::NewFeature` is defined.
/// Specifically, when `jobstatus` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `JobStatus::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum JobStatus {
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Completing,
    #[allow(missing_docs)] // documentation missing in model
    Created,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Failing,
    #[allow(missing_docs)] // documentation missing in model
    Initializing,
    #[allow(missing_docs)] // documentation missing in model
    PendingJob,
    #[allow(missing_docs)] // documentation missing in model
    PreparingForInitialization,
    #[allow(missing_docs)] // documentation missing in model
    Processing,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for JobStatus {
    fn from(s: &str) -> Self {
        match s {
            "COMPLETED" => JobStatus::Completed,
            "COMPLETING" => JobStatus::Completing,
            "CREATED" => JobStatus::Created,
            "FAILED" => JobStatus::Failed,
            "FAILING" => JobStatus::Failing,
            "INITIALIZING" => JobStatus::Initializing,
            "PENDING_JOB" => JobStatus::PendingJob,
            "PREPARING_FOR_INITIALIZATION" => JobStatus::PreparingForInitialization,
            "PROCESSING" => JobStatus::Processing,
            other => JobStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for JobStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(JobStatus::from(s))
    }
}
impl JobStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            JobStatus::Completed => "COMPLETED",
            JobStatus::Completing => "COMPLETING",
            JobStatus::Created => "CREATED",
            JobStatus::Failed => "FAILED",
            JobStatus::Failing => "FAILING",
            JobStatus::Initializing => "INITIALIZING",
            JobStatus::PendingJob => "PENDING_JOB",
            JobStatus::PreparingForInitialization => "PREPARING_FOR_INITIALIZATION",
            JobStatus::Processing => "PROCESSING",
            JobStatus::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "COMPLETED",
            "COMPLETING",
            "CREATED",
            "FAILED",
            "FAILING",
            "INITIALIZING",
            "PENDING_JOB",
            "PREPARING_FOR_INITIALIZATION",
            "PROCESSING",
        ]
    }
}
impl AsRef<str> for JobStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Provides information about the resource settings for a job that imports endpoint definitions from one or more files. The files can be stored in an Amazon Simple Storage Service (Amazon S3) bucket or uploaded directly from a computer by using the Amazon Pinpoint console.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportJobResource {
    /// <p>Specifies whether the import job creates a segment that contains the endpoints, when the endpoint definitions are imported.</p>
    #[doc(hidden)]
    pub define_segment: bool,
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    #[doc(hidden)]
    pub external_id: std::option::Option<std::string::String>,
    /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
    /// <p>If the files are stored in an Amazon S3 location and that location contains multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
    #[doc(hidden)]
    pub format: std::option::Option<crate::model::Format>,
    /// <p>Specifies whether the import job registers the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
    #[doc(hidden)]
    pub register_endpoints: bool,
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
    /// <p>The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/<replaceable>
    /// file-name
    /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
    #[doc(hidden)]
    pub s3_url: std::option::Option<std::string::String>,
    /// <p>The identifier for the segment that the import job updates or adds endpoint definitions to, if the import job updates an existing segment.</p>
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
    /// <p>The custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
    #[doc(hidden)]
    pub segment_name: std::option::Option<std::string::String>,
}
impl ImportJobResource {
    /// <p>Specifies whether the import job creates a segment that contains the endpoints, when the endpoint definitions are imported.</p>
    pub fn define_segment(&self) -> bool {
        self.define_segment
    }
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    pub fn external_id(&self) -> std::option::Option<&str> {
        self.external_id.as_deref()
    }
    /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
    /// <p>If the files are stored in an Amazon S3 location and that location contains multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
    pub fn format(&self) -> std::option::Option<&crate::model::Format> {
        self.format.as_ref()
    }
    /// <p>Specifies whether the import job registers the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
    pub fn register_endpoints(&self) -> bool {
        self.register_endpoints
    }
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
    /// <p>The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/<replaceable>
    /// file-name
    /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
    pub fn s3_url(&self) -> std::option::Option<&str> {
        self.s3_url.as_deref()
    }
    /// <p>The identifier for the segment that the import job updates or adds endpoint definitions to, if the import job updates an existing segment.</p>
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
    /// <p>The custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
    pub fn segment_name(&self) -> std::option::Option<&str> {
        self.segment_name.as_deref()
    }
}
/// See [`ImportJobResource`](crate::model::ImportJobResource).
pub mod import_job_resource {

    /// A builder for [`ImportJobResource`](crate::model::ImportJobResource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) define_segment: std::option::Option<bool>,
        pub(crate) external_id: std::option::Option<std::string::String>,
        pub(crate) format: std::option::Option<crate::model::Format>,
        pub(crate) register_endpoints: std::option::Option<bool>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) s3_url: std::option::Option<std::string::String>,
        pub(crate) segment_id: std::option::Option<std::string::String>,
        pub(crate) segment_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Specifies whether the import job creates a segment that contains the endpoints, when the endpoint definitions are imported.</p>
        pub fn define_segment(mut self, input: bool) -> Self {
            self.define_segment = Some(input);
            self
        }
        /// <p>Specifies whether the import job creates a segment that contains the endpoints, when the endpoint definitions are imported.</p>
        pub fn set_define_segment(mut self, input: std::option::Option<bool>) -> Self {
            self.define_segment = input;
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn external_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.external_id = Some(input.into());
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn set_external_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.external_id = input;
            self
        }
        /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
        /// <p>If the files are stored in an Amazon S3 location and that location contains multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
        pub fn format(mut self, input: crate::model::Format) -> Self {
            self.format = Some(input);
            self
        }
        /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format.</p>
        /// <p>If the files are stored in an Amazon S3 location and that location contains multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
        pub fn set_format(mut self, input: std::option::Option<crate::model::Format>) -> Self {
            self.format = input;
            self
        }
        /// <p>Specifies whether the import job registers the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
        pub fn register_endpoints(mut self, input: bool) -> Self {
            self.register_endpoints = Some(input);
            self
        }
        /// <p>Specifies whether the import job registers the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
        pub fn set_register_endpoints(mut self, input: std::option::Option<bool>) -> Self {
            self.register_endpoints = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
        /// <p>The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/<replaceable>
        /// file-name
        /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
        pub fn s3_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_url = Some(input.into());
            self
        }
        /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
        /// <p>The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/<replaceable>
        /// file-name
        /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
        pub fn set_s3_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_url = input;
            self
        }
        /// <p>The identifier for the segment that the import job updates or adds endpoint definitions to, if the import job updates an existing segment.</p>
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        /// <p>The identifier for the segment that the import job updates or adds endpoint definitions to, if the import job updates an existing segment.</p>
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// <p>The custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
        pub fn segment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_name = Some(input.into());
            self
        }
        /// <p>The custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
        pub fn set_segment_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_name = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportJobResource`](crate::model::ImportJobResource).
        pub fn build(self) -> crate::model::ImportJobResource {
            crate::model::ImportJobResource {
                define_segment: self.define_segment.unwrap_or_default(),
                external_id: self.external_id,
                format: self.format,
                register_endpoints: self.register_endpoints.unwrap_or_default(),
                role_arn: self.role_arn,
                s3_url: self.s3_url,
                segment_id: self.segment_id,
                segment_name: self.segment_name,
            }
        }
    }
}
impl ImportJobResource {
    /// Creates a new builder-style object to manufacture [`ImportJobResource`](crate::model::ImportJobResource).
    pub fn builder() -> crate::model::import_job_resource::Builder {
        crate::model::import_job_resource::Builder::default()
    }
}

/// <p>Provides information about all the export jobs that are associated with an application or segment. An export job is a job that exports endpoint definitions to a file.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportJobsResponse {
    /// <p>An array of responses, one for each export job that's associated with the application (Export Jobs resource) or segment (Segment Export Jobs resource).</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::ExportJobResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ExportJobsResponse {
    /// <p>An array of responses, one for each export job that's associated with the application (Export Jobs resource) or segment (Segment Export Jobs resource).</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::ExportJobResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`ExportJobsResponse`](crate::model::ExportJobsResponse).
pub mod export_jobs_response {

    /// A builder for [`ExportJobsResponse`](crate::model::ExportJobsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::ExportJobResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each export job that's associated with the application (Export Jobs resource) or segment (Segment Export Jobs resource).</p>
        pub fn item(mut self, input: crate::model::ExportJobResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each export job that's associated with the application (Export Jobs resource) or segment (Segment Export Jobs resource).</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ExportJobResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportJobsResponse`](crate::model::ExportJobsResponse).
        pub fn build(self) -> crate::model::ExportJobsResponse {
            crate::model::ExportJobsResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl ExportJobsResponse {
    /// Creates a new builder-style object to manufacture [`ExportJobsResponse`](crate::model::ExportJobsResponse).
    pub fn builder() -> crate::model::export_jobs_response::Builder {
        crate::model::export_jobs_response::Builder::default()
    }
}

/// <p>Provides information about the status and settings of a job that exports endpoint definitions to a file. The file can be added directly to an Amazon Simple Storage Service (Amazon S3) bucket by using the Amazon Pinpoint API or downloaded directly to a computer by using the Amazon Pinpoint console.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportJobResponse {
    /// <p>The unique identifier for the application that's associated with the export job.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The number of pieces that were processed successfully (completed) by the export job, as of the time of the request.</p>
    #[doc(hidden)]
    pub completed_pieces: i32,
    /// <p>The date, in ISO 8601 format, when the export job was completed.</p>
    #[doc(hidden)]
    pub completion_date: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the export job was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The resource settings that apply to the export job.</p>
    #[doc(hidden)]
    pub definition: std::option::Option<crate::model::ExportJobResource>,
    /// <p>The number of pieces that weren't processed successfully (failed) by the export job, as of the time of the request.</p>
    #[doc(hidden)]
    pub failed_pieces: i32,
    /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the export job, if any.</p>
    #[doc(hidden)]
    pub failures: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The unique identifier for the export job.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The status of the export job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
    #[doc(hidden)]
    pub job_status: std::option::Option<crate::model::JobStatus>,
    /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the export job, typically because an error, such as a syntax error, occurred.</p>
    #[doc(hidden)]
    pub total_failures: i32,
    /// <p>The total number of pieces that must be processed to complete the export job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the export job.</p>
    #[doc(hidden)]
    pub total_pieces: i32,
    /// <p>The total number of endpoint definitions that were processed by the export job.</p>
    #[doc(hidden)]
    pub total_processed: i32,
    /// <p>The job type. This value is EXPORT for export jobs.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
}
impl ExportJobResponse {
    /// <p>The unique identifier for the application that's associated with the export job.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The number of pieces that were processed successfully (completed) by the export job, as of the time of the request.</p>
    pub fn completed_pieces(&self) -> i32 {
        self.completed_pieces
    }
    /// <p>The date, in ISO 8601 format, when the export job was completed.</p>
    pub fn completion_date(&self) -> std::option::Option<&str> {
        self.completion_date.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the export job was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The resource settings that apply to the export job.</p>
    pub fn definition(&self) -> std::option::Option<&crate::model::ExportJobResource> {
        self.definition.as_ref()
    }
    /// <p>The number of pieces that weren't processed successfully (failed) by the export job, as of the time of the request.</p>
    pub fn failed_pieces(&self) -> i32 {
        self.failed_pieces
    }
    /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the export job, if any.</p>
    pub fn failures(&self) -> std::option::Option<&[std::string::String]> {
        self.failures.as_deref()
    }
    /// <p>The unique identifier for the export job.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The status of the export job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
    pub fn job_status(&self) -> std::option::Option<&crate::model::JobStatus> {
        self.job_status.as_ref()
    }
    /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the export job, typically because an error, such as a syntax error, occurred.</p>
    pub fn total_failures(&self) -> i32 {
        self.total_failures
    }
    /// <p>The total number of pieces that must be processed to complete the export job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the export job.</p>
    pub fn total_pieces(&self) -> i32 {
        self.total_pieces
    }
    /// <p>The total number of endpoint definitions that were processed by the export job.</p>
    pub fn total_processed(&self) -> i32 {
        self.total_processed
    }
    /// <p>The job type. This value is EXPORT for export jobs.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
}
/// See [`ExportJobResponse`](crate::model::ExportJobResponse).
pub mod export_job_response {

    /// A builder for [`ExportJobResponse`](crate::model::ExportJobResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) completed_pieces: std::option::Option<i32>,
        pub(crate) completion_date: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) definition: std::option::Option<crate::model::ExportJobResource>,
        pub(crate) failed_pieces: std::option::Option<i32>,
        pub(crate) failures: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) job_status: std::option::Option<crate::model::JobStatus>,
        pub(crate) total_failures: std::option::Option<i32>,
        pub(crate) total_pieces: std::option::Option<i32>,
        pub(crate) total_processed: std::option::Option<i32>,
        pub(crate) r#type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that's associated with the export job.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that's associated with the export job.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The number of pieces that were processed successfully (completed) by the export job, as of the time of the request.</p>
        pub fn completed_pieces(mut self, input: i32) -> Self {
            self.completed_pieces = Some(input);
            self
        }
        /// <p>The number of pieces that were processed successfully (completed) by the export job, as of the time of the request.</p>
        pub fn set_completed_pieces(mut self, input: std::option::Option<i32>) -> Self {
            self.completed_pieces = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the export job was completed.</p>
        pub fn completion_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.completion_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the export job was completed.</p>
        pub fn set_completion_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.completion_date = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the export job was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the export job was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The resource settings that apply to the export job.</p>
        pub fn definition(mut self, input: crate::model::ExportJobResource) -> Self {
            self.definition = Some(input);
            self
        }
        /// <p>The resource settings that apply to the export job.</p>
        pub fn set_definition(
            mut self,
            input: std::option::Option<crate::model::ExportJobResource>,
        ) -> Self {
            self.definition = input;
            self
        }
        /// <p>The number of pieces that weren't processed successfully (failed) by the export job, as of the time of the request.</p>
        pub fn failed_pieces(mut self, input: i32) -> Self {
            self.failed_pieces = Some(input);
            self
        }
        /// <p>The number of pieces that weren't processed successfully (failed) by the export job, as of the time of the request.</p>
        pub fn set_failed_pieces(mut self, input: std::option::Option<i32>) -> Self {
            self.failed_pieces = input;
            self
        }
        /// Appends an item to `failures`.
        ///
        /// To override the contents of this collection use [`set_failures`](Self::set_failures).
        ///
        /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the export job, if any.</p>
        pub fn failures(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.failures.unwrap_or_default();
            v.push(input.into());
            self.failures = Some(v);
            self
        }
        /// <p>An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the export job, if any.</p>
        pub fn set_failures(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.failures = input;
            self
        }
        /// <p>The unique identifier for the export job.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the export job.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The status of the export job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
        pub fn job_status(mut self, input: crate::model::JobStatus) -> Self {
            self.job_status = Some(input);
            self
        }
        /// <p>The status of the export job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.</p>
        pub fn set_job_status(
            mut self,
            input: std::option::Option<crate::model::JobStatus>,
        ) -> Self {
            self.job_status = input;
            self
        }
        /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the export job, typically because an error, such as a syntax error, occurred.</p>
        pub fn total_failures(mut self, input: i32) -> Self {
            self.total_failures = Some(input);
            self
        }
        /// <p>The total number of endpoint definitions that weren't processed successfully (failed) by the export job, typically because an error, such as a syntax error, occurred.</p>
        pub fn set_total_failures(mut self, input: std::option::Option<i32>) -> Self {
            self.total_failures = input;
            self
        }
        /// <p>The total number of pieces that must be processed to complete the export job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the export job.</p>
        pub fn total_pieces(mut self, input: i32) -> Self {
            self.total_pieces = Some(input);
            self
        }
        /// <p>The total number of pieces that must be processed to complete the export job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the export job.</p>
        pub fn set_total_pieces(mut self, input: std::option::Option<i32>) -> Self {
            self.total_pieces = input;
            self
        }
        /// <p>The total number of endpoint definitions that were processed by the export job.</p>
        pub fn total_processed(mut self, input: i32) -> Self {
            self.total_processed = Some(input);
            self
        }
        /// <p>The total number of endpoint definitions that were processed by the export job.</p>
        pub fn set_total_processed(mut self, input: std::option::Option<i32>) -> Self {
            self.total_processed = input;
            self
        }
        /// <p>The job type. This value is EXPORT for export jobs.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The job type. This value is EXPORT for export jobs.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportJobResponse`](crate::model::ExportJobResponse).
        pub fn build(self) -> crate::model::ExportJobResponse {
            crate::model::ExportJobResponse {
                application_id: self.application_id,
                completed_pieces: self.completed_pieces.unwrap_or_default(),
                completion_date: self.completion_date,
                creation_date: self.creation_date,
                definition: self.definition,
                failed_pieces: self.failed_pieces.unwrap_or_default(),
                failures: self.failures,
                id: self.id,
                job_status: self.job_status,
                total_failures: self.total_failures.unwrap_or_default(),
                total_pieces: self.total_pieces.unwrap_or_default(),
                total_processed: self.total_processed.unwrap_or_default(),
                r#type: self.r#type,
            }
        }
    }
}
impl ExportJobResponse {
    /// Creates a new builder-style object to manufacture [`ExportJobResponse`](crate::model::ExportJobResponse).
    pub fn builder() -> crate::model::export_job_response::Builder {
        crate::model::export_job_response::Builder::default()
    }
}

/// <p>Provides information about the resource settings for a job that exports endpoint definitions to a file. The file can be added directly to an Amazon Simple Storage Service (Amazon S3) bucket by using the Amazon Pinpoint API or downloaded directly to a computer by using the Amazon Pinpoint console.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportJobResource {
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location where the endpoint definitions were exported to.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where the endpoint definitions were exported to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/.</p>
    #[doc(hidden)]
    pub s3_url_prefix: std::option::Option<std::string::String>,
    /// <p>The identifier for the segment that the endpoint definitions were exported from. If this value isn't present, Amazon Pinpoint exported definitions for all the endpoints that are associated with the application.</p>
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
    /// <p>The version of the segment that the endpoint definitions were exported from.</p>
    #[doc(hidden)]
    pub segment_version: i32,
}
impl ExportJobResource {
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location where the endpoint definitions were exported to.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where the endpoint definitions were exported to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/.</p>
    pub fn s3_url_prefix(&self) -> std::option::Option<&str> {
        self.s3_url_prefix.as_deref()
    }
    /// <p>The identifier for the segment that the endpoint definitions were exported from. If this value isn't present, Amazon Pinpoint exported definitions for all the endpoints that are associated with the application.</p>
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
    /// <p>The version of the segment that the endpoint definitions were exported from.</p>
    pub fn segment_version(&self) -> i32 {
        self.segment_version
    }
}
/// See [`ExportJobResource`](crate::model::ExportJobResource).
pub mod export_job_resource {

    /// A builder for [`ExportJobResource`](crate::model::ExportJobResource).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) s3_url_prefix: std::option::Option<std::string::String>,
        pub(crate) segment_id: std::option::Option<std::string::String>,
        pub(crate) segment_version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location where the endpoint definitions were exported to.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location where the endpoint definitions were exported to.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where the endpoint definitions were exported to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/.</p>
        pub fn s3_url_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_url_prefix = Some(input.into());
            self
        }
        /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where the endpoint definitions were exported to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/.</p>
        pub fn set_s3_url_prefix(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.s3_url_prefix = input;
            self
        }
        /// <p>The identifier for the segment that the endpoint definitions were exported from. If this value isn't present, Amazon Pinpoint exported definitions for all the endpoints that are associated with the application.</p>
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        /// <p>The identifier for the segment that the endpoint definitions were exported from. If this value isn't present, Amazon Pinpoint exported definitions for all the endpoints that are associated with the application.</p>
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// <p>The version of the segment that the endpoint definitions were exported from.</p>
        pub fn segment_version(mut self, input: i32) -> Self {
            self.segment_version = Some(input);
            self
        }
        /// <p>The version of the segment that the endpoint definitions were exported from.</p>
        pub fn set_segment_version(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_version = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportJobResource`](crate::model::ExportJobResource).
        pub fn build(self) -> crate::model::ExportJobResource {
            crate::model::ExportJobResource {
                role_arn: self.role_arn,
                s3_url_prefix: self.s3_url_prefix,
                segment_id: self.segment_id,
                segment_version: self.segment_version.unwrap_or_default(),
            }
        }
    }
}
impl ExportJobResource {
    /// Creates a new builder-style object to manufacture [`ExportJobResource`](crate::model::ExportJobResource).
    pub fn builder() -> crate::model::export_job_resource::Builder {
        crate::model::export_job_resource::Builder::default()
    }
}

/// <p>Provides information about all the recommender model configurations that are associated with your Amazon Pinpoint account.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListRecommenderConfigurationsResponse {
    /// <p>An array of responses, one for each recommender model configuration that's associated with your Amazon Pinpoint account.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::RecommenderConfigurationResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ListRecommenderConfigurationsResponse {
    /// <p>An array of responses, one for each recommender model configuration that's associated with your Amazon Pinpoint account.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::RecommenderConfigurationResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`ListRecommenderConfigurationsResponse`](crate::model::ListRecommenderConfigurationsResponse).
pub mod list_recommender_configurations_response {

    /// A builder for [`ListRecommenderConfigurationsResponse`](crate::model::ListRecommenderConfigurationsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item:
            std::option::Option<std::vec::Vec<crate::model::RecommenderConfigurationResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each recommender model configuration that's associated with your Amazon Pinpoint account.</p>
        pub fn item(mut self, input: crate::model::RecommenderConfigurationResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each recommender model configuration that's associated with your Amazon Pinpoint account.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<
                std::vec::Vec<crate::model::RecommenderConfigurationResponse>,
            >,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ListRecommenderConfigurationsResponse`](crate::model::ListRecommenderConfigurationsResponse).
        pub fn build(self) -> crate::model::ListRecommenderConfigurationsResponse {
            crate::model::ListRecommenderConfigurationsResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl ListRecommenderConfigurationsResponse {
    /// Creates a new builder-style object to manufacture [`ListRecommenderConfigurationsResponse`](crate::model::ListRecommenderConfigurationsResponse).
    pub fn builder() -> crate::model::list_recommender_configurations_response::Builder {
        crate::model::list_recommender_configurations_response::Builder::default()
    }
}

/// <p>Provides information about the content and settings for a message template that can be used in messages that are sent through a push notification channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PushNotificationTemplateResponse {
    /// <p>The message template that's used for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub adm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
    /// <p>The message template that's used for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub apns: std::option::Option<crate::model::ApnsPushNotificationTemplate>,
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The message template that's used for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub baidu: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The default message template that's used for push notification channels.</p>
    ///
    /// _Note: This member has been renamed from `default`._
    #[doc(hidden)]
    pub default_value: std::option::Option<crate::model::DefaultPushNotificationTemplate>,
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The message template that's used for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    #[doc(hidden)]
    pub gcm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the recommender model that's used by the message template.</p>
    #[doc(hidden)]
    pub recommender_id: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The type of channel that the message template is designed for. For a push notification template, this value is PUSH.</p>
    #[doc(hidden)]
    pub template_type: std::option::Option<crate::model::TemplateType>,
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl PushNotificationTemplateResponse {
    /// <p>The message template that's used for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn adm(&self) -> std::option::Option<&crate::model::AndroidPushNotificationTemplate> {
        self.adm.as_ref()
    }
    /// <p>The message template that's used for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn apns(&self) -> std::option::Option<&crate::model::ApnsPushNotificationTemplate> {
        self.apns.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The message template that's used for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn baidu(&self) -> std::option::Option<&crate::model::AndroidPushNotificationTemplate> {
        self.baidu.as_ref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The default message template that's used for push notification channels.</p>
    ///
    /// _Note: This member has been renamed from `default`._
    pub fn default_value(
        &self,
    ) -> std::option::Option<&crate::model::DefaultPushNotificationTemplate> {
        self.default_value.as_ref()
    }
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The message template that's used for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
    pub fn gcm(&self) -> std::option::Option<&crate::model::AndroidPushNotificationTemplate> {
        self.gcm.as_ref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The unique identifier for the recommender model that's used by the message template.</p>
    pub fn recommender_id(&self) -> std::option::Option<&str> {
        self.recommender_id.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The type of channel that the message template is designed for. For a push notification template, this value is PUSH.</p>
    pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
        self.template_type.as_ref()
    }
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`PushNotificationTemplateResponse`](crate::model::PushNotificationTemplateResponse).
pub mod push_notification_template_response {

    /// A builder for [`PushNotificationTemplateResponse`](crate::model::PushNotificationTemplateResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) adm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        pub(crate) apns: std::option::Option<crate::model::ApnsPushNotificationTemplate>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) baidu: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_value:
            std::option::Option<crate::model::DefaultPushNotificationTemplate>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) gcm: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) recommender_id: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The message template that's used for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn adm(mut self, input: crate::model::AndroidPushNotificationTemplate) -> Self {
            self.adm = Some(input);
            self
        }
        /// <p>The message template that's used for the ADM (Amazon Device Messaging) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_adm(
            mut self,
            input: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        ) -> Self {
            self.adm = input;
            self
        }
        /// <p>The message template that's used for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn apns(mut self, input: crate::model::ApnsPushNotificationTemplate) -> Self {
            self.apns = Some(input);
            self
        }
        /// <p>The message template that's used for the APNs (Apple Push Notification service) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_apns(
            mut self,
            input: std::option::Option<crate::model::ApnsPushNotificationTemplate>,
        ) -> Self {
            self.apns = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The message template that's used for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn baidu(mut self, input: crate::model::AndroidPushNotificationTemplate) -> Self {
            self.baidu = Some(input);
            self
        }
        /// <p>The message template that's used for the Baidu (Baidu Cloud Push) channel. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_baidu(
            mut self,
            input: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        ) -> Self {
            self.baidu = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The default message template that's used for push notification channels.</p>
        pub fn default_value(
            mut self,
            input: crate::model::DefaultPushNotificationTemplate,
        ) -> Self {
            self.default_value = Some(input);
            self
        }
        /// <p>The default message template that's used for push notification channels.</p>
        pub fn set_default(
            mut self,
            input: std::option::Option<crate::model::DefaultPushNotificationTemplate>,
        ) -> Self {
            self.default_value = input;
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The message template that's used for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn gcm(mut self, input: crate::model::AndroidPushNotificationTemplate) -> Self {
            self.gcm = Some(input);
            self
        }
        /// <p>The message template that's used for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. This message template overrides the default template for push notification channels (DefaultPushNotificationTemplate).</p>
        pub fn set_gcm(
            mut self,
            input: std::option::Option<crate::model::AndroidPushNotificationTemplate>,
        ) -> Self {
            self.gcm = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The unique identifier for the recommender model that's used by the message template.</p>
        pub fn recommender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.recommender_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recommender model that's used by the message template.</p>
        pub fn set_recommender_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommender_id = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The type of channel that the message template is designed for. For a push notification template, this value is PUSH.</p>
        pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
            self.template_type = Some(input);
            self
        }
        /// <p>The type of channel that the message template is designed for. For a push notification template, this value is PUSH.</p>
        pub fn set_template_type(
            mut self,
            input: std::option::Option<crate::model::TemplateType>,
        ) -> Self {
            self.template_type = input;
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`PushNotificationTemplateResponse`](crate::model::PushNotificationTemplateResponse).
        pub fn build(self) -> crate::model::PushNotificationTemplateResponse {
            crate::model::PushNotificationTemplateResponse {
                adm: self.adm,
                apns: self.apns,
                arn: self.arn,
                baidu: self.baidu,
                creation_date: self.creation_date,
                default_value: self.default_value,
                default_substitutions: self.default_substitutions,
                gcm: self.gcm,
                last_modified_date: self.last_modified_date,
                recommender_id: self.recommender_id,
                tags: self.tags,
                template_description: self.template_description,
                template_name: self.template_name,
                template_type: self.template_type,
                version: self.version,
            }
        }
    }
}
impl PushNotificationTemplateResponse {
    /// Creates a new builder-style object to manufacture [`PushNotificationTemplateResponse`](crate::model::PushNotificationTemplateResponse).
    pub fn builder() -> crate::model::push_notification_template_response::Builder {
        crate::model::push_notification_template_response::Builder::default()
    }
}

/// <p>Provides the results of a query that retrieved the data for a standard execution metric that applies to a journey, and provides information about that query.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyExecutionMetricsResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the journey that the metric applies to.</p>
    #[doc(hidden)]
    pub journey_id: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the journey and updated the data for the metric.</p>
    #[doc(hidden)]
    pub last_evaluated_time: std::option::Option<std::string::String>,
    /// <p>A JSON object that contains the results of the query. For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com//pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    #[doc(hidden)]
    pub metrics:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl JourneyExecutionMetricsResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The unique identifier for the journey that the metric applies to.</p>
    pub fn journey_id(&self) -> std::option::Option<&str> {
        self.journey_id.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the journey and updated the data for the metric.</p>
    pub fn last_evaluated_time(&self) -> std::option::Option<&str> {
        self.last_evaluated_time.as_deref()
    }
    /// <p>A JSON object that contains the results of the query. For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com//pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.metrics.as_ref()
    }
}
/// See [`JourneyExecutionMetricsResponse`](crate::model::JourneyExecutionMetricsResponse).
pub mod journey_execution_metrics_response {

    /// A builder for [`JourneyExecutionMetricsResponse`](crate::model::JourneyExecutionMetricsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) journey_id: std::option::Option<std::string::String>,
        pub(crate) last_evaluated_time: std::option::Option<std::string::String>,
        pub(crate) metrics: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The unique identifier for the journey that the metric applies to.</p>
        pub fn journey_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.journey_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the journey that the metric applies to.</p>
        pub fn set_journey_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.journey_id = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the journey and updated the data for the metric.</p>
        pub fn last_evaluated_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_evaluated_time = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the journey and updated the data for the metric.</p>
        pub fn set_last_evaluated_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_evaluated_time = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>A JSON object that contains the results of the query. For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com//pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn metrics(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.metrics = Some(hash_map);
            self
        }
        /// <p>A JSON object that contains the results of the query. For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com//pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyExecutionMetricsResponse`](crate::model::JourneyExecutionMetricsResponse).
        pub fn build(self) -> crate::model::JourneyExecutionMetricsResponse {
            crate::model::JourneyExecutionMetricsResponse {
                application_id: self.application_id,
                journey_id: self.journey_id,
                last_evaluated_time: self.last_evaluated_time,
                metrics: self.metrics,
            }
        }
    }
}
impl JourneyExecutionMetricsResponse {
    /// Creates a new builder-style object to manufacture [`JourneyExecutionMetricsResponse`](crate::model::JourneyExecutionMetricsResponse).
    pub fn builder() -> crate::model::journey_execution_metrics_response::Builder {
        crate::model::journey_execution_metrics_response::Builder::default()
    }
}

/// <p>Provides the results of a query that retrieved the data for a standard execution metric that applies to a journey activity, and provides information about that query.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyExecutionActivityMetricsResponse {
    /// <p>The type of activity that the metric applies to. Possible values are:</p>
    /// <ul>
    /// <li><p>CONDITIONAL_SPLIT - For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
    /// <li><p>HOLDOUT - For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
    /// <li><p>MESSAGE - For an email activity, which is an activity that sends an email message to participants.</p></li>
    /// <li><p>MULTI_CONDITIONAL_SPLIT - For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
    /// <li><p>RANDOM_SPLIT - For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
    /// <li><p>WAIT - For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub activity_type: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the application that the metric applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the activity that the metric applies to.</p>
    #[doc(hidden)]
    pub journey_activity_id: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the journey that the metric applies to.</p>
    #[doc(hidden)]
    pub journey_id: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
    #[doc(hidden)]
    pub last_evaluated_time: std::option::Option<std::string::String>,
    /// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    #[doc(hidden)]
    pub metrics:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl JourneyExecutionActivityMetricsResponse {
    /// <p>The type of activity that the metric applies to. Possible values are:</p>
    /// <ul>
    /// <li><p>CONDITIONAL_SPLIT - For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
    /// <li><p>HOLDOUT - For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
    /// <li><p>MESSAGE - For an email activity, which is an activity that sends an email message to participants.</p></li>
    /// <li><p>MULTI_CONDITIONAL_SPLIT - For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
    /// <li><p>RANDOM_SPLIT - For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
    /// <li><p>WAIT - For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
    /// </ul>
    pub fn activity_type(&self) -> std::option::Option<&str> {
        self.activity_type.as_deref()
    }
    /// <p>The unique identifier for the application that the metric applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The unique identifier for the activity that the metric applies to.</p>
    pub fn journey_activity_id(&self) -> std::option::Option<&str> {
        self.journey_activity_id.as_deref()
    }
    /// <p>The unique identifier for the journey that the metric applies to.</p>
    pub fn journey_id(&self) -> std::option::Option<&str> {
        self.journey_id.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
    pub fn last_evaluated_time(&self) -> std::option::Option<&str> {
        self.last_evaluated_time.as_deref()
    }
    /// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    pub fn metrics(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.metrics.as_ref()
    }
}
/// See [`JourneyExecutionActivityMetricsResponse`](crate::model::JourneyExecutionActivityMetricsResponse).
pub mod journey_execution_activity_metrics_response {

    /// A builder for [`JourneyExecutionActivityMetricsResponse`](crate::model::JourneyExecutionActivityMetricsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) activity_type: std::option::Option<std::string::String>,
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) journey_activity_id: std::option::Option<std::string::String>,
        pub(crate) journey_id: std::option::Option<std::string::String>,
        pub(crate) last_evaluated_time: std::option::Option<std::string::String>,
        pub(crate) metrics: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// <p>The type of activity that the metric applies to. Possible values are:</p>
        /// <ul>
        /// <li><p>CONDITIONAL_SPLIT - For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
        /// <li><p>HOLDOUT - For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
        /// <li><p>MESSAGE - For an email activity, which is an activity that sends an email message to participants.</p></li>
        /// <li><p>MULTI_CONDITIONAL_SPLIT - For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
        /// <li><p>RANDOM_SPLIT - For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
        /// <li><p>WAIT - For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
        /// </ul>
        pub fn activity_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.activity_type = Some(input.into());
            self
        }
        /// <p>The type of activity that the metric applies to. Possible values are:</p>
        /// <ul>
        /// <li><p>CONDITIONAL_SPLIT - For a yes/no split activity, which is an activity that sends participants down one of two paths in a journey.</p></li>
        /// <li><p>HOLDOUT - For a holdout activity, which is an activity that stops a journey for a specified percentage of participants.</p></li>
        /// <li><p>MESSAGE - For an email activity, which is an activity that sends an email message to participants.</p></li>
        /// <li><p>MULTI_CONDITIONAL_SPLIT - For a multivariate split activity, which is an activity that sends participants down one of as many as five paths in a journey.</p></li>
        /// <li><p>RANDOM_SPLIT - For a random split activity, which is an activity that sends specified percentages of participants down one of as many as five paths in a journey.</p></li>
        /// <li><p>WAIT - For a wait activity, which is an activity that waits for a certain amount of time or until a specific date and time before moving participants to the next activity in a journey.</p></li>
        /// </ul>
        pub fn set_activity_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.activity_type = input;
            self
        }
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The unique identifier for the activity that the metric applies to.</p>
        pub fn journey_activity_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.journey_activity_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the activity that the metric applies to.</p>
        pub fn set_journey_activity_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.journey_activity_id = input;
            self
        }
        /// <p>The unique identifier for the journey that the metric applies to.</p>
        pub fn journey_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.journey_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the journey that the metric applies to.</p>
        pub fn set_journey_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.journey_id = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
        pub fn last_evaluated_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_evaluated_time = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when Amazon Pinpoint last evaluated the execution status of the activity and updated the data for the metric.</p>
        pub fn set_last_evaluated_time(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_evaluated_time = input;
            self
        }
        /// Adds a key-value pair to `metrics`.
        ///
        /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
        ///
        /// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn metrics(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.metrics.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.metrics = Some(hash_map);
            self
        }
        /// <p>A JSON object that contains the results of the query. The results vary depending on the type of activity (ActivityType). For information about the structure and contents of the results, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn set_metrics(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.metrics = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyExecutionActivityMetricsResponse`](crate::model::JourneyExecutionActivityMetricsResponse).
        pub fn build(self) -> crate::model::JourneyExecutionActivityMetricsResponse {
            crate::model::JourneyExecutionActivityMetricsResponse {
                activity_type: self.activity_type,
                application_id: self.application_id,
                journey_activity_id: self.journey_activity_id,
                journey_id: self.journey_id,
                last_evaluated_time: self.last_evaluated_time,
                metrics: self.metrics,
            }
        }
    }
}
impl JourneyExecutionActivityMetricsResponse {
    /// Creates a new builder-style object to manufacture [`JourneyExecutionActivityMetricsResponse`](crate::model::JourneyExecutionActivityMetricsResponse).
    pub fn builder() -> crate::model::journey_execution_activity_metrics_response::Builder {
        crate::model::journey_execution_activity_metrics_response::Builder::default()
    }
}

/// <p>Provides the results of a query that retrieved the data for a standard engagement metric that applies to a journey, and provides information about that query.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JourneyDateRangeKpiResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    #[doc(hidden)]
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The unique identifier for the journey that the metric applies to.</p>
    #[doc(hidden)]
    pub journey_id: std::option::Option<std::string::String>,
    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    #[doc(hidden)]
    pub kpi_name: std::option::Option<std::string::String>,
    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
    #[doc(hidden)]
    pub kpi_result: std::option::Option<crate::model::BaseKpiResult>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Journey Engagement Metrics resource because the resource returns all results in a single page.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl JourneyDateRangeKpiResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The unique identifier for the journey that the metric applies to.</p>
    pub fn journey_id(&self) -> std::option::Option<&str> {
        self.journey_id.as_deref()
    }
    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    pub fn kpi_name(&self) -> std::option::Option<&str> {
        self.kpi_name.as_deref()
    }
    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
    pub fn kpi_result(&self) -> std::option::Option<&crate::model::BaseKpiResult> {
        self.kpi_result.as_ref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Journey Engagement Metrics resource because the resource returns all results in a single page.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
}
/// See [`JourneyDateRangeKpiResponse`](crate::model::JourneyDateRangeKpiResponse).
pub mod journey_date_range_kpi_response {

    /// A builder for [`JourneyDateRangeKpiResponse`](crate::model::JourneyDateRangeKpiResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) journey_id: std::option::Option<std::string::String>,
        pub(crate) kpi_name: std::option::Option<std::string::String>,
        pub(crate) kpi_result: std::option::Option<crate::model::BaseKpiResult>,
        pub(crate) next_token: std::option::Option<std::string::String>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// <p>The unique identifier for the journey that the metric applies to.</p>
        pub fn journey_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.journey_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the journey that the metric applies to.</p>
        pub fn set_journey_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.journey_id = input;
            self
        }
        /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn kpi_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.kpi_name = Some(input.into());
            self
        }
        /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn set_kpi_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kpi_name = input;
            self
        }
        /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
        pub fn kpi_result(mut self, input: crate::model::BaseKpiResult) -> Self {
            self.kpi_result = Some(input);
            self
        }
        /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
        pub fn set_kpi_result(
            mut self,
            input: std::option::Option<crate::model::BaseKpiResult>,
        ) -> Self {
            self.kpi_result = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Journey Engagement Metrics resource because the resource returns all results in a single page.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Journey Engagement Metrics resource because the resource returns all results in a single page.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// Consumes the builder and constructs a [`JourneyDateRangeKpiResponse`](crate::model::JourneyDateRangeKpiResponse).
        pub fn build(self) -> crate::model::JourneyDateRangeKpiResponse {
            crate::model::JourneyDateRangeKpiResponse {
                application_id: self.application_id,
                end_time: self.end_time,
                journey_id: self.journey_id,
                kpi_name: self.kpi_name,
                kpi_result: self.kpi_result,
                next_token: self.next_token,
                start_time: self.start_time,
            }
        }
    }
}
impl JourneyDateRangeKpiResponse {
    /// Creates a new builder-style object to manufacture [`JourneyDateRangeKpiResponse`](crate::model::JourneyDateRangeKpiResponse).
    pub fn builder() -> crate::model::journey_date_range_kpi_response::Builder {
        crate::model::journey_date_range_kpi_response::Builder::default()
    }
}

/// <p>Provides the results of a query that retrieved the data for a standard metric that applies to an application, campaign, or journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BaseKpiResult {
    /// <p>An array of objects that provides the results of a query that retrieved the data for a standard metric that applies to an application, campaign, or journey.</p>
    #[doc(hidden)]
    pub rows: std::option::Option<std::vec::Vec<crate::model::ResultRow>>,
}
impl BaseKpiResult {
    /// <p>An array of objects that provides the results of a query that retrieved the data for a standard metric that applies to an application, campaign, or journey.</p>
    pub fn rows(&self) -> std::option::Option<&[crate::model::ResultRow]> {
        self.rows.as_deref()
    }
}
/// See [`BaseKpiResult`](crate::model::BaseKpiResult).
pub mod base_kpi_result {

    /// A builder for [`BaseKpiResult`](crate::model::BaseKpiResult).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) rows: std::option::Option<std::vec::Vec<crate::model::ResultRow>>,
    }
    impl Builder {
        /// Appends an item to `rows`.
        ///
        /// To override the contents of this collection use [`set_rows`](Self::set_rows).
        ///
        /// <p>An array of objects that provides the results of a query that retrieved the data for a standard metric that applies to an application, campaign, or journey.</p>
        pub fn rows(mut self, input: crate::model::ResultRow) -> Self {
            let mut v = self.rows.unwrap_or_default();
            v.push(input);
            self.rows = Some(v);
            self
        }
        /// <p>An array of objects that provides the results of a query that retrieved the data for a standard metric that applies to an application, campaign, or journey.</p>
        pub fn set_rows(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ResultRow>>,
        ) -> Self {
            self.rows = input;
            self
        }
        /// Consumes the builder and constructs a [`BaseKpiResult`](crate::model::BaseKpiResult).
        pub fn build(self) -> crate::model::BaseKpiResult {
            crate::model::BaseKpiResult { rows: self.rows }
        }
    }
}
impl BaseKpiResult {
    /// Creates a new builder-style object to manufacture [`BaseKpiResult`](crate::model::BaseKpiResult).
    pub fn builder() -> crate::model::base_kpi_result::Builder {
        crate::model::base_kpi_result::Builder::default()
    }
}

/// <p>Provides the results of a query that retrieved the data for a standard metric that applies to an application, campaign, or journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResultRow {
    /// <p>An array of objects that defines the field and field values that were used to group data in a result set that contains multiple results. This value is null if the data in a result set isn’t grouped.</p>
    #[doc(hidden)]
    pub grouped_bys: std::option::Option<std::vec::Vec<crate::model::ResultRowValue>>,
    /// <p>An array of objects that provides pre-aggregated values for a standard metric that applies to an application, campaign, or journey.</p>
    #[doc(hidden)]
    pub values: std::option::Option<std::vec::Vec<crate::model::ResultRowValue>>,
}
impl ResultRow {
    /// <p>An array of objects that defines the field and field values that were used to group data in a result set that contains multiple results. This value is null if the data in a result set isn’t grouped.</p>
    pub fn grouped_bys(&self) -> std::option::Option<&[crate::model::ResultRowValue]> {
        self.grouped_bys.as_deref()
    }
    /// <p>An array of objects that provides pre-aggregated values for a standard metric that applies to an application, campaign, or journey.</p>
    pub fn values(&self) -> std::option::Option<&[crate::model::ResultRowValue]> {
        self.values.as_deref()
    }
}
/// See [`ResultRow`](crate::model::ResultRow).
pub mod result_row {

    /// A builder for [`ResultRow`](crate::model::ResultRow).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) grouped_bys: std::option::Option<std::vec::Vec<crate::model::ResultRowValue>>,
        pub(crate) values: std::option::Option<std::vec::Vec<crate::model::ResultRowValue>>,
    }
    impl Builder {
        /// Appends an item to `grouped_bys`.
        ///
        /// To override the contents of this collection use [`set_grouped_bys`](Self::set_grouped_bys).
        ///
        /// <p>An array of objects that defines the field and field values that were used to group data in a result set that contains multiple results. This value is null if the data in a result set isn’t grouped.</p>
        pub fn grouped_bys(mut self, input: crate::model::ResultRowValue) -> Self {
            let mut v = self.grouped_bys.unwrap_or_default();
            v.push(input);
            self.grouped_bys = Some(v);
            self
        }
        /// <p>An array of objects that defines the field and field values that were used to group data in a result set that contains multiple results. This value is null if the data in a result set isn’t grouped.</p>
        pub fn set_grouped_bys(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ResultRowValue>>,
        ) -> Self {
            self.grouped_bys = input;
            self
        }
        /// Appends an item to `values`.
        ///
        /// To override the contents of this collection use [`set_values`](Self::set_values).
        ///
        /// <p>An array of objects that provides pre-aggregated values for a standard metric that applies to an application, campaign, or journey.</p>
        pub fn values(mut self, input: crate::model::ResultRowValue) -> Self {
            let mut v = self.values.unwrap_or_default();
            v.push(input);
            self.values = Some(v);
            self
        }
        /// <p>An array of objects that provides pre-aggregated values for a standard metric that applies to an application, campaign, or journey.</p>
        pub fn set_values(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ResultRowValue>>,
        ) -> Self {
            self.values = input;
            self
        }
        /// Consumes the builder and constructs a [`ResultRow`](crate::model::ResultRow).
        pub fn build(self) -> crate::model::ResultRow {
            crate::model::ResultRow {
                grouped_bys: self.grouped_bys,
                values: self.values,
            }
        }
    }
}
impl ResultRow {
    /// Creates a new builder-style object to manufacture [`ResultRow`](crate::model::ResultRow).
    pub fn builder() -> crate::model::result_row::Builder {
        crate::model::result_row::Builder::default()
    }
}

/// <p>Provides a single value and metadata about that value as part of an array of query results for a standard metric that applies to an application, campaign, or journey.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResultRowValue {
    /// <p>The friendly name of the metric whose value is specified by the Value property.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The data type of the value specified by the Value property.</p>
    #[doc(hidden)]
    pub r#type: std::option::Option<std::string::String>,
    /// <p>In a Values object, the value for the metric that the query retrieved data for. In a GroupedBys object, the value for the field that was used to group data in a result set that contains multiple results (Values objects).</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl ResultRowValue {
    /// <p>The friendly name of the metric whose value is specified by the Value property.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The data type of the value specified by the Value property.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>In a Values object, the value for the metric that the query retrieved data for. In a GroupedBys object, the value for the field that was used to group data in a result set that contains multiple results (Values objects).</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
/// See [`ResultRowValue`](crate::model::ResultRowValue).
pub mod result_row_value {

    /// A builder for [`ResultRowValue`](crate::model::ResultRowValue).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The friendly name of the metric whose value is specified by the Value property.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The friendly name of the metric whose value is specified by the Value property.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The data type of the value specified by the Value property.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The data type of the value specified by the Value property.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>In a Values object, the value for the metric that the query retrieved data for. In a GroupedBys object, the value for the field that was used to group data in a result set that contains multiple results (Values objects).</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>In a Values object, the value for the metric that the query retrieved data for. In a GroupedBys object, the value for the field that was used to group data in a result set that contains multiple results (Values objects).</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`ResultRowValue`](crate::model::ResultRowValue).
        pub fn build(self) -> crate::model::ResultRowValue {
            crate::model::ResultRowValue {
                key: self.key,
                r#type: self.r#type,
                value: self.value,
            }
        }
    }
}
impl ResultRowValue {
    /// Creates a new builder-style object to manufacture [`ResultRowValue`](crate::model::ResultRowValue).
    pub fn builder() -> crate::model::result_row_value::Builder {
        crate::model::result_row_value::Builder::default()
    }
}

/// <p>In-App Template Response.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppTemplateResponse {
    /// <p>The resource arn of the template.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
    #[doc(hidden)]
    pub content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
    /// <p>The creation date of the template.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>Custom config to be sent to client.</p>
    #[doc(hidden)]
    pub custom_config:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The last modified date of the template.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The layout of the message.</p>
    #[doc(hidden)]
    pub layout: std::option::Option<crate::model::Layout>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The description of the template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The type of the template.</p>
    #[doc(hidden)]
    pub template_type: std::option::Option<crate::model::TemplateType>,
    /// <p>The version id of the template.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl InAppTemplateResponse {
    /// <p>The resource arn of the template.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
    pub fn content(&self) -> std::option::Option<&[crate::model::InAppMessageContent]> {
        self.content.as_deref()
    }
    /// <p>The creation date of the template.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>Custom config to be sent to client.</p>
    pub fn custom_config(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.custom_config.as_ref()
    }
    /// <p>The last modified date of the template.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The layout of the message.</p>
    pub fn layout(&self) -> std::option::Option<&crate::model::Layout> {
        self.layout.as_ref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The description of the template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The type of the template.</p>
    pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
        self.template_type.as_ref()
    }
    /// <p>The version id of the template.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`InAppTemplateResponse`](crate::model::InAppTemplateResponse).
pub mod in_app_template_response {

    /// A builder for [`InAppTemplateResponse`](crate::model::InAppTemplateResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) custom_config: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) layout: std::option::Option<crate::model::Layout>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The resource arn of the template.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The resource arn of the template.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// Appends an item to `content`.
        ///
        /// To override the contents of this collection use [`set_content`](Self::set_content).
        ///
        /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
        pub fn content(mut self, input: crate::model::InAppMessageContent) -> Self {
            let mut v = self.content.unwrap_or_default();
            v.push(input);
            self.content = Some(v);
            self
        }
        /// <p>The content of the message, can include up to 5 modals. Each modal must contain a message, a header, and background color. ImageUrl and buttons are optional.</p>
        pub fn set_content(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        ) -> Self {
            self.content = input;
            self
        }
        /// <p>The creation date of the template.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The creation date of the template.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// Adds a key-value pair to `custom_config`.
        ///
        /// To override the contents of this collection use [`set_custom_config`](Self::set_custom_config).
        ///
        /// <p>Custom config to be sent to client.</p>
        pub fn custom_config(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.custom_config.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.custom_config = Some(hash_map);
            self
        }
        /// <p>Custom config to be sent to client.</p>
        pub fn set_custom_config(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.custom_config = input;
            self
        }
        /// <p>The last modified date of the template.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The last modified date of the template.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The layout of the message.</p>
        pub fn layout(mut self, input: crate::model::Layout) -> Self {
            self.layout = Some(input);
            self
        }
        /// <p>The layout of the message.</p>
        pub fn set_layout(mut self, input: std::option::Option<crate::model::Layout>) -> Self {
            self.layout = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The description of the template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The description of the template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The type of the template.</p>
        pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
            self.template_type = Some(input);
            self
        }
        /// <p>The type of the template.</p>
        pub fn set_template_type(
            mut self,
            input: std::option::Option<crate::model::TemplateType>,
        ) -> Self {
            self.template_type = input;
            self
        }
        /// <p>The version id of the template.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The version id of the template.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppTemplateResponse`](crate::model::InAppTemplateResponse).
        pub fn build(self) -> crate::model::InAppTemplateResponse {
            crate::model::InAppTemplateResponse {
                arn: self.arn,
                content: self.content,
                creation_date: self.creation_date,
                custom_config: self.custom_config,
                last_modified_date: self.last_modified_date,
                layout: self.layout,
                tags: self.tags,
                template_description: self.template_description,
                template_name: self.template_name,
                template_type: self.template_type,
                version: self.version,
            }
        }
    }
}
impl InAppTemplateResponse {
    /// Creates a new builder-style object to manufacture [`InAppTemplateResponse`](crate::model::InAppTemplateResponse).
    pub fn builder() -> crate::model::in_app_template_response::Builder {
        crate::model::in_app_template_response::Builder::default()
    }
}

/// <p>Get in-app messages response object.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppMessagesResponse {
    /// <p>List of targeted in-app message campaigns.</p>
    #[doc(hidden)]
    pub in_app_message_campaigns:
        std::option::Option<std::vec::Vec<crate::model::InAppMessageCampaign>>,
}
impl InAppMessagesResponse {
    /// <p>List of targeted in-app message campaigns.</p>
    pub fn in_app_message_campaigns(
        &self,
    ) -> std::option::Option<&[crate::model::InAppMessageCampaign]> {
        self.in_app_message_campaigns.as_deref()
    }
}
/// See [`InAppMessagesResponse`](crate::model::InAppMessagesResponse).
pub mod in_app_messages_response {

    /// A builder for [`InAppMessagesResponse`](crate::model::InAppMessagesResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) in_app_message_campaigns:
            std::option::Option<std::vec::Vec<crate::model::InAppMessageCampaign>>,
    }
    impl Builder {
        /// Appends an item to `in_app_message_campaigns`.
        ///
        /// To override the contents of this collection use [`set_in_app_message_campaigns`](Self::set_in_app_message_campaigns).
        ///
        /// <p>List of targeted in-app message campaigns.</p>
        pub fn in_app_message_campaigns(
            mut self,
            input: crate::model::InAppMessageCampaign,
        ) -> Self {
            let mut v = self.in_app_message_campaigns.unwrap_or_default();
            v.push(input);
            self.in_app_message_campaigns = Some(v);
            self
        }
        /// <p>List of targeted in-app message campaigns.</p>
        pub fn set_in_app_message_campaigns(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InAppMessageCampaign>>,
        ) -> Self {
            self.in_app_message_campaigns = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppMessagesResponse`](crate::model::InAppMessagesResponse).
        pub fn build(self) -> crate::model::InAppMessagesResponse {
            crate::model::InAppMessagesResponse {
                in_app_message_campaigns: self.in_app_message_campaigns,
            }
        }
    }
}
impl InAppMessagesResponse {
    /// Creates a new builder-style object to manufacture [`InAppMessagesResponse`](crate::model::InAppMessagesResponse).
    pub fn builder() -> crate::model::in_app_messages_response::Builder {
        crate::model::in_app_messages_response::Builder::default()
    }
}

/// <p>Targeted in-app message campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppMessageCampaign {
    /// <p>Campaign id of the corresponding campaign.</p>
    #[doc(hidden)]
    pub campaign_id: std::option::Option<std::string::String>,
    /// <p>Daily cap which controls the number of times any in-app messages can be shown to the endpoint during a day.</p>
    #[doc(hidden)]
    pub daily_cap: i32,
    /// <p>In-app message content with all fields required for rendering an in-app message.</p>
    #[doc(hidden)]
    pub in_app_message: std::option::Option<crate::model::InAppMessage>,
    /// <p>Priority of the in-app message.</p>
    #[doc(hidden)]
    pub priority: i32,
    /// <p>Schedule of the campaign.</p>
    #[doc(hidden)]
    pub schedule: std::option::Option<crate::model::InAppCampaignSchedule>,
    /// <p>Session cap which controls the number of times an in-app message can be shown to the endpoint during an application session.</p>
    #[doc(hidden)]
    pub session_cap: i32,
    /// <p>Total cap which controls the number of times an in-app message can be shown to the endpoint.</p>
    #[doc(hidden)]
    pub total_cap: i32,
    /// <p>Treatment id of the campaign.</p>
    #[doc(hidden)]
    pub treatment_id: std::option::Option<std::string::String>,
}
impl InAppMessageCampaign {
    /// <p>Campaign id of the corresponding campaign.</p>
    pub fn campaign_id(&self) -> std::option::Option<&str> {
        self.campaign_id.as_deref()
    }
    /// <p>Daily cap which controls the number of times any in-app messages can be shown to the endpoint during a day.</p>
    pub fn daily_cap(&self) -> i32 {
        self.daily_cap
    }
    /// <p>In-app message content with all fields required for rendering an in-app message.</p>
    pub fn in_app_message(&self) -> std::option::Option<&crate::model::InAppMessage> {
        self.in_app_message.as_ref()
    }
    /// <p>Priority of the in-app message.</p>
    pub fn priority(&self) -> i32 {
        self.priority
    }
    /// <p>Schedule of the campaign.</p>
    pub fn schedule(&self) -> std::option::Option<&crate::model::InAppCampaignSchedule> {
        self.schedule.as_ref()
    }
    /// <p>Session cap which controls the number of times an in-app message can be shown to the endpoint during an application session.</p>
    pub fn session_cap(&self) -> i32 {
        self.session_cap
    }
    /// <p>Total cap which controls the number of times an in-app message can be shown to the endpoint.</p>
    pub fn total_cap(&self) -> i32 {
        self.total_cap
    }
    /// <p>Treatment id of the campaign.</p>
    pub fn treatment_id(&self) -> std::option::Option<&str> {
        self.treatment_id.as_deref()
    }
}
/// See [`InAppMessageCampaign`](crate::model::InAppMessageCampaign).
pub mod in_app_message_campaign {

    /// A builder for [`InAppMessageCampaign`](crate::model::InAppMessageCampaign).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) campaign_id: std::option::Option<std::string::String>,
        pub(crate) daily_cap: std::option::Option<i32>,
        pub(crate) in_app_message: std::option::Option<crate::model::InAppMessage>,
        pub(crate) priority: std::option::Option<i32>,
        pub(crate) schedule: std::option::Option<crate::model::InAppCampaignSchedule>,
        pub(crate) session_cap: std::option::Option<i32>,
        pub(crate) total_cap: std::option::Option<i32>,
        pub(crate) treatment_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Campaign id of the corresponding campaign.</p>
        pub fn campaign_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.campaign_id = Some(input.into());
            self
        }
        /// <p>Campaign id of the corresponding campaign.</p>
        pub fn set_campaign_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.campaign_id = input;
            self
        }
        /// <p>Daily cap which controls the number of times any in-app messages can be shown to the endpoint during a day.</p>
        pub fn daily_cap(mut self, input: i32) -> Self {
            self.daily_cap = Some(input);
            self
        }
        /// <p>Daily cap which controls the number of times any in-app messages can be shown to the endpoint during a day.</p>
        pub fn set_daily_cap(mut self, input: std::option::Option<i32>) -> Self {
            self.daily_cap = input;
            self
        }
        /// <p>In-app message content with all fields required for rendering an in-app message.</p>
        pub fn in_app_message(mut self, input: crate::model::InAppMessage) -> Self {
            self.in_app_message = Some(input);
            self
        }
        /// <p>In-app message content with all fields required for rendering an in-app message.</p>
        pub fn set_in_app_message(
            mut self,
            input: std::option::Option<crate::model::InAppMessage>,
        ) -> Self {
            self.in_app_message = input;
            self
        }
        /// <p>Priority of the in-app message.</p>
        pub fn priority(mut self, input: i32) -> Self {
            self.priority = Some(input);
            self
        }
        /// <p>Priority of the in-app message.</p>
        pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
            self.priority = input;
            self
        }
        /// <p>Schedule of the campaign.</p>
        pub fn schedule(mut self, input: crate::model::InAppCampaignSchedule) -> Self {
            self.schedule = Some(input);
            self
        }
        /// <p>Schedule of the campaign.</p>
        pub fn set_schedule(
            mut self,
            input: std::option::Option<crate::model::InAppCampaignSchedule>,
        ) -> Self {
            self.schedule = input;
            self
        }
        /// <p>Session cap which controls the number of times an in-app message can be shown to the endpoint during an application session.</p>
        pub fn session_cap(mut self, input: i32) -> Self {
            self.session_cap = Some(input);
            self
        }
        /// <p>Session cap which controls the number of times an in-app message can be shown to the endpoint during an application session.</p>
        pub fn set_session_cap(mut self, input: std::option::Option<i32>) -> Self {
            self.session_cap = input;
            self
        }
        /// <p>Total cap which controls the number of times an in-app message can be shown to the endpoint.</p>
        pub fn total_cap(mut self, input: i32) -> Self {
            self.total_cap = Some(input);
            self
        }
        /// <p>Total cap which controls the number of times an in-app message can be shown to the endpoint.</p>
        pub fn set_total_cap(mut self, input: std::option::Option<i32>) -> Self {
            self.total_cap = input;
            self
        }
        /// <p>Treatment id of the campaign.</p>
        pub fn treatment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_id = Some(input.into());
            self
        }
        /// <p>Treatment id of the campaign.</p>
        pub fn set_treatment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.treatment_id = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppMessageCampaign`](crate::model::InAppMessageCampaign).
        pub fn build(self) -> crate::model::InAppMessageCampaign {
            crate::model::InAppMessageCampaign {
                campaign_id: self.campaign_id,
                daily_cap: self.daily_cap.unwrap_or_default(),
                in_app_message: self.in_app_message,
                priority: self.priority.unwrap_or_default(),
                schedule: self.schedule,
                session_cap: self.session_cap.unwrap_or_default(),
                total_cap: self.total_cap.unwrap_or_default(),
                treatment_id: self.treatment_id,
            }
        }
    }
}
impl InAppMessageCampaign {
    /// Creates a new builder-style object to manufacture [`InAppMessageCampaign`](crate::model::InAppMessageCampaign).
    pub fn builder() -> crate::model::in_app_message_campaign::Builder {
        crate::model::in_app_message_campaign::Builder::default()
    }
}

/// <p>Schedule of the campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppCampaignSchedule {
    /// <p>The scheduled time after which the in-app message should not be shown. Timestamp is in ISO 8601 format.</p>
    #[doc(hidden)]
    pub end_date: std::option::Option<std::string::String>,
    /// <p>The event filter the SDK has to use to show the in-app message in the application.</p>
    #[doc(hidden)]
    pub event_filter: std::option::Option<crate::model::CampaignEventFilter>,
    /// <p>Time during which the in-app message should not be shown to the user.</p>
    #[doc(hidden)]
    pub quiet_time: std::option::Option<crate::model::QuietTime>,
}
impl InAppCampaignSchedule {
    /// <p>The scheduled time after which the in-app message should not be shown. Timestamp is in ISO 8601 format.</p>
    pub fn end_date(&self) -> std::option::Option<&str> {
        self.end_date.as_deref()
    }
    /// <p>The event filter the SDK has to use to show the in-app message in the application.</p>
    pub fn event_filter(&self) -> std::option::Option<&crate::model::CampaignEventFilter> {
        self.event_filter.as_ref()
    }
    /// <p>Time during which the in-app message should not be shown to the user.</p>
    pub fn quiet_time(&self) -> std::option::Option<&crate::model::QuietTime> {
        self.quiet_time.as_ref()
    }
}
/// See [`InAppCampaignSchedule`](crate::model::InAppCampaignSchedule).
pub mod in_app_campaign_schedule {

    /// A builder for [`InAppCampaignSchedule`](crate::model::InAppCampaignSchedule).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) end_date: std::option::Option<std::string::String>,
        pub(crate) event_filter: std::option::Option<crate::model::CampaignEventFilter>,
        pub(crate) quiet_time: std::option::Option<crate::model::QuietTime>,
    }
    impl Builder {
        /// <p>The scheduled time after which the in-app message should not be shown. Timestamp is in ISO 8601 format.</p>
        pub fn end_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.end_date = Some(input.into());
            self
        }
        /// <p>The scheduled time after which the in-app message should not be shown. Timestamp is in ISO 8601 format.</p>
        pub fn set_end_date(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.end_date = input;
            self
        }
        /// <p>The event filter the SDK has to use to show the in-app message in the application.</p>
        pub fn event_filter(mut self, input: crate::model::CampaignEventFilter) -> Self {
            self.event_filter = Some(input);
            self
        }
        /// <p>The event filter the SDK has to use to show the in-app message in the application.</p>
        pub fn set_event_filter(
            mut self,
            input: std::option::Option<crate::model::CampaignEventFilter>,
        ) -> Self {
            self.event_filter = input;
            self
        }
        /// <p>Time during which the in-app message should not be shown to the user.</p>
        pub fn quiet_time(mut self, input: crate::model::QuietTime) -> Self {
            self.quiet_time = Some(input);
            self
        }
        /// <p>Time during which the in-app message should not be shown to the user.</p>
        pub fn set_quiet_time(
            mut self,
            input: std::option::Option<crate::model::QuietTime>,
        ) -> Self {
            self.quiet_time = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppCampaignSchedule`](crate::model::InAppCampaignSchedule).
        pub fn build(self) -> crate::model::InAppCampaignSchedule {
            crate::model::InAppCampaignSchedule {
                end_date: self.end_date,
                event_filter: self.event_filter,
                quiet_time: self.quiet_time,
            }
        }
    }
}
impl InAppCampaignSchedule {
    /// Creates a new builder-style object to manufacture [`InAppCampaignSchedule`](crate::model::InAppCampaignSchedule).
    pub fn builder() -> crate::model::in_app_campaign_schedule::Builder {
        crate::model::in_app_campaign_schedule::Builder::default()
    }
}

/// <p>Provides all fields required for building an in-app message.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InAppMessage {
    /// <p>In-app message content.</p>
    #[doc(hidden)]
    pub content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
    /// <p>Custom config to be sent to SDK.</p>
    #[doc(hidden)]
    pub custom_config:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The layout of the message.</p>
    #[doc(hidden)]
    pub layout: std::option::Option<crate::model::Layout>,
}
impl InAppMessage {
    /// <p>In-app message content.</p>
    pub fn content(&self) -> std::option::Option<&[crate::model::InAppMessageContent]> {
        self.content.as_deref()
    }
    /// <p>Custom config to be sent to SDK.</p>
    pub fn custom_config(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.custom_config.as_ref()
    }
    /// <p>The layout of the message.</p>
    pub fn layout(&self) -> std::option::Option<&crate::model::Layout> {
        self.layout.as_ref()
    }
}
/// See [`InAppMessage`](crate::model::InAppMessage).
pub mod in_app_message {

    /// A builder for [`InAppMessage`](crate::model::InAppMessage).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) content: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        pub(crate) custom_config: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) layout: std::option::Option<crate::model::Layout>,
    }
    impl Builder {
        /// Appends an item to `content`.
        ///
        /// To override the contents of this collection use [`set_content`](Self::set_content).
        ///
        /// <p>In-app message content.</p>
        pub fn content(mut self, input: crate::model::InAppMessageContent) -> Self {
            let mut v = self.content.unwrap_or_default();
            v.push(input);
            self.content = Some(v);
            self
        }
        /// <p>In-app message content.</p>
        pub fn set_content(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InAppMessageContent>>,
        ) -> Self {
            self.content = input;
            self
        }
        /// Adds a key-value pair to `custom_config`.
        ///
        /// To override the contents of this collection use [`set_custom_config`](Self::set_custom_config).
        ///
        /// <p>Custom config to be sent to SDK.</p>
        pub fn custom_config(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.custom_config.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.custom_config = Some(hash_map);
            self
        }
        /// <p>Custom config to be sent to SDK.</p>
        pub fn set_custom_config(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.custom_config = input;
            self
        }
        /// <p>The layout of the message.</p>
        pub fn layout(mut self, input: crate::model::Layout) -> Self {
            self.layout = Some(input);
            self
        }
        /// <p>The layout of the message.</p>
        pub fn set_layout(mut self, input: std::option::Option<crate::model::Layout>) -> Self {
            self.layout = input;
            self
        }
        /// Consumes the builder and constructs a [`InAppMessage`](crate::model::InAppMessage).
        pub fn build(self) -> crate::model::InAppMessage {
            crate::model::InAppMessage {
                content: self.content,
                custom_config: self.custom_config,
                layout: self.layout,
            }
        }
    }
}
impl InAppMessage {
    /// Creates a new builder-style object to manufacture [`InAppMessage`](crate::model::InAppMessage).
    pub fn builder() -> crate::model::in_app_message::Builder {
        crate::model::in_app_message::Builder::default()
    }
}

/// <p>Provides information about the content and settings for a message template that can be used in messages that are sent through the email channel.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EmailTemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    #[doc(hidden)]
    pub default_substitutions: std::option::Option<std::string::String>,
    /// <p>The message body, in HTML format, that's used in email messages that are based on the message template.</p>
    #[doc(hidden)]
    pub html_part: std::option::Option<std::string::String>,
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the recommender model that's used by the message template.</p>
    #[doc(hidden)]
    pub recommender_id: std::option::Option<std::string::String>,
    /// <p>The subject line, or title, that's used in email messages that are based on the message template.</p>
    #[doc(hidden)]
    pub subject: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The custom description of the message template.</p>
    #[doc(hidden)]
    pub template_description: std::option::Option<std::string::String>,
    /// <p>The name of the message template.</p>
    #[doc(hidden)]
    pub template_name: std::option::Option<std::string::String>,
    /// <p>The type of channel that the message template is designed for. For an email template, this value is EMAIL.</p>
    #[doc(hidden)]
    pub template_type: std::option::Option<crate::model::TemplateType>,
    /// <p>The message body, in plain text format, that's used in email messages that are based on the message template.</p>
    #[doc(hidden)]
    pub text_part: std::option::Option<std::string::String>,
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    #[doc(hidden)]
    pub version: std::option::Option<std::string::String>,
}
impl EmailTemplateResponse {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
    pub fn default_substitutions(&self) -> std::option::Option<&str> {
        self.default_substitutions.as_deref()
    }
    /// <p>The message body, in HTML format, that's used in email messages that are based on the message template.</p>
    pub fn html_part(&self) -> std::option::Option<&str> {
        self.html_part.as_deref()
    }
    /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The unique identifier for the recommender model that's used by the message template.</p>
    pub fn recommender_id(&self) -> std::option::Option<&str> {
        self.recommender_id.as_deref()
    }
    /// <p>The subject line, or title, that's used in email messages that are based on the message template.</p>
    pub fn subject(&self) -> std::option::Option<&str> {
        self.subject.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The custom description of the message template.</p>
    pub fn template_description(&self) -> std::option::Option<&str> {
        self.template_description.as_deref()
    }
    /// <p>The name of the message template.</p>
    pub fn template_name(&self) -> std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The type of channel that the message template is designed for. For an email template, this value is EMAIL.</p>
    pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
        self.template_type.as_ref()
    }
    /// <p>The message body, in plain text format, that's used in email messages that are based on the message template.</p>
    pub fn text_part(&self) -> std::option::Option<&str> {
        self.text_part.as_deref()
    }
    /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
    pub fn version(&self) -> std::option::Option<&str> {
        self.version.as_deref()
    }
}
/// See [`EmailTemplateResponse`](crate::model::EmailTemplateResponse).
pub mod email_template_response {

    /// A builder for [`EmailTemplateResponse`](crate::model::EmailTemplateResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) default_substitutions: std::option::Option<std::string::String>,
        pub(crate) html_part: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) recommender_id: std::option::Option<std::string::String>,
        pub(crate) subject: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) template_description: std::option::Option<std::string::String>,
        pub(crate) template_name: std::option::Option<std::string::String>,
        pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
        pub(crate) text_part: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn default_substitutions(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_substitutions = Some(input.into());
            self
        }
        /// <p>The JSON object that specifies the default values that are used for message variables in the message template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the default value for that variable.</p>
        pub fn set_default_substitutions(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_substitutions = input;
            self
        }
        /// <p>The message body, in HTML format, that's used in email messages that are based on the message template.</p>
        pub fn html_part(mut self, input: impl Into<std::string::String>) -> Self {
            self.html_part = Some(input.into());
            self
        }
        /// <p>The message body, in HTML format, that's used in email messages that are based on the message template.</p>
        pub fn set_html_part(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.html_part = input;
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date, in ISO 8601 format, when the message template was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The unique identifier for the recommender model that's used by the message template.</p>
        pub fn recommender_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.recommender_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the recommender model that's used by the message template.</p>
        pub fn set_recommender_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommender_id = input;
            self
        }
        /// <p>The subject line, or title, that's used in email messages that are based on the message template.</p>
        pub fn subject(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject = Some(input.into());
            self
        }
        /// <p>The subject line, or title, that's used in email messages that are based on the message template.</p>
        pub fn set_subject(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the message template. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn template_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_description = Some(input.into());
            self
        }
        /// <p>The custom description of the message template.</p>
        pub fn set_template_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_description = input;
            self
        }
        /// <p>The name of the message template.</p>
        pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.template_name = Some(input.into());
            self
        }
        /// <p>The name of the message template.</p>
        pub fn set_template_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.template_name = input;
            self
        }
        /// <p>The type of channel that the message template is designed for. For an email template, this value is EMAIL.</p>
        pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
            self.template_type = Some(input);
            self
        }
        /// <p>The type of channel that the message template is designed for. For an email template, this value is EMAIL.</p>
        pub fn set_template_type(
            mut self,
            input: std::option::Option<crate::model::TemplateType>,
        ) -> Self {
            self.template_type = input;
            self
        }
        /// <p>The message body, in plain text format, that's used in email messages that are based on the message template.</p>
        pub fn text_part(mut self, input: impl Into<std::string::String>) -> Self {
            self.text_part = Some(input.into());
            self
        }
        /// <p>The message body, in plain text format, that's used in email messages that are based on the message template.</p>
        pub fn set_text_part(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.text_part = input;
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
            self.version = Some(input.into());
            self
        }
        /// <p>The unique identifier, as an integer, for the active version of the message template, or the version of the template that you specified by using the version parameter in your request.</p>
        pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`EmailTemplateResponse`](crate::model::EmailTemplateResponse).
        pub fn build(self) -> crate::model::EmailTemplateResponse {
            crate::model::EmailTemplateResponse {
                arn: self.arn,
                creation_date: self.creation_date,
                default_substitutions: self.default_substitutions,
                html_part: self.html_part,
                last_modified_date: self.last_modified_date,
                recommender_id: self.recommender_id,
                subject: self.subject,
                tags: self.tags,
                template_description: self.template_description,
                template_name: self.template_name,
                template_type: self.template_type,
                text_part: self.text_part,
                version: self.version,
            }
        }
    }
}
impl EmailTemplateResponse {
    /// Creates a new builder-style object to manufacture [`EmailTemplateResponse`](crate::model::EmailTemplateResponse).
    pub fn builder() -> crate::model::email_template_response::Builder {
        crate::model::email_template_response::Builder::default()
    }
}

/// <p>Provides information about the general settings and status of all channels for an application, including channels that aren't enabled for the application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ChannelsResponse {
    /// <p>A map that contains a multipart response for each channel. For each item in this object, the ChannelType is the key and the Channel is the value.</p>
    #[doc(hidden)]
    pub channels: std::option::Option<
        std::collections::HashMap<std::string::String, crate::model::ChannelResponse>,
    >,
}
impl ChannelsResponse {
    /// <p>A map that contains a multipart response for each channel. For each item in this object, the ChannelType is the key and the Channel is the value.</p>
    pub fn channels(
        &self,
    ) -> std::option::Option<
        &std::collections::HashMap<std::string::String, crate::model::ChannelResponse>,
    > {
        self.channels.as_ref()
    }
}
/// See [`ChannelsResponse`](crate::model::ChannelsResponse).
pub mod channels_response {

    /// A builder for [`ChannelsResponse`](crate::model::ChannelsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) channels: std::option::Option<
            std::collections::HashMap<std::string::String, crate::model::ChannelResponse>,
        >,
    }
    impl Builder {
        /// Adds a key-value pair to `channels`.
        ///
        /// To override the contents of this collection use [`set_channels`](Self::set_channels).
        ///
        /// <p>A map that contains a multipart response for each channel. For each item in this object, the ChannelType is the key and the Channel is the value.</p>
        pub fn channels(
            mut self,
            k: impl Into<std::string::String>,
            v: crate::model::ChannelResponse,
        ) -> Self {
            let mut hash_map = self.channels.unwrap_or_default();
            hash_map.insert(k.into(), v);
            self.channels = Some(hash_map);
            self
        }
        /// <p>A map that contains a multipart response for each channel. For each item in this object, the ChannelType is the key and the Channel is the value.</p>
        pub fn set_channels(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, crate::model::ChannelResponse>,
            >,
        ) -> Self {
            self.channels = input;
            self
        }
        /// Consumes the builder and constructs a [`ChannelsResponse`](crate::model::ChannelsResponse).
        pub fn build(self) -> crate::model::ChannelsResponse {
            crate::model::ChannelsResponse {
                channels: self.channels,
            }
        }
    }
}
impl ChannelsResponse {
    /// Creates a new builder-style object to manufacture [`ChannelsResponse`](crate::model::ChannelsResponse).
    pub fn builder() -> crate::model::channels_response::Builder {
        crate::model::channels_response::Builder::default()
    }
}

/// <p>Provides information about the general settings and status of a channel for an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ChannelResponse {
    /// <p>The unique identifier for the application.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the channel was enabled.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
    /// <p>Specifies whether the channel is enabled for the application.</p>
    #[doc(hidden)]
    pub enabled: bool,
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub has_credential: bool,
    /// <p>(Deprecated) An identifier for the channel. This property is retained only for backward compatibility.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the channel is archived.</p>
    #[doc(hidden)]
    pub is_archived: bool,
    /// <p>The user who last modified the channel.</p>
    #[doc(hidden)]
    pub last_modified_by: std::option::Option<std::string::String>,
    /// <p>The date and time, in ISO 8601 format, when the channel was last modified.</p>
    #[doc(hidden)]
    pub last_modified_date: std::option::Option<std::string::String>,
    /// <p>The current version of the channel.</p>
    #[doc(hidden)]
    pub version: i32,
}
impl ChannelResponse {
    /// <p>The unique identifier for the application.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the channel was enabled.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
    /// <p>Specifies whether the channel is enabled for the application.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
    /// <p>(Not used) This property is retained only for backward compatibility.</p>
    pub fn has_credential(&self) -> bool {
        self.has_credential
    }
    /// <p>(Deprecated) An identifier for the channel. This property is retained only for backward compatibility.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the channel is archived.</p>
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
    /// <p>The user who last modified the channel.</p>
    pub fn last_modified_by(&self) -> std::option::Option<&str> {
        self.last_modified_by.as_deref()
    }
    /// <p>The date and time, in ISO 8601 format, when the channel was last modified.</p>
    pub fn last_modified_date(&self) -> std::option::Option<&str> {
        self.last_modified_date.as_deref()
    }
    /// <p>The current version of the channel.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
}
/// See [`ChannelResponse`](crate::model::ChannelResponse).
pub mod channel_response {

    /// A builder for [`ChannelResponse`](crate::model::ChannelResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) creation_date: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) has_credential: std::option::Option<bool>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) is_archived: std::option::Option<bool>,
        pub(crate) last_modified_by: std::option::Option<std::string::String>,
        pub(crate) last_modified_date: std::option::Option<std::string::String>,
        pub(crate) version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier for the application.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the channel was enabled.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the channel was enabled.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// <p>Specifies whether the channel is enabled for the application.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Specifies whether the channel is enabled for the application.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn has_credential(mut self, input: bool) -> Self {
            self.has_credential = Some(input);
            self
        }
        /// <p>(Not used) This property is retained only for backward compatibility.</p>
        pub fn set_has_credential(mut self, input: std::option::Option<bool>) -> Self {
            self.has_credential = input;
            self
        }
        /// <p>(Deprecated) An identifier for the channel. This property is retained only for backward compatibility.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>(Deprecated) An identifier for the channel. This property is retained only for backward compatibility.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the channel is archived.</p>
        pub fn is_archived(mut self, input: bool) -> Self {
            self.is_archived = Some(input);
            self
        }
        /// <p>Specifies whether the channel is archived.</p>
        pub fn set_is_archived(mut self, input: std::option::Option<bool>) -> Self {
            self.is_archived = input;
            self
        }
        /// <p>The user who last modified the channel.</p>
        pub fn last_modified_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_by = Some(input.into());
            self
        }
        /// <p>The user who last modified the channel.</p>
        pub fn set_last_modified_by(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_by = input;
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the channel was last modified.</p>
        pub fn last_modified_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.last_modified_date = Some(input.into());
            self
        }
        /// <p>The date and time, in ISO 8601 format, when the channel was last modified.</p>
        pub fn set_last_modified_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.last_modified_date = input;
            self
        }
        /// <p>The current version of the channel.</p>
        pub fn version(mut self, input: i32) -> Self {
            self.version = Some(input);
            self
        }
        /// <p>The current version of the channel.</p>
        pub fn set_version(mut self, input: std::option::Option<i32>) -> Self {
            self.version = input;
            self
        }
        /// Consumes the builder and constructs a [`ChannelResponse`](crate::model::ChannelResponse).
        pub fn build(self) -> crate::model::ChannelResponse {
            crate::model::ChannelResponse {
                application_id: self.application_id,
                creation_date: self.creation_date,
                enabled: self.enabled.unwrap_or_default(),
                has_credential: self.has_credential.unwrap_or_default(),
                id: self.id,
                is_archived: self.is_archived.unwrap_or_default(),
                last_modified_by: self.last_modified_by,
                last_modified_date: self.last_modified_date,
                version: self.version.unwrap_or_default(),
            }
        }
    }
}
impl ChannelResponse {
    /// Creates a new builder-style object to manufacture [`ChannelResponse`](crate::model::ChannelResponse).
    pub fn builder() -> crate::model::channel_response::Builder {
        crate::model::channel_response::Builder::default()
    }
}

/// <p>Provides information about the configuration and other settings for all the campaigns that are associated with an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignsResponse {
    /// <p>An array of responses, one for each campaign that's associated with the application.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::CampaignResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl CampaignsResponse {
    /// <p>An array of responses, one for each campaign that's associated with the application.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::CampaignResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`CampaignsResponse`](crate::model::CampaignsResponse).
pub mod campaigns_response {

    /// A builder for [`CampaignsResponse`](crate::model::CampaignsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::CampaignResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each campaign that's associated with the application.</p>
        pub fn item(mut self, input: crate::model::CampaignResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each campaign that's associated with the application.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CampaignResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignsResponse`](crate::model::CampaignsResponse).
        pub fn build(self) -> crate::model::CampaignsResponse {
            crate::model::CampaignsResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl CampaignsResponse {
    /// Creates a new builder-style object to manufacture [`CampaignsResponse`](crate::model::CampaignsResponse).
    pub fn builder() -> crate::model::campaigns_response::Builder {
        crate::model::campaigns_response::Builder::default()
    }
}

/// <p>Provides the results of a query that retrieved the data for a standard metric that applies to a campaign, and provides information about that query.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CampaignDateRangeKpiResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the campaign that the metric applies to.</p>
    #[doc(hidden)]
    pub campaign_id: std::option::Option<std::string::String>,
    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    #[doc(hidden)]
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    #[doc(hidden)]
    pub kpi_name: std::option::Option<std::string::String>,
    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
    #[doc(hidden)]
    pub kpi_result: std::option::Option<crate::model::BaseKpiResult>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Campaign Metrics resource because the resource returns all results in a single page.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl CampaignDateRangeKpiResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The unique identifier for the campaign that the metric applies to.</p>
    pub fn campaign_id(&self) -> std::option::Option<&str> {
        self.campaign_id.as_deref()
    }
    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    pub fn kpi_name(&self) -> std::option::Option<&str> {
        self.kpi_name.as_deref()
    }
    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
    pub fn kpi_result(&self) -> std::option::Option<&crate::model::BaseKpiResult> {
        self.kpi_result.as_ref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Campaign Metrics resource because the resource returns all results in a single page.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
}
/// See [`CampaignDateRangeKpiResponse`](crate::model::CampaignDateRangeKpiResponse).
pub mod campaign_date_range_kpi_response {

    /// A builder for [`CampaignDateRangeKpiResponse`](crate::model::CampaignDateRangeKpiResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) campaign_id: std::option::Option<std::string::String>,
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) kpi_name: std::option::Option<std::string::String>,
        pub(crate) kpi_result: std::option::Option<crate::model::BaseKpiResult>,
        pub(crate) next_token: std::option::Option<std::string::String>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The unique identifier for the campaign that the metric applies to.</p>
        pub fn campaign_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.campaign_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the campaign that the metric applies to.</p>
        pub fn set_campaign_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.campaign_id = input;
            self
        }
        /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn kpi_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.kpi_name = Some(input.into());
            self
        }
        /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn set_kpi_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kpi_name = input;
            self
        }
        /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
        pub fn kpi_result(mut self, input: crate::model::BaseKpiResult) -> Self {
            self.kpi_result = Some(input);
            self
        }
        /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
        pub fn set_kpi_result(
            mut self,
            input: std::option::Option<crate::model::BaseKpiResult>,
        ) -> Self {
            self.kpi_result = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Campaign Metrics resource because the resource returns all results in a single page.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Campaign Metrics resource because the resource returns all results in a single page.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// Consumes the builder and constructs a [`CampaignDateRangeKpiResponse`](crate::model::CampaignDateRangeKpiResponse).
        pub fn build(self) -> crate::model::CampaignDateRangeKpiResponse {
            crate::model::CampaignDateRangeKpiResponse {
                application_id: self.application_id,
                campaign_id: self.campaign_id,
                end_time: self.end_time,
                kpi_name: self.kpi_name,
                kpi_result: self.kpi_result,
                next_token: self.next_token,
                start_time: self.start_time,
            }
        }
    }
}
impl CampaignDateRangeKpiResponse {
    /// Creates a new builder-style object to manufacture [`CampaignDateRangeKpiResponse`](crate::model::CampaignDateRangeKpiResponse).
    pub fn builder() -> crate::model::campaign_date_range_kpi_response::Builder {
        crate::model::campaign_date_range_kpi_response::Builder::default()
    }
}

/// <p>Provides information about the activities that were performed by a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ActivitiesResponse {
    /// <p>An array of responses, one for each activity that was performed by the campaign.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::ActivityResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ActivitiesResponse {
    /// <p>An array of responses, one for each activity that was performed by the campaign.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::ActivityResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`ActivitiesResponse`](crate::model::ActivitiesResponse).
pub mod activities_response {

    /// A builder for [`ActivitiesResponse`](crate::model::ActivitiesResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::ActivityResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each activity that was performed by the campaign.</p>
        pub fn item(mut self, input: crate::model::ActivityResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each activity that was performed by the campaign.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ActivityResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ActivitiesResponse`](crate::model::ActivitiesResponse).
        pub fn build(self) -> crate::model::ActivitiesResponse {
            crate::model::ActivitiesResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl ActivitiesResponse {
    /// Creates a new builder-style object to manufacture [`ActivitiesResponse`](crate::model::ActivitiesResponse).
    pub fn builder() -> crate::model::activities_response::Builder {
        crate::model::activities_response::Builder::default()
    }
}

/// <p>Provides information about an activity that was performed by a campaign.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ActivityResponse {
    /// <p>The unique identifier for the application that the campaign applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the campaign that the activity applies to.</p>
    #[doc(hidden)]
    pub campaign_id: std::option::Option<std::string::String>,
    /// <p>The actual time, in ISO 8601 format, when the activity was marked CANCELLED or COMPLETED.</p>
    #[doc(hidden)]
    pub end: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the activity.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>Specifies whether the activity succeeded. Possible values are SUCCESS and FAIL.</p>
    #[doc(hidden)]
    pub result: std::option::Option<std::string::String>,
    /// <p>The scheduled start time, in ISO 8601 format, for the activity.</p>
    #[doc(hidden)]
    pub scheduled_start: std::option::Option<std::string::String>,
    /// <p>The actual start time, in ISO 8601 format, of the activity.</p>
    #[doc(hidden)]
    pub start: std::option::Option<std::string::String>,
    /// <p>The current status of the activity. Possible values are: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, and COMPLETED.</p>
    #[doc(hidden)]
    pub state: std::option::Option<std::string::String>,
    /// <p>The total number of endpoints that the campaign successfully delivered messages to.</p>
    #[doc(hidden)]
    pub successful_endpoint_count: i32,
    /// <p>The total number of time zones that were completed.</p>
    #[doc(hidden)]
    pub timezones_completed_count: i32,
    /// <p>The total number of unique time zones that are in the segment for the campaign.</p>
    #[doc(hidden)]
    pub timezones_total_count: i32,
    /// <p>The total number of endpoints that the campaign attempted to deliver messages to.</p>
    #[doc(hidden)]
    pub total_endpoint_count: i32,
    /// <p>The unique identifier for the campaign treatment that the activity applies to. A treatment is a variation of a campaign that's used for A/B testing of a campaign.</p>
    #[doc(hidden)]
    pub treatment_id: std::option::Option<std::string::String>,
}
impl ActivityResponse {
    /// <p>The unique identifier for the application that the campaign applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The unique identifier for the campaign that the activity applies to.</p>
    pub fn campaign_id(&self) -> std::option::Option<&str> {
        self.campaign_id.as_deref()
    }
    /// <p>The actual time, in ISO 8601 format, when the activity was marked CANCELLED or COMPLETED.</p>
    pub fn end(&self) -> std::option::Option<&str> {
        self.end.as_deref()
    }
    /// <p>The unique identifier for the activity.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the activity succeeded. Possible values are SUCCESS and FAIL.</p>
    pub fn result(&self) -> std::option::Option<&str> {
        self.result.as_deref()
    }
    /// <p>The scheduled start time, in ISO 8601 format, for the activity.</p>
    pub fn scheduled_start(&self) -> std::option::Option<&str> {
        self.scheduled_start.as_deref()
    }
    /// <p>The actual start time, in ISO 8601 format, of the activity.</p>
    pub fn start(&self) -> std::option::Option<&str> {
        self.start.as_deref()
    }
    /// <p>The current status of the activity. Possible values are: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, and COMPLETED.</p>
    pub fn state(&self) -> std::option::Option<&str> {
        self.state.as_deref()
    }
    /// <p>The total number of endpoints that the campaign successfully delivered messages to.</p>
    pub fn successful_endpoint_count(&self) -> i32 {
        self.successful_endpoint_count
    }
    /// <p>The total number of time zones that were completed.</p>
    pub fn timezones_completed_count(&self) -> i32 {
        self.timezones_completed_count
    }
    /// <p>The total number of unique time zones that are in the segment for the campaign.</p>
    pub fn timezones_total_count(&self) -> i32 {
        self.timezones_total_count
    }
    /// <p>The total number of endpoints that the campaign attempted to deliver messages to.</p>
    pub fn total_endpoint_count(&self) -> i32 {
        self.total_endpoint_count
    }
    /// <p>The unique identifier for the campaign treatment that the activity applies to. A treatment is a variation of a campaign that's used for A/B testing of a campaign.</p>
    pub fn treatment_id(&self) -> std::option::Option<&str> {
        self.treatment_id.as_deref()
    }
}
/// See [`ActivityResponse`](crate::model::ActivityResponse).
pub mod activity_response {

    /// A builder for [`ActivityResponse`](crate::model::ActivityResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) campaign_id: std::option::Option<std::string::String>,
        pub(crate) end: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) result: std::option::Option<std::string::String>,
        pub(crate) scheduled_start: std::option::Option<std::string::String>,
        pub(crate) start: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<std::string::String>,
        pub(crate) successful_endpoint_count: std::option::Option<i32>,
        pub(crate) timezones_completed_count: std::option::Option<i32>,
        pub(crate) timezones_total_count: std::option::Option<i32>,
        pub(crate) total_endpoint_count: std::option::Option<i32>,
        pub(crate) treatment_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the campaign applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the campaign applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The unique identifier for the campaign that the activity applies to.</p>
        pub fn campaign_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.campaign_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the campaign that the activity applies to.</p>
        pub fn set_campaign_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.campaign_id = input;
            self
        }
        /// <p>The actual time, in ISO 8601 format, when the activity was marked CANCELLED or COMPLETED.</p>
        pub fn end(mut self, input: impl Into<std::string::String>) -> Self {
            self.end = Some(input.into());
            self
        }
        /// <p>The actual time, in ISO 8601 format, when the activity was marked CANCELLED or COMPLETED.</p>
        pub fn set_end(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.end = input;
            self
        }
        /// <p>The unique identifier for the activity.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the activity.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>Specifies whether the activity succeeded. Possible values are SUCCESS and FAIL.</p>
        pub fn result(mut self, input: impl Into<std::string::String>) -> Self {
            self.result = Some(input.into());
            self
        }
        /// <p>Specifies whether the activity succeeded. Possible values are SUCCESS and FAIL.</p>
        pub fn set_result(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.result = input;
            self
        }
        /// <p>The scheduled start time, in ISO 8601 format, for the activity.</p>
        pub fn scheduled_start(mut self, input: impl Into<std::string::String>) -> Self {
            self.scheduled_start = Some(input.into());
            self
        }
        /// <p>The scheduled start time, in ISO 8601 format, for the activity.</p>
        pub fn set_scheduled_start(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.scheduled_start = input;
            self
        }
        /// <p>The actual start time, in ISO 8601 format, of the activity.</p>
        pub fn start(mut self, input: impl Into<std::string::String>) -> Self {
            self.start = Some(input.into());
            self
        }
        /// <p>The actual start time, in ISO 8601 format, of the activity.</p>
        pub fn set_start(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.start = input;
            self
        }
        /// <p>The current status of the activity. Possible values are: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, and COMPLETED.</p>
        pub fn state(mut self, input: impl Into<std::string::String>) -> Self {
            self.state = Some(input.into());
            self
        }
        /// <p>The current status of the activity. Possible values are: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, and COMPLETED.</p>
        pub fn set_state(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.state = input;
            self
        }
        /// <p>The total number of endpoints that the campaign successfully delivered messages to.</p>
        pub fn successful_endpoint_count(mut self, input: i32) -> Self {
            self.successful_endpoint_count = Some(input);
            self
        }
        /// <p>The total number of endpoints that the campaign successfully delivered messages to.</p>
        pub fn set_successful_endpoint_count(mut self, input: std::option::Option<i32>) -> Self {
            self.successful_endpoint_count = input;
            self
        }
        /// <p>The total number of time zones that were completed.</p>
        pub fn timezones_completed_count(mut self, input: i32) -> Self {
            self.timezones_completed_count = Some(input);
            self
        }
        /// <p>The total number of time zones that were completed.</p>
        pub fn set_timezones_completed_count(mut self, input: std::option::Option<i32>) -> Self {
            self.timezones_completed_count = input;
            self
        }
        /// <p>The total number of unique time zones that are in the segment for the campaign.</p>
        pub fn timezones_total_count(mut self, input: i32) -> Self {
            self.timezones_total_count = Some(input);
            self
        }
        /// <p>The total number of unique time zones that are in the segment for the campaign.</p>
        pub fn set_timezones_total_count(mut self, input: std::option::Option<i32>) -> Self {
            self.timezones_total_count = input;
            self
        }
        /// <p>The total number of endpoints that the campaign attempted to deliver messages to.</p>
        pub fn total_endpoint_count(mut self, input: i32) -> Self {
            self.total_endpoint_count = Some(input);
            self
        }
        /// <p>The total number of endpoints that the campaign attempted to deliver messages to.</p>
        pub fn set_total_endpoint_count(mut self, input: std::option::Option<i32>) -> Self {
            self.total_endpoint_count = input;
            self
        }
        /// <p>The unique identifier for the campaign treatment that the activity applies to. A treatment is a variation of a campaign that's used for A/B testing of a campaign.</p>
        pub fn treatment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.treatment_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the campaign treatment that the activity applies to. A treatment is a variation of a campaign that's used for A/B testing of a campaign.</p>
        pub fn set_treatment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.treatment_id = input;
            self
        }
        /// Consumes the builder and constructs a [`ActivityResponse`](crate::model::ActivityResponse).
        pub fn build(self) -> crate::model::ActivityResponse {
            crate::model::ActivityResponse {
                application_id: self.application_id,
                campaign_id: self.campaign_id,
                end: self.end,
                id: self.id,
                result: self.result,
                scheduled_start: self.scheduled_start,
                start: self.start,
                state: self.state,
                successful_endpoint_count: self.successful_endpoint_count.unwrap_or_default(),
                timezones_completed_count: self.timezones_completed_count.unwrap_or_default(),
                timezones_total_count: self.timezones_total_count.unwrap_or_default(),
                total_endpoint_count: self.total_endpoint_count.unwrap_or_default(),
                treatment_id: self.treatment_id,
            }
        }
    }
}
impl ActivityResponse {
    /// Creates a new builder-style object to manufacture [`ActivityResponse`](crate::model::ActivityResponse).
    pub fn builder() -> crate::model::activity_response::Builder {
        crate::model::activity_response::Builder::default()
    }
}

/// <p>Provides information about all of your applications.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApplicationsResponse {
    /// <p>An array of responses, one for each application that was returned.</p>
    #[doc(hidden)]
    pub item: std::option::Option<std::vec::Vec<crate::model::ApplicationResponse>>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ApplicationsResponse {
    /// <p>An array of responses, one for each application that was returned.</p>
    pub fn item(&self) -> std::option::Option<&[crate::model::ApplicationResponse]> {
        self.item.as_deref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
/// See [`ApplicationsResponse`](crate::model::ApplicationsResponse).
pub mod applications_response {

    /// A builder for [`ApplicationsResponse`](crate::model::ApplicationsResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) item: std::option::Option<std::vec::Vec<crate::model::ApplicationResponse>>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `item`.
        ///
        /// To override the contents of this collection use [`set_item`](Self::set_item).
        ///
        /// <p>An array of responses, one for each application that was returned.</p>
        pub fn item(mut self, input: crate::model::ApplicationResponse) -> Self {
            let mut v = self.item.unwrap_or_default();
            v.push(input);
            self.item = Some(v);
            self
        }
        /// <p>An array of responses, one for each application that was returned.</p>
        pub fn set_item(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ApplicationResponse>>,
        ) -> Self {
            self.item = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ApplicationsResponse`](crate::model::ApplicationsResponse).
        pub fn build(self) -> crate::model::ApplicationsResponse {
            crate::model::ApplicationsResponse {
                item: self.item,
                next_token: self.next_token,
            }
        }
    }
}
impl ApplicationsResponse {
    /// Creates a new builder-style object to manufacture [`ApplicationsResponse`](crate::model::ApplicationsResponse).
    pub fn builder() -> crate::model::applications_response::Builder {
        crate::model::applications_response::Builder::default()
    }
}

/// <p>Provides information about an application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApplicationResponse {
    /// <p>The Amazon Resource Name (ARN) of the application.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    #[doc(hidden)]
    pub id: std::option::Option<std::string::String>,
    /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the application. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The date and time when the Application was created.</p>
    #[doc(hidden)]
    pub creation_date: std::option::Option<std::string::String>,
}
impl ApplicationResponse {
    /// <p>The Amazon Resource Name (ARN) of the application.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the application. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// <p>The date and time when the Application was created.</p>
    pub fn creation_date(&self) -> std::option::Option<&str> {
        self.creation_date.as_deref()
    }
}
/// See [`ApplicationResponse`](crate::model::ApplicationResponse).
pub mod application_response {

    /// A builder for [`ApplicationResponse`](crate::model::ApplicationResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) creation_date: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the application.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the application.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the application. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that identifies the tags that are associated with the application. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// <p>The date and time when the Application was created.</p>
        pub fn creation_date(mut self, input: impl Into<std::string::String>) -> Self {
            self.creation_date = Some(input.into());
            self
        }
        /// <p>The date and time when the Application was created.</p>
        pub fn set_creation_date(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.creation_date = input;
            self
        }
        /// Consumes the builder and constructs a [`ApplicationResponse`](crate::model::ApplicationResponse).
        pub fn build(self) -> crate::model::ApplicationResponse {
            crate::model::ApplicationResponse {
                arn: self.arn,
                id: self.id,
                name: self.name,
                tags: self.tags,
                creation_date: self.creation_date,
            }
        }
    }
}
impl ApplicationResponse {
    /// Creates a new builder-style object to manufacture [`ApplicationResponse`](crate::model::ApplicationResponse).
    pub fn builder() -> crate::model::application_response::Builder {
        crate::model::application_response::Builder::default()
    }
}

/// <p>Provides the results of a query that retrieved the data for a standard metric that applies to an application, and provides information about that query.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApplicationDateRangeKpiResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    #[doc(hidden)]
    pub application_id: std::option::Option<std::string::String>,
    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    #[doc(hidden)]
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    #[doc(hidden)]
    pub kpi_name: std::option::Option<std::string::String>,
    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
    #[doc(hidden)]
    pub kpi_result: std::option::Option<crate::model::BaseKpiResult>,
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    #[doc(hidden)]
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl ApplicationDateRangeKpiResponse {
    /// <p>The unique identifier for the application that the metric applies to.</p>
    pub fn application_id(&self) -> std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
    pub fn kpi_name(&self) -> std::option::Option<&str> {
        self.kpi_name.as_deref()
    }
    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
    pub fn kpi_result(&self) -> std::option::Option<&crate::model::BaseKpiResult> {
        self.kpi_result.as_ref()
    }
    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
}
/// See [`ApplicationDateRangeKpiResponse`](crate::model::ApplicationDateRangeKpiResponse).
pub mod application_date_range_kpi_response {

    /// A builder for [`ApplicationDateRangeKpiResponse`](crate::model::ApplicationDateRangeKpiResponse).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) application_id: std::option::Option<std::string::String>,
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) kpi_name: std::option::Option<std::string::String>,
        pub(crate) kpi_result: std::option::Option<crate::model::BaseKpiResult>,
        pub(crate) next_token: std::option::Option<std::string::String>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.application_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the application that the metric applies to.</p>
        pub fn set_application_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.application_id = input;
            self
        }
        /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn kpi_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.kpi_name = Some(input.into());
            self
        }
        /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        pub fn set_kpi_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kpi_name = input;
            self
        }
        /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
        pub fn kpi_result(mut self, input: crate::model::BaseKpiResult) -> Self {
            self.kpi_result = Some(input);
            self
        }
        /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
        pub fn set_kpi_result(
            mut self,
            input: std::option::Option<crate::model::BaseKpiResult>,
        ) -> Self {
            self.kpi_result = input;
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ApplicationDateRangeKpiResponse`](crate::model::ApplicationDateRangeKpiResponse).
        pub fn build(self) -> crate::model::ApplicationDateRangeKpiResponse {
            crate::model::ApplicationDateRangeKpiResponse {
                application_id: self.application_id,
                end_time: self.end_time,
                kpi_name: self.kpi_name,
                kpi_result: self.kpi_result,
                next_token: self.next_token,
                start_time: self.start_time,
            }
        }
    }
}
impl ApplicationDateRangeKpiResponse {
    /// Creates a new builder-style object to manufacture [`ApplicationDateRangeKpiResponse`](crate::model::ApplicationDateRangeKpiResponse).
    pub fn builder() -> crate::model::application_date_range_kpi_response::Builder {
        crate::model::application_date_range_kpi_response::Builder::default()
    }
}

/// <p>Provides information about a request to create a message template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateTemplateMessageBody {
    /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The message that's returned from the API for the request to create the message template.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the request to create the message template.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
}
impl CreateTemplateMessageBody {
    /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The message that's returned from the API for the request to create the message template.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The unique identifier for the request to create the message template.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
}
/// See [`CreateTemplateMessageBody`](crate::model::CreateTemplateMessageBody).
pub mod create_template_message_body {

    /// A builder for [`CreateTemplateMessageBody`](crate::model::CreateTemplateMessageBody).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The message that's returned from the API for the request to create the message template.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message that's returned from the API for the request to create the message template.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The unique identifier for the request to create the message template.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the request to create the message template.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateTemplateMessageBody`](crate::model::CreateTemplateMessageBody).
        pub fn build(self) -> crate::model::CreateTemplateMessageBody {
            crate::model::CreateTemplateMessageBody {
                arn: self.arn,
                message: self.message,
                request_id: self.request_id,
            }
        }
    }
}
impl CreateTemplateMessageBody {
    /// Creates a new builder-style object to manufacture [`CreateTemplateMessageBody`](crate::model::CreateTemplateMessageBody).
    pub fn builder() -> crate::model::create_template_message_body::Builder {
        crate::model::create_template_message_body::Builder::default()
    }
}

/// <p>Specifies Amazon Pinpoint configuration settings for retrieving and processing recommendation data from a recommender model.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateRecommenderConfigurationShape {
    /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
    /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
    /// <ul>
    /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
    /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
    /// </ul>
    /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
    #[doc(hidden)]
    pub attributes:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
    #[doc(hidden)]
    pub description: std::option::Option<std::string::String>,
    /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
    /// <ul>
    /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
    /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub recommendation_provider_id_type: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
    #[doc(hidden)]
    pub recommendation_provider_role_arn: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
    #[doc(hidden)]
    pub recommendation_provider_uri: std::option::Option<std::string::String>,
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
    #[doc(hidden)]
    pub recommendation_transformer_uri: std::option::Option<std::string::String>,
    /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
    #[doc(hidden)]
    pub recommendations_display_name: std::option::Option<std::string::String>,
    /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
    /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    #[doc(hidden)]
    pub recommendations_per_message: i32,
}
impl CreateRecommenderConfigurationShape {
    /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
    /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
    /// <ul>
    /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
    /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
    /// </ul>
    /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
    pub fn attributes(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.attributes.as_ref()
    }
    /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
    pub fn description(&self) -> std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
    /// <ul>
    /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
    /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
    /// </ul>
    pub fn recommendation_provider_id_type(&self) -> std::option::Option<&str> {
        self.recommendation_provider_id_type.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
    pub fn recommendation_provider_role_arn(&self) -> std::option::Option<&str> {
        self.recommendation_provider_role_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
    pub fn recommendation_provider_uri(&self) -> std::option::Option<&str> {
        self.recommendation_provider_uri.as_deref()
    }
    /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
    pub fn recommendation_transformer_uri(&self) -> std::option::Option<&str> {
        self.recommendation_transformer_uri.as_deref()
    }
    /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
    pub fn recommendations_display_name(&self) -> std::option::Option<&str> {
        self.recommendations_display_name.as_deref()
    }
    /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
    /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
    pub fn recommendations_per_message(&self) -> i32 {
        self.recommendations_per_message
    }
}
/// See [`CreateRecommenderConfigurationShape`](crate::model::CreateRecommenderConfigurationShape).
pub mod create_recommender_configuration_shape {

    /// A builder for [`CreateRecommenderConfigurationShape`](crate::model::CreateRecommenderConfigurationShape).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attributes: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) description: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_id_type: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_role_arn: std::option::Option<std::string::String>,
        pub(crate) recommendation_provider_uri: std::option::Option<std::string::String>,
        pub(crate) recommendation_transformer_uri: std::option::Option<std::string::String>,
        pub(crate) recommendations_display_name: std::option::Option<std::string::String>,
        pub(crate) recommendations_per_message: std::option::Option<i32>,
    }
    impl Builder {
        /// Adds a key-value pair to `attributes`.
        ///
        /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
        ///
        /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
        /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
        /// <ul>
        /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
        /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
        /// </ul>
        /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
        pub fn attributes(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.attributes.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.attributes = Some(hash_map);
            self
        }
        /// <p>A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute can be used as a message variable in a message template.</p>
        /// <p>In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. The display name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The following restrictions apply to these names:</p>
        /// <ul>
        /// <li><p>An attribute name must start with a letter or number and it can contain up to 50 characters. The characters can be letters, numbers, underscores (_), or hyphens (-). Attribute names are case sensitive and must be unique.</p></li>
        /// <li><p>An attribute display name must start with a letter or number and it can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p></li>
        /// </ul>
        /// <p>This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in your request.</p>
        pub fn set_attributes(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.attributes = input;
            self
        }
        /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.description = Some(input.into());
            self
        }
        /// <p>A custom description of the configuration for the recommender model. The description can contain up to 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐.</p>
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.description = input;
            self
        }
        /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>A custom name of the configuration for the recommender model. The name must start with a letter or number and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-).</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
        /// <ul>
        /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
        /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
        /// </ul>
        pub fn recommendation_provider_id_type(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_id_type = Some(input.into());
            self
        }
        /// <p>The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint application. Valid values are:</p>
        /// <ul>
        /// <li><p>PINPOINT_ENDPOINT_ID - Associate each user in the model with a particular endpoint in Amazon Pinpoint. The data is correlated based on endpoint IDs in Amazon Pinpoint. This is the default value.</p></li>
        /// <li><p>PINPOINT_USER_ID - Associate each user in the model with a particular user and endpoint in Amazon Pinpoint. The data is correlated based on user IDs in Amazon Pinpoint. If you specify this value, an endpoint definition in Amazon Pinpoint has to specify both a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be sent to the user's endpoint.</p></li>
        /// </ul>
        pub fn set_recommendation_provider_id_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_id_type = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
        pub fn recommendation_provider_role_arn(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to retrieve recommendation data from the recommender model.</p>
        pub fn set_recommendation_provider_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_role_arn = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
        pub fn recommendation_provider_uri(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_provider_uri = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must match the ARN of an Amazon Personalize campaign.</p>
        pub fn set_recommendation_provider_uri(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_provider_uri = input;
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
        pub fn recommendation_transformer_uri(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendation_transformer_uri = Some(input.into());
            self
        }
        /// <p>The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of recommendation data that's retrieved from the recommender model.</p>
        pub fn set_recommendation_transformer_uri(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendation_transformer_uri = input;
            self
        }
        /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
        pub fn recommendations_display_name(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.recommendations_display_name = Some(input.into());
            self
        }
        /// <p>A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This value is required if the configuration doesn't invoke an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        /// <p>This name appears in the <b>Attribute finder</b> of the template editor on the Amazon Pinpoint console. The name can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). These restrictions don't apply to attribute values.</p>
        pub fn set_recommendations_display_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.recommendations_display_name = input;
            self
        }
        /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
        /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn recommendations_per_message(mut self, input: i32) -> Self {
            self.recommendations_per_message = Some(input);
            self
        }
        /// <p>The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for the RecommendationProviderIdType property. This number determines how many recommended items are available for use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5.</p>
        /// <p>To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda function (RecommendationTransformerUri) to perform additional processing of recommendation data.</p>
        pub fn set_recommendations_per_message(mut self, input: std::option::Option<i32>) -> Self {
            self.recommendations_per_message = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateRecommenderConfigurationShape`](crate::model::CreateRecommenderConfigurationShape).
        pub fn build(self) -> crate::model::CreateRecommenderConfigurationShape {
            crate::model::CreateRecommenderConfigurationShape {
                attributes: self.attributes,
                description: self.description,
                name: self.name,
                recommendation_provider_id_type: self.recommendation_provider_id_type,
                recommendation_provider_role_arn: self.recommendation_provider_role_arn,
                recommendation_provider_uri: self.recommendation_provider_uri,
                recommendation_transformer_uri: self.recommendation_transformer_uri,
                recommendations_display_name: self.recommendations_display_name,
                recommendations_per_message: self.recommendations_per_message.unwrap_or_default(),
            }
        }
    }
}
impl CreateRecommenderConfigurationShape {
    /// Creates a new builder-style object to manufacture [`CreateRecommenderConfigurationShape`](crate::model::CreateRecommenderConfigurationShape).
    pub fn builder() -> crate::model::create_recommender_configuration_shape::Builder {
        crate::model::create_recommender_configuration_shape::Builder::default()
    }
}

/// <p>Provides information about a request to create a message template.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateCreateMessageBody {
    /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The message that's returned from the API for the request to create the message template.</p>
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// <p>The unique identifier for the request to create the message template.</p>
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
}
impl TemplateCreateMessageBody {
    /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The message that's returned from the API for the request to create the message template.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The unique identifier for the request to create the message template.</p>
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
}
/// See [`TemplateCreateMessageBody`](crate::model::TemplateCreateMessageBody).
pub mod template_create_message_body {

    /// A builder for [`TemplateCreateMessageBody`](crate::model::TemplateCreateMessageBody).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) request_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the message template that was created.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The message that's returned from the API for the request to create the message template.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message that's returned from the API for the request to create the message template.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The unique identifier for the request to create the message template.</p>
        pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.request_id = Some(input.into());
            self
        }
        /// <p>The unique identifier for the request to create the message template.</p>
        pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.request_id = input;
            self
        }
        /// Consumes the builder and constructs a [`TemplateCreateMessageBody`](crate::model::TemplateCreateMessageBody).
        pub fn build(self) -> crate::model::TemplateCreateMessageBody {
            crate::model::TemplateCreateMessageBody {
                arn: self.arn,
                message: self.message,
                request_id: self.request_id,
            }
        }
    }
}
impl TemplateCreateMessageBody {
    /// Creates a new builder-style object to manufacture [`TemplateCreateMessageBody`](crate::model::TemplateCreateMessageBody).
    pub fn builder() -> crate::model::template_create_message_body::Builder {
        crate::model::template_create_message_body::Builder::default()
    }
}

/// <p>Specifies the settings for a job that imports endpoint definitions from an Amazon Simple Storage Service (Amazon S3) bucket.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ImportJobRequest {
    /// <p>Specifies whether to create a segment that contains the endpoints, when the endpoint definitions are imported.</p>
    #[doc(hidden)]
    pub define_segment: bool,
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    #[doc(hidden)]
    pub external_id: std::option::Option<std::string::String>,
    /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format. If the Amazon S3 location stores multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
    #[doc(hidden)]
    pub format: std::option::Option<crate::model::Format>,
    /// <p>Specifies whether to register the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
    #[doc(hidden)]
    pub register_endpoints: bool,
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
    /// <p>The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/<replaceable>
    /// file-name
    /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
    #[doc(hidden)]
    pub s3_url: std::option::Option<std::string::String>,
    /// <p>The identifier for the segment to update or add the imported endpoint definitions to, if the import job is meant to update an existing segment.</p>
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
    /// <p>A custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
    #[doc(hidden)]
    pub segment_name: std::option::Option<std::string::String>,
}
impl ImportJobRequest {
    /// <p>Specifies whether to create a segment that contains the endpoints, when the endpoint definitions are imported.</p>
    pub fn define_segment(&self) -> bool {
        self.define_segment
    }
    /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
    pub fn external_id(&self) -> std::option::Option<&str> {
        self.external_id.as_deref()
    }
    /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format. If the Amazon S3 location stores multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
    pub fn format(&self) -> std::option::Option<&crate::model::Format> {
        self.format.as_ref()
    }
    /// <p>Specifies whether to register the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
    pub fn register_endpoints(&self) -> bool {
        self.register_endpoints
    }
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
    /// <p>The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/<replaceable>
    /// file-name
    /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
    pub fn s3_url(&self) -> std::option::Option<&str> {
        self.s3_url.as_deref()
    }
    /// <p>The identifier for the segment to update or add the imported endpoint definitions to, if the import job is meant to update an existing segment.</p>
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
    /// <p>A custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
    pub fn segment_name(&self) -> std::option::Option<&str> {
        self.segment_name.as_deref()
    }
}
/// See [`ImportJobRequest`](crate::model::ImportJobRequest).
pub mod import_job_request {

    /// A builder for [`ImportJobRequest`](crate::model::ImportJobRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) define_segment: std::option::Option<bool>,
        pub(crate) external_id: std::option::Option<std::string::String>,
        pub(crate) format: std::option::Option<crate::model::Format>,
        pub(crate) register_endpoints: std::option::Option<bool>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) s3_url: std::option::Option<std::string::String>,
        pub(crate) segment_id: std::option::Option<std::string::String>,
        pub(crate) segment_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Specifies whether to create a segment that contains the endpoints, when the endpoint definitions are imported.</p>
        pub fn define_segment(mut self, input: bool) -> Self {
            self.define_segment = Some(input);
            self
        }
        /// <p>Specifies whether to create a segment that contains the endpoints, when the endpoint definitions are imported.</p>
        pub fn set_define_segment(mut self, input: std::option::Option<bool>) -> Self {
            self.define_segment = input;
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn external_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.external_id = Some(input.into());
            self
        }
        /// <p>(Deprecated) Your AWS account ID, which you assigned to an external ID key in an IAM trust policy. Amazon Pinpoint previously used this value to assume an IAM role when importing endpoint definitions, but we removed this requirement. We don't recommend use of external IDs for IAM roles that are assumed by Amazon Pinpoint.</p>
        pub fn set_external_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.external_id = input;
            self
        }
        /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format. If the Amazon S3 location stores multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
        pub fn format(mut self, input: crate::model::Format) -> Self {
            self.format = Some(input);
            self
        }
        /// <p>The format of the files that contain the endpoint definitions to import. Valid values are: CSV, for comma-separated values format; and, JSON, for newline-delimited JSON format. If the Amazon S3 location stores multiple files that use different formats, Amazon Pinpoint imports data only from the files that use the specified format.</p>
        pub fn set_format(mut self, input: std::option::Option<crate::model::Format>) -> Self {
            self.format = input;
            self
        }
        /// <p>Specifies whether to register the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
        pub fn register_endpoints(mut self, input: bool) -> Self {
            self.register_endpoints = Some(input);
            self
        }
        /// <p>Specifies whether to register the endpoints with Amazon Pinpoint, when the endpoint definitions are imported.</p>
        pub fn set_register_endpoints(mut self, input: std::option::Option<bool>) -> Self {
            self.register_endpoints = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location to import endpoint definitions from.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
        /// <p>The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/<replaceable>
        /// file-name
        /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
        pub fn s3_url(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_url = Some(input.into());
            self
        }
        /// <p>The URL of the Amazon Simple Storage Service (Amazon S3) bucket that contains the endpoint definitions to import. This location can be a folder or a single file. If the location is a folder, Amazon Pinpoint imports endpoint definitions from the files in this location, including any subfolders that the folder contains.</p>
        /// <p>The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/<replaceable>
        /// file-name
        /// </replaceable>. The location can end with the key for an individual object or a prefix that qualifies multiple objects.</p>
        pub fn set_s3_url(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.s3_url = input;
            self
        }
        /// <p>The identifier for the segment to update or add the imported endpoint definitions to, if the import job is meant to update an existing segment.</p>
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        /// <p>The identifier for the segment to update or add the imported endpoint definitions to, if the import job is meant to update an existing segment.</p>
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// <p>A custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
        pub fn segment_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_name = Some(input.into());
            self
        }
        /// <p>A custom name for the segment that's created by the import job, if the value of the DefineSegment property is true.</p>
        pub fn set_segment_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_name = input;
            self
        }
        /// Consumes the builder and constructs a [`ImportJobRequest`](crate::model::ImportJobRequest).
        pub fn build(self) -> crate::model::ImportJobRequest {
            crate::model::ImportJobRequest {
                define_segment: self.define_segment.unwrap_or_default(),
                external_id: self.external_id,
                format: self.format,
                register_endpoints: self.register_endpoints.unwrap_or_default(),
                role_arn: self.role_arn,
                s3_url: self.s3_url,
                segment_id: self.segment_id,
                segment_name: self.segment_name,
            }
        }
    }
}
impl ImportJobRequest {
    /// Creates a new builder-style object to manufacture [`ImportJobRequest`](crate::model::ImportJobRequest).
    pub fn builder() -> crate::model::import_job_request::Builder {
        crate::model::import_job_request::Builder::default()
    }
}

/// <p>Specifies the settings for a job that exports endpoint definitions to an Amazon Simple Storage Service (Amazon S3) bucket.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExportJobRequest {
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/.</p>
    #[doc(hidden)]
    pub s3_url_prefix: std::option::Option<std::string::String>,
    /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
    #[doc(hidden)]
    pub segment_id: std::option::Option<std::string::String>,
    /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
    #[doc(hidden)]
    pub segment_version: i32,
}
impl ExportJobRequest {
    /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
    /// bucket-name
    /// </replaceable>/<replaceable>
    /// folder-name
    /// </replaceable>/.</p>
    pub fn s3_url_prefix(&self) -> std::option::Option<&str> {
        self.s3_url_prefix.as_deref()
    }
    /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
    pub fn segment_id(&self) -> std::option::Option<&str> {
        self.segment_id.as_deref()
    }
    /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
    pub fn segment_version(&self) -> i32 {
        self.segment_version
    }
}
/// See [`ExportJobRequest`](crate::model::ExportJobRequest).
pub mod export_job_request {

    /// A builder for [`ExportJobRequest`](crate::model::ExportJobRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) s3_url_prefix: std::option::Option<std::string::String>,
        pub(crate) segment_id: std::option::Option<std::string::String>,
        pub(crate) segment_version: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/.</p>
        pub fn s3_url_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.s3_url_prefix = Some(input.into());
            self
        }
        /// <p>The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://<replaceable>
        /// bucket-name
        /// </replaceable>/<replaceable>
        /// folder-name
        /// </replaceable>/.</p>
        pub fn set_s3_url_prefix(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.s3_url_prefix = input;
            self
        }
        /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
        pub fn segment_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.segment_id = Some(input.into());
            self
        }
        /// <p>The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.</p>
        pub fn set_segment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.segment_id = input;
            self
        }
        /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
        pub fn segment_version(mut self, input: i32) -> Self {
            self.segment_version = Some(input);
            self
        }
        /// <p>The version of the segment to export endpoint definitions from, if specified.</p>
        pub fn set_segment_version(mut self, input: std::option::Option<i32>) -> Self {
            self.segment_version = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportJobRequest`](crate::model::ExportJobRequest).
        pub fn build(self) -> crate::model::ExportJobRequest {
            crate::model::ExportJobRequest {
                role_arn: self.role_arn,
                s3_url_prefix: self.s3_url_prefix,
                segment_id: self.segment_id,
                segment_version: self.segment_version.unwrap_or_default(),
            }
        }
    }
}
impl ExportJobRequest {
    /// Creates a new builder-style object to manufacture [`ExportJobRequest`](crate::model::ExportJobRequest).
    pub fn builder() -> crate::model::export_job_request::Builder {
        crate::model::export_job_request::Builder::default()
    }
}

/// <p>Specifies the display name of an application and the tags to associate with the application.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateApplicationRequest {
    /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the application. Each tag consists of a required tag key and an associated tag value.</p>
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateApplicationRequest {
    /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the application. Each tag consists of a required tag key and an associated tag value.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
/// See [`CreateApplicationRequest`](crate::model::CreateApplicationRequest).
pub mod create_application_request {

    /// A builder for [`CreateApplicationRequest`](crate::model::CreateApplicationRequest).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The display name of the application. This name is displayed as the <b>Project name</b> on the Amazon Pinpoint console.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the application. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>A string-to-string map of key-value pairs that defines the tags to associate with the application. Each tag consists of a required tag key and an associated tag value.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`CreateApplicationRequest`](crate::model::CreateApplicationRequest).
        pub fn build(self) -> crate::model::CreateApplicationRequest {
            crate::model::CreateApplicationRequest {
                name: self.name,
                tags: self.tags,
            }
        }
    }
}
impl CreateApplicationRequest {
    /// Creates a new builder-style object to manufacture [`CreateApplicationRequest`](crate::model::CreateApplicationRequest).
    pub fn builder() -> crate::model::create_application_request::Builder {
        crate::model::create_application_request::Builder::default()
    }
}