aws_sdk_quicksight/operation/search_groups/
_search_groups_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 SearchGroupsOutput {
6    /// <p>A list of groups in a specified namespace that match the filters you set in your <code>SearchGroups</code> request.</p>
7    pub group_list: ::std::option::Option<::std::vec::Vec<crate::types::Group>>,
8    /// <p>A pagination token that can be used in a subsequent request.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Web Services request ID for this operation.</p>
11    pub request_id: ::std::option::Option<::std::string::String>,
12    /// <p>The HTTP status of the request.</p>
13    pub status: i32,
14    _request_id: Option<String>,
15}
16impl SearchGroupsOutput {
17    /// <p>A list of groups in a specified namespace that match the filters you set in your <code>SearchGroups</code> request.</p>
18    ///
19    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.group_list.is_none()`.
20    pub fn group_list(&self) -> &[crate::types::Group] {
21        self.group_list.as_deref().unwrap_or_default()
22    }
23    /// <p>A pagination token that can be used in a subsequent request.</p>
24    pub fn next_token(&self) -> ::std::option::Option<&str> {
25        self.next_token.as_deref()
26    }
27    /// <p>The Amazon Web Services request ID for this operation.</p>
28    pub fn request_id(&self) -> ::std::option::Option<&str> {
29        self.request_id.as_deref()
30    }
31    /// <p>The HTTP status of the request.</p>
32    pub fn status(&self) -> i32 {
33        self.status
34    }
35}
36impl ::aws_types::request_id::RequestId for SearchGroupsOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl SearchGroupsOutput {
42    /// Creates a new builder-style object to manufacture [`SearchGroupsOutput`](crate::operation::search_groups::SearchGroupsOutput).
43    pub fn builder() -> crate::operation::search_groups::builders::SearchGroupsOutputBuilder {
44        crate::operation::search_groups::builders::SearchGroupsOutputBuilder::default()
45    }
46}
47
48/// A builder for [`SearchGroupsOutput`](crate::operation::search_groups::SearchGroupsOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct SearchGroupsOutputBuilder {
52    pub(crate) group_list: ::std::option::Option<::std::vec::Vec<crate::types::Group>>,
53    pub(crate) next_token: ::std::option::Option<::std::string::String>,
54    pub(crate) request_id: ::std::option::Option<::std::string::String>,
55    pub(crate) status: ::std::option::Option<i32>,
56    _request_id: Option<String>,
57}
58impl SearchGroupsOutputBuilder {
59    /// Appends an item to `group_list`.
60    ///
61    /// To override the contents of this collection use [`set_group_list`](Self::set_group_list).
62    ///
63    /// <p>A list of groups in a specified namespace that match the filters you set in your <code>SearchGroups</code> request.</p>
64    pub fn group_list(mut self, input: crate::types::Group) -> Self {
65        let mut v = self.group_list.unwrap_or_default();
66        v.push(input);
67        self.group_list = ::std::option::Option::Some(v);
68        self
69    }
70    /// <p>A list of groups in a specified namespace that match the filters you set in your <code>SearchGroups</code> request.</p>
71    pub fn set_group_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Group>>) -> Self {
72        self.group_list = input;
73        self
74    }
75    /// <p>A list of groups in a specified namespace that match the filters you set in your <code>SearchGroups</code> request.</p>
76    pub fn get_group_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Group>> {
77        &self.group_list
78    }
79    /// <p>A pagination token that can be used in a subsequent request.</p>
80    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.next_token = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A pagination token that can be used in a subsequent request.</p>
85    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.next_token = input;
87        self
88    }
89    /// <p>A pagination token that can be used in a subsequent request.</p>
90    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91        &self.next_token
92    }
93    /// <p>The Amazon Web Services request ID for this operation.</p>
94    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.request_id = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The Amazon Web Services request ID for this operation.</p>
99    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.request_id = input;
101        self
102    }
103    /// <p>The Amazon Web Services request ID for this operation.</p>
104    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
105        &self.request_id
106    }
107    /// <p>The HTTP status of the request.</p>
108    pub fn status(mut self, input: i32) -> Self {
109        self.status = ::std::option::Option::Some(input);
110        self
111    }
112    /// <p>The HTTP status of the request.</p>
113    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
114        self.status = input;
115        self
116    }
117    /// <p>The HTTP status of the request.</p>
118    pub fn get_status(&self) -> &::std::option::Option<i32> {
119        &self.status
120    }
121    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
122        self._request_id = Some(request_id.into());
123        self
124    }
125
126    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
127        self._request_id = request_id;
128        self
129    }
130    /// Consumes the builder and constructs a [`SearchGroupsOutput`](crate::operation::search_groups::SearchGroupsOutput).
131    pub fn build(self) -> crate::operation::search_groups::SearchGroupsOutput {
132        crate::operation::search_groups::SearchGroupsOutput {
133            group_list: self.group_list,
134            next_token: self.next_token,
135            request_id: self.request_id,
136            status: self.status.unwrap_or_default(),
137            _request_id: self._request_id,
138        }
139    }
140}