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 DeleteProfileKeyInput {
    /// <p>The unique identifier of a customer profile.</p>
    pub profile_id: ::std::option::Option<::std::string::String>,
    /// <p>A searchable identifier of a customer profile.</p>
    pub key_name: ::std::option::Option<::std::string::String>,
    /// <p>A list of key values.</p>
    pub values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
}
impl DeleteProfileKeyInput {
    /// <p>The unique identifier of a customer profile.</p>
    pub fn profile_id(&self) -> ::std::option::Option<&str> {
        self.profile_id.as_deref()
    }
    /// <p>A searchable identifier of a customer profile.</p>
    pub fn key_name(&self) -> ::std::option::Option<&str> {
        self.key_name.as_deref()
    }
    /// <p>A list of key values.</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 `.values.is_none()`.
    pub fn values(&self) -> &[::std::string::String] {
        self.values.as_deref().unwrap_or_default()
    }
    /// <p>The unique name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
}
impl DeleteProfileKeyInput {
    /// Creates a new builder-style object to manufacture [`DeleteProfileKeyInput`](crate::operation::delete_profile_key::DeleteProfileKeyInput).
    pub fn builder() -> crate::operation::delete_profile_key::builders::DeleteProfileKeyInputBuilder {
        crate::operation::delete_profile_key::builders::DeleteProfileKeyInputBuilder::default()
    }
}

/// A builder for [`DeleteProfileKeyInput`](crate::operation::delete_profile_key::DeleteProfileKeyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteProfileKeyInputBuilder {
    pub(crate) profile_id: ::std::option::Option<::std::string::String>,
    pub(crate) key_name: ::std::option::Option<::std::string::String>,
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
}
impl DeleteProfileKeyInputBuilder {
    /// <p>The unique identifier of a customer profile.</p>
    /// This field is required.
    pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of a customer profile.</p>
    pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_id = input;
        self
    }
    /// <p>The unique identifier of a customer profile.</p>
    pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_id
    }
    /// <p>A searchable identifier of a customer profile.</p>
    /// This field is required.
    pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A searchable identifier of a customer profile.</p>
    pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_name = input;
        self
    }
    /// <p>A searchable identifier of a customer profile.</p>
    pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_name
    }
    /// Appends an item to `values`.
    ///
    /// To override the contents of this collection use [`set_values`](Self::set_values).
    ///
    /// <p>A list of key values.</p>
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.values.unwrap_or_default();
        v.push(input.into());
        self.values = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of key values.</p>
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.values = input;
        self
    }
    /// <p>A list of key values.</p>
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.values
    }
    /// <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
    }
    /// Consumes the builder and constructs a [`DeleteProfileKeyInput`](crate::operation::delete_profile_key::DeleteProfileKeyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_profile_key::DeleteProfileKeyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_profile_key::DeleteProfileKeyInput {
            profile_id: self.profile_id,
            key_name: self.key_name,
            values: self.values,
            domain_name: self.domain_name,
        })
    }
}