aws_sdk_deadline/operation/search_steps/
_search_steps_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 SearchStepsInput {
6    /// <p>The farm ID to use for the step search.</p>
7    pub farm_id: ::std::option::Option<::std::string::String>,
8    /// <p>The queue IDs in the step search.</p>
9    pub queue_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>The job ID to use in the step search.</p>
11    pub job_id: ::std::option::Option<::std::string::String>,
12    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
13    pub filter_expressions: ::std::option::Option<crate::types::SearchGroupedFilterExpressions>,
14    /// <p>The search terms for a resource.</p>
15    pub sort_expressions: ::std::option::Option<::std::vec::Vec<crate::types::SearchSortExpression>>,
16    /// <p>Defines how far into the scrollable list to start the return of results.</p>
17    pub item_offset: ::std::option::Option<i32>,
18    /// <p>Specifies the number of items per page for the resource.</p>
19    pub page_size: ::std::option::Option<i32>,
20}
21impl SearchStepsInput {
22    /// <p>The farm ID to use for the step search.</p>
23    pub fn farm_id(&self) -> ::std::option::Option<&str> {
24        self.farm_id.as_deref()
25    }
26    /// <p>The queue IDs in the step search.</p>
27    ///
28    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.queue_ids.is_none()`.
29    pub fn queue_ids(&self) -> &[::std::string::String] {
30        self.queue_ids.as_deref().unwrap_or_default()
31    }
32    /// <p>The job ID to use in the step search.</p>
33    pub fn job_id(&self) -> ::std::option::Option<&str> {
34        self.job_id.as_deref()
35    }
36    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
37    pub fn filter_expressions(&self) -> ::std::option::Option<&crate::types::SearchGroupedFilterExpressions> {
38        self.filter_expressions.as_ref()
39    }
40    /// <p>The search terms for a resource.</p>
41    ///
42    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sort_expressions.is_none()`.
43    pub fn sort_expressions(&self) -> &[crate::types::SearchSortExpression] {
44        self.sort_expressions.as_deref().unwrap_or_default()
45    }
46    /// <p>Defines how far into the scrollable list to start the return of results.</p>
47    pub fn item_offset(&self) -> ::std::option::Option<i32> {
48        self.item_offset
49    }
50    /// <p>Specifies the number of items per page for the resource.</p>
51    pub fn page_size(&self) -> ::std::option::Option<i32> {
52        self.page_size
53    }
54}
55impl SearchStepsInput {
56    /// Creates a new builder-style object to manufacture [`SearchStepsInput`](crate::operation::search_steps::SearchStepsInput).
57    pub fn builder() -> crate::operation::search_steps::builders::SearchStepsInputBuilder {
58        crate::operation::search_steps::builders::SearchStepsInputBuilder::default()
59    }
60}
61
62/// A builder for [`SearchStepsInput`](crate::operation::search_steps::SearchStepsInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct SearchStepsInputBuilder {
66    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
67    pub(crate) queue_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
68    pub(crate) job_id: ::std::option::Option<::std::string::String>,
69    pub(crate) filter_expressions: ::std::option::Option<crate::types::SearchGroupedFilterExpressions>,
70    pub(crate) sort_expressions: ::std::option::Option<::std::vec::Vec<crate::types::SearchSortExpression>>,
71    pub(crate) item_offset: ::std::option::Option<i32>,
72    pub(crate) page_size: ::std::option::Option<i32>,
73}
74impl SearchStepsInputBuilder {
75    /// <p>The farm ID to use for the step search.</p>
76    /// This field is required.
77    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.farm_id = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The farm ID to use for the step search.</p>
82    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.farm_id = input;
84        self
85    }
86    /// <p>The farm ID to use for the step search.</p>
87    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
88        &self.farm_id
89    }
90    /// Appends an item to `queue_ids`.
91    ///
92    /// To override the contents of this collection use [`set_queue_ids`](Self::set_queue_ids).
93    ///
94    /// <p>The queue IDs in the step search.</p>
95    pub fn queue_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        let mut v = self.queue_ids.unwrap_or_default();
97        v.push(input.into());
98        self.queue_ids = ::std::option::Option::Some(v);
99        self
100    }
101    /// <p>The queue IDs in the step search.</p>
102    pub fn set_queue_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
103        self.queue_ids = input;
104        self
105    }
106    /// <p>The queue IDs in the step search.</p>
107    pub fn get_queue_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
108        &self.queue_ids
109    }
110    /// <p>The job ID to use in the step search.</p>
111    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.job_id = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The job ID to use in the step search.</p>
116    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.job_id = input;
118        self
119    }
120    /// <p>The job ID to use in the step search.</p>
121    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
122        &self.job_id
123    }
124    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
125    pub fn filter_expressions(mut self, input: crate::types::SearchGroupedFilterExpressions) -> Self {
126        self.filter_expressions = ::std::option::Option::Some(input);
127        self
128    }
129    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
130    pub fn set_filter_expressions(mut self, input: ::std::option::Option<crate::types::SearchGroupedFilterExpressions>) -> Self {
131        self.filter_expressions = input;
132        self
133    }
134    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
135    pub fn get_filter_expressions(&self) -> &::std::option::Option<crate::types::SearchGroupedFilterExpressions> {
136        &self.filter_expressions
137    }
138    /// Appends an item to `sort_expressions`.
139    ///
140    /// To override the contents of this collection use [`set_sort_expressions`](Self::set_sort_expressions).
141    ///
142    /// <p>The search terms for a resource.</p>
143    pub fn sort_expressions(mut self, input: crate::types::SearchSortExpression) -> Self {
144        let mut v = self.sort_expressions.unwrap_or_default();
145        v.push(input);
146        self.sort_expressions = ::std::option::Option::Some(v);
147        self
148    }
149    /// <p>The search terms for a resource.</p>
150    pub fn set_sort_expressions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SearchSortExpression>>) -> Self {
151        self.sort_expressions = input;
152        self
153    }
154    /// <p>The search terms for a resource.</p>
155    pub fn get_sort_expressions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SearchSortExpression>> {
156        &self.sort_expressions
157    }
158    /// <p>Defines how far into the scrollable list to start the return of results.</p>
159    /// This field is required.
160    pub fn item_offset(mut self, input: i32) -> Self {
161        self.item_offset = ::std::option::Option::Some(input);
162        self
163    }
164    /// <p>Defines how far into the scrollable list to start the return of results.</p>
165    pub fn set_item_offset(mut self, input: ::std::option::Option<i32>) -> Self {
166        self.item_offset = input;
167        self
168    }
169    /// <p>Defines how far into the scrollable list to start the return of results.</p>
170    pub fn get_item_offset(&self) -> &::std::option::Option<i32> {
171        &self.item_offset
172    }
173    /// <p>Specifies the number of items per page for the resource.</p>
174    pub fn page_size(mut self, input: i32) -> Self {
175        self.page_size = ::std::option::Option::Some(input);
176        self
177    }
178    /// <p>Specifies the number of items per page for the resource.</p>
179    pub fn set_page_size(mut self, input: ::std::option::Option<i32>) -> Self {
180        self.page_size = input;
181        self
182    }
183    /// <p>Specifies the number of items per page for the resource.</p>
184    pub fn get_page_size(&self) -> &::std::option::Option<i32> {
185        &self.page_size
186    }
187    /// Consumes the builder and constructs a [`SearchStepsInput`](crate::operation::search_steps::SearchStepsInput).
188    pub fn build(self) -> ::std::result::Result<crate::operation::search_steps::SearchStepsInput, ::aws_smithy_types::error::operation::BuildError> {
189        ::std::result::Result::Ok(crate::operation::search_steps::SearchStepsInput {
190            farm_id: self.farm_id,
191            queue_ids: self.queue_ids,
192            job_id: self.job_id,
193            filter_expressions: self.filter_expressions,
194            sort_expressions: self.sort_expressions,
195            item_offset: self.item_offset,
196            page_size: self.page_size,
197        })
198    }
199}