aws_sdk_machinelearning/operation/describe_ml_models/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_ml_models::_describe_ml_models_output::DescribeMlModelsOutputBuilder;
3
4pub use crate::operation::describe_ml_models::_describe_ml_models_input::DescribeMlModelsInputBuilder;
5
6impl crate::operation::describe_ml_models::builders::DescribeMlModelsInputBuilder {
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_ml_models::DescribeMlModelsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_ml_models::DescribeMLModelsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_ml_models();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeMLModels`.
24///
25/// <p>Returns a list of <code>MLModel</code> that match the search criteria in the request.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeMLModelsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_ml_models::builders::DescribeMlModelsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_ml_models::DescribeMlModelsOutput,
35        crate::operation::describe_ml_models::DescribeMLModelsError,
36    > for DescribeMLModelsFluentBuilder
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_ml_models::DescribeMlModelsOutput,
44            crate::operation::describe_ml_models::DescribeMLModelsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeMLModelsFluentBuilder {
51    /// Creates a new `DescribeMLModelsFluentBuilder`.
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 DescribeMLModels as a reference.
60    pub fn as_input(&self) -> &crate::operation::describe_ml_models::builders::DescribeMlModelsInputBuilder {
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_ml_models::DescribeMlModelsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::describe_ml_models::DescribeMLModelsError,
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_ml_models::DescribeMLModels::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::describe_ml_models::DescribeMLModels::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_ml_models::DescribeMlModelsOutput,
97        crate::operation::describe_ml_models::DescribeMLModelsError,
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_ml_models::paginator::DescribeMlModelsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::describe_ml_models::paginator::DescribeMlModelsPaginator {
115        crate::operation::describe_ml_models::paginator::DescribeMlModelsPaginator::new(self.handle, self.inner)
116    }
117    /// <p>Use one of the following variables to filter a list of <code>MLModel</code>:</p>
118    /// <ul>
119    /// <li>
120    /// <p><code>CreatedAt</code> - Sets the search criteria to <code>MLModel</code> creation date.</p></li>
121    /// <li>
122    /// <p><code>Status</code> - Sets the search criteria to <code>MLModel</code> status.</p></li>
123    /// <li>
124    /// <p><code>Name</code> - Sets the search criteria to the contents of <code>MLModel</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>MLModel</code> creation.</p></li>
127    /// <li>
128    /// <p><code>TrainingDataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used to train one or more <code>MLModel</code>.</p></li>
129    /// <li>
130    /// <p><code>RealtimeEndpointStatus</code> - Sets the search criteria to the <code>MLModel</code> real-time endpoint status.</p></li>
131    /// <li>
132    /// <p><code>MLModelType</code> - Sets the search criteria to <code>MLModel</code> type: binary, regression, or multi-class.</p></li>
133    /// <li>
134    /// <p><code>Algorithm</code> - Sets the search criteria to the algorithm that the <code>MLModel</code> uses.</p></li>
135    /// <li>
136    /// <p><code>TrainingDataURI</code> - Sets the search criteria to the data file(s) used in training a <code>MLModel</code>. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.</p></li>
137    /// </ul>
138    pub fn filter_variable(mut self, input: crate::types::MlModelFilterVariable) -> Self {
139        self.inner = self.inner.filter_variable(input);
140        self
141    }
142    /// <p>Use one of the following variables to filter a list of <code>MLModel</code>:</p>
143    /// <ul>
144    /// <li>
145    /// <p><code>CreatedAt</code> - Sets the search criteria to <code>MLModel</code> creation date.</p></li>
146    /// <li>
147    /// <p><code>Status</code> - Sets the search criteria to <code>MLModel</code> status.</p></li>
148    /// <li>
149    /// <p><code>Name</code> - Sets the search criteria to the contents of <code>MLModel</code> <b> </b> <code>Name</code>.</p></li>
150    /// <li>
151    /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked the <code>MLModel</code> creation.</p></li>
152    /// <li>
153    /// <p><code>TrainingDataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used to train one or more <code>MLModel</code>.</p></li>
154    /// <li>
155    /// <p><code>RealtimeEndpointStatus</code> - Sets the search criteria to the <code>MLModel</code> real-time endpoint status.</p></li>
156    /// <li>
157    /// <p><code>MLModelType</code> - Sets the search criteria to <code>MLModel</code> type: binary, regression, or multi-class.</p></li>
158    /// <li>
159    /// <p><code>Algorithm</code> - Sets the search criteria to the algorithm that the <code>MLModel</code> uses.</p></li>
160    /// <li>
161    /// <p><code>TrainingDataURI</code> - Sets the search criteria to the data file(s) used in training a <code>MLModel</code>. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.</p></li>
162    /// </ul>
163    pub fn set_filter_variable(mut self, input: ::std::option::Option<crate::types::MlModelFilterVariable>) -> Self {
164        self.inner = self.inner.set_filter_variable(input);
165        self
166    }
167    /// <p>Use one of the following variables to filter a list of <code>MLModel</code>:</p>
168    /// <ul>
169    /// <li>
170    /// <p><code>CreatedAt</code> - Sets the search criteria to <code>MLModel</code> creation date.</p></li>
171    /// <li>
172    /// <p><code>Status</code> - Sets the search criteria to <code>MLModel</code> status.</p></li>
173    /// <li>
174    /// <p><code>Name</code> - Sets the search criteria to the contents of <code>MLModel</code> <b> </b> <code>Name</code>.</p></li>
175    /// <li>
176    /// <p><code>IAMUser</code> - Sets the search criteria to the user account that invoked the <code>MLModel</code> creation.</p></li>
177    /// <li>
178    /// <p><code>TrainingDataSourceId</code> - Sets the search criteria to the <code>DataSource</code> used to train one or more <code>MLModel</code>.</p></li>
179    /// <li>
180    /// <p><code>RealtimeEndpointStatus</code> - Sets the search criteria to the <code>MLModel</code> real-time endpoint status.</p></li>
181    /// <li>
182    /// <p><code>MLModelType</code> - Sets the search criteria to <code>MLModel</code> type: binary, regression, or multi-class.</p></li>
183    /// <li>
184    /// <p><code>Algorithm</code> - Sets the search criteria to the algorithm that the <code>MLModel</code> uses.</p></li>
185    /// <li>
186    /// <p><code>TrainingDataURI</code> - Sets the search criteria to the data file(s) used in training a <code>MLModel</code>. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.</p></li>
187    /// </ul>
188    pub fn get_filter_variable(&self) -> &::std::option::Option<crate::types::MlModelFilterVariable> {
189        self.inner.get_filter_variable()
190    }
191    /// <p>The equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
192    pub fn eq(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.inner = self.inner.eq(input.into());
194        self
195    }
196    /// <p>The equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
197    pub fn set_eq(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198        self.inner = self.inner.set_eq(input);
199        self
200    }
201    /// <p>The equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that exactly match the value specified with <code>EQ</code>.</p>
202    pub fn get_eq(&self) -> &::std::option::Option<::std::string::String> {
203        self.inner.get_eq()
204    }
205    /// <p>The greater than operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
206    pub fn gt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207        self.inner = self.inner.gt(input.into());
208        self
209    }
210    /// <p>The greater than operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
211    pub fn set_gt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212        self.inner = self.inner.set_gt(input);
213        self
214    }
215    /// <p>The greater than operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are greater than the value specified with <code>GT</code>.</p>
216    pub fn get_gt(&self) -> &::std::option::Option<::std::string::String> {
217        self.inner.get_gt()
218    }
219    /// <p>The less than operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
220    pub fn lt(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221        self.inner = self.inner.lt(input.into());
222        self
223    }
224    /// <p>The less than operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
225    pub fn set_lt(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226        self.inner = self.inner.set_lt(input);
227        self
228    }
229    /// <p>The less than operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are less than the value specified with <code>LT</code>.</p>
230    pub fn get_lt(&self) -> &::std::option::Option<::std::string::String> {
231        self.inner.get_lt()
232    }
233    /// <p>The greater than or equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
234    pub fn ge(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235        self.inner = self.inner.ge(input.into());
236        self
237    }
238    /// <p>The greater than or equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
239    pub fn set_ge(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
240        self.inner = self.inner.set_ge(input);
241        self
242    }
243    /// <p>The greater than or equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are greater than or equal to the value specified with <code>GE</code>.</p>
244    pub fn get_ge(&self) -> &::std::option::Option<::std::string::String> {
245        self.inner.get_ge()
246    }
247    /// <p>The less than or equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
248    pub fn le(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249        self.inner = self.inner.le(input.into());
250        self
251    }
252    /// <p>The less than or equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
253    pub fn set_le(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
254        self.inner = self.inner.set_le(input);
255        self
256    }
257    /// <p>The less than or equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values that are less than or equal to the value specified with <code>LE</code>.</p>
258    pub fn get_le(&self) -> &::std::option::Option<::std::string::String> {
259        self.inner.get_le()
260    }
261    /// <p>The not equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
262    pub fn ne(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263        self.inner = self.inner.ne(input.into());
264        self
265    }
266    /// <p>The not equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
267    pub fn set_ne(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.inner = self.inner.set_ne(input);
269        self
270    }
271    /// <p>The not equal to operator. The <code>MLModel</code> results will have <code>FilterVariable</code> values not equal to the value specified with <code>NE</code>.</p>
272    pub fn get_ne(&self) -> &::std::option::Option<::std::string::String> {
273        self.inner.get_ne()
274    }
275    /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
276    /// <p>For example, an <code>MLModel</code> could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>MLModel</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
277    /// <ul>
278    /// <li>
279    /// <p>2014-09</p></li>
280    /// <li>
281    /// <p>2014-09-09</p></li>
282    /// <li>
283    /// <p>2014-09-09-Holiday</p></li>
284    /// </ul>
285    pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
286        self.inner = self.inner.prefix(input.into());
287        self
288    }
289    /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
290    /// <p>For example, an <code>MLModel</code> could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>MLModel</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
291    /// <ul>
292    /// <li>
293    /// <p>2014-09</p></li>
294    /// <li>
295    /// <p>2014-09-09</p></li>
296    /// <li>
297    /// <p>2014-09-09-Holiday</p></li>
298    /// </ul>
299    pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
300        self.inner = self.inner.set_prefix(input);
301        self
302    }
303    /// <p>A string that is found at the beginning of a variable, such as <code>Name</code> or <code>Id</code>.</p>
304    /// <p>For example, an <code>MLModel</code> could have the <code>Name</code> <code>2014-09-09-HolidayGiftMailer</code>. To search for this <code>MLModel</code>, select <code>Name</code> for the <code>FilterVariable</code> and any of the following strings for the <code>Prefix</code>:</p>
305    /// <ul>
306    /// <li>
307    /// <p>2014-09</p></li>
308    /// <li>
309    /// <p>2014-09-09</p></li>
310    /// <li>
311    /// <p>2014-09-09-Holiday</p></li>
312    /// </ul>
313    pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
314        self.inner.get_prefix()
315    }
316    /// <p>A two-value parameter that determines the sequence of the resulting list of <code>MLModel</code>.</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 sort_order(mut self, input: crate::types::SortOrder) -> Self {
325        self.inner = self.inner.sort_order(input);
326        self
327    }
328    /// <p>A two-value parameter that determines the sequence of the resulting list of <code>MLModel</code>.</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 set_sort_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
337        self.inner = self.inner.set_sort_order(input);
338        self
339    }
340    /// <p>A two-value parameter that determines the sequence of the resulting list of <code>MLModel</code>.</p>
341    /// <ul>
342    /// <li>
343    /// <p><code>asc</code> - Arranges the list in ascending order (A-Z, 0-9).</p></li>
344    /// <li>
345    /// <p><code>dsc</code> - Arranges the list in descending order (Z-A, 9-0).</p></li>
346    /// </ul>
347    /// <p>Results are sorted by <code>FilterVariable</code>.</p>
348    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
349        self.inner.get_sort_order()
350    }
351    /// <p>The ID of the page in the paginated results.</p>
352    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
353        self.inner = self.inner.next_token(input.into());
354        self
355    }
356    /// <p>The ID of the page in the paginated results.</p>
357    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
358        self.inner = self.inner.set_next_token(input);
359        self
360    }
361    /// <p>The ID of the page in the paginated results.</p>
362    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
363        self.inner.get_next_token()
364    }
365    /// <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>
366    pub fn limit(mut self, input: i32) -> Self {
367        self.inner = self.inner.limit(input);
368        self
369    }
370    /// <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>
371    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
372        self.inner = self.inner.set_limit(input);
373        self
374    }
375    /// <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>
376    pub fn get_limit(&self) -> &::std::option::Option<i32> {
377        self.inner.get_limit()
378    }
379}