aws_sdk_quicksight/operation/search_dashboards/_search_dashboards_input.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 SearchDashboardsInput {
6 /// <p>The ID of the Amazon Web Services account that contains the user whose dashboards you're searching for.</p>
7 pub aws_account_id: ::std::option::Option<::std::string::String>,
8 /// <p>The filters to apply to the search. Currently, you can search only by user name, for example, <code>"Filters": \[ { "Name": "QUICKSIGHT_USER", "Operator": "StringEquals", "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1" } \]</code></p>
9 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::DashboardSearchFilter>>,
10 /// <p>The token for the next set of results, or null if there are no more results.</p>
11 pub next_token: ::std::option::Option<::std::string::String>,
12 /// <p>The maximum number of results to be returned per request.</p>
13 pub max_results: ::std::option::Option<i32>,
14}
15impl SearchDashboardsInput {
16 /// <p>The ID of the Amazon Web Services account that contains the user whose dashboards you're searching for.</p>
17 pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
18 self.aws_account_id.as_deref()
19 }
20 /// <p>The filters to apply to the search. Currently, you can search only by user name, for example, <code>"Filters": \[ { "Name": "QUICKSIGHT_USER", "Operator": "StringEquals", "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1" } \]</code></p>
21 ///
22 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
23 pub fn filters(&self) -> &[crate::types::DashboardSearchFilter] {
24 self.filters.as_deref().unwrap_or_default()
25 }
26 /// <p>The token for the next set of results, or null if there are no more results.</p>
27 pub fn next_token(&self) -> ::std::option::Option<&str> {
28 self.next_token.as_deref()
29 }
30 /// <p>The maximum number of results to be returned per request.</p>
31 pub fn max_results(&self) -> ::std::option::Option<i32> {
32 self.max_results
33 }
34}
35impl SearchDashboardsInput {
36 /// Creates a new builder-style object to manufacture [`SearchDashboardsInput`](crate::operation::search_dashboards::SearchDashboardsInput).
37 pub fn builder() -> crate::operation::search_dashboards::builders::SearchDashboardsInputBuilder {
38 crate::operation::search_dashboards::builders::SearchDashboardsInputBuilder::default()
39 }
40}
41
42/// A builder for [`SearchDashboardsInput`](crate::operation::search_dashboards::SearchDashboardsInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct SearchDashboardsInputBuilder {
46 pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
47 pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::DashboardSearchFilter>>,
48 pub(crate) next_token: ::std::option::Option<::std::string::String>,
49 pub(crate) max_results: ::std::option::Option<i32>,
50}
51impl SearchDashboardsInputBuilder {
52 /// <p>The ID of the Amazon Web Services account that contains the user whose dashboards you're searching for.</p>
53 /// This field is required.
54 pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.aws_account_id = ::std::option::Option::Some(input.into());
56 self
57 }
58 /// <p>The ID of the Amazon Web Services account that contains the user whose dashboards you're searching for.</p>
59 pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.aws_account_id = input;
61 self
62 }
63 /// <p>The ID of the Amazon Web Services account that contains the user whose dashboards you're searching for.</p>
64 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.aws_account_id
66 }
67 /// Appends an item to `filters`.
68 ///
69 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
70 ///
71 /// <p>The filters to apply to the search. Currently, you can search only by user name, for example, <code>"Filters": \[ { "Name": "QUICKSIGHT_USER", "Operator": "StringEquals", "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1" } \]</code></p>
72 pub fn filters(mut self, input: crate::types::DashboardSearchFilter) -> Self {
73 let mut v = self.filters.unwrap_or_default();
74 v.push(input);
75 self.filters = ::std::option::Option::Some(v);
76 self
77 }
78 /// <p>The filters to apply to the search. Currently, you can search only by user name, for example, <code>"Filters": \[ { "Name": "QUICKSIGHT_USER", "Operator": "StringEquals", "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1" } \]</code></p>
79 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DashboardSearchFilter>>) -> Self {
80 self.filters = input;
81 self
82 }
83 /// <p>The filters to apply to the search. Currently, you can search only by user name, for example, <code>"Filters": \[ { "Name": "QUICKSIGHT_USER", "Operator": "StringEquals", "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1" } \]</code></p>
84 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DashboardSearchFilter>> {
85 &self.filters
86 }
87 /// <p>The token for the next set of results, or null if there are no more results.</p>
88 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.next_token = ::std::option::Option::Some(input.into());
90 self
91 }
92 /// <p>The token for the next set of results, or null if there are no more results.</p>
93 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.next_token = input;
95 self
96 }
97 /// <p>The token for the next set of results, or null if there are no more results.</p>
98 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
99 &self.next_token
100 }
101 /// <p>The maximum number of results to be returned per request.</p>
102 pub fn max_results(mut self, input: i32) -> Self {
103 self.max_results = ::std::option::Option::Some(input);
104 self
105 }
106 /// <p>The maximum number of results to be returned per request.</p>
107 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
108 self.max_results = input;
109 self
110 }
111 /// <p>The maximum number of results to be returned per request.</p>
112 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
113 &self.max_results
114 }
115 /// Consumes the builder and constructs a [`SearchDashboardsInput`](crate::operation::search_dashboards::SearchDashboardsInput).
116 pub fn build(
117 self,
118 ) -> ::std::result::Result<crate::operation::search_dashboards::SearchDashboardsInput, ::aws_smithy_types::error::operation::BuildError> {
119 ::std::result::Result::Ok(crate::operation::search_dashboards::SearchDashboardsInput {
120 aws_account_id: self.aws_account_id,
121 filters: self.filters,
122 next_token: self.next_token,
123 max_results: self.max_results,
124 })
125 }
126}