1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateIamPolicyAssignmentOutput {
    /// <p>The name of the assignment. The name must be unique within the Amazon Web Services account.</p>
    pub assignment_name: ::std::option::Option<::std::string::String>,
    /// <p>The ID for the assignment.</p>
    pub assignment_id: ::std::option::Option<::std::string::String>,
    /// <p>The status of the assignment. Possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code> - Anything specified in this assignment is used when creating the data source.</p> </li>
    /// <li> <p> <code>DISABLED</code> - This assignment isn't used when creating the data source.</p> </li>
    /// <li> <p> <code>DRAFT</code> - This assignment is an unfinished draft and isn't used when creating the data source.</p> </li>
    /// </ul>
    pub assignment_status: ::std::option::Option<crate::types::AssignmentStatus>,
    /// <p>The ARN for the IAM policy that is applied to the Amazon QuickSight users and groups specified in this assignment.</p>
    pub policy_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon QuickSight users, groups, or both that the IAM policy is assigned to.</p>
    pub identities: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub request_id: ::std::option::Option<::std::string::String>,
    /// <p>The HTTP status of the request.</p>
    pub status: i32,
    _request_id: Option<String>,
}
impl CreateIamPolicyAssignmentOutput {
    /// <p>The name of the assignment. The name must be unique within the Amazon Web Services account.</p>
    pub fn assignment_name(&self) -> ::std::option::Option<&str> {
        self.assignment_name.as_deref()
    }
    /// <p>The ID for the assignment.</p>
    pub fn assignment_id(&self) -> ::std::option::Option<&str> {
        self.assignment_id.as_deref()
    }
    /// <p>The status of the assignment. Possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code> - Anything specified in this assignment is used when creating the data source.</p> </li>
    /// <li> <p> <code>DISABLED</code> - This assignment isn't used when creating the data source.</p> </li>
    /// <li> <p> <code>DRAFT</code> - This assignment is an unfinished draft and isn't used when creating the data source.</p> </li>
    /// </ul>
    pub fn assignment_status(&self) -> ::std::option::Option<&crate::types::AssignmentStatus> {
        self.assignment_status.as_ref()
    }
    /// <p>The ARN for the IAM policy that is applied to the Amazon QuickSight users and groups specified in this assignment.</p>
    pub fn policy_arn(&self) -> ::std::option::Option<&str> {
        self.policy_arn.as_deref()
    }
    /// <p>The Amazon QuickSight users, groups, or both that the IAM policy is assigned to.</p>
    pub fn identities(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
        self.identities.as_ref()
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(&self) -> ::std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(&self) -> i32 {
        self.status
    }
}
impl ::aws_http::request_id::RequestId for CreateIamPolicyAssignmentOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateIamPolicyAssignmentOutput {
    /// Creates a new builder-style object to manufacture [`CreateIamPolicyAssignmentOutput`](crate::operation::create_iam_policy_assignment::CreateIamPolicyAssignmentOutput).
    pub fn builder() -> crate::operation::create_iam_policy_assignment::builders::CreateIamPolicyAssignmentOutputBuilder {
        crate::operation::create_iam_policy_assignment::builders::CreateIamPolicyAssignmentOutputBuilder::default()
    }
}

/// A builder for [`CreateIamPolicyAssignmentOutput`](crate::operation::create_iam_policy_assignment::CreateIamPolicyAssignmentOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateIamPolicyAssignmentOutputBuilder {
    pub(crate) assignment_name: ::std::option::Option<::std::string::String>,
    pub(crate) assignment_id: ::std::option::Option<::std::string::String>,
    pub(crate) assignment_status: ::std::option::Option<crate::types::AssignmentStatus>,
    pub(crate) policy_arn: ::std::option::Option<::std::string::String>,
    pub(crate) identities: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl CreateIamPolicyAssignmentOutputBuilder {
    /// <p>The name of the assignment. The name must be unique within the Amazon Web Services account.</p>
    pub fn assignment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.assignment_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the assignment. The name must be unique within the Amazon Web Services account.</p>
    pub fn set_assignment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.assignment_name = input;
        self
    }
    /// <p>The name of the assignment. The name must be unique within the Amazon Web Services account.</p>
    pub fn get_assignment_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.assignment_name
    }
    /// <p>The ID for the assignment.</p>
    pub fn assignment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.assignment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID for the assignment.</p>
    pub fn set_assignment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.assignment_id = input;
        self
    }
    /// <p>The ID for the assignment.</p>
    pub fn get_assignment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.assignment_id
    }
    /// <p>The status of the assignment. Possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code> - Anything specified in this assignment is used when creating the data source.</p> </li>
    /// <li> <p> <code>DISABLED</code> - This assignment isn't used when creating the data source.</p> </li>
    /// <li> <p> <code>DRAFT</code> - This assignment is an unfinished draft and isn't used when creating the data source.</p> </li>
    /// </ul>
    pub fn assignment_status(mut self, input: crate::types::AssignmentStatus) -> Self {
        self.assignment_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the assignment. Possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code> - Anything specified in this assignment is used when creating the data source.</p> </li>
    /// <li> <p> <code>DISABLED</code> - This assignment isn't used when creating the data source.</p> </li>
    /// <li> <p> <code>DRAFT</code> - This assignment is an unfinished draft and isn't used when creating the data source.</p> </li>
    /// </ul>
    pub fn set_assignment_status(mut self, input: ::std::option::Option<crate::types::AssignmentStatus>) -> Self {
        self.assignment_status = input;
        self
    }
    /// <p>The status of the assignment. Possible values are as follows:</p>
    /// <ul>
    /// <li> <p> <code>ENABLED</code> - Anything specified in this assignment is used when creating the data source.</p> </li>
    /// <li> <p> <code>DISABLED</code> - This assignment isn't used when creating the data source.</p> </li>
    /// <li> <p> <code>DRAFT</code> - This assignment is an unfinished draft and isn't used when creating the data source.</p> </li>
    /// </ul>
    pub fn get_assignment_status(&self) -> &::std::option::Option<crate::types::AssignmentStatus> {
        &self.assignment_status
    }
    /// <p>The ARN for the IAM policy that is applied to the Amazon QuickSight users and groups specified in this assignment.</p>
    pub fn policy_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN for the IAM policy that is applied to the Amazon QuickSight users and groups specified in this assignment.</p>
    pub fn set_policy_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_arn = input;
        self
    }
    /// <p>The ARN for the IAM policy that is applied to the Amazon QuickSight users and groups specified in this assignment.</p>
    pub fn get_policy_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_arn
    }
    /// Adds a key-value pair to `identities`.
    ///
    /// To override the contents of this collection use [`set_identities`](Self::set_identities).
    ///
    /// <p>The Amazon QuickSight users, groups, or both that the IAM policy is assigned to.</p>
    pub fn identities(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
        let mut hash_map = self.identities.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.identities = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The Amazon QuickSight users, groups, or both that the IAM policy is assigned to.</p>
    pub fn set_identities(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    ) -> Self {
        self.identities = input;
        self
    }
    /// <p>The Amazon QuickSight users, groups, or both that the IAM policy is assigned to.</p>
    pub fn get_identities(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
        &self.identities
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(mut self, input: i32) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
        self.status = input;
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn get_status(&self) -> &::std::option::Option<i32> {
        &self.status
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateIamPolicyAssignmentOutput`](crate::operation::create_iam_policy_assignment::CreateIamPolicyAssignmentOutput).
    pub fn build(self) -> crate::operation::create_iam_policy_assignment::CreateIamPolicyAssignmentOutput {
        crate::operation::create_iam_policy_assignment::CreateIamPolicyAssignmentOutput {
            assignment_name: self.assignment_name,
            assignment_id: self.assignment_id,
            assignment_status: self.assignment_status,
            policy_arn: self.policy_arn,
            identities: self.identities,
            request_id: self.request_id,
            status: self.status.unwrap_or_default(),
            _request_id: self._request_id,
        }
    }
}