aws_sdk_b2bi/operation/update_partnership/
_update_partnership_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdatePartnershipOutput {
6 pub profile_id: ::std::string::String,
8 pub partnership_id: ::std::string::String,
10 pub partnership_arn: ::std::string::String,
12 pub name: ::std::option::Option<::std::string::String>,
14 pub email: ::std::option::Option<::std::string::String>,
16 pub phone: ::std::option::Option<::std::string::String>,
18 pub capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20 pub capability_options: ::std::option::Option<crate::types::CapabilityOptions>,
22 pub trading_partner_id: ::std::option::Option<::std::string::String>,
24 pub created_at: ::aws_smithy_types::DateTime,
26 pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
28 _request_id: Option<String>,
29}
30impl UpdatePartnershipOutput {
31 pub fn profile_id(&self) -> &str {
33 use std::ops::Deref;
34 self.profile_id.deref()
35 }
36 pub fn partnership_id(&self) -> &str {
38 use std::ops::Deref;
39 self.partnership_id.deref()
40 }
41 pub fn partnership_arn(&self) -> &str {
43 use std::ops::Deref;
44 self.partnership_arn.deref()
45 }
46 pub fn name(&self) -> ::std::option::Option<&str> {
48 self.name.as_deref()
49 }
50 pub fn email(&self) -> ::std::option::Option<&str> {
52 self.email.as_deref()
53 }
54 pub fn phone(&self) -> ::std::option::Option<&str> {
56 self.phone.as_deref()
57 }
58 pub fn capabilities(&self) -> &[::std::string::String] {
62 self.capabilities.as_deref().unwrap_or_default()
63 }
64 pub fn capability_options(&self) -> ::std::option::Option<&crate::types::CapabilityOptions> {
66 self.capability_options.as_ref()
67 }
68 pub fn trading_partner_id(&self) -> ::std::option::Option<&str> {
70 self.trading_partner_id.as_deref()
71 }
72 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
74 &self.created_at
75 }
76 pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
78 self.modified_at.as_ref()
79 }
80}
81impl ::std::fmt::Debug for UpdatePartnershipOutput {
82 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
83 let mut formatter = f.debug_struct("UpdatePartnershipOutput");
84 formatter.field("profile_id", &self.profile_id);
85 formatter.field("partnership_id", &self.partnership_id);
86 formatter.field("partnership_arn", &self.partnership_arn);
87 formatter.field("name", &self.name);
88 formatter.field("email", &"*** Sensitive Data Redacted ***");
89 formatter.field("phone", &"*** Sensitive Data Redacted ***");
90 formatter.field("capabilities", &self.capabilities);
91 formatter.field("capability_options", &self.capability_options);
92 formatter.field("trading_partner_id", &self.trading_partner_id);
93 formatter.field("created_at", &self.created_at);
94 formatter.field("modified_at", &self.modified_at);
95 formatter.field("_request_id", &self._request_id);
96 formatter.finish()
97 }
98}
99impl ::aws_types::request_id::RequestId for UpdatePartnershipOutput {
100 fn request_id(&self) -> Option<&str> {
101 self._request_id.as_deref()
102 }
103}
104impl UpdatePartnershipOutput {
105 pub fn builder() -> crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder {
107 crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder::default()
108 }
109}
110
111#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
113#[non_exhaustive]
114pub struct UpdatePartnershipOutputBuilder {
115 pub(crate) profile_id: ::std::option::Option<::std::string::String>,
116 pub(crate) partnership_id: ::std::option::Option<::std::string::String>,
117 pub(crate) partnership_arn: ::std::option::Option<::std::string::String>,
118 pub(crate) name: ::std::option::Option<::std::string::String>,
119 pub(crate) email: ::std::option::Option<::std::string::String>,
120 pub(crate) phone: ::std::option::Option<::std::string::String>,
121 pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
122 pub(crate) capability_options: ::std::option::Option<crate::types::CapabilityOptions>,
123 pub(crate) trading_partner_id: ::std::option::Option<::std::string::String>,
124 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
125 pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
126 _request_id: Option<String>,
127}
128impl UpdatePartnershipOutputBuilder {
129 pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.profile_id = ::std::option::Option::Some(input.into());
133 self
134 }
135 pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.profile_id = input;
138 self
139 }
140 pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
142 &self.profile_id
143 }
144 pub fn partnership_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.partnership_id = ::std::option::Option::Some(input.into());
148 self
149 }
150 pub fn set_partnership_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.partnership_id = input;
153 self
154 }
155 pub fn get_partnership_id(&self) -> &::std::option::Option<::std::string::String> {
157 &self.partnership_id
158 }
159 pub fn partnership_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.partnership_arn = ::std::option::Option::Some(input.into());
163 self
164 }
165 pub fn set_partnership_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.partnership_arn = input;
168 self
169 }
170 pub fn get_partnership_arn(&self) -> &::std::option::Option<::std::string::String> {
172 &self.partnership_arn
173 }
174 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.name = ::std::option::Option::Some(input.into());
177 self
178 }
179 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181 self.name = input;
182 self
183 }
184 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
186 &self.name
187 }
188 pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190 self.email = ::std::option::Option::Some(input.into());
191 self
192 }
193 pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195 self.email = input;
196 self
197 }
198 pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
200 &self.email
201 }
202 pub fn phone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.phone = ::std::option::Option::Some(input.into());
205 self
206 }
207 pub fn set_phone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.phone = input;
210 self
211 }
212 pub fn get_phone(&self) -> &::std::option::Option<::std::string::String> {
214 &self.phone
215 }
216 pub fn capabilities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 let mut v = self.capabilities.unwrap_or_default();
223 v.push(input.into());
224 self.capabilities = ::std::option::Option::Some(v);
225 self
226 }
227 pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
229 self.capabilities = input;
230 self
231 }
232 pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
234 &self.capabilities
235 }
236 pub fn capability_options(mut self, input: crate::types::CapabilityOptions) -> Self {
238 self.capability_options = ::std::option::Option::Some(input);
239 self
240 }
241 pub fn set_capability_options(mut self, input: ::std::option::Option<crate::types::CapabilityOptions>) -> Self {
243 self.capability_options = input;
244 self
245 }
246 pub fn get_capability_options(&self) -> &::std::option::Option<crate::types::CapabilityOptions> {
248 &self.capability_options
249 }
250 pub fn trading_partner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252 self.trading_partner_id = ::std::option::Option::Some(input.into());
253 self
254 }
255 pub fn set_trading_partner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
257 self.trading_partner_id = input;
258 self
259 }
260 pub fn get_trading_partner_id(&self) -> &::std::option::Option<::std::string::String> {
262 &self.trading_partner_id
263 }
264 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
267 self.created_at = ::std::option::Option::Some(input);
268 self
269 }
270 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
272 self.created_at = input;
273 self
274 }
275 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
277 &self.created_at
278 }
279 pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
281 self.modified_at = ::std::option::Option::Some(input);
282 self
283 }
284 pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
286 self.modified_at = input;
287 self
288 }
289 pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
291 &self.modified_at
292 }
293 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
294 self._request_id = Some(request_id.into());
295 self
296 }
297
298 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
299 self._request_id = request_id;
300 self
301 }
302 pub fn build(
309 self,
310 ) -> ::std::result::Result<crate::operation::update_partnership::UpdatePartnershipOutput, ::aws_smithy_types::error::operation::BuildError> {
311 ::std::result::Result::Ok(crate::operation::update_partnership::UpdatePartnershipOutput {
312 profile_id: self.profile_id.ok_or_else(|| {
313 ::aws_smithy_types::error::operation::BuildError::missing_field(
314 "profile_id",
315 "profile_id was not specified but it is required when building UpdatePartnershipOutput",
316 )
317 })?,
318 partnership_id: self.partnership_id.ok_or_else(|| {
319 ::aws_smithy_types::error::operation::BuildError::missing_field(
320 "partnership_id",
321 "partnership_id was not specified but it is required when building UpdatePartnershipOutput",
322 )
323 })?,
324 partnership_arn: self.partnership_arn.ok_or_else(|| {
325 ::aws_smithy_types::error::operation::BuildError::missing_field(
326 "partnership_arn",
327 "partnership_arn was not specified but it is required when building UpdatePartnershipOutput",
328 )
329 })?,
330 name: self.name,
331 email: self.email,
332 phone: self.phone,
333 capabilities: self.capabilities,
334 capability_options: self.capability_options,
335 trading_partner_id: self.trading_partner_id,
336 created_at: self.created_at.ok_or_else(|| {
337 ::aws_smithy_types::error::operation::BuildError::missing_field(
338 "created_at",
339 "created_at was not specified but it is required when building UpdatePartnershipOutput",
340 )
341 })?,
342 modified_at: self.modified_at,
343 _request_id: self._request_id,
344 })
345 }
346}
347impl ::std::fmt::Debug for UpdatePartnershipOutputBuilder {
348 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
349 let mut formatter = f.debug_struct("UpdatePartnershipOutputBuilder");
350 formatter.field("profile_id", &self.profile_id);
351 formatter.field("partnership_id", &self.partnership_id);
352 formatter.field("partnership_arn", &self.partnership_arn);
353 formatter.field("name", &self.name);
354 formatter.field("email", &"*** Sensitive Data Redacted ***");
355 formatter.field("phone", &"*** Sensitive Data Redacted ***");
356 formatter.field("capabilities", &self.capabilities);
357 formatter.field("capability_options", &self.capability_options);
358 formatter.field("trading_partner_id", &self.trading_partner_id);
359 formatter.field("created_at", &self.created_at);
360 formatter.field("modified_at", &self.modified_at);
361 formatter.field("_request_id", &self._request_id);
362 formatter.finish()
363 }
364}