aws-sdk-pinpoint 0.28.0

AWS SDK for Amazon Pinpoint
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 RemoveAttributesInput {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    #[doc(hidden)]
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
    /// <ul>
    /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints, such as the date when an associated user opted in or out of receiving communications from you through a specific type of channel.</p></li>
    /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints, such as the number of app sessions or the number of items left in a cart.</p></li>
    /// <li><p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
    /// </ul>
    #[doc(hidden)]
    pub attribute_type: ::std::option::Option<::std::string::String>,
    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
    #[doc(hidden)]
    pub update_attributes_request: ::std::option::Option<crate::types::UpdateAttributesRequest>,
}
impl RemoveAttributesInput {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
    /// <ul>
    /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints, such as the date when an associated user opted in or out of receiving communications from you through a specific type of channel.</p></li>
    /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints, such as the number of app sessions or the number of items left in a cart.</p></li>
    /// <li><p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
    /// </ul>
    pub fn attribute_type(&self) -> ::std::option::Option<&str> {
        self.attribute_type.as_deref()
    }
    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
    pub fn update_attributes_request(
        &self,
    ) -> ::std::option::Option<&crate::types::UpdateAttributesRequest> {
        self.update_attributes_request.as_ref()
    }
}
impl RemoveAttributesInput {
    /// Creates a new builder-style object to manufacture [`RemoveAttributesInput`](crate::operation::remove_attributes::RemoveAttributesInput).
    pub fn builder() -> crate::operation::remove_attributes::builders::RemoveAttributesInputBuilder
    {
        crate::operation::remove_attributes::builders::RemoveAttributesInputBuilder::default()
    }
}

/// A builder for [`RemoveAttributesInput`](crate::operation::remove_attributes::RemoveAttributesInput).
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct RemoveAttributesInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) attribute_type: ::std::option::Option<::std::string::String>,
    pub(crate) update_attributes_request:
        ::std::option::Option<crate::types::UpdateAttributesRequest>,
}
impl RemoveAttributesInputBuilder {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn application_id(
        mut self,
        input: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn set_application_id(
        mut self,
        input: ::std::option::Option<::std::string::String>,
    ) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
    /// <ul>
    /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints, such as the date when an associated user opted in or out of receiving communications from you through a specific type of channel.</p></li>
    /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints, such as the number of app sessions or the number of items left in a cart.</p></li>
    /// <li><p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
    /// </ul>
    pub fn attribute_type(
        mut self,
        input: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        self.attribute_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
    /// <ul>
    /// <li><p>endpoint-custom-attributes - Custom attributes that describe endpoints, such as the date when an associated user opted in or out of receiving communications from you through a specific type of channel.</p></li>
    /// <li><p>endpoint-metric-attributes - Custom metrics that your app reports to Amazon Pinpoint for endpoints, such as the number of app sessions or the number of items left in a cart.</p></li>
    /// <li><p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
    /// </ul>
    pub fn set_attribute_type(
        mut self,
        input: ::std::option::Option<::std::string::String>,
    ) -> Self {
        self.attribute_type = input;
        self
    }
    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
    pub fn update_attributes_request(
        mut self,
        input: crate::types::UpdateAttributesRequest,
    ) -> Self {
        self.update_attributes_request = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
    pub fn set_update_attributes_request(
        mut self,
        input: ::std::option::Option<crate::types::UpdateAttributesRequest>,
    ) -> Self {
        self.update_attributes_request = input;
        self
    }
    /// Consumes the builder and constructs a [`RemoveAttributesInput`](crate::operation::remove_attributes::RemoveAttributesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::remove_attributes::RemoveAttributesInput,
        ::aws_smithy_http::operation::error::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::remove_attributes::RemoveAttributesInput {
            application_id: self.application_id,
            attribute_type: self.attribute_type,
            update_attributes_request: self.update_attributes_request,
        })
    }
}