aws_sdk_machinelearning/waiters/evaluation_available.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3///
4/// Fluent builder for the `evaluation_available` waiter.
5///
6/// This builder is intended to be used similar to the other fluent builders for
7/// normal operations on the client. However, instead of a `send` method, it has
8/// a `wait` method that takes a maximum amount of time to wait.
9///
10/// Construct this fluent builder using the client by importing the
11/// [`Waiters`](crate::client::Waiters) trait and calling the methods
12/// prefixed with `wait_until`.
13///
14#[derive(::std::clone::Clone, ::std::fmt::Debug)]
15pub struct EvaluationAvailableFluentBuilder {
16 handle: ::std::sync::Arc<crate::client::Handle>,
17 inner: crate::operation::describe_evaluations::builders::DescribeEvaluationsInputBuilder,
18}
19impl EvaluationAvailableFluentBuilder {
20 /// Creates a new `EvaluationAvailableFluentBuilder`.
21 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
22 Self {
23 handle,
24 inner: ::std::default::Default::default(),
25 }
26 }
27 /// Access the DescribeEvaluations as a reference.
28 pub fn as_input(&self) -> &crate::operation::describe_evaluations::builders::DescribeEvaluationsInputBuilder {
29 &self.inner
30 }
31 /// Wait for `evaluation_available`
32 pub async fn wait(
33 self,
34 max_wait: ::std::time::Duration,
35 ) -> ::std::result::Result<
36 crate::waiters::evaluation_available::EvaluationAvailableFinalPoll,
37 crate::waiters::evaluation_available::WaitUntilEvaluationAvailableError,
38 > {
39 let input = self
40 .inner
41 .build()
42 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
43 let runtime_plugins = crate::operation::describe_evaluations::DescribeEvaluations::operation_runtime_plugins(
44 self.handle.runtime_plugins.clone(),
45 &self.handle.conf,
46 ::std::option::Option::None,
47 )
48 .with_operation_plugin(crate::sdk_feature_tracker::waiter::WaiterFeatureTrackerRuntimePlugin::new());
49 let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
50 let runtime_components_builder = runtime_plugins
51 .apply_client_configuration(&mut cfg)
52 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
53 let time_components = runtime_components_builder.into_time_components();
54 let sleep_impl = time_components.sleep_impl().expect("a sleep impl is required by waiters");
55 let time_source = time_components.time_source().expect("a time source is required by waiters");
56
57 let acceptor = move |result: ::std::result::Result<
58 &crate::operation::describe_evaluations::DescribeEvaluationsOutput,
59 &crate::operation::describe_evaluations::DescribeEvaluationsError,
60 >| {
61 // Matches: {"output":{"path":"Results[].Status","expected":"COMPLETED","comparator":"allStringEquals"}}
62 if crate::waiters::matchers::match_describe_evaluations_147c4749b8435ead2(result) {
63 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
64 }
65 // Matches: {"output":{"path":"Results[].Status","expected":"FAILED","comparator":"anyStringEquals"}}
66 if crate::waiters::matchers::match_describe_evaluations_772ab1725e6b52e57(result) {
67 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
68 }
69 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
70 };
71 let operation = move || {
72 let input = input.clone();
73 let runtime_plugins = runtime_plugins.clone();
74 async move { crate::operation::describe_evaluations::DescribeEvaluations::orchestrate(&runtime_plugins, input).await }
75 };
76 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
77 .min_delay(::std::time::Duration::from_secs(30))
78 .max_delay(::std::time::Duration::from_secs(120))
79 .max_wait(max_wait)
80 .time_source(time_source)
81 .sleep_impl(sleep_impl)
82 .acceptor(acceptor)
83 .operation(operation)
84 .build();
85 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
86 }
87 /// <p>Use one of the following variable to filter a list of <code>Evaluation</code> objects:</p>
88 /// <ul>
89 /// <li>
90 /// <p><code>CreatedAt</code> - Sets the search criteria to the <code>Evaluation</code> creation date.</p></li>
91 /// <li>
92 /// <p><code>Status</code> - Sets the search criteria to the <code>Evaluation</code> status.</p></li>
93 /// <li>
94 /// <p><code>Name</code> - Sets the search criteria to the contents of <code>Evaluation</code> <b> </b> <code>Name</code>.</p></li>
95 /// <li>
96 /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked an <code>Evaluation</code>.</p></li>
97 /// <li>
98 /// <p><code>MLModelId</code> - Sets the search criteria to the <code>MLModel</code> that was evaluated.</p></li>
99 /// <li>
100 /// <p><code>DataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used in <code>Evaluation</code>.</p></li>
101 /// <li>
102 /// <p><code>DataUri</code> - Sets the search criteria to the data file(s) used in <code>Evaluation</code>. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.</p></li>
103 /// </ul>
104 pub fn filter_variable(mut self, input: crate::types::EvaluationFilterVariable) -> Self {
105 self.inner = self.inner.filter_variable(input);
106 self
107 }
108 /// <p>Use one of the following variable to filter a list of <code>Evaluation</code> objects:</p>
109 /// <ul>
110 /// <li>
111 /// <p><code>CreatedAt</code> - Sets the search criteria to the <code>Evaluation</code> creation date.</p></li>
112 /// <li>
113 /// <p><code>Status</code> - Sets the search criteria to the <code>Evaluation</code> status.</p></li>
114 /// <li>
115 /// <p><code>Name</code> - Sets the search criteria to the contents of <code>Evaluation</code> <b> </b> <code>Name</code>.</p></li>
116 /// <li>
117 /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked an <code>Evaluation</code>.</p></li>
118 /// <li>
119 /// <p><code>MLModelId</code> - Sets the search criteria to the <code>MLModel</code> that was evaluated.</p></li>
120 /// <li>
121 /// <p><code>DataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used in <code>Evaluation</code>.</p></li>
122 /// <li>
123 /// <p><code>DataUri</code> - Sets the search criteria to the data file(s) used in <code>Evaluation</code>. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.</p></li>
124 /// </ul>
125 pub fn set_filter_variable(mut self, input: ::std::option::Option<crate::types::EvaluationFilterVariable>) -> Self {
126 self.inner = self.inner.set_filter_variable(input);
127 self
128 }
129 /// <p>Use one of the following variable to filter a list of <code>Evaluation</code> objects:</p>
130 /// <ul>
131 /// <li>
132 /// <p><code>CreatedAt</code> - Sets the search criteria to the <code>Evaluation</code> creation date.</p></li>
133 /// <li>
134 /// <p><code>Status</code> - Sets the search criteria to the <code>Evaluation</code> status.</p></li>
135 /// <li>
136 /// <p><code>Name</code> - Sets the search criteria to the contents of <code>Evaluation</code> <b> </b> <code>Name</code>.</p></li>
137 /// <li>
138 /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked an <code>Evaluation</code>.</p></li>
139 /// <li>
140 /// <p><code>MLModelId</code> - Sets the search criteria to the <code>MLModel</code> that was evaluated.</p></li>
141 /// <li>
142 /// <p><code>DataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used in <code>Evaluation</code>.</p></li>
143 /// <li>
144 /// <p><code>DataUri</code> - Sets the search criteria to the data file(s) used in <code>Evaluation</code>. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.</p></li>
145 /// </ul>
146 pub fn get_filter_variable(&self) -> &::std::option::Option<crate::types::EvaluationFilterVariable> {
147 self.inner.get_filter_variable()
148 }
149 /// <p>The equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
150 pub fn eq(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.inner = self.inner.eq(input.into());
152 self
153 }
154 /// <p>The equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
155 pub fn set_eq(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.inner = self.inner.set_eq(input);
157 self
158 }
159 /// <p>The equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
160 pub fn get_eq(&self) -> &::std::option::Option<::std::string::String> {
161 self.inner.get_eq()
162 }
163 /// <p>The greater than operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
164 pub fn gt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.inner = self.inner.gt(input.into());
166 self
167 }
168 /// <p>The greater than operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
169 pub fn set_gt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.inner = self.inner.set_gt(input);
171 self
172 }
173 /// <p>The greater than operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
174 pub fn get_gt(&self) -> &::std::option::Option<::std::string::String> {
175 self.inner.get_gt()
176 }
177 /// <p>The less than operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
178 pub fn lt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.inner = self.inner.lt(input.into());
180 self
181 }
182 /// <p>The less than operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
183 pub fn set_lt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.inner = self.inner.set_lt(input);
185 self
186 }
187 /// <p>The less than operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
188 pub fn get_lt(&self) -> &::std::option::Option<::std::string::String> {
189 self.inner.get_lt()
190 }
191 /// <p>The greater than or equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
192 pub fn ge(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.inner = self.inner.ge(input.into());
194 self
195 }
196 /// <p>The greater than or equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
197 pub fn set_ge(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.inner = self.inner.set_ge(input);
199 self
200 }
201 /// <p>The greater than or equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
202 pub fn get_ge(&self) -> &::std::option::Option<::std::string::String> {
203 self.inner.get_ge()
204 }
205 /// <p>The less than or equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
206 pub fn le(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.inner = self.inner.le(input.into());
208 self
209 }
210 /// <p>The less than or equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
211 pub fn set_le(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.inner = self.inner.set_le(input);
213 self
214 }
215 /// <p>The less than or equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
216 pub fn get_le(&self) -> &::std::option::Option<::std::string::String> {
217 self.inner.get_le()
218 }
219 /// <p>The not equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
220 pub fn ne(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221 self.inner = self.inner.ne(input.into());
222 self
223 }
224 /// <p>The not equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
225 pub fn set_ne(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226 self.inner = self.inner.set_ne(input);
227 self
228 }
229 /// <p>The not equal to operator. The <code>Evaluation</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
230 pub fn get_ne(&self) -> &::std::option::Option<::std::string::String> {
231 self.inner.get_ne()
232 }
233 /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
234 /// <p>For example, an <code>Evaluation</code> could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>Evaluation</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
235 /// <ul>
236 /// <li>
237 /// <p>2014-09</p></li>
238 /// <li>
239 /// <p>2014-09-09</p></li>
240 /// <li>
241 /// <p>2014-09-09-Holiday</p></li>
242 /// </ul>
243 pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244 self.inner = self.inner.prefix(input.into());
245 self
246 }
247 /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
248 /// <p>For example, an <code>Evaluation</code> could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>Evaluation</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
249 /// <ul>
250 /// <li>
251 /// <p>2014-09</p></li>
252 /// <li>
253 /// <p>2014-09-09</p></li>
254 /// <li>
255 /// <p>2014-09-09-Holiday</p></li>
256 /// </ul>
257 pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.inner = self.inner.set_prefix(input);
259 self
260 }
261 /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
262 /// <p>For example, an <code>Evaluation</code> could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>Evaluation</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
263 /// <ul>
264 /// <li>
265 /// <p>2014-09</p></li>
266 /// <li>
267 /// <p>2014-09-09</p></li>
268 /// <li>
269 /// <p>2014-09-09-Holiday</p></li>
270 /// </ul>
271 pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
272 self.inner.get_prefix()
273 }
274 /// <p>A two-value parameter that determines the sequence of the resulting list of <code>Evaluation</code>.</p>
275 /// <ul>
276 /// <li>
277 /// <p><code>asc</code> - Arranges the list in ascending order (A-Z, 0-9).</p></li>
278 /// <li>
279 /// <p><code>dsc</code> - Arranges the list in descending order (Z-A, 9-0).</p></li>
280 /// </ul>
281 /// <p>Results are sorted by <code>FilterVariable</code>.</p>
282 pub fn sort_order(mut self, input: crate::types::SortOrder) -> Self {
283 self.inner = self.inner.sort_order(input);
284 self
285 }
286 /// <p>A two-value parameter that determines the sequence of the resulting list of <code>Evaluation</code>.</p>
287 /// <ul>
288 /// <li>
289 /// <p><code>asc</code> - Arranges the list in ascending order (A-Z, 0-9).</p></li>
290 /// <li>
291 /// <p><code>dsc</code> - Arranges the list in descending order (Z-A, 9-0).</p></li>
292 /// </ul>
293 /// <p>Results are sorted by <code>FilterVariable</code>.</p>
294 pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
295 self.inner = self.inner.set_sort_order(input);
296 self
297 }
298 /// <p>A two-value parameter that determines the sequence of the resulting list of <code>Evaluation</code>.</p>
299 /// <ul>
300 /// <li>
301 /// <p><code>asc</code> - Arranges the list in ascending order (A-Z, 0-9).</p></li>
302 /// <li>
303 /// <p><code>dsc</code> - Arranges the list in descending order (Z-A, 9-0).</p></li>
304 /// </ul>
305 /// <p>Results are sorted by <code>FilterVariable</code>.</p>
306 pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
307 self.inner.get_sort_order()
308 }
309 /// <p>The ID of the page in the paginated results.</p>
310 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
311 self.inner = self.inner.next_token(input.into());
312 self
313 }
314 /// <p>The ID of the page in the paginated results.</p>
315 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
316 self.inner = self.inner.set_next_token(input);
317 self
318 }
319 /// <p>The ID of the page in the paginated results.</p>
320 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
321 self.inner.get_next_token()
322 }
323 /// <p>The maximum number of <code>Evaluation</code> to include in the result.</p>
324 pub fn limit(mut self, input: i32) -> Self {
325 self.inner = self.inner.limit(input);
326 self
327 }
328 /// <p>The maximum number of <code>Evaluation</code> to include in the result.</p>
329 pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
330 self.inner = self.inner.set_limit(input);
331 self
332 }
333 /// <p>The maximum number of <code>Evaluation</code> to include in the result.</p>
334 pub fn get_limit(&self) -> &::std::option::Option<i32> {
335 self.inner.get_limit()
336 }
337}
338
339/// Successful return type for the `evaluation_available` waiter.
340pub type EvaluationAvailableFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
341 crate::operation::describe_evaluations::DescribeEvaluationsOutput,
342 ::aws_smithy_runtime_api::client::result::SdkError<
343 crate::operation::describe_evaluations::DescribeEvaluationsError,
344 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
345 >,
346>;
347
348/// Error type for the `evaluation_available` waiter.
349pub type WaitUntilEvaluationAvailableError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
350 crate::operation::describe_evaluations::DescribeEvaluationsOutput,
351 crate::operation::describe_evaluations::DescribeEvaluationsError,
352>;