Skip to main content

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