aws_sdk_b2bi/operation/update_profile/
_update_profile_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateProfileOutput {
6 pub profile_id: ::std::string::String,
8 pub profile_arn: ::std::string::String,
10 pub name: ::std::string::String,
12 pub email: ::std::option::Option<::std::string::String>,
14 pub phone: ::std::string::String,
16 pub business_name: ::std::string::String,
18 pub logging: ::std::option::Option<crate::types::Logging>,
20 pub log_group_name: ::std::option::Option<::std::string::String>,
22 pub created_at: ::aws_smithy_types::DateTime,
24 pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
26 _request_id: Option<String>,
27}
28impl UpdateProfileOutput {
29 pub fn profile_id(&self) -> &str {
31 use std::ops::Deref;
32 self.profile_id.deref()
33 }
34 pub fn profile_arn(&self) -> &str {
36 use std::ops::Deref;
37 self.profile_arn.deref()
38 }
39 pub fn name(&self) -> &str {
41 use std::ops::Deref;
42 self.name.deref()
43 }
44 pub fn email(&self) -> ::std::option::Option<&str> {
46 self.email.as_deref()
47 }
48 pub fn phone(&self) -> &str {
50 use std::ops::Deref;
51 self.phone.deref()
52 }
53 pub fn business_name(&self) -> &str {
55 use std::ops::Deref;
56 self.business_name.deref()
57 }
58 pub fn logging(&self) -> ::std::option::Option<&crate::types::Logging> {
60 self.logging.as_ref()
61 }
62 pub fn log_group_name(&self) -> ::std::option::Option<&str> {
64 self.log_group_name.as_deref()
65 }
66 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
68 &self.created_at
69 }
70 pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
72 self.modified_at.as_ref()
73 }
74}
75impl ::std::fmt::Debug for UpdateProfileOutput {
76 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
77 let mut formatter = f.debug_struct("UpdateProfileOutput");
78 formatter.field("profile_id", &self.profile_id);
79 formatter.field("profile_arn", &self.profile_arn);
80 formatter.field("name", &self.name);
81 formatter.field("email", &"*** Sensitive Data Redacted ***");
82 formatter.field("phone", &"*** Sensitive Data Redacted ***");
83 formatter.field("business_name", &self.business_name);
84 formatter.field("logging", &self.logging);
85 formatter.field("log_group_name", &self.log_group_name);
86 formatter.field("created_at", &self.created_at);
87 formatter.field("modified_at", &self.modified_at);
88 formatter.field("_request_id", &self._request_id);
89 formatter.finish()
90 }
91}
92impl ::aws_types::request_id::RequestId for UpdateProfileOutput {
93 fn request_id(&self) -> Option<&str> {
94 self._request_id.as_deref()
95 }
96}
97impl UpdateProfileOutput {
98 pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileOutputBuilder {
100 crate::operation::update_profile::builders::UpdateProfileOutputBuilder::default()
101 }
102}
103
104#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
106#[non_exhaustive]
107pub struct UpdateProfileOutputBuilder {
108 pub(crate) profile_id: ::std::option::Option<::std::string::String>,
109 pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
110 pub(crate) name: ::std::option::Option<::std::string::String>,
111 pub(crate) email: ::std::option::Option<::std::string::String>,
112 pub(crate) phone: ::std::option::Option<::std::string::String>,
113 pub(crate) business_name: ::std::option::Option<::std::string::String>,
114 pub(crate) logging: ::std::option::Option<crate::types::Logging>,
115 pub(crate) log_group_name: ::std::option::Option<::std::string::String>,
116 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
117 pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
118 _request_id: Option<String>,
119}
120impl UpdateProfileOutputBuilder {
121 pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.profile_id = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.profile_id = input;
130 self
131 }
132 pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
134 &self.profile_id
135 }
136 pub fn profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139 self.profile_arn = ::std::option::Option::Some(input.into());
140 self
141 }
142 pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144 self.profile_arn = input;
145 self
146 }
147 pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
149 &self.profile_arn
150 }
151 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.name = ::std::option::Option::Some(input.into());
155 self
156 }
157 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159 self.name = input;
160 self
161 }
162 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
164 &self.name
165 }
166 pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168 self.email = ::std::option::Option::Some(input.into());
169 self
170 }
171 pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.email = input;
174 self
175 }
176 pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
178 &self.email
179 }
180 pub fn phone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183 self.phone = ::std::option::Option::Some(input.into());
184 self
185 }
186 pub fn set_phone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188 self.phone = input;
189 self
190 }
191 pub fn get_phone(&self) -> &::std::option::Option<::std::string::String> {
193 &self.phone
194 }
195 pub fn business_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198 self.business_name = ::std::option::Option::Some(input.into());
199 self
200 }
201 pub fn set_business_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203 self.business_name = input;
204 self
205 }
206 pub fn get_business_name(&self) -> &::std::option::Option<::std::string::String> {
208 &self.business_name
209 }
210 pub fn logging(mut self, input: crate::types::Logging) -> Self {
212 self.logging = ::std::option::Option::Some(input);
213 self
214 }
215 pub fn set_logging(mut self, input: ::std::option::Option<crate::types::Logging>) -> Self {
217 self.logging = input;
218 self
219 }
220 pub fn get_logging(&self) -> &::std::option::Option<crate::types::Logging> {
222 &self.logging
223 }
224 pub fn log_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226 self.log_group_name = ::std::option::Option::Some(input.into());
227 self
228 }
229 pub fn set_log_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231 self.log_group_name = input;
232 self
233 }
234 pub fn get_log_group_name(&self) -> &::std::option::Option<::std::string::String> {
236 &self.log_group_name
237 }
238 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
241 self.created_at = ::std::option::Option::Some(input);
242 self
243 }
244 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
246 self.created_at = input;
247 self
248 }
249 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
251 &self.created_at
252 }
253 pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
255 self.modified_at = ::std::option::Option::Some(input);
256 self
257 }
258 pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
260 self.modified_at = input;
261 self
262 }
263 pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
265 &self.modified_at
266 }
267 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
268 self._request_id = Some(request_id.into());
269 self
270 }
271
272 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
273 self._request_id = request_id;
274 self
275 }
276 pub fn build(
285 self,
286 ) -> ::std::result::Result<crate::operation::update_profile::UpdateProfileOutput, ::aws_smithy_types::error::operation::BuildError> {
287 ::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileOutput {
288 profile_id: self.profile_id.ok_or_else(|| {
289 ::aws_smithy_types::error::operation::BuildError::missing_field(
290 "profile_id",
291 "profile_id was not specified but it is required when building UpdateProfileOutput",
292 )
293 })?,
294 profile_arn: self.profile_arn.ok_or_else(|| {
295 ::aws_smithy_types::error::operation::BuildError::missing_field(
296 "profile_arn",
297 "profile_arn was not specified but it is required when building UpdateProfileOutput",
298 )
299 })?,
300 name: self.name.ok_or_else(|| {
301 ::aws_smithy_types::error::operation::BuildError::missing_field(
302 "name",
303 "name was not specified but it is required when building UpdateProfileOutput",
304 )
305 })?,
306 email: self.email,
307 phone: self.phone.ok_or_else(|| {
308 ::aws_smithy_types::error::operation::BuildError::missing_field(
309 "phone",
310 "phone was not specified but it is required when building UpdateProfileOutput",
311 )
312 })?,
313 business_name: self.business_name.ok_or_else(|| {
314 ::aws_smithy_types::error::operation::BuildError::missing_field(
315 "business_name",
316 "business_name was not specified but it is required when building UpdateProfileOutput",
317 )
318 })?,
319 logging: self.logging,
320 log_group_name: self.log_group_name,
321 created_at: self.created_at.ok_or_else(|| {
322 ::aws_smithy_types::error::operation::BuildError::missing_field(
323 "created_at",
324 "created_at was not specified but it is required when building UpdateProfileOutput",
325 )
326 })?,
327 modified_at: self.modified_at,
328 _request_id: self._request_id,
329 })
330 }
331}
332impl ::std::fmt::Debug for UpdateProfileOutputBuilder {
333 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
334 let mut formatter = f.debug_struct("UpdateProfileOutputBuilder");
335 formatter.field("profile_id", &self.profile_id);
336 formatter.field("profile_arn", &self.profile_arn);
337 formatter.field("name", &self.name);
338 formatter.field("email", &"*** Sensitive Data Redacted ***");
339 formatter.field("phone", &"*** Sensitive Data Redacted ***");
340 formatter.field("business_name", &self.business_name);
341 formatter.field("logging", &self.logging);
342 formatter.field("log_group_name", &self.log_group_name);
343 formatter.field("created_at", &self.created_at);
344 formatter.field("modified_at", &self.modified_at);
345 formatter.field("_request_id", &self._request_id);
346 formatter.finish()
347 }
348}