aws_sdk_emr/operation/list_notebook_executions/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_notebook_executions::_list_notebook_executions_output::ListNotebookExecutionsOutputBuilder;
3
4pub use crate::operation::list_notebook_executions::_list_notebook_executions_input::ListNotebookExecutionsInputBuilder;
5
6impl crate::operation::list_notebook_executions::builders::ListNotebookExecutionsInputBuilder {
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::list_notebook_executions::ListNotebookExecutionsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_notebook_executions::ListNotebookExecutionsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_notebook_executions();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListNotebookExecutions`.
24///
25/// <p>Provides summaries of all notebook executions. You can filter the list based on multiple criteria such as status, time range, and editor id. Returns a maximum of 50 notebook executions and a marker to track the paging of a longer notebook execution list across multiple <code>ListNotebookExecutions</code> calls.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListNotebookExecutionsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::list_notebook_executions::builders::ListNotebookExecutionsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::list_notebook_executions::ListNotebookExecutionsOutput,
35        crate::operation::list_notebook_executions::ListNotebookExecutionsError,
36    > for ListNotebookExecutionsFluentBuilder
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::list_notebook_executions::ListNotebookExecutionsOutput,
44            crate::operation::list_notebook_executions::ListNotebookExecutionsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ListNotebookExecutionsFluentBuilder {
51    /// Creates a new `ListNotebookExecutionsFluentBuilder`.
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 ListNotebookExecutions as a reference.
60    pub fn as_input(&self) -> &crate::operation::list_notebook_executions::builders::ListNotebookExecutionsInputBuilder {
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::list_notebook_executions::ListNotebookExecutionsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::list_notebook_executions::ListNotebookExecutionsError,
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::list_notebook_executions::ListNotebookExecutions::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::list_notebook_executions::ListNotebookExecutions::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::list_notebook_executions::ListNotebookExecutionsOutput,
97        crate::operation::list_notebook_executions::ListNotebookExecutionsError,
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::list_notebook_executions::paginator::ListNotebookExecutionsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::list_notebook_executions::paginator::ListNotebookExecutionsPaginator {
115        crate::operation::list_notebook_executions::paginator::ListNotebookExecutionsPaginator::new(self.handle, self.inner)
116    }
117    /// <p>The unique ID of the editor associated with the notebook execution.</p>
118    pub fn editor_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.inner = self.inner.editor_id(input.into());
120        self
121    }
122    /// <p>The unique ID of the editor associated with the notebook execution.</p>
123    pub fn set_editor_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.inner = self.inner.set_editor_id(input);
125        self
126    }
127    /// <p>The unique ID of the editor associated with the notebook execution.</p>
128    pub fn get_editor_id(&self) -> &::std::option::Option<::std::string::String> {
129        self.inner.get_editor_id()
130    }
131    /// <p>The status filter for listing notebook executions.</p>
132    /// <ul>
133    /// <li>
134    /// <p><code>START_PENDING</code> indicates that the cluster has received the execution request but execution has not begun.</p></li>
135    /// <li>
136    /// <p><code>STARTING</code> indicates that the execution is starting on the cluster.</p></li>
137    /// <li>
138    /// <p><code>RUNNING</code> indicates that the execution is being processed by the cluster.</p></li>
139    /// <li>
140    /// <p><code>FINISHING</code> indicates that execution processing is in the final stages.</p></li>
141    /// <li>
142    /// <p><code>FINISHED</code> indicates that the execution has completed without error.</p></li>
143    /// <li>
144    /// <p><code>FAILING</code> indicates that the execution is failing and will not finish successfully.</p></li>
145    /// <li>
146    /// <p><code>FAILED</code> indicates that the execution failed.</p></li>
147    /// <li>
148    /// <p><code>STOP_PENDING</code> indicates that the cluster has received a <code>StopNotebookExecution</code> request and the stop is pending.</p></li>
149    /// <li>
150    /// <p><code>STOPPING</code> indicates that the cluster is in the process of stopping the execution as a result of a <code>StopNotebookExecution</code> request.</p></li>
151    /// <li>
152    /// <p><code>STOPPED</code> indicates that the execution stopped because of a <code>StopNotebookExecution</code> request.</p></li>
153    /// </ul>
154    pub fn status(mut self, input: crate::types::NotebookExecutionStatus) -> Self {
155        self.inner = self.inner.status(input);
156        self
157    }
158    /// <p>The status filter for listing notebook executions.</p>
159    /// <ul>
160    /// <li>
161    /// <p><code>START_PENDING</code> indicates that the cluster has received the execution request but execution has not begun.</p></li>
162    /// <li>
163    /// <p><code>STARTING</code> indicates that the execution is starting on the cluster.</p></li>
164    /// <li>
165    /// <p><code>RUNNING</code> indicates that the execution is being processed by the cluster.</p></li>
166    /// <li>
167    /// <p><code>FINISHING</code> indicates that execution processing is in the final stages.</p></li>
168    /// <li>
169    /// <p><code>FINISHED</code> indicates that the execution has completed without error.</p></li>
170    /// <li>
171    /// <p><code>FAILING</code> indicates that the execution is failing and will not finish successfully.</p></li>
172    /// <li>
173    /// <p><code>FAILED</code> indicates that the execution failed.</p></li>
174    /// <li>
175    /// <p><code>STOP_PENDING</code> indicates that the cluster has received a <code>StopNotebookExecution</code> request and the stop is pending.</p></li>
176    /// <li>
177    /// <p><code>STOPPING</code> indicates that the cluster is in the process of stopping the execution as a result of a <code>StopNotebookExecution</code> request.</p></li>
178    /// <li>
179    /// <p><code>STOPPED</code> indicates that the execution stopped because of a <code>StopNotebookExecution</code> request.</p></li>
180    /// </ul>
181    pub fn set_status(mut self, input: ::std::option::Option<crate::types::NotebookExecutionStatus>) -> Self {
182        self.inner = self.inner.set_status(input);
183        self
184    }
185    /// <p>The status filter for listing notebook executions.</p>
186    /// <ul>
187    /// <li>
188    /// <p><code>START_PENDING</code> indicates that the cluster has received the execution request but execution has not begun.</p></li>
189    /// <li>
190    /// <p><code>STARTING</code> indicates that the execution is starting on the cluster.</p></li>
191    /// <li>
192    /// <p><code>RUNNING</code> indicates that the execution is being processed by the cluster.</p></li>
193    /// <li>
194    /// <p><code>FINISHING</code> indicates that execution processing is in the final stages.</p></li>
195    /// <li>
196    /// <p><code>FINISHED</code> indicates that the execution has completed without error.</p></li>
197    /// <li>
198    /// <p><code>FAILING</code> indicates that the execution is failing and will not finish successfully.</p></li>
199    /// <li>
200    /// <p><code>FAILED</code> indicates that the execution failed.</p></li>
201    /// <li>
202    /// <p><code>STOP_PENDING</code> indicates that the cluster has received a <code>StopNotebookExecution</code> request and the stop is pending.</p></li>
203    /// <li>
204    /// <p><code>STOPPING</code> indicates that the cluster is in the process of stopping the execution as a result of a <code>StopNotebookExecution</code> request.</p></li>
205    /// <li>
206    /// <p><code>STOPPED</code> indicates that the execution stopped because of a <code>StopNotebookExecution</code> request.</p></li>
207    /// </ul>
208    pub fn get_status(&self) -> &::std::option::Option<crate::types::NotebookExecutionStatus> {
209        self.inner.get_status()
210    }
211    /// <p>The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.</p>
212    pub fn from(mut self, input: ::aws_smithy_types::DateTime) -> Self {
213        self.inner = self.inner.from(input);
214        self
215    }
216    /// <p>The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.</p>
217    pub fn set_from(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
218        self.inner = self.inner.set_from(input);
219        self
220    }
221    /// <p>The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.</p>
222    pub fn get_from(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
223        self.inner.get_from()
224    }
225    /// <p>The end of time range filter for listing notebook executions. The default is the current timestamp.</p>
226    pub fn to(mut self, input: ::aws_smithy_types::DateTime) -> Self {
227        self.inner = self.inner.to(input);
228        self
229    }
230    /// <p>The end of time range filter for listing notebook executions. The default is the current timestamp.</p>
231    pub fn set_to(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
232        self.inner = self.inner.set_to(input);
233        self
234    }
235    /// <p>The end of time range filter for listing notebook executions. The default is the current timestamp.</p>
236    pub fn get_to(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
237        self.inner.get_to()
238    }
239    /// <p>The pagination token, returned by a previous <code>ListNotebookExecutions</code> call, that indicates the start of the list for this <code>ListNotebookExecutions</code> call.</p>
240    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241        self.inner = self.inner.marker(input.into());
242        self
243    }
244    /// <p>The pagination token, returned by a previous <code>ListNotebookExecutions</code> call, that indicates the start of the list for this <code>ListNotebookExecutions</code> call.</p>
245    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246        self.inner = self.inner.set_marker(input);
247        self
248    }
249    /// <p>The pagination token, returned by a previous <code>ListNotebookExecutions</code> call, that indicates the start of the list for this <code>ListNotebookExecutions</code> call.</p>
250    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
251        self.inner.get_marker()
252    }
253    /// <p>The unique ID of the execution engine.</p>
254    pub fn execution_engine_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255        self.inner = self.inner.execution_engine_id(input.into());
256        self
257    }
258    /// <p>The unique ID of the execution engine.</p>
259    pub fn set_execution_engine_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260        self.inner = self.inner.set_execution_engine_id(input);
261        self
262    }
263    /// <p>The unique ID of the execution engine.</p>
264    pub fn get_execution_engine_id(&self) -> &::std::option::Option<::std::string::String> {
265        self.inner.get_execution_engine_id()
266    }
267}