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 CreateSegmentDefinitionInput {
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique name of the segment definition.</p>
    pub segment_definition_name: ::std::option::Option<::std::string::String>,
    /// <p>The display name of the segment definition.</p>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the segment definition.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the base segments and dimensions for a segment definition along with their respective relationship.</p>
    pub segment_groups: ::std::option::Option<crate::types::SegmentGroup>,
    /// <p>The segment SQL query.</p>
    pub segment_sql_query: ::std::option::Option<::std::string::String>,
    /// <p>The segment sort.</p>
    pub segment_sort: ::std::option::Option<crate::types::SegmentSort>,
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateSegmentDefinitionInput {
    /// <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 segment definition.</p>
    pub fn segment_definition_name(&self) -> ::std::option::Option<&str> {
        self.segment_definition_name.as_deref()
    }
    /// <p>The display name of the segment definition.</p>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>The description of the segment definition.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Specifies the base segments and dimensions for a segment definition along with their respective relationship.</p>
    pub fn segment_groups(&self) -> ::std::option::Option<&crate::types::SegmentGroup> {
        self.segment_groups.as_ref()
    }
    /// <p>The segment SQL query.</p>
    pub fn segment_sql_query(&self) -> ::std::option::Option<&str> {
        self.segment_sql_query.as_deref()
    }
    /// <p>The segment sort.</p>
    pub fn segment_sort(&self) -> ::std::option::Option<&crate::types::SegmentSort> {
        self.segment_sort.as_ref()
    }
    /// <p>The tags used to organize, track, or control access for 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 CreateSegmentDefinitionInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateSegmentDefinitionInput");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("segment_definition_name", &self.segment_definition_name);
        formatter.field("display_name", &self.display_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_groups", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_sql_query", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_sort", &"*** Sensitive Data Redacted ***");
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}
impl CreateSegmentDefinitionInput {
    /// Creates a new builder-style object to manufacture [`CreateSegmentDefinitionInput`](crate::operation::create_segment_definition::CreateSegmentDefinitionInput).
    pub fn builder() -> crate::operation::create_segment_definition::builders::CreateSegmentDefinitionInputBuilder {
        crate::operation::create_segment_definition::builders::CreateSegmentDefinitionInputBuilder::default()
    }
}

/// A builder for [`CreateSegmentDefinitionInput`](crate::operation::create_segment_definition::CreateSegmentDefinitionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateSegmentDefinitionInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) segment_definition_name: ::std::option::Option<::std::string::String>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) segment_groups: ::std::option::Option<crate::types::SegmentGroup>,
    pub(crate) segment_sql_query: ::std::option::Option<::std::string::String>,
    pub(crate) segment_sort: ::std::option::Option<crate::types::SegmentSort>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateSegmentDefinitionInputBuilder {
    /// <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 segment definition.</p>
    /// This field is required.
    pub fn segment_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.segment_definition_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the segment definition.</p>
    pub fn set_segment_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.segment_definition_name = input;
        self
    }
    /// <p>The unique name of the segment definition.</p>
    pub fn get_segment_definition_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.segment_definition_name
    }
    /// <p>The display name of the segment definition.</p>
    /// This field is required.
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The display name of the segment definition.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>The display name of the segment definition.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// <p>The description of the segment definition.</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 segment definition.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the segment definition.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Specifies the base segments and dimensions for a segment definition along with their respective relationship.</p>
    pub fn segment_groups(mut self, input: crate::types::SegmentGroup) -> Self {
        self.segment_groups = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the base segments and dimensions for a segment definition along with their respective relationship.</p>
    pub fn set_segment_groups(mut self, input: ::std::option::Option<crate::types::SegmentGroup>) -> Self {
        self.segment_groups = input;
        self
    }
    /// <p>Specifies the base segments and dimensions for a segment definition along with their respective relationship.</p>
    pub fn get_segment_groups(&self) -> &::std::option::Option<crate::types::SegmentGroup> {
        &self.segment_groups
    }
    /// <p>The segment SQL query.</p>
    pub fn segment_sql_query(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.segment_sql_query = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The segment SQL query.</p>
    pub fn set_segment_sql_query(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.segment_sql_query = input;
        self
    }
    /// <p>The segment SQL query.</p>
    pub fn get_segment_sql_query(&self) -> &::std::option::Option<::std::string::String> {
        &self.segment_sql_query
    }
    /// <p>The segment sort.</p>
    pub fn segment_sort(mut self, input: crate::types::SegmentSort) -> Self {
        self.segment_sort = ::std::option::Option::Some(input);
        self
    }
    /// <p>The segment sort.</p>
    pub fn set_segment_sort(mut self, input: ::std::option::Option<crate::types::SegmentSort>) -> Self {
        self.segment_sort = input;
        self
    }
    /// <p>The segment sort.</p>
    pub fn get_segment_sort(&self) -> &::std::option::Option<crate::types::SegmentSort> {
        &self.segment_sort
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags used to organize, track, or control access for 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>The tags used to organize, track, or control access for 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>The tags used to organize, track, or control access for 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 [`CreateSegmentDefinitionInput`](crate::operation::create_segment_definition::CreateSegmentDefinitionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_segment_definition::CreateSegmentDefinitionInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_segment_definition::CreateSegmentDefinitionInput {
            domain_name: self.domain_name,
            segment_definition_name: self.segment_definition_name,
            display_name: self.display_name,
            description: self.description,
            segment_groups: self.segment_groups,
            segment_sql_query: self.segment_sql_query,
            segment_sort: self.segment_sort,
            tags: self.tags,
        })
    }
}
impl ::std::fmt::Debug for CreateSegmentDefinitionInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateSegmentDefinitionInputBuilder");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("segment_definition_name", &self.segment_definition_name);
        formatter.field("display_name", &self.display_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_groups", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_sql_query", &"*** Sensitive Data Redacted ***");
        formatter.field("segment_sort", &"*** Sensitive Data Redacted ***");
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}