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 CreateEventTriggerOutput {
    /// <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>The timestamp of when the event trigger was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp of when the event trigger was most recently updated.</p>
    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <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>>,
    _request_id: Option<String>,
}
impl CreateEventTriggerOutput {
    /// <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>The timestamp of when the event trigger was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The timestamp of when the event trigger was most recently updated.</p>
    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_at.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 CreateEventTriggerOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateEventTriggerOutput");
        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("created_at", &self.created_at);
        formatter.field("last_updated_at", &self.last_updated_at);
        formatter.field("tags", &self.tags);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for CreateEventTriggerOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateEventTriggerOutput {
    /// Creates a new builder-style object to manufacture [`CreateEventTriggerOutput`](crate::operation::create_event_trigger::CreateEventTriggerOutput).
    pub fn builder() -> crate::operation::create_event_trigger::builders::CreateEventTriggerOutputBuilder {
        crate::operation::create_event_trigger::builders::CreateEventTriggerOutputBuilder::default()
    }
}

/// A builder for [`CreateEventTriggerOutput`](crate::operation::create_event_trigger::CreateEventTriggerOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateEventTriggerOutputBuilder {
    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) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl CreateEventTriggerOutputBuilder {
    /// <p>The unique name of the event trigger.</p>
    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>
    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
    }
    /// <p>The timestamp of when the event trigger was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the event trigger was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The timestamp of when the event trigger was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The timestamp of when the event trigger was most recently updated.</p>
    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the event trigger was most recently updated.</p>
    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_at = input;
        self
    }
    /// <p>The timestamp of when the event trigger was most recently updated.</p>
    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_at
    }
    /// 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
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateEventTriggerOutput`](crate::operation::create_event_trigger::CreateEventTriggerOutput).
    pub fn build(self) -> crate::operation::create_event_trigger::CreateEventTriggerOutput {
        crate::operation::create_event_trigger::CreateEventTriggerOutput {
            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,
            created_at: self.created_at,
            last_updated_at: self.last_updated_at,
            tags: self.tags,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for CreateEventTriggerOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateEventTriggerOutputBuilder");
        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("created_at", &self.created_at);
        formatter.field("last_updated_at", &self.last_updated_at);
        formatter.field("tags", &self.tags);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}