aws_sdk_ssoadmin/types/_account_assignment_operation_status.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The status of the creation or deletion operation of an assignment that a principal needs to access an account.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AccountAssignmentOperationStatus {
7 /// <p>The status of the permission set provisioning process.</p>
8 pub status: ::std::option::Option<crate::types::StatusValues>,
9 /// <p>The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.</p>
10 pub request_id: ::std::option::Option<::std::string::String>,
11 /// <p>The message that contains an error or exception in case of an operation failure.</p>
12 pub failure_reason: ::std::option::Option<::std::string::String>,
13 /// <p>TargetID is an Amazon Web Services account identifier, (For example, 123456789012).</p>
14 pub target_id: ::std::option::Option<::std::string::String>,
15 /// <p>The entity type for which the assignment will be created.</p>
16 pub target_type: ::std::option::Option<crate::types::TargetType>,
17 /// <p>The ARN of the permission set. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
18 pub permission_set_arn: ::std::option::Option<::std::string::String>,
19 /// <p>The entity type for which the assignment will be created.</p>
20 pub principal_type: ::std::option::Option<crate::types::PrincipalType>,
21 /// <p>An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the <a href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">IAM Identity Center Identity Store API Reference</a>.</p>
22 pub principal_id: ::std::option::Option<::std::string::String>,
23 /// <p>The date that the permission set was created.</p>
24 pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
25}
26impl AccountAssignmentOperationStatus {
27 /// <p>The status of the permission set provisioning process.</p>
28 pub fn status(&self) -> ::std::option::Option<&crate::types::StatusValues> {
29 self.status.as_ref()
30 }
31 /// <p>The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.</p>
32 pub fn request_id(&self) -> ::std::option::Option<&str> {
33 self.request_id.as_deref()
34 }
35 /// <p>The message that contains an error or exception in case of an operation failure.</p>
36 pub fn failure_reason(&self) -> ::std::option::Option<&str> {
37 self.failure_reason.as_deref()
38 }
39 /// <p>TargetID is an Amazon Web Services account identifier, (For example, 123456789012).</p>
40 pub fn target_id(&self) -> ::std::option::Option<&str> {
41 self.target_id.as_deref()
42 }
43 /// <p>The entity type for which the assignment will be created.</p>
44 pub fn target_type(&self) -> ::std::option::Option<&crate::types::TargetType> {
45 self.target_type.as_ref()
46 }
47 /// <p>The ARN of the permission set. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
48 pub fn permission_set_arn(&self) -> ::std::option::Option<&str> {
49 self.permission_set_arn.as_deref()
50 }
51 /// <p>The entity type for which the assignment will be created.</p>
52 pub fn principal_type(&self) -> ::std::option::Option<&crate::types::PrincipalType> {
53 self.principal_type.as_ref()
54 }
55 /// <p>An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the <a href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">IAM Identity Center Identity Store API Reference</a>.</p>
56 pub fn principal_id(&self) -> ::std::option::Option<&str> {
57 self.principal_id.as_deref()
58 }
59 /// <p>The date that the permission set was created.</p>
60 pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61 self.created_date.as_ref()
62 }
63}
64impl AccountAssignmentOperationStatus {
65 /// Creates a new builder-style object to manufacture [`AccountAssignmentOperationStatus`](crate::types::AccountAssignmentOperationStatus).
66 pub fn builder() -> crate::types::builders::AccountAssignmentOperationStatusBuilder {
67 crate::types::builders::AccountAssignmentOperationStatusBuilder::default()
68 }
69}
70
71/// A builder for [`AccountAssignmentOperationStatus`](crate::types::AccountAssignmentOperationStatus).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct AccountAssignmentOperationStatusBuilder {
75 pub(crate) status: ::std::option::Option<crate::types::StatusValues>,
76 pub(crate) request_id: ::std::option::Option<::std::string::String>,
77 pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
78 pub(crate) target_id: ::std::option::Option<::std::string::String>,
79 pub(crate) target_type: ::std::option::Option<crate::types::TargetType>,
80 pub(crate) permission_set_arn: ::std::option::Option<::std::string::String>,
81 pub(crate) principal_type: ::std::option::Option<crate::types::PrincipalType>,
82 pub(crate) principal_id: ::std::option::Option<::std::string::String>,
83 pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
84}
85impl AccountAssignmentOperationStatusBuilder {
86 /// <p>The status of the permission set provisioning process.</p>
87 pub fn status(mut self, input: crate::types::StatusValues) -> Self {
88 self.status = ::std::option::Option::Some(input);
89 self
90 }
91 /// <p>The status of the permission set provisioning process.</p>
92 pub fn set_status(mut self, input: ::std::option::Option<crate::types::StatusValues>) -> Self {
93 self.status = input;
94 self
95 }
96 /// <p>The status of the permission set provisioning process.</p>
97 pub fn get_status(&self) -> &::std::option::Option<crate::types::StatusValues> {
98 &self.status
99 }
100 /// <p>The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.</p>
101 pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.request_id = ::std::option::Option::Some(input.into());
103 self
104 }
105 /// <p>The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.</p>
106 pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.request_id = input;
108 self
109 }
110 /// <p>The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.</p>
111 pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
112 &self.request_id
113 }
114 /// <p>The message that contains an error or exception in case of an operation failure.</p>
115 pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.failure_reason = ::std::option::Option::Some(input.into());
117 self
118 }
119 /// <p>The message that contains an error or exception in case of an operation failure.</p>
120 pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.failure_reason = input;
122 self
123 }
124 /// <p>The message that contains an error or exception in case of an operation failure.</p>
125 pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
126 &self.failure_reason
127 }
128 /// <p>TargetID is an Amazon Web Services account identifier, (For example, 123456789012).</p>
129 pub fn target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.target_id = ::std::option::Option::Some(input.into());
131 self
132 }
133 /// <p>TargetID is an Amazon Web Services account identifier, (For example, 123456789012).</p>
134 pub fn set_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.target_id = input;
136 self
137 }
138 /// <p>TargetID is an Amazon Web Services account identifier, (For example, 123456789012).</p>
139 pub fn get_target_id(&self) -> &::std::option::Option<::std::string::String> {
140 &self.target_id
141 }
142 /// <p>The entity type for which the assignment will be created.</p>
143 pub fn target_type(mut self, input: crate::types::TargetType) -> Self {
144 self.target_type = ::std::option::Option::Some(input);
145 self
146 }
147 /// <p>The entity type for which the assignment will be created.</p>
148 pub fn set_target_type(mut self, input: ::std::option::Option<crate::types::TargetType>) -> Self {
149 self.target_type = input;
150 self
151 }
152 /// <p>The entity type for which the assignment will be created.</p>
153 pub fn get_target_type(&self) -> &::std::option::Option<crate::types::TargetType> {
154 &self.target_type
155 }
156 /// <p>The ARN of the permission set. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
157 pub fn permission_set_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.permission_set_arn = ::std::option::Option::Some(input.into());
159 self
160 }
161 /// <p>The ARN of the permission set. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
162 pub fn set_permission_set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.permission_set_arn = input;
164 self
165 }
166 /// <p>The ARN of the permission set. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
167 pub fn get_permission_set_arn(&self) -> &::std::option::Option<::std::string::String> {
168 &self.permission_set_arn
169 }
170 /// <p>The entity type for which the assignment will be created.</p>
171 pub fn principal_type(mut self, input: crate::types::PrincipalType) -> Self {
172 self.principal_type = ::std::option::Option::Some(input);
173 self
174 }
175 /// <p>The entity type for which the assignment will be created.</p>
176 pub fn set_principal_type(mut self, input: ::std::option::Option<crate::types::PrincipalType>) -> Self {
177 self.principal_type = input;
178 self
179 }
180 /// <p>The entity type for which the assignment will be created.</p>
181 pub fn get_principal_type(&self) -> &::std::option::Option<crate::types::PrincipalType> {
182 &self.principal_type
183 }
184 /// <p>An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the <a href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">IAM Identity Center Identity Store API Reference</a>.</p>
185 pub fn principal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186 self.principal_id = ::std::option::Option::Some(input.into());
187 self
188 }
189 /// <p>An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the <a href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">IAM Identity Center Identity Store API Reference</a>.</p>
190 pub fn set_principal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191 self.principal_id = input;
192 self
193 }
194 /// <p>An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the <a href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">IAM Identity Center Identity Store API Reference</a>.</p>
195 pub fn get_principal_id(&self) -> &::std::option::Option<::std::string::String> {
196 &self.principal_id
197 }
198 /// <p>The date that the permission set was created.</p>
199 pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
200 self.created_date = ::std::option::Option::Some(input);
201 self
202 }
203 /// <p>The date that the permission set was created.</p>
204 pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
205 self.created_date = input;
206 self
207 }
208 /// <p>The date that the permission set was created.</p>
209 pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
210 &self.created_date
211 }
212 /// Consumes the builder and constructs a [`AccountAssignmentOperationStatus`](crate::types::AccountAssignmentOperationStatus).
213 pub fn build(self) -> crate::types::AccountAssignmentOperationStatus {
214 crate::types::AccountAssignmentOperationStatus {
215 status: self.status,
216 request_id: self.request_id,
217 failure_reason: self.failure_reason,
218 target_id: self.target_id,
219 target_type: self.target_type,
220 permission_set_arn: self.permission_set_arn,
221 principal_type: self.principal_type,
222 principal_id: self.principal_id,
223 created_date: self.created_date,
224 }
225 }
226}