aws-sdk-customerprofiles 1.118.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 CreateSegmentEstimateInput {
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The segment query for calculating a segment estimate.</p>
    pub segment_query: ::std::option::Option<crate::types::SegmentGroupStructure>,
    /// <p>The segment SQL query.</p>
    pub segment_sql_query: ::std::option::Option<::std::string::String>,
}
impl CreateSegmentEstimateInput {
    /// <p>The unique name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The segment query for calculating a segment estimate.</p>
    pub fn segment_query(&self) -> ::std::option::Option<&crate::types::SegmentGroupStructure> {
        self.segment_query.as_ref()
    }
    /// <p>The segment SQL query.</p>
    pub fn segment_sql_query(&self) -> ::std::option::Option<&str> {
        self.segment_sql_query.as_deref()
    }
}
impl ::std::fmt::Debug for CreateSegmentEstimateInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateSegmentEstimateInput");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("segment_query", &self.segment_query);
        formatter.field("segment_sql_query", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateSegmentEstimateInput {
    /// Creates a new builder-style object to manufacture [`CreateSegmentEstimateInput`](crate::operation::create_segment_estimate::CreateSegmentEstimateInput).
    pub fn builder() -> crate::operation::create_segment_estimate::builders::CreateSegmentEstimateInputBuilder {
        crate::operation::create_segment_estimate::builders::CreateSegmentEstimateInputBuilder::default()
    }
}

/// A builder for [`CreateSegmentEstimateInput`](crate::operation::create_segment_estimate::CreateSegmentEstimateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateSegmentEstimateInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) segment_query: ::std::option::Option<crate::types::SegmentGroupStructure>,
    pub(crate) segment_sql_query: ::std::option::Option<::std::string::String>,
}
impl CreateSegmentEstimateInputBuilder {
    /// <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 segment query for calculating a segment estimate.</p>
    pub fn segment_query(mut self, input: crate::types::SegmentGroupStructure) -> Self {
        self.segment_query = ::std::option::Option::Some(input);
        self
    }
    /// <p>The segment query for calculating a segment estimate.</p>
    pub fn set_segment_query(mut self, input: ::std::option::Option<crate::types::SegmentGroupStructure>) -> Self {
        self.segment_query = input;
        self
    }
    /// <p>The segment query for calculating a segment estimate.</p>
    pub fn get_segment_query(&self) -> &::std::option::Option<crate::types::SegmentGroupStructure> {
        &self.segment_query
    }
    /// <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
    }
    /// Consumes the builder and constructs a [`CreateSegmentEstimateInput`](crate::operation::create_segment_estimate::CreateSegmentEstimateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_segment_estimate::CreateSegmentEstimateInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_segment_estimate::CreateSegmentEstimateInput {
            domain_name: self.domain_name,
            segment_query: self.segment_query,
            segment_sql_query: self.segment_sql_query,
        })
    }
}
impl ::std::fmt::Debug for CreateSegmentEstimateInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateSegmentEstimateInputBuilder");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("segment_query", &self.segment_query);
        formatter.field("segment_sql_query", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}