aws_sdk_b2bi/operation/get_profile/
_get_profile_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetProfileOutput {
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 GetProfileOutput {
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 GetProfileOutput {
76 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
77 let mut formatter = f.debug_struct("GetProfileOutput");
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 GetProfileOutput {
93 fn request_id(&self) -> Option<&str> {
94 self._request_id.as_deref()
95 }
96}
97impl GetProfileOutput {
98 pub fn builder() -> crate::operation::get_profile::builders::GetProfileOutputBuilder {
100 crate::operation::get_profile::builders::GetProfileOutputBuilder::default()
101 }
102}
103
104#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
106#[non_exhaustive]
107pub struct GetProfileOutputBuilder {
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 GetProfileOutputBuilder {
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(self) -> ::std::result::Result<crate::operation::get_profile::GetProfileOutput, ::aws_smithy_types::error::operation::BuildError> {
285 ::std::result::Result::Ok(crate::operation::get_profile::GetProfileOutput {
286 profile_id: self.profile_id.ok_or_else(|| {
287 ::aws_smithy_types::error::operation::BuildError::missing_field(
288 "profile_id",
289 "profile_id was not specified but it is required when building GetProfileOutput",
290 )
291 })?,
292 profile_arn: self.profile_arn.ok_or_else(|| {
293 ::aws_smithy_types::error::operation::BuildError::missing_field(
294 "profile_arn",
295 "profile_arn was not specified but it is required when building GetProfileOutput",
296 )
297 })?,
298 name: self.name.ok_or_else(|| {
299 ::aws_smithy_types::error::operation::BuildError::missing_field(
300 "name",
301 "name was not specified but it is required when building GetProfileOutput",
302 )
303 })?,
304 email: self.email,
305 phone: self.phone.ok_or_else(|| {
306 ::aws_smithy_types::error::operation::BuildError::missing_field(
307 "phone",
308 "phone was not specified but it is required when building GetProfileOutput",
309 )
310 })?,
311 business_name: self.business_name.ok_or_else(|| {
312 ::aws_smithy_types::error::operation::BuildError::missing_field(
313 "business_name",
314 "business_name was not specified but it is required when building GetProfileOutput",
315 )
316 })?,
317 logging: self.logging,
318 log_group_name: self.log_group_name,
319 created_at: self.created_at.ok_or_else(|| {
320 ::aws_smithy_types::error::operation::BuildError::missing_field(
321 "created_at",
322 "created_at was not specified but it is required when building GetProfileOutput",
323 )
324 })?,
325 modified_at: self.modified_at,
326 _request_id: self._request_id,
327 })
328 }
329}
330impl ::std::fmt::Debug for GetProfileOutputBuilder {
331 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
332 let mut formatter = f.debug_struct("GetProfileOutputBuilder");
333 formatter.field("profile_id", &self.profile_id);
334 formatter.field("profile_arn", &self.profile_arn);
335 formatter.field("name", &self.name);
336 formatter.field("email", &"*** Sensitive Data Redacted ***");
337 formatter.field("phone", &"*** Sensitive Data Redacted ***");
338 formatter.field("business_name", &self.business_name);
339 formatter.field("logging", &self.logging);
340 formatter.field("log_group_name", &self.log_group_name);
341 formatter.field("created_at", &self.created_at);
342 formatter.field("modified_at", &self.modified_at);
343 formatter.field("_request_id", &self._request_id);
344 formatter.finish()
345 }
346}