aws_sdk_quicksight/operation/describe_folder_resolved_permissions/
_describe_folder_resolved_permissions_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, ::std::fmt::Debug)]
5pub struct DescribeFolderResolvedPermissionsOutput {
6    /// <p>The HTTP status of the request.</p>
7    pub status: i32,
8    /// <p>The ID of the folder.</p>
9    pub folder_id: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the folder.</p>
11    pub arn: ::std::option::Option<::std::string::String>,
12    /// <p>Information about the permissions for the folder.</p>
13    pub permissions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>,
14    /// <p>The Amazon Web Services request ID for this operation.</p>
15    pub request_id: ::std::option::Option<::std::string::String>,
16    /// <p>A pagination token for the next set of results, or null if there are no more results.</p>
17    pub next_token: ::std::option::Option<::std::string::String>,
18    _request_id: Option<String>,
19}
20impl DescribeFolderResolvedPermissionsOutput {
21    /// <p>The HTTP status of the request.</p>
22    pub fn status(&self) -> i32 {
23        self.status
24    }
25    /// <p>The ID of the folder.</p>
26    pub fn folder_id(&self) -> ::std::option::Option<&str> {
27        self.folder_id.as_deref()
28    }
29    /// <p>The Amazon Resource Name (ARN) of the folder.</p>
30    pub fn arn(&self) -> ::std::option::Option<&str> {
31        self.arn.as_deref()
32    }
33    /// <p>Information about the permissions for the folder.</p>
34    ///
35    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.permissions.is_none()`.
36    pub fn permissions(&self) -> &[crate::types::ResourcePermission] {
37        self.permissions.as_deref().unwrap_or_default()
38    }
39    /// <p>The Amazon Web Services request ID for this operation.</p>
40    pub fn request_id(&self) -> ::std::option::Option<&str> {
41        self.request_id.as_deref()
42    }
43    /// <p>A pagination token for the next set of results, or null if there are no more results.</p>
44    pub fn next_token(&self) -> ::std::option::Option<&str> {
45        self.next_token.as_deref()
46    }
47}
48impl ::aws_types::request_id::RequestId for DescribeFolderResolvedPermissionsOutput {
49    fn request_id(&self) -> Option<&str> {
50        self._request_id.as_deref()
51    }
52}
53impl DescribeFolderResolvedPermissionsOutput {
54    /// Creates a new builder-style object to manufacture [`DescribeFolderResolvedPermissionsOutput`](crate::operation::describe_folder_resolved_permissions::DescribeFolderResolvedPermissionsOutput).
55    pub fn builder() -> crate::operation::describe_folder_resolved_permissions::builders::DescribeFolderResolvedPermissionsOutputBuilder {
56        crate::operation::describe_folder_resolved_permissions::builders::DescribeFolderResolvedPermissionsOutputBuilder::default()
57    }
58}
59
60/// A builder for [`DescribeFolderResolvedPermissionsOutput`](crate::operation::describe_folder_resolved_permissions::DescribeFolderResolvedPermissionsOutput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
62#[non_exhaustive]
63pub struct DescribeFolderResolvedPermissionsOutputBuilder {
64    pub(crate) status: ::std::option::Option<i32>,
65    pub(crate) folder_id: ::std::option::Option<::std::string::String>,
66    pub(crate) arn: ::std::option::Option<::std::string::String>,
67    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>,
68    pub(crate) request_id: ::std::option::Option<::std::string::String>,
69    pub(crate) next_token: ::std::option::Option<::std::string::String>,
70    _request_id: Option<String>,
71}
72impl DescribeFolderResolvedPermissionsOutputBuilder {
73    /// <p>The HTTP status of the request.</p>
74    pub fn status(mut self, input: i32) -> Self {
75        self.status = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The HTTP status of the request.</p>
79    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
80        self.status = input;
81        self
82    }
83    /// <p>The HTTP status of the request.</p>
84    pub fn get_status(&self) -> &::std::option::Option<i32> {
85        &self.status
86    }
87    /// <p>The ID of the folder.</p>
88    pub fn folder_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.folder_id = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>The ID of the folder.</p>
93    pub fn set_folder_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.folder_id = input;
95        self
96    }
97    /// <p>The ID of the folder.</p>
98    pub fn get_folder_id(&self) -> &::std::option::Option<::std::string::String> {
99        &self.folder_id
100    }
101    /// <p>The Amazon Resource Name (ARN) of the folder.</p>
102    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.arn = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The Amazon Resource Name (ARN) of the folder.</p>
107    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.arn = input;
109        self
110    }
111    /// <p>The Amazon Resource Name (ARN) of the folder.</p>
112    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
113        &self.arn
114    }
115    /// Appends an item to `permissions`.
116    ///
117    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
118    ///
119    /// <p>Information about the permissions for the folder.</p>
120    pub fn permissions(mut self, input: crate::types::ResourcePermission) -> Self {
121        let mut v = self.permissions.unwrap_or_default();
122        v.push(input);
123        self.permissions = ::std::option::Option::Some(v);
124        self
125    }
126    /// <p>Information about the permissions for the folder.</p>
127    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>) -> Self {
128        self.permissions = input;
129        self
130    }
131    /// <p>Information about the permissions for the folder.</p>
132    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>> {
133        &self.permissions
134    }
135    /// <p>The Amazon Web Services request ID for this operation.</p>
136    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.request_id = ::std::option::Option::Some(input.into());
138        self
139    }
140    /// <p>The Amazon Web Services request ID for this operation.</p>
141    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.request_id = input;
143        self
144    }
145    /// <p>The Amazon Web Services request ID for this operation.</p>
146    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
147        &self.request_id
148    }
149    /// <p>A pagination token for the next set of results, or null if there are no more results.</p>
150    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.next_token = ::std::option::Option::Some(input.into());
152        self
153    }
154    /// <p>A pagination token for the next set of results, or null if there are no more results.</p>
155    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.next_token = input;
157        self
158    }
159    /// <p>A pagination token for the next set of results, or null if there are no more results.</p>
160    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
161        &self.next_token
162    }
163    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
164        self._request_id = Some(request_id.into());
165        self
166    }
167
168    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
169        self._request_id = request_id;
170        self
171    }
172    /// Consumes the builder and constructs a [`DescribeFolderResolvedPermissionsOutput`](crate::operation::describe_folder_resolved_permissions::DescribeFolderResolvedPermissionsOutput).
173    pub fn build(self) -> crate::operation::describe_folder_resolved_permissions::DescribeFolderResolvedPermissionsOutput {
174        crate::operation::describe_folder_resolved_permissions::DescribeFolderResolvedPermissionsOutput {
175            status: self.status.unwrap_or_default(),
176            folder_id: self.folder_id,
177            arn: self.arn,
178            permissions: self.permissions,
179            request_id: self.request_id,
180            next_token: self.next_token,
181            _request_id: self._request_id,
182        }
183    }
184}