aws_sdk_b2bi/operation/update_profile/
_update_profile_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateProfileInput {
6 pub profile_id: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub email: ::std::option::Option<::std::string::String>,
12 pub phone: ::std::option::Option<::std::string::String>,
14 pub business_name: ::std::option::Option<::std::string::String>,
16}
17impl UpdateProfileInput {
18 pub fn profile_id(&self) -> ::std::option::Option<&str> {
20 self.profile_id.as_deref()
21 }
22 pub fn name(&self) -> ::std::option::Option<&str> {
24 self.name.as_deref()
25 }
26 pub fn email(&self) -> ::std::option::Option<&str> {
28 self.email.as_deref()
29 }
30 pub fn phone(&self) -> ::std::option::Option<&str> {
32 self.phone.as_deref()
33 }
34 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 pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
53 crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
54 }
55}
56
57#[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 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 pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.profile_id = input;
77 self
78 }
79 pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
81 &self.profile_id
82 }
83 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90 self.name = input;
91 self
92 }
93 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
95 &self.name
96 }
97 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 pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.email = input;
105 self
106 }
107 pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
109 &self.email
110 }
111 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 pub fn set_phone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.phone = input;
119 self
120 }
121 pub fn get_phone(&self) -> &::std::option::Option<::std::string::String> {
123 &self.phone
124 }
125 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 pub fn set_business_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.business_name = input;
133 self
134 }
135 pub fn get_business_name(&self) -> &::std::option::Option<::std::string::String> {
137 &self.business_name
138 }
139 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}