aws_sdk_resourceexplorer2/operation/search/_search_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)]
5pub struct SearchInput {
6 /// <p>A string that includes keywords and filters that specify the resources that you want to include in the results.</p>
7 /// <p>For the complete syntax supported by the <code>QueryString</code> parameter, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html">Search query syntax reference for Resource Explorer</a>.</p>
8 /// <p>The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.</p><note>
9 /// <p>The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for <code>QueryString</code> to refine the results.</p>
10 /// </note>
11 pub query_string: ::std::option::Option<::std::string::String>,
12 /// <p>The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results.</p><note>
13 /// <p>An API operation can return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
14 /// </note>
15 pub max_results: ::std::option::Option<i32>,
16 /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the Amazon Web Services Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a <code>401 Unauthorized</code> exception.</p>
17 pub view_arn: ::std::option::Option<::std::string::String>,
18 /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value of the previous call's <code>NextToken</code> response to indicate where the output should continue from. The pagination tokens expire after 24 hours.</p>
19 pub next_token: ::std::option::Option<::std::string::String>,
20}
21impl SearchInput {
22 /// <p>A string that includes keywords and filters that specify the resources that you want to include in the results.</p>
23 /// <p>For the complete syntax supported by the <code>QueryString</code> parameter, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html">Search query syntax reference for Resource Explorer</a>.</p>
24 /// <p>The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.</p><note>
25 /// <p>The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for <code>QueryString</code> to refine the results.</p>
26 /// </note>
27 pub fn query_string(&self) -> ::std::option::Option<&str> {
28 self.query_string.as_deref()
29 }
30 /// <p>The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results.</p><note>
31 /// <p>An API operation can return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
32 /// </note>
33 pub fn max_results(&self) -> ::std::option::Option<i32> {
34 self.max_results
35 }
36 /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the Amazon Web Services Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a <code>401 Unauthorized</code> exception.</p>
37 pub fn view_arn(&self) -> ::std::option::Option<&str> {
38 self.view_arn.as_deref()
39 }
40 /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value of the previous call's <code>NextToken</code> response to indicate where the output should continue from. The pagination tokens expire after 24 hours.</p>
41 pub fn next_token(&self) -> ::std::option::Option<&str> {
42 self.next_token.as_deref()
43 }
44}
45impl ::std::fmt::Debug for SearchInput {
46 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47 let mut formatter = f.debug_struct("SearchInput");
48 formatter.field("query_string", &"*** Sensitive Data Redacted ***");
49 formatter.field("max_results", &self.max_results);
50 formatter.field("view_arn", &self.view_arn);
51 formatter.field("next_token", &self.next_token);
52 formatter.finish()
53 }
54}
55impl SearchInput {
56 /// Creates a new builder-style object to manufacture [`SearchInput`](crate::operation::search::SearchInput).
57 pub fn builder() -> crate::operation::search::builders::SearchInputBuilder {
58 crate::operation::search::builders::SearchInputBuilder::default()
59 }
60}
61
62/// A builder for [`SearchInput`](crate::operation::search::SearchInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
64#[non_exhaustive]
65pub struct SearchInputBuilder {
66 pub(crate) query_string: ::std::option::Option<::std::string::String>,
67 pub(crate) max_results: ::std::option::Option<i32>,
68 pub(crate) view_arn: ::std::option::Option<::std::string::String>,
69 pub(crate) next_token: ::std::option::Option<::std::string::String>,
70}
71impl SearchInputBuilder {
72 /// <p>A string that includes keywords and filters that specify the resources that you want to include in the results.</p>
73 /// <p>For the complete syntax supported by the <code>QueryString</code> parameter, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html">Search query syntax reference for Resource Explorer</a>.</p>
74 /// <p>The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.</p><note>
75 /// <p>The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for <code>QueryString</code> to refine the results.</p>
76 /// </note>
77 /// This field is required.
78 pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.query_string = ::std::option::Option::Some(input.into());
80 self
81 }
82 /// <p>A string that includes keywords and filters that specify the resources that you want to include in the results.</p>
83 /// <p>For the complete syntax supported by the <code>QueryString</code> parameter, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html">Search query syntax reference for Resource Explorer</a>.</p>
84 /// <p>The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.</p><note>
85 /// <p>The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for <code>QueryString</code> to refine the results.</p>
86 /// </note>
87 pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.query_string = input;
89 self
90 }
91 /// <p>A string that includes keywords and filters that specify the resources that you want to include in the results.</p>
92 /// <p>For the complete syntax supported by the <code>QueryString</code> parameter, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html">Search query syntax reference for Resource Explorer</a>.</p>
93 /// <p>The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.</p><note>
94 /// <p>The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for <code>QueryString</code> to refine the results.</p>
95 /// </note>
96 pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
97 &self.query_string
98 }
99 /// <p>The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results.</p><note>
100 /// <p>An API operation can return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
101 /// </note>
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 that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results.</p><note>
107 /// <p>An API operation can return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
108 /// </note>
109 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
110 self.max_results = input;
111 self
112 }
113 /// <p>The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results.</p><note>
114 /// <p>An API operation can return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
115 /// </note>
116 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
117 &self.max_results
118 }
119 /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the Amazon Web Services Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a <code>401 Unauthorized</code> exception.</p>
120 pub fn view_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.view_arn = ::std::option::Option::Some(input.into());
122 self
123 }
124 /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the Amazon Web Services Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a <code>401 Unauthorized</code> exception.</p>
125 pub fn set_view_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.view_arn = input;
127 self
128 }
129 /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the Amazon Web Services Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a <code>401 Unauthorized</code> exception.</p>
130 pub fn get_view_arn(&self) -> &::std::option::Option<::std::string::String> {
131 &self.view_arn
132 }
133 /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value of the previous call's <code>NextToken</code> response to indicate where the output should continue from. The pagination tokens expire after 24 hours.</p>
134 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 self.next_token = ::std::option::Option::Some(input.into());
136 self
137 }
138 /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value of the previous call's <code>NextToken</code> response to indicate where the output should continue from. The pagination tokens expire after 24 hours.</p>
139 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140 self.next_token = input;
141 self
142 }
143 /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value of the previous call's <code>NextToken</code> response to indicate where the output should continue from. The pagination tokens expire after 24 hours.</p>
144 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
145 &self.next_token
146 }
147 /// Consumes the builder and constructs a [`SearchInput`](crate::operation::search::SearchInput).
148 pub fn build(self) -> ::std::result::Result<crate::operation::search::SearchInput, ::aws_smithy_types::error::operation::BuildError> {
149 ::std::result::Result::Ok(crate::operation::search::SearchInput {
150 query_string: self.query_string,
151 max_results: self.max_results,
152 view_arn: self.view_arn,
153 next_token: self.next_token,
154 })
155 }
156}
157impl ::std::fmt::Debug for SearchInputBuilder {
158 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
159 let mut formatter = f.debug_struct("SearchInputBuilder");
160 formatter.field("query_string", &"*** Sensitive Data Redacted ***");
161 formatter.field("max_results", &self.max_results);
162 formatter.field("view_arn", &self.view_arn);
163 formatter.field("next_token", &self.next_token);
164 formatter.finish()
165 }
166}