aws_sdk_b2bi/operation/update_profile/
_update_profile_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)]
5pub struct UpdateProfileInput {
6    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
7    pub profile_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the profile, used to identify it.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies the email address associated with this customer profile.</p>
11    pub email: ::std::option::Option<::std::string::String>,
12    /// <p>Specifies the phone number associated with the profile.</p>
13    pub phone: ::std::option::Option<::std::string::String>,
14    /// <p>Specifies the name for the business associated with this profile.</p>
15    pub business_name: ::std::option::Option<::std::string::String>,
16}
17impl UpdateProfileInput {
18    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
19    pub fn profile_id(&self) -> ::std::option::Option<&str> {
20        self.profile_id.as_deref()
21    }
22    /// <p>The name of the profile, used to identify it.</p>
23    pub fn name(&self) -> ::std::option::Option<&str> {
24        self.name.as_deref()
25    }
26    /// <p>Specifies the email address associated with this customer profile.</p>
27    pub fn email(&self) -> ::std::option::Option<&str> {
28        self.email.as_deref()
29    }
30    /// <p>Specifies the phone number associated with the profile.</p>
31    pub fn phone(&self) -> ::std::option::Option<&str> {
32        self.phone.as_deref()
33    }
34    /// <p>Specifies the name for the business associated with this profile.</p>
35    pub fn business_name(&self) -> ::std::option::Option<&str> {
36        self.business_name.as_deref()
37    }
38}
39impl ::std::fmt::Debug for UpdateProfileInput {
40    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41        let mut formatter = f.debug_struct("UpdateProfileInput");
42        formatter.field("profile_id", &self.profile_id);
43        formatter.field("name", &self.name);
44        formatter.field("email", &"*** Sensitive Data Redacted ***");
45        formatter.field("phone", &"*** Sensitive Data Redacted ***");
46        formatter.field("business_name", &self.business_name);
47        formatter.finish()
48    }
49}
50impl UpdateProfileInput {
51    /// Creates a new builder-style object to manufacture [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
52    pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
53        crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
54    }
55}
56
57/// A builder for [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
59#[non_exhaustive]
60pub struct UpdateProfileInputBuilder {
61    pub(crate) profile_id: ::std::option::Option<::std::string::String>,
62    pub(crate) name: ::std::option::Option<::std::string::String>,
63    pub(crate) email: ::std::option::Option<::std::string::String>,
64    pub(crate) phone: ::std::option::Option<::std::string::String>,
65    pub(crate) business_name: ::std::option::Option<::std::string::String>,
66}
67impl UpdateProfileInputBuilder {
68    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
69    /// This field is required.
70    pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.profile_id = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
75    pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.profile_id = input;
77        self
78    }
79    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
80    pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
81        &self.profile_id
82    }
83    /// <p>The name of the profile, used to identify it.</p>
84    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.name = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The name of the profile, used to identify it.</p>
89    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.name = input;
91        self
92    }
93    /// <p>The name of the profile, used to identify it.</p>
94    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
95        &self.name
96    }
97    /// <p>Specifies the email address associated with this customer profile.</p>
98    pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.email = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>Specifies the email address associated with this customer profile.</p>
103    pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.email = input;
105        self
106    }
107    /// <p>Specifies the email address associated with this customer profile.</p>
108    pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
109        &self.email
110    }
111    /// <p>Specifies the phone number associated with the profile.</p>
112    pub fn phone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.phone = ::std::option::Option::Some(input.into());
114        self
115    }
116    /// <p>Specifies the phone number associated with the profile.</p>
117    pub fn set_phone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.phone = input;
119        self
120    }
121    /// <p>Specifies the phone number associated with the profile.</p>
122    pub fn get_phone(&self) -> &::std::option::Option<::std::string::String> {
123        &self.phone
124    }
125    /// <p>Specifies the name for the business associated with this profile.</p>
126    pub fn business_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.business_name = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <p>Specifies the name for the business associated with this profile.</p>
131    pub fn set_business_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.business_name = input;
133        self
134    }
135    /// <p>Specifies the name for the business associated with this profile.</p>
136    pub fn get_business_name(&self) -> &::std::option::Option<::std::string::String> {
137        &self.business_name
138    }
139    /// Consumes the builder and constructs a [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
140    pub fn build(
141        self,
142    ) -> ::std::result::Result<crate::operation::update_profile::UpdateProfileInput, ::aws_smithy_types::error::operation::BuildError> {
143        ::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileInput {
144            profile_id: self.profile_id,
145            name: self.name,
146            email: self.email,
147            phone: self.phone,
148            business_name: self.business_name,
149        })
150    }
151}
152impl ::std::fmt::Debug for UpdateProfileInputBuilder {
153    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
154        let mut formatter = f.debug_struct("UpdateProfileInputBuilder");
155        formatter.field("profile_id", &self.profile_id);
156        formatter.field("name", &self.name);
157        formatter.field("email", &"*** Sensitive Data Redacted ***");
158        formatter.field("phone", &"*** Sensitive Data Redacted ***");
159        formatter.field("business_name", &self.business_name);
160        formatter.finish()
161    }
162}