aws_sdk_pinpoint/operation/remove_attributes/
_remove_attributes_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RemoveAttributesInput {
6    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
9    /// <ul>
10    /// <li>
11    /// <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>
12    /// <li>
13    /// <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>
14    /// <li>
15    /// <p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
16    /// </ul>
17    pub attribute_type: ::std::option::Option<::std::string::String>,
18    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
19    pub update_attributes_request: ::std::option::Option<crate::types::UpdateAttributesRequest>,
20}
21impl RemoveAttributesInput {
22    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
23    pub fn application_id(&self) -> ::std::option::Option<&str> {
24        self.application_id.as_deref()
25    }
26    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
27    /// <ul>
28    /// <li>
29    /// <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>
30    /// <li>
31    /// <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>
32    /// <li>
33    /// <p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
34    /// </ul>
35    pub fn attribute_type(&self) -> ::std::option::Option<&str> {
36        self.attribute_type.as_deref()
37    }
38    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
39    pub fn update_attributes_request(&self) -> ::std::option::Option<&crate::types::UpdateAttributesRequest> {
40        self.update_attributes_request.as_ref()
41    }
42}
43impl RemoveAttributesInput {
44    /// Creates a new builder-style object to manufacture [`RemoveAttributesInput`](crate::operation::remove_attributes::RemoveAttributesInput).
45    pub fn builder() -> crate::operation::remove_attributes::builders::RemoveAttributesInputBuilder {
46        crate::operation::remove_attributes::builders::RemoveAttributesInputBuilder::default()
47    }
48}
49
50/// A builder for [`RemoveAttributesInput`](crate::operation::remove_attributes::RemoveAttributesInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct RemoveAttributesInputBuilder {
54    pub(crate) application_id: ::std::option::Option<::std::string::String>,
55    pub(crate) attribute_type: ::std::option::Option<::std::string::String>,
56    pub(crate) update_attributes_request: ::std::option::Option<crate::types::UpdateAttributesRequest>,
57}
58impl RemoveAttributesInputBuilder {
59    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
60    /// This field is required.
61    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.application_id = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
66    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.application_id = input;
68        self
69    }
70    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
71    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
72        &self.application_id
73    }
74    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
75    /// <ul>
76    /// <li>
77    /// <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>
78    /// <li>
79    /// <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>
80    /// <li>
81    /// <p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
82    /// </ul>
83    /// This field is required.
84    pub fn attribute_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.attribute_type = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
89    /// <ul>
90    /// <li>
91    /// <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>
92    /// <li>
93    /// <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>
94    /// <li>
95    /// <p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
96    /// </ul>
97    pub fn set_attribute_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.attribute_type = input;
99        self
100    }
101    /// <p>The type of attribute or attributes to remove. Valid values are:</p>
102    /// <ul>
103    /// <li>
104    /// <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>
105    /// <li>
106    /// <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>
107    /// <li>
108    /// <p>endpoint-user-attributes - Custom attributes that describe users, such as first name, last name, and age.</p></li>
109    /// </ul>
110    pub fn get_attribute_type(&self) -> &::std::option::Option<::std::string::String> {
111        &self.attribute_type
112    }
113    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
114    /// This field is required.
115    pub fn update_attributes_request(mut self, input: crate::types::UpdateAttributesRequest) -> Self {
116        self.update_attributes_request = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
120    pub fn set_update_attributes_request(mut self, input: ::std::option::Option<crate::types::UpdateAttributesRequest>) -> Self {
121        self.update_attributes_request = input;
122        self
123    }
124    /// <p>Specifies one or more attributes to remove from all the endpoints that are associated with an application.</p>
125    pub fn get_update_attributes_request(&self) -> &::std::option::Option<crate::types::UpdateAttributesRequest> {
126        &self.update_attributes_request
127    }
128    /// Consumes the builder and constructs a [`RemoveAttributesInput`](crate::operation::remove_attributes::RemoveAttributesInput).
129    pub fn build(
130        self,
131    ) -> ::std::result::Result<crate::operation::remove_attributes::RemoveAttributesInput, ::aws_smithy_types::error::operation::BuildError> {
132        ::std::result::Result::Ok(crate::operation::remove_attributes::RemoveAttributesInput {
133            application_id: self.application_id,
134            attribute_type: self.attribute_type,
135            update_attributes_request: self.update_attributes_request,
136        })
137    }
138}