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