aws_sdk_omics/operation/get_run/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_run::_get_run_output::GetRunOutputBuilder;
3
4pub use crate::operation::get_run::_get_run_input::GetRunInputBuilder;
5
6impl crate::operation::get_run::builders::GetRunInputBuilder {
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::get_run::GetRunOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_run::GetRunError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_run();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetRun`.
24///
25/// <p>Gets information about a workflow run.</p>
26/// <p>If a workflow is shared with you, you cannot export information about the run.</p>
27/// <p>HealthOmics stores a fixed number of runs that are available to the console and API. If GetRun doesn't return the requested run, you can find run logs for all runs in the CloudWatch logs. For more information about viewing the run logs, see <a href="https://docs.aws.amazon.com/omics/latest/dev/cloudwatch-logs.html">CloudWatch logs</a> in the <i>AWS HealthOmics User Guide</i>.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct GetRunFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::get_run::builders::GetRunInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl crate::client::customize::internal::CustomizableSend<crate::operation::get_run::GetRunOutput, crate::operation::get_run::GetRunError>
35    for GetRunFluentBuilder
36{
37    fn send(
38        self,
39        config_override: crate::config::Builder,
40    ) -> crate::client::customize::internal::BoxFuture<
41        crate::client::customize::internal::SendResult<crate::operation::get_run::GetRunOutput, crate::operation::get_run::GetRunError>,
42    > {
43        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
44    }
45}
46impl GetRunFluentBuilder {
47    /// Creates a new `GetRunFluentBuilder`.
48    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
49        Self {
50            handle,
51            inner: ::std::default::Default::default(),
52            config_override: ::std::option::Option::None,
53        }
54    }
55    /// Access the GetRun as a reference.
56    pub fn as_input(&self) -> &crate::operation::get_run::builders::GetRunInputBuilder {
57        &self.inner
58    }
59    /// Sends the request and returns the response.
60    ///
61    /// If an error occurs, an `SdkError` will be returned with additional details that
62    /// can be matched against.
63    ///
64    /// By default, any retryable failures will be retried twice. Retry behavior
65    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
66    /// set when configuring the client.
67    pub async fn send(
68        self,
69    ) -> ::std::result::Result<
70        crate::operation::get_run::GetRunOutput,
71        ::aws_smithy_runtime_api::client::result::SdkError<
72            crate::operation::get_run::GetRunError,
73            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
74        >,
75    > {
76        let input = self
77            .inner
78            .build()
79            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
80        let runtime_plugins = crate::operation::get_run::GetRun::operation_runtime_plugins(
81            self.handle.runtime_plugins.clone(),
82            &self.handle.conf,
83            self.config_override,
84        );
85        crate::operation::get_run::GetRun::orchestrate(&runtime_plugins, input).await
86    }
87
88    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
89    pub fn customize(
90        self,
91    ) -> crate::client::customize::CustomizableOperation<crate::operation::get_run::GetRunOutput, crate::operation::get_run::GetRunError, Self> {
92        crate::client::customize::CustomizableOperation::new(self)
93    }
94    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
95        self.set_config_override(::std::option::Option::Some(config_override.into()));
96        self
97    }
98
99    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
100        self.config_override = config_override;
101        self
102    }
103    /// <p>The run's ID.</p>
104    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.inner = self.inner.id(input.into());
106        self
107    }
108    /// <p>The run's ID.</p>
109    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.inner = self.inner.set_id(input);
111        self
112    }
113    /// <p>The run's ID.</p>
114    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
115        self.inner.get_id()
116    }
117    ///
118    /// Appends an item to `export`.
119    ///
120    /// To override the contents of this collection use [`set_export`](Self::set_export).
121    ///
122    /// <p>The run's export format.</p>
123    pub fn export(mut self, input: crate::types::RunExport) -> Self {
124        self.inner = self.inner.export(input);
125        self
126    }
127    /// <p>The run's export format.</p>
128    pub fn set_export(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RunExport>>) -> Self {
129        self.inner = self.inner.set_export(input);
130        self
131    }
132    /// <p>The run's export format.</p>
133    pub fn get_export(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RunExport>> {
134        self.inner.get_export()
135    }
136}