aws-sdk-customerprofiles 1.119.0

AWS SDK for Amazon Connect Customer Profiles
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateEventTriggerInput {
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique name of the event trigger.</p>
    pub event_trigger_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique name of the object type.</p>
    pub object_type_name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the event trigger.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>A list of conditions that determine when an event should trigger the destination.</p>
    pub event_trigger_conditions: ::std::option::Option<::std::vec::Vec<crate::types::EventTriggerCondition>>,
    /// <p>The destination is triggered only for profiles that meet the criteria of a segment definition.</p>
    pub segment_filter: ::std::option::Option<::std::string::String>,
    /// <p>Defines limits controlling whether an event triggers the destination, based on ingestion latency and the number of invocations per profile over specific time periods.</p>
    pub event_trigger_limits: ::std::option::Option<crate::types::EventTriggerLimits>,
    /// <p>An array of key-value pairs to apply to this resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateEventTriggerInput {
    /// <p>The unique name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The unique name of the event trigger.</p>
    pub fn event_trigger_name(&self) -> ::std::option::Option<&str> {
        self.event_trigger_name.as_deref()
    }
    /// <p>The unique name of the object type.</p>
    pub fn object_type_name(&self) -> ::std::option::Option<&str> {
        self.object_type_name.as_deref()
    }
    /// <p>The description of the event trigger.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>A list of conditions that determine when an event should trigger the destination.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.event_trigger_conditions.is_none()`.
    pub fn event_trigger_conditions(&self) -> &[crate::types::EventTriggerCondition] {
        self.event_trigger_conditions.as_deref().unwrap_or_default()
    }
    /// <p>The destination is triggered only for profiles that meet the criteria of a segment definition.</p>
    pub fn segment_filter(&self) -> ::std::option::Option<&str> {
        self.segment_filter.as_deref()
    }
    /// <p>Defines limits controlling whether an event triggers the destination, based on ingestion latency and the number of invocations per profile over specific time periods.</p>
    pub fn event_trigger_limits(&self) -> ::std::option::Option<&crate::types::EventTriggerLimits> {
        self.event_trigger_limits.as_ref()
    }
    /// <p>An array of key-value pairs to apply to this resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::std::fmt::Debug for CreateEventTriggerInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateEventTriggerInput");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("event_trigger_name", &self.event_trigger_name);
        formatter.field("object_type_name", &self.object_type_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("event_trigger_conditions", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_filter", &self.segment_filter);
        formatter.field("event_trigger_limits", &self.event_trigger_limits);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}
impl CreateEventTriggerInput {
    /// Creates a new builder-style object to manufacture [`CreateEventTriggerInput`](crate::operation::create_event_trigger::CreateEventTriggerInput).
    pub fn builder() -> crate::operation::create_event_trigger::builders::CreateEventTriggerInputBuilder {
        crate::operation::create_event_trigger::builders::CreateEventTriggerInputBuilder::default()
    }
}

/// A builder for [`CreateEventTriggerInput`](crate::operation::create_event_trigger::CreateEventTriggerInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateEventTriggerInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) event_trigger_name: ::std::option::Option<::std::string::String>,
    pub(crate) object_type_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) event_trigger_conditions: ::std::option::Option<::std::vec::Vec<crate::types::EventTriggerCondition>>,
    pub(crate) segment_filter: ::std::option::Option<::std::string::String>,
    pub(crate) event_trigger_limits: ::std::option::Option<crate::types::EventTriggerLimits>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateEventTriggerInputBuilder {
    /// <p>The unique name of the domain.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the domain.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The unique name of the domain.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The unique name of the event trigger.</p>
    /// This field is required.
    pub fn event_trigger_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_trigger_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the event trigger.</p>
    pub fn set_event_trigger_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_trigger_name = input;
        self
    }
    /// <p>The unique name of the event trigger.</p>
    pub fn get_event_trigger_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_trigger_name
    }
    /// <p>The unique name of the object type.</p>
    /// This field is required.
    pub fn object_type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.object_type_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the object type.</p>
    pub fn set_object_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.object_type_name = input;
        self
    }
    /// <p>The unique name of the object type.</p>
    pub fn get_object_type_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.object_type_name
    }
    /// <p>The description of the event trigger.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the event trigger.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the event trigger.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `event_trigger_conditions`.
    ///
    /// To override the contents of this collection use [`set_event_trigger_conditions`](Self::set_event_trigger_conditions).
    ///
    /// <p>A list of conditions that determine when an event should trigger the destination.</p>
    pub fn event_trigger_conditions(mut self, input: crate::types::EventTriggerCondition) -> Self {
        let mut v = self.event_trigger_conditions.unwrap_or_default();
        v.push(input);
        self.event_trigger_conditions = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of conditions that determine when an event should trigger the destination.</p>
    pub fn set_event_trigger_conditions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EventTriggerCondition>>) -> Self {
        self.event_trigger_conditions = input;
        self
    }
    /// <p>A list of conditions that determine when an event should trigger the destination.</p>
    pub fn get_event_trigger_conditions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EventTriggerCondition>> {
        &self.event_trigger_conditions
    }
    /// <p>The destination is triggered only for profiles that meet the criteria of a segment definition.</p>
    pub fn segment_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.segment_filter = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The destination is triggered only for profiles that meet the criteria of a segment definition.</p>
    pub fn set_segment_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.segment_filter = input;
        self
    }
    /// <p>The destination is triggered only for profiles that meet the criteria of a segment definition.</p>
    pub fn get_segment_filter(&self) -> &::std::option::Option<::std::string::String> {
        &self.segment_filter
    }
    /// <p>Defines limits controlling whether an event triggers the destination, based on ingestion latency and the number of invocations per profile over specific time periods.</p>
    pub fn event_trigger_limits(mut self, input: crate::types::EventTriggerLimits) -> Self {
        self.event_trigger_limits = ::std::option::Option::Some(input);
        self
    }
    /// <p>Defines limits controlling whether an event triggers the destination, based on ingestion latency and the number of invocations per profile over specific time periods.</p>
    pub fn set_event_trigger_limits(mut self, input: ::std::option::Option<crate::types::EventTriggerLimits>) -> Self {
        self.event_trigger_limits = input;
        self
    }
    /// <p>Defines limits controlling whether an event triggers the destination, based on ingestion latency and the number of invocations per profile over specific time periods.</p>
    pub fn get_event_trigger_limits(&self) -> &::std::option::Option<crate::types::EventTriggerLimits> {
        &self.event_trigger_limits
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>An array of key-value pairs to apply to this resource.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>An array of key-value pairs to apply to this resource.</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>An array of key-value pairs to apply to this resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateEventTriggerInput`](crate::operation::create_event_trigger::CreateEventTriggerInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_event_trigger::CreateEventTriggerInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_event_trigger::CreateEventTriggerInput {
            domain_name: self.domain_name,
            event_trigger_name: self.event_trigger_name,
            object_type_name: self.object_type_name,
            description: self.description,
            event_trigger_conditions: self.event_trigger_conditions,
            segment_filter: self.segment_filter,
            event_trigger_limits: self.event_trigger_limits,
            tags: self.tags,
        })
    }
}
impl ::std::fmt::Debug for CreateEventTriggerInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateEventTriggerInputBuilder");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("event_trigger_name", &self.event_trigger_name);
        formatter.field("object_type_name", &self.object_type_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("event_trigger_conditions", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_filter", &self.segment_filter);
        formatter.field("event_trigger_limits", &self.event_trigger_limits);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}