aws_sdk_machinelearning/operation/describe_batch_predictions/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_batch_predictions::_describe_batch_predictions_output::DescribeBatchPredictionsOutputBuilder;
3
4pub use crate::operation::describe_batch_predictions::_describe_batch_predictions_input::DescribeBatchPredictionsInputBuilder;
5
6impl crate::operation::describe_batch_predictions::builders::DescribeBatchPredictionsInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::describe_batch_predictions::DescribeBatchPredictionsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_batch_predictions::DescribeBatchPredictionsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_batch_predictions();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeBatchPredictions`.
24///
25/// <p>Returns a list of <code>BatchPrediction</code> operations that match the search criteria in the request.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeBatchPredictionsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_batch_predictions::builders::DescribeBatchPredictionsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_batch_predictions::DescribeBatchPredictionsOutput,
35        crate::operation::describe_batch_predictions::DescribeBatchPredictionsError,
36    > for DescribeBatchPredictionsFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::describe_batch_predictions::DescribeBatchPredictionsOutput,
44            crate::operation::describe_batch_predictions::DescribeBatchPredictionsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeBatchPredictionsFluentBuilder {
51    /// Creates a new `DescribeBatchPredictionsFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the DescribeBatchPredictions as a reference.
60    pub fn as_input(&self) -> &crate::operation::describe_batch_predictions::builders::DescribeBatchPredictionsInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::describe_batch_predictions::DescribeBatchPredictionsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::describe_batch_predictions::DescribeBatchPredictionsError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::describe_batch_predictions::DescribeBatchPredictions::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::describe_batch_predictions::DescribeBatchPredictions::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::describe_batch_predictions::DescribeBatchPredictionsOutput,
97        crate::operation::describe_batch_predictions::DescribeBatchPredictionsError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// Create a paginator for this request
112    ///
113    /// Paginators are used by calling [`send().await`](crate::operation::describe_batch_predictions::paginator::DescribeBatchPredictionsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::describe_batch_predictions::paginator::DescribeBatchPredictionsPaginator {
115        crate::operation::describe_batch_predictions::paginator::DescribeBatchPredictionsPaginator::new(self.handle, self.inner)
116    }
117    /// <p>Use one of the following variables to filter a list of <code>BatchPrediction</code>:</p>
118    /// <ul>
119    /// <li>
120    /// <p><code>CreatedAt</code> - Sets the search criteria to the <code>BatchPrediction</code> creation date.</p></li>
121    /// <li>
122    /// <p><code>Status</code> - Sets the search criteria to the <code>BatchPrediction</code> status.</p></li>
123    /// <li>
124    /// <p><code>Name</code> - Sets the search criteria to the contents of the <code>BatchPrediction</code> <b> </b> <code>Name</code>.</p></li>
125    /// <li>
126    /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked the <code>BatchPrediction</code> creation.</p></li>
127    /// <li>
128    /// <p><code>MLModelId</code> - Sets the search criteria to the <code>MLModel</code> used in the <code>BatchPrediction</code>.</p></li>
129    /// <li>
130    /// <p><code>DataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used in the <code>BatchPrediction</code>.</p></li>
131    /// <li>
132    /// <p><code>DataURI</code> - Sets the search criteria to the data file(s) used in the <code>BatchPrediction</code>. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.</p></li>
133    /// </ul>
134    pub fn filter_variable(mut self, input: crate::types::BatchPredictionFilterVariable) -> Self {
135        self.inner = self.inner.filter_variable(input);
136        self
137    }
138    /// <p>Use one of the following variables to filter a list of <code>BatchPrediction</code>:</p>
139    /// <ul>
140    /// <li>
141    /// <p><code>CreatedAt</code> - Sets the search criteria to the <code>BatchPrediction</code> creation date.</p></li>
142    /// <li>
143    /// <p><code>Status</code> - Sets the search criteria to the <code>BatchPrediction</code> status.</p></li>
144    /// <li>
145    /// <p><code>Name</code> - Sets the search criteria to the contents of the <code>BatchPrediction</code> <b> </b> <code>Name</code>.</p></li>
146    /// <li>
147    /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked the <code>BatchPrediction</code> creation.</p></li>
148    /// <li>
149    /// <p><code>MLModelId</code> - Sets the search criteria to the <code>MLModel</code> used in the <code>BatchPrediction</code>.</p></li>
150    /// <li>
151    /// <p><code>DataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used in the <code>BatchPrediction</code>.</p></li>
152    /// <li>
153    /// <p><code>DataURI</code> - Sets the search criteria to the data file(s) used in the <code>BatchPrediction</code>. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.</p></li>
154    /// </ul>
155    pub fn set_filter_variable(mut self, input: ::std::option::Option<crate::types::BatchPredictionFilterVariable>) -> Self {
156        self.inner = self.inner.set_filter_variable(input);
157        self
158    }
159    /// <p>Use one of the following variables to filter a list of <code>BatchPrediction</code>:</p>
160    /// <ul>
161    /// <li>
162    /// <p><code>CreatedAt</code> - Sets the search criteria to the <code>BatchPrediction</code> creation date.</p></li>
163    /// <li>
164    /// <p><code>Status</code> - Sets the search criteria to the <code>BatchPrediction</code> status.</p></li>
165    /// <li>
166    /// <p><code>Name</code> - Sets the search criteria to the contents of the <code>BatchPrediction</code> <b> </b> <code>Name</code>.</p></li>
167    /// <li>
168    /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked the <code>BatchPrediction</code> creation.</p></li>
169    /// <li>
170    /// <p><code>MLModelId</code> - Sets the search criteria to the <code>MLModel</code> used in the <code>BatchPrediction</code>.</p></li>
171    /// <li>
172    /// <p><code>DataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used in the <code>BatchPrediction</code>.</p></li>
173    /// <li>
174    /// <p><code>DataURI</code> - Sets the search criteria to the data file(s) used in the <code>BatchPrediction</code>. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.</p></li>
175    /// </ul>
176    pub fn get_filter_variable(&self) -> &::std::option::Option<crate::types::BatchPredictionFilterVariable> {
177        self.inner.get_filter_variable()
178    }
179    /// <p>The equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
180    pub fn eq(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.inner = self.inner.eq(input.into());
182        self
183    }
184    /// <p>The equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
185    pub fn set_eq(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.inner = self.inner.set_eq(input);
187        self
188    }
189    /// <p>The equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
190    pub fn get_eq(&self) -> &::std::option::Option<::std::string::String> {
191        self.inner.get_eq()
192    }
193    /// <p>The greater than operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
194    pub fn gt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.gt(input.into());
196        self
197    }
198    /// <p>The greater than operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
199    pub fn set_gt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.inner = self.inner.set_gt(input);
201        self
202    }
203    /// <p>The greater than operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
204    pub fn get_gt(&self) -> &::std::option::Option<::std::string::String> {
205        self.inner.get_gt()
206    }
207    /// <p>The less than operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
208    pub fn lt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.inner = self.inner.lt(input.into());
210        self
211    }
212    /// <p>The less than operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
213    pub fn set_lt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214        self.inner = self.inner.set_lt(input);
215        self
216    }
217    /// <p>The less than operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
218    pub fn get_lt(&self) -> &::std::option::Option<::std::string::String> {
219        self.inner.get_lt()
220    }
221    /// <p>The greater than or equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
222    pub fn ge(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.inner = self.inner.ge(input.into());
224        self
225    }
226    /// <p>The greater than or equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
227    pub fn set_ge(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.inner = self.inner.set_ge(input);
229        self
230    }
231    /// <p>The greater than or equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
232    pub fn get_ge(&self) -> &::std::option::Option<::std::string::String> {
233        self.inner.get_ge()
234    }
235    /// <p>The less than or equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
236    pub fn le(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237        self.inner = self.inner.le(input.into());
238        self
239    }
240    /// <p>The less than or equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
241    pub fn set_le(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242        self.inner = self.inner.set_le(input);
243        self
244    }
245    /// <p>The less than or equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
246    pub fn get_le(&self) -> &::std::option::Option<::std::string::String> {
247        self.inner.get_le()
248    }
249    /// <p>The not equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
250    pub fn ne(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
251        self.inner = self.inner.ne(input.into());
252        self
253    }
254    /// <p>The not equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
255    pub fn set_ne(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
256        self.inner = self.inner.set_ne(input);
257        self
258    }
259    /// <p>The not equal to operator. The <code>BatchPrediction</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
260    pub fn get_ne(&self) -> &::std::option::Option<::std::string::String> {
261        self.inner.get_ne()
262    }
263    /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
264    /// <p>For example, a <code>Batch Prediction</code> operation could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>BatchPrediction</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
265    /// <ul>
266    /// <li>
267    /// <p>2014-09</p></li>
268    /// <li>
269    /// <p>2014-09-09</p></li>
270    /// <li>
271    /// <p>2014-09-09-Holiday</p></li>
272    /// </ul>
273    pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
274        self.inner = self.inner.prefix(input.into());
275        self
276    }
277    /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
278    /// <p>For example, a <code>Batch Prediction</code> operation could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>BatchPrediction</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
279    /// <ul>
280    /// <li>
281    /// <p>2014-09</p></li>
282    /// <li>
283    /// <p>2014-09-09</p></li>
284    /// <li>
285    /// <p>2014-09-09-Holiday</p></li>
286    /// </ul>
287    pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
288        self.inner = self.inner.set_prefix(input);
289        self
290    }
291    /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
292    /// <p>For example, a <code>Batch Prediction</code> operation could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>BatchPrediction</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
293    /// <ul>
294    /// <li>
295    /// <p>2014-09</p></li>
296    /// <li>
297    /// <p>2014-09-09</p></li>
298    /// <li>
299    /// <p>2014-09-09-Holiday</p></li>
300    /// </ul>
301    pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
302        self.inner.get_prefix()
303    }
304    /// <p>A two-value parameter that determines the sequence of the resulting list of <code>MLModel</code>s.</p>
305    /// <ul>
306    /// <li>
307    /// <p><code>asc</code> - Arranges the list in ascending order (A-Z, 0-9).</p></li>
308    /// <li>
309    /// <p><code>dsc</code> - Arranges the list in descending order (Z-A, 9-0).</p></li>
310    /// </ul>
311    /// <p>Results are sorted by <code>FilterVariable</code>.</p>
312    pub fn sort_order(mut self, input: crate::types::SortOrder) -> Self {
313        self.inner = self.inner.sort_order(input);
314        self
315    }
316    /// <p>A two-value parameter that determines the sequence of the resulting list of <code>MLModel</code>s.</p>
317    /// <ul>
318    /// <li>
319    /// <p><code>asc</code> - Arranges the list in ascending order (A-Z, 0-9).</p></li>
320    /// <li>
321    /// <p><code>dsc</code> - Arranges the list in descending order (Z-A, 9-0).</p></li>
322    /// </ul>
323    /// <p>Results are sorted by <code>FilterVariable</code>.</p>
324    pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
325        self.inner = self.inner.set_sort_order(input);
326        self
327    }
328    /// <p>A two-value parameter that determines the sequence of the resulting list of <code>MLModel</code>s.</p>
329    /// <ul>
330    /// <li>
331    /// <p><code>asc</code> - Arranges the list in ascending order (A-Z, 0-9).</p></li>
332    /// <li>
333    /// <p><code>dsc</code> - Arranges the list in descending order (Z-A, 9-0).</p></li>
334    /// </ul>
335    /// <p>Results are sorted by <code>FilterVariable</code>.</p>
336    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
337        self.inner.get_sort_order()
338    }
339    /// <p>An ID of the page in the paginated results.</p>
340    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341        self.inner = self.inner.next_token(input.into());
342        self
343    }
344    /// <p>An ID of the page in the paginated results.</p>
345    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
346        self.inner = self.inner.set_next_token(input);
347        self
348    }
349    /// <p>An ID of the page in the paginated results.</p>
350    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
351        self.inner.get_next_token()
352    }
353    /// <p>The number of pages of information to include in the result. The range of acceptable values is <code>1</code> through <code>100</code>. The default value is <code>100</code>.</p>
354    pub fn limit(mut self, input: i32) -> Self {
355        self.inner = self.inner.limit(input);
356        self
357    }
358    /// <p>The number of pages of information to include in the result. The range of acceptable values is <code>1</code> through <code>100</code>. The default value is <code>100</code>.</p>
359    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
360        self.inner = self.inner.set_limit(input);
361        self
362    }
363    /// <p>The number of pages of information to include in the result. The range of acceptable values is <code>1</code> through <code>100</code>. The default value is <code>100</code>.</p>
364    pub fn get_limit(&self) -> &::std::option::Option<i32> {
365        self.inner.get_limit()
366    }
367}