aws_sdk_mpa/operation/get_session/
_get_session_output.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 GetSessionOutput {
6    /// <p>Amazon Resource Name (ARN) for the session.</p>
7    pub session_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
9    pub approval_team_arn: ::std::option::Option<::std::string::String>,
10    /// <p>Name of the approval team.</p>
11    pub approval_team_name: ::std::option::Option<::std::string::String>,
12    /// <p>Amazon Resource Name (ARN) for the protected operation.</p>
13    pub protected_resource_arn: ::std::option::Option<::std::string::String>,
14    /// <p>An <code>ApprovalStrategyResponse</code> object. Contains details for how the team grants approval</p>
15    pub approval_strategy: ::std::option::Option<crate::types::ApprovalStrategyResponse>,
16    /// <p>Total number of approvers in the session.</p>
17    pub number_of_approvers: ::std::option::Option<i32>,
18    /// <p>Timestamp when the session was initiated.</p>
19    pub initiation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>Timestamp when the session will expire.</p>
21    pub expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>Timestamp when the session completed.</p>
23    pub completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>Description for the session.</p>
25    pub description: ::std::option::Option<::std::string::String>,
26    /// <p>Metadata for the session.</p>
27    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28    /// <p>Status for the session. For example, if the team has approved the requested operation.</p>
29    pub status: ::std::option::Option<crate::types::SessionStatus>,
30    /// <p>Status code of the session.</p>
31    pub status_code: ::std::option::Option<crate::types::SessionStatusCode>,
32    /// <p>Message describing the status for session.</p>
33    pub status_message: ::std::option::Option<::std::string::String>,
34    /// <p>Status for the protected operation. For example, if the operation is <code>PENDING</code>.</p>
35    pub execution_status: ::std::option::Option<crate::types::SessionExecutionStatus>,
36    /// <p>Name of the protected operation.</p>
37    pub action_name: ::std::option::Option<::std::string::String>,
38    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">Service principal</a> for the service associated with the protected operation.</p>
39    pub requester_service_principal: ::std::option::Option<::std::string::String>,
40    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-request">IAM principal</a> that made the operation request.</p>
41    pub requester_principal_arn: ::std::option::Option<::std::string::String>,
42    /// <p>ID for the account that made the operation request.</p>
43    pub requester_account_id: ::std::option::Option<::std::string::String>,
44    /// <p>Amazon Web Services Region where the operation request originated.</p>
45    pub requester_region: ::std::option::Option<::std::string::String>,
46    /// <p>Message from the account that made the operation request</p>
47    pub requester_comment: ::std::option::Option<::std::string::String>,
48    /// <p>Strategy for executing the protected operation. <code>AUTO_COMPLETION_UPON_APPROVAL</code> means the operation is automatically executed using the requester's permissions, if approved.</p>
49    pub action_completion_strategy: ::std::option::Option<crate::types::ActionCompletionStrategy>,
50    /// <p>An array of <code>GetSessionResponseApproverResponse</code> objects. Contains details for approver responses in the session.</p>
51    pub approver_responses: ::std::option::Option<::std::vec::Vec<crate::types::GetSessionResponseApproverResponse>>,
52    _request_id: Option<String>,
53}
54impl GetSessionOutput {
55    /// <p>Amazon Resource Name (ARN) for the session.</p>
56    pub fn session_arn(&self) -> ::std::option::Option<&str> {
57        self.session_arn.as_deref()
58    }
59    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
60    pub fn approval_team_arn(&self) -> ::std::option::Option<&str> {
61        self.approval_team_arn.as_deref()
62    }
63    /// <p>Name of the approval team.</p>
64    pub fn approval_team_name(&self) -> ::std::option::Option<&str> {
65        self.approval_team_name.as_deref()
66    }
67    /// <p>Amazon Resource Name (ARN) for the protected operation.</p>
68    pub fn protected_resource_arn(&self) -> ::std::option::Option<&str> {
69        self.protected_resource_arn.as_deref()
70    }
71    /// <p>An <code>ApprovalStrategyResponse</code> object. Contains details for how the team grants approval</p>
72    pub fn approval_strategy(&self) -> ::std::option::Option<&crate::types::ApprovalStrategyResponse> {
73        self.approval_strategy.as_ref()
74    }
75    /// <p>Total number of approvers in the session.</p>
76    pub fn number_of_approvers(&self) -> ::std::option::Option<i32> {
77        self.number_of_approvers
78    }
79    /// <p>Timestamp when the session was initiated.</p>
80    pub fn initiation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
81        self.initiation_time.as_ref()
82    }
83    /// <p>Timestamp when the session will expire.</p>
84    pub fn expiration_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
85        self.expiration_time.as_ref()
86    }
87    /// <p>Timestamp when the session completed.</p>
88    pub fn completion_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
89        self.completion_time.as_ref()
90    }
91    /// <p>Description for the session.</p>
92    pub fn description(&self) -> ::std::option::Option<&str> {
93        self.description.as_deref()
94    }
95    /// <p>Metadata for the session.</p>
96    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
97        self.metadata.as_ref()
98    }
99    /// <p>Status for the session. For example, if the team has approved the requested operation.</p>
100    pub fn status(&self) -> ::std::option::Option<&crate::types::SessionStatus> {
101        self.status.as_ref()
102    }
103    /// <p>Status code of the session.</p>
104    pub fn status_code(&self) -> ::std::option::Option<&crate::types::SessionStatusCode> {
105        self.status_code.as_ref()
106    }
107    /// <p>Message describing the status for session.</p>
108    pub fn status_message(&self) -> ::std::option::Option<&str> {
109        self.status_message.as_deref()
110    }
111    /// <p>Status for the protected operation. For example, if the operation is <code>PENDING</code>.</p>
112    pub fn execution_status(&self) -> ::std::option::Option<&crate::types::SessionExecutionStatus> {
113        self.execution_status.as_ref()
114    }
115    /// <p>Name of the protected operation.</p>
116    pub fn action_name(&self) -> ::std::option::Option<&str> {
117        self.action_name.as_deref()
118    }
119    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">Service principal</a> for the service associated with the protected operation.</p>
120    pub fn requester_service_principal(&self) -> ::std::option::Option<&str> {
121        self.requester_service_principal.as_deref()
122    }
123    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-request">IAM principal</a> that made the operation request.</p>
124    pub fn requester_principal_arn(&self) -> ::std::option::Option<&str> {
125        self.requester_principal_arn.as_deref()
126    }
127    /// <p>ID for the account that made the operation request.</p>
128    pub fn requester_account_id(&self) -> ::std::option::Option<&str> {
129        self.requester_account_id.as_deref()
130    }
131    /// <p>Amazon Web Services Region where the operation request originated.</p>
132    pub fn requester_region(&self) -> ::std::option::Option<&str> {
133        self.requester_region.as_deref()
134    }
135    /// <p>Message from the account that made the operation request</p>
136    pub fn requester_comment(&self) -> ::std::option::Option<&str> {
137        self.requester_comment.as_deref()
138    }
139    /// <p>Strategy for executing the protected operation. <code>AUTO_COMPLETION_UPON_APPROVAL</code> means the operation is automatically executed using the requester's permissions, if approved.</p>
140    pub fn action_completion_strategy(&self) -> ::std::option::Option<&crate::types::ActionCompletionStrategy> {
141        self.action_completion_strategy.as_ref()
142    }
143    /// <p>An array of <code>GetSessionResponseApproverResponse</code> objects. Contains details for approver responses in the session.</p>
144    ///
145    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.approver_responses.is_none()`.
146    pub fn approver_responses(&self) -> &[crate::types::GetSessionResponseApproverResponse] {
147        self.approver_responses.as_deref().unwrap_or_default()
148    }
149}
150impl ::std::fmt::Debug for GetSessionOutput {
151    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
152        let mut formatter = f.debug_struct("GetSessionOutput");
153        formatter.field("session_arn", &self.session_arn);
154        formatter.field("approval_team_arn", &self.approval_team_arn);
155        formatter.field("approval_team_name", &self.approval_team_name);
156        formatter.field("protected_resource_arn", &self.protected_resource_arn);
157        formatter.field("approval_strategy", &self.approval_strategy);
158        formatter.field("number_of_approvers", &self.number_of_approvers);
159        formatter.field("initiation_time", &self.initiation_time);
160        formatter.field("expiration_time", &self.expiration_time);
161        formatter.field("completion_time", &self.completion_time);
162        formatter.field("description", &"*** Sensitive Data Redacted ***");
163        formatter.field("metadata", &"*** Sensitive Data Redacted ***");
164        formatter.field("status", &self.status);
165        formatter.field("status_code", &self.status_code);
166        formatter.field("status_message", &self.status_message);
167        formatter.field("execution_status", &self.execution_status);
168        formatter.field("action_name", &self.action_name);
169        formatter.field("requester_service_principal", &self.requester_service_principal);
170        formatter.field("requester_principal_arn", &self.requester_principal_arn);
171        formatter.field("requester_account_id", &self.requester_account_id);
172        formatter.field("requester_region", &self.requester_region);
173        formatter.field("requester_comment", &"*** Sensitive Data Redacted ***");
174        formatter.field("action_completion_strategy", &self.action_completion_strategy);
175        formatter.field("approver_responses", &self.approver_responses);
176        formatter.field("_request_id", &self._request_id);
177        formatter.finish()
178    }
179}
180impl ::aws_types::request_id::RequestId for GetSessionOutput {
181    fn request_id(&self) -> Option<&str> {
182        self._request_id.as_deref()
183    }
184}
185impl GetSessionOutput {
186    /// Creates a new builder-style object to manufacture [`GetSessionOutput`](crate::operation::get_session::GetSessionOutput).
187    pub fn builder() -> crate::operation::get_session::builders::GetSessionOutputBuilder {
188        crate::operation::get_session::builders::GetSessionOutputBuilder::default()
189    }
190}
191
192/// A builder for [`GetSessionOutput`](crate::operation::get_session::GetSessionOutput).
193#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
194#[non_exhaustive]
195pub struct GetSessionOutputBuilder {
196    pub(crate) session_arn: ::std::option::Option<::std::string::String>,
197    pub(crate) approval_team_arn: ::std::option::Option<::std::string::String>,
198    pub(crate) approval_team_name: ::std::option::Option<::std::string::String>,
199    pub(crate) protected_resource_arn: ::std::option::Option<::std::string::String>,
200    pub(crate) approval_strategy: ::std::option::Option<crate::types::ApprovalStrategyResponse>,
201    pub(crate) number_of_approvers: ::std::option::Option<i32>,
202    pub(crate) initiation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
203    pub(crate) expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
204    pub(crate) completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
205    pub(crate) description: ::std::option::Option<::std::string::String>,
206    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
207    pub(crate) status: ::std::option::Option<crate::types::SessionStatus>,
208    pub(crate) status_code: ::std::option::Option<crate::types::SessionStatusCode>,
209    pub(crate) status_message: ::std::option::Option<::std::string::String>,
210    pub(crate) execution_status: ::std::option::Option<crate::types::SessionExecutionStatus>,
211    pub(crate) action_name: ::std::option::Option<::std::string::String>,
212    pub(crate) requester_service_principal: ::std::option::Option<::std::string::String>,
213    pub(crate) requester_principal_arn: ::std::option::Option<::std::string::String>,
214    pub(crate) requester_account_id: ::std::option::Option<::std::string::String>,
215    pub(crate) requester_region: ::std::option::Option<::std::string::String>,
216    pub(crate) requester_comment: ::std::option::Option<::std::string::String>,
217    pub(crate) action_completion_strategy: ::std::option::Option<crate::types::ActionCompletionStrategy>,
218    pub(crate) approver_responses: ::std::option::Option<::std::vec::Vec<crate::types::GetSessionResponseApproverResponse>>,
219    _request_id: Option<String>,
220}
221impl GetSessionOutputBuilder {
222    /// <p>Amazon Resource Name (ARN) for the session.</p>
223    pub fn session_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224        self.session_arn = ::std::option::Option::Some(input.into());
225        self
226    }
227    /// <p>Amazon Resource Name (ARN) for the session.</p>
228    pub fn set_session_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229        self.session_arn = input;
230        self
231    }
232    /// <p>Amazon Resource Name (ARN) for the session.</p>
233    pub fn get_session_arn(&self) -> &::std::option::Option<::std::string::String> {
234        &self.session_arn
235    }
236    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
237    pub fn approval_team_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238        self.approval_team_arn = ::std::option::Option::Some(input.into());
239        self
240    }
241    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
242    pub fn set_approval_team_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243        self.approval_team_arn = input;
244        self
245    }
246    /// <p>Amazon Resource Name (ARN) for the approval team.</p>
247    pub fn get_approval_team_arn(&self) -> &::std::option::Option<::std::string::String> {
248        &self.approval_team_arn
249    }
250    /// <p>Name of the approval team.</p>
251    pub fn approval_team_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
252        self.approval_team_name = ::std::option::Option::Some(input.into());
253        self
254    }
255    /// <p>Name of the approval team.</p>
256    pub fn set_approval_team_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
257        self.approval_team_name = input;
258        self
259    }
260    /// <p>Name of the approval team.</p>
261    pub fn get_approval_team_name(&self) -> &::std::option::Option<::std::string::String> {
262        &self.approval_team_name
263    }
264    /// <p>Amazon Resource Name (ARN) for the protected operation.</p>
265    pub fn protected_resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266        self.protected_resource_arn = ::std::option::Option::Some(input.into());
267        self
268    }
269    /// <p>Amazon Resource Name (ARN) for the protected operation.</p>
270    pub fn set_protected_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
271        self.protected_resource_arn = input;
272        self
273    }
274    /// <p>Amazon Resource Name (ARN) for the protected operation.</p>
275    pub fn get_protected_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
276        &self.protected_resource_arn
277    }
278    /// <p>An <code>ApprovalStrategyResponse</code> object. Contains details for how the team grants approval</p>
279    pub fn approval_strategy(mut self, input: crate::types::ApprovalStrategyResponse) -> Self {
280        self.approval_strategy = ::std::option::Option::Some(input);
281        self
282    }
283    /// <p>An <code>ApprovalStrategyResponse</code> object. Contains details for how the team grants approval</p>
284    pub fn set_approval_strategy(mut self, input: ::std::option::Option<crate::types::ApprovalStrategyResponse>) -> Self {
285        self.approval_strategy = input;
286        self
287    }
288    /// <p>An <code>ApprovalStrategyResponse</code> object. Contains details for how the team grants approval</p>
289    pub fn get_approval_strategy(&self) -> &::std::option::Option<crate::types::ApprovalStrategyResponse> {
290        &self.approval_strategy
291    }
292    /// <p>Total number of approvers in the session.</p>
293    pub fn number_of_approvers(mut self, input: i32) -> Self {
294        self.number_of_approvers = ::std::option::Option::Some(input);
295        self
296    }
297    /// <p>Total number of approvers in the session.</p>
298    pub fn set_number_of_approvers(mut self, input: ::std::option::Option<i32>) -> Self {
299        self.number_of_approvers = input;
300        self
301    }
302    /// <p>Total number of approvers in the session.</p>
303    pub fn get_number_of_approvers(&self) -> &::std::option::Option<i32> {
304        &self.number_of_approvers
305    }
306    /// <p>Timestamp when the session was initiated.</p>
307    pub fn initiation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
308        self.initiation_time = ::std::option::Option::Some(input);
309        self
310    }
311    /// <p>Timestamp when the session was initiated.</p>
312    pub fn set_initiation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
313        self.initiation_time = input;
314        self
315    }
316    /// <p>Timestamp when the session was initiated.</p>
317    pub fn get_initiation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
318        &self.initiation_time
319    }
320    /// <p>Timestamp when the session will expire.</p>
321    pub fn expiration_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
322        self.expiration_time = ::std::option::Option::Some(input);
323        self
324    }
325    /// <p>Timestamp when the session will expire.</p>
326    pub fn set_expiration_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
327        self.expiration_time = input;
328        self
329    }
330    /// <p>Timestamp when the session will expire.</p>
331    pub fn get_expiration_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
332        &self.expiration_time
333    }
334    /// <p>Timestamp when the session completed.</p>
335    pub fn completion_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
336        self.completion_time = ::std::option::Option::Some(input);
337        self
338    }
339    /// <p>Timestamp when the session completed.</p>
340    pub fn set_completion_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
341        self.completion_time = input;
342        self
343    }
344    /// <p>Timestamp when the session completed.</p>
345    pub fn get_completion_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
346        &self.completion_time
347    }
348    /// <p>Description for the session.</p>
349    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350        self.description = ::std::option::Option::Some(input.into());
351        self
352    }
353    /// <p>Description for the session.</p>
354    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
355        self.description = input;
356        self
357    }
358    /// <p>Description for the session.</p>
359    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
360        &self.description
361    }
362    /// Adds a key-value pair to `metadata`.
363    ///
364    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
365    ///
366    /// <p>Metadata for the session.</p>
367    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
368        let mut hash_map = self.metadata.unwrap_or_default();
369        hash_map.insert(k.into(), v.into());
370        self.metadata = ::std::option::Option::Some(hash_map);
371        self
372    }
373    /// <p>Metadata for the session.</p>
374    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
375        self.metadata = input;
376        self
377    }
378    /// <p>Metadata for the session.</p>
379    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
380        &self.metadata
381    }
382    /// <p>Status for the session. For example, if the team has approved the requested operation.</p>
383    pub fn status(mut self, input: crate::types::SessionStatus) -> Self {
384        self.status = ::std::option::Option::Some(input);
385        self
386    }
387    /// <p>Status for the session. For example, if the team has approved the requested operation.</p>
388    pub fn set_status(mut self, input: ::std::option::Option<crate::types::SessionStatus>) -> Self {
389        self.status = input;
390        self
391    }
392    /// <p>Status for the session. For example, if the team has approved the requested operation.</p>
393    pub fn get_status(&self) -> &::std::option::Option<crate::types::SessionStatus> {
394        &self.status
395    }
396    /// <p>Status code of the session.</p>
397    pub fn status_code(mut self, input: crate::types::SessionStatusCode) -> Self {
398        self.status_code = ::std::option::Option::Some(input);
399        self
400    }
401    /// <p>Status code of the session.</p>
402    pub fn set_status_code(mut self, input: ::std::option::Option<crate::types::SessionStatusCode>) -> Self {
403        self.status_code = input;
404        self
405    }
406    /// <p>Status code of the session.</p>
407    pub fn get_status_code(&self) -> &::std::option::Option<crate::types::SessionStatusCode> {
408        &self.status_code
409    }
410    /// <p>Message describing the status for session.</p>
411    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
412        self.status_message = ::std::option::Option::Some(input.into());
413        self
414    }
415    /// <p>Message describing the status for session.</p>
416    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
417        self.status_message = input;
418        self
419    }
420    /// <p>Message describing the status for session.</p>
421    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
422        &self.status_message
423    }
424    /// <p>Status for the protected operation. For example, if the operation is <code>PENDING</code>.</p>
425    pub fn execution_status(mut self, input: crate::types::SessionExecutionStatus) -> Self {
426        self.execution_status = ::std::option::Option::Some(input);
427        self
428    }
429    /// <p>Status for the protected operation. For example, if the operation is <code>PENDING</code>.</p>
430    pub fn set_execution_status(mut self, input: ::std::option::Option<crate::types::SessionExecutionStatus>) -> Self {
431        self.execution_status = input;
432        self
433    }
434    /// <p>Status for the protected operation. For example, if the operation is <code>PENDING</code>.</p>
435    pub fn get_execution_status(&self) -> &::std::option::Option<crate::types::SessionExecutionStatus> {
436        &self.execution_status
437    }
438    /// <p>Name of the protected operation.</p>
439    pub fn action_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
440        self.action_name = ::std::option::Option::Some(input.into());
441        self
442    }
443    /// <p>Name of the protected operation.</p>
444    pub fn set_action_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
445        self.action_name = input;
446        self
447    }
448    /// <p>Name of the protected operation.</p>
449    pub fn get_action_name(&self) -> &::std::option::Option<::std::string::String> {
450        &self.action_name
451    }
452    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">Service principal</a> for the service associated with the protected operation.</p>
453    pub fn requester_service_principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
454        self.requester_service_principal = ::std::option::Option::Some(input.into());
455        self
456    }
457    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">Service principal</a> for the service associated with the protected operation.</p>
458    pub fn set_requester_service_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
459        self.requester_service_principal = input;
460        self
461    }
462    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">Service principal</a> for the service associated with the protected operation.</p>
463    pub fn get_requester_service_principal(&self) -> &::std::option::Option<::std::string::String> {
464        &self.requester_service_principal
465    }
466    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-request">IAM principal</a> that made the operation request.</p>
467    pub fn requester_principal_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
468        self.requester_principal_arn = ::std::option::Option::Some(input.into());
469        self
470    }
471    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-request">IAM principal</a> that made the operation request.</p>
472    pub fn set_requester_principal_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
473        self.requester_principal_arn = input;
474        self
475    }
476    /// <p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-request">IAM principal</a> that made the operation request.</p>
477    pub fn get_requester_principal_arn(&self) -> &::std::option::Option<::std::string::String> {
478        &self.requester_principal_arn
479    }
480    /// <p>ID for the account that made the operation request.</p>
481    pub fn requester_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
482        self.requester_account_id = ::std::option::Option::Some(input.into());
483        self
484    }
485    /// <p>ID for the account that made the operation request.</p>
486    pub fn set_requester_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
487        self.requester_account_id = input;
488        self
489    }
490    /// <p>ID for the account that made the operation request.</p>
491    pub fn get_requester_account_id(&self) -> &::std::option::Option<::std::string::String> {
492        &self.requester_account_id
493    }
494    /// <p>Amazon Web Services Region where the operation request originated.</p>
495    pub fn requester_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
496        self.requester_region = ::std::option::Option::Some(input.into());
497        self
498    }
499    /// <p>Amazon Web Services Region where the operation request originated.</p>
500    pub fn set_requester_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
501        self.requester_region = input;
502        self
503    }
504    /// <p>Amazon Web Services Region where the operation request originated.</p>
505    pub fn get_requester_region(&self) -> &::std::option::Option<::std::string::String> {
506        &self.requester_region
507    }
508    /// <p>Message from the account that made the operation request</p>
509    pub fn requester_comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
510        self.requester_comment = ::std::option::Option::Some(input.into());
511        self
512    }
513    /// <p>Message from the account that made the operation request</p>
514    pub fn set_requester_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
515        self.requester_comment = input;
516        self
517    }
518    /// <p>Message from the account that made the operation request</p>
519    pub fn get_requester_comment(&self) -> &::std::option::Option<::std::string::String> {
520        &self.requester_comment
521    }
522    /// <p>Strategy for executing the protected operation. <code>AUTO_COMPLETION_UPON_APPROVAL</code> means the operation is automatically executed using the requester's permissions, if approved.</p>
523    pub fn action_completion_strategy(mut self, input: crate::types::ActionCompletionStrategy) -> Self {
524        self.action_completion_strategy = ::std::option::Option::Some(input);
525        self
526    }
527    /// <p>Strategy for executing the protected operation. <code>AUTO_COMPLETION_UPON_APPROVAL</code> means the operation is automatically executed using the requester's permissions, if approved.</p>
528    pub fn set_action_completion_strategy(mut self, input: ::std::option::Option<crate::types::ActionCompletionStrategy>) -> Self {
529        self.action_completion_strategy = input;
530        self
531    }
532    /// <p>Strategy for executing the protected operation. <code>AUTO_COMPLETION_UPON_APPROVAL</code> means the operation is automatically executed using the requester's permissions, if approved.</p>
533    pub fn get_action_completion_strategy(&self) -> &::std::option::Option<crate::types::ActionCompletionStrategy> {
534        &self.action_completion_strategy
535    }
536    /// Appends an item to `approver_responses`.
537    ///
538    /// To override the contents of this collection use [`set_approver_responses`](Self::set_approver_responses).
539    ///
540    /// <p>An array of <code>GetSessionResponseApproverResponse</code> objects. Contains details for approver responses in the session.</p>
541    pub fn approver_responses(mut self, input: crate::types::GetSessionResponseApproverResponse) -> Self {
542        let mut v = self.approver_responses.unwrap_or_default();
543        v.push(input);
544        self.approver_responses = ::std::option::Option::Some(v);
545        self
546    }
547    /// <p>An array of <code>GetSessionResponseApproverResponse</code> objects. Contains details for approver responses in the session.</p>
548    pub fn set_approver_responses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GetSessionResponseApproverResponse>>) -> Self {
549        self.approver_responses = input;
550        self
551    }
552    /// <p>An array of <code>GetSessionResponseApproverResponse</code> objects. Contains details for approver responses in the session.</p>
553    pub fn get_approver_responses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GetSessionResponseApproverResponse>> {
554        &self.approver_responses
555    }
556    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
557        self._request_id = Some(request_id.into());
558        self
559    }
560
561    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
562        self._request_id = request_id;
563        self
564    }
565    /// Consumes the builder and constructs a [`GetSessionOutput`](crate::operation::get_session::GetSessionOutput).
566    pub fn build(self) -> crate::operation::get_session::GetSessionOutput {
567        crate::operation::get_session::GetSessionOutput {
568            session_arn: self.session_arn,
569            approval_team_arn: self.approval_team_arn,
570            approval_team_name: self.approval_team_name,
571            protected_resource_arn: self.protected_resource_arn,
572            approval_strategy: self.approval_strategy,
573            number_of_approvers: self.number_of_approvers,
574            initiation_time: self.initiation_time,
575            expiration_time: self.expiration_time,
576            completion_time: self.completion_time,
577            description: self.description,
578            metadata: self.metadata,
579            status: self.status,
580            status_code: self.status_code,
581            status_message: self.status_message,
582            execution_status: self.execution_status,
583            action_name: self.action_name,
584            requester_service_principal: self.requester_service_principal,
585            requester_principal_arn: self.requester_principal_arn,
586            requester_account_id: self.requester_account_id,
587            requester_region: self.requester_region,
588            requester_comment: self.requester_comment,
589            action_completion_strategy: self.action_completion_strategy,
590            approver_responses: self.approver_responses,
591            _request_id: self._request_id,
592        }
593    }
594}
595impl ::std::fmt::Debug for GetSessionOutputBuilder {
596    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
597        let mut formatter = f.debug_struct("GetSessionOutputBuilder");
598        formatter.field("session_arn", &self.session_arn);
599        formatter.field("approval_team_arn", &self.approval_team_arn);
600        formatter.field("approval_team_name", &self.approval_team_name);
601        formatter.field("protected_resource_arn", &self.protected_resource_arn);
602        formatter.field("approval_strategy", &self.approval_strategy);
603        formatter.field("number_of_approvers", &self.number_of_approvers);
604        formatter.field("initiation_time", &self.initiation_time);
605        formatter.field("expiration_time", &self.expiration_time);
606        formatter.field("completion_time", &self.completion_time);
607        formatter.field("description", &"*** Sensitive Data Redacted ***");
608        formatter.field("metadata", &"*** Sensitive Data Redacted ***");
609        formatter.field("status", &self.status);
610        formatter.field("status_code", &self.status_code);
611        formatter.field("status_message", &self.status_message);
612        formatter.field("execution_status", &self.execution_status);
613        formatter.field("action_name", &self.action_name);
614        formatter.field("requester_service_principal", &self.requester_service_principal);
615        formatter.field("requester_principal_arn", &self.requester_principal_arn);
616        formatter.field("requester_account_id", &self.requester_account_id);
617        formatter.field("requester_region", &self.requester_region);
618        formatter.field("requester_comment", &"*** Sensitive Data Redacted ***");
619        formatter.field("action_completion_strategy", &self.action_completion_strategy);
620        formatter.field("approver_responses", &self.approver_responses);
621        formatter.field("_request_id", &self._request_id);
622        formatter.finish()
623    }
624}