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, ::std::fmt::Debug)]
pub struct GetSegmentEstimateOutput {
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The <code>QueryId</code> which is the same as the value passed in <code>QueryId</code>.</p>
    pub estimate_id: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the query.</p>
    pub status: ::std::option::Option<crate::types::EstimateStatus>,
    /// <p>The estimated number of profiles contained in the segment.</p>
    pub estimate: ::std::option::Option<::std::string::String>,
    /// <p>The error message if there is any error.</p>
    pub message: ::std::option::Option<::std::string::String>,
    /// <p>The status code of the segment estimate.</p>
    pub status_code: i32,
    _request_id: Option<String>,
}
impl GetSegmentEstimateOutput {
    /// <p>The unique name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The <code>QueryId</code> which is the same as the value passed in <code>QueryId</code>.</p>
    pub fn estimate_id(&self) -> ::std::option::Option<&str> {
        self.estimate_id.as_deref()
    }
    /// <p>The current status of the query.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::EstimateStatus> {
        self.status.as_ref()
    }
    /// <p>The estimated number of profiles contained in the segment.</p>
    pub fn estimate(&self) -> ::std::option::Option<&str> {
        self.estimate.as_deref()
    }
    /// <p>The error message if there is any error.</p>
    pub fn message(&self) -> ::std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The status code of the segment estimate.</p>
    pub fn status_code(&self) -> i32 {
        self.status_code
    }
}
impl ::aws_types::request_id::RequestId for GetSegmentEstimateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetSegmentEstimateOutput {
    /// Creates a new builder-style object to manufacture [`GetSegmentEstimateOutput`](crate::operation::get_segment_estimate::GetSegmentEstimateOutput).
    pub fn builder() -> crate::operation::get_segment_estimate::builders::GetSegmentEstimateOutputBuilder {
        crate::operation::get_segment_estimate::builders::GetSegmentEstimateOutputBuilder::default()
    }
}

/// A builder for [`GetSegmentEstimateOutput`](crate::operation::get_segment_estimate::GetSegmentEstimateOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSegmentEstimateOutputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) estimate_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::EstimateStatus>,
    pub(crate) estimate: ::std::option::Option<::std::string::String>,
    pub(crate) message: ::std::option::Option<::std::string::String>,
    pub(crate) status_code: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl GetSegmentEstimateOutputBuilder {
    /// <p>The unique name of the domain.</p>
    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 <code>QueryId</code> which is the same as the value passed in <code>QueryId</code>.</p>
    pub fn estimate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.estimate_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>QueryId</code> which is the same as the value passed in <code>QueryId</code>.</p>
    pub fn set_estimate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.estimate_id = input;
        self
    }
    /// <p>The <code>QueryId</code> which is the same as the value passed in <code>QueryId</code>.</p>
    pub fn get_estimate_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.estimate_id
    }
    /// <p>The current status of the query.</p>
    pub fn status(mut self, input: crate::types::EstimateStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the query.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::EstimateStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the query.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::EstimateStatus> {
        &self.status
    }
    /// <p>The estimated number of profiles contained in the segment.</p>
    pub fn estimate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.estimate = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The estimated number of profiles contained in the segment.</p>
    pub fn set_estimate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.estimate = input;
        self
    }
    /// <p>The estimated number of profiles contained in the segment.</p>
    pub fn get_estimate(&self) -> &::std::option::Option<::std::string::String> {
        &self.estimate
    }
    /// <p>The error message if there is any error.</p>
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The error message if there is any error.</p>
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message = input;
        self
    }
    /// <p>The error message if there is any error.</p>
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.message
    }
    /// <p>The status code of the segment estimate.</p>
    pub fn status_code(mut self, input: i32) -> Self {
        self.status_code = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status code of the segment estimate.</p>
    pub fn set_status_code(mut self, input: ::std::option::Option<i32>) -> Self {
        self.status_code = input;
        self
    }
    /// <p>The status code of the segment estimate.</p>
    pub fn get_status_code(&self) -> &::std::option::Option<i32> {
        &self.status_code
    }
    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 [`GetSegmentEstimateOutput`](crate::operation::get_segment_estimate::GetSegmentEstimateOutput).
    pub fn build(self) -> crate::operation::get_segment_estimate::GetSegmentEstimateOutput {
        crate::operation::get_segment_estimate::GetSegmentEstimateOutput {
            domain_name: self.domain_name,
            estimate_id: self.estimate_id,
            status: self.status,
            estimate: self.estimate,
            message: self.message,
            status_code: self.status_code.unwrap_or_default(),
            _request_id: self._request_id,
        }
    }
}