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 BatchGetProfileInput {
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>List of unique identifiers for customer profiles to retrieve.</p>
    pub profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchGetProfileInput {
    /// <p>The unique name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>List of unique identifiers for customer profiles to retrieve.</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 `.profile_ids.is_none()`.
    pub fn profile_ids(&self) -> &[::std::string::String] {
        self.profile_ids.as_deref().unwrap_or_default()
    }
}
impl BatchGetProfileInput {
    /// Creates a new builder-style object to manufacture [`BatchGetProfileInput`](crate::operation::batch_get_profile::BatchGetProfileInput).
    pub fn builder() -> crate::operation::batch_get_profile::builders::BatchGetProfileInputBuilder {
        crate::operation::batch_get_profile::builders::BatchGetProfileInputBuilder::default()
    }
}

/// A builder for [`BatchGetProfileInput`](crate::operation::batch_get_profile::BatchGetProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetProfileInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchGetProfileInputBuilder {
    /// <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
    }
    /// Appends an item to `profile_ids`.
    ///
    /// To override the contents of this collection use [`set_profile_ids`](Self::set_profile_ids).
    ///
    /// <p>List of unique identifiers for customer profiles to retrieve.</p>
    pub fn profile_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.profile_ids.unwrap_or_default();
        v.push(input.into());
        self.profile_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of unique identifiers for customer profiles to retrieve.</p>
    pub fn set_profile_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.profile_ids = input;
        self
    }
    /// <p>List of unique identifiers for customer profiles to retrieve.</p>
    pub fn get_profile_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.profile_ids
    }
    /// Consumes the builder and constructs a [`BatchGetProfileInput`](crate::operation::batch_get_profile::BatchGetProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_get_profile::BatchGetProfileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_get_profile::BatchGetProfileInput {
            domain_name: self.domain_name,
            profile_ids: self.profile_ids,
        })
    }
}