aws_sdk_omics/operation/create_workflow/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_workflow::_create_workflow_output::CreateWorkflowOutputBuilder;
3
4pub use crate::operation::create_workflow::_create_workflow_input::CreateWorkflowInputBuilder;
5
6impl crate::operation::create_workflow::builders::CreateWorkflowInputBuilder {
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::create_workflow::CreateWorkflowOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_workflow::CreateWorkflowError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_workflow();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateWorkflow`.
24///
25/// <p>Creates a private workflow.Private workflows depend on a variety of resources that you create and configure before creating the workflow:</p>
26/// <ul>
27/// <li>
28/// <p><i>Input data</i>: Input data for the workflow, stored in an S3 bucket or a Amazon Web Services HealthOmics sequence store.</p></li>
29/// <li>
30/// <p><i>Workflow definition files</i>: Define your workflow in one or more workflow definition files, written in WDL, Nextflow, or CWL. The workflow definition specifies the inputs and outputs for runs that use the workflow. It also includes specifications for the runs and run tasks for your workflow, including compute and memory requirements.</p></li>
31/// <li>
32/// <p><i>Parameter template files</i>: Define run parameters using a parameter template file (written in JSON).</p></li>
33/// <li>
34/// <p><i>ECR container images</i>: Create one or more container images for the workflow. Store the images in a private ECR repository.</p></li>
35/// <li>
36/// <p>(Optional) <i>Sentieon licenses</i>: Request a Sentieon license if you plan to use Sentieon software in a private workflow.</p></li>
37/// </ul>
38/// <p>For more information, see <a href="https://docs.aws.amazon.com/omics/latest/dev/creating-private-workflows.html">Creating or updating a private workflow in Amazon Web Services HealthOmics</a> in the Amazon Web Services HealthOmics User Guide.</p>
39#[derive(::std::clone::Clone, ::std::fmt::Debug)]
40pub struct CreateWorkflowFluentBuilder {
41    handle: ::std::sync::Arc<crate::client::Handle>,
42    inner: crate::operation::create_workflow::builders::CreateWorkflowInputBuilder,
43    config_override: ::std::option::Option<crate::config::Builder>,
44}
45impl
46    crate::client::customize::internal::CustomizableSend<
47        crate::operation::create_workflow::CreateWorkflowOutput,
48        crate::operation::create_workflow::CreateWorkflowError,
49    > for CreateWorkflowFluentBuilder
50{
51    fn send(
52        self,
53        config_override: crate::config::Builder,
54    ) -> crate::client::customize::internal::BoxFuture<
55        crate::client::customize::internal::SendResult<
56            crate::operation::create_workflow::CreateWorkflowOutput,
57            crate::operation::create_workflow::CreateWorkflowError,
58        >,
59    > {
60        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
61    }
62}
63impl CreateWorkflowFluentBuilder {
64    /// Creates a new `CreateWorkflowFluentBuilder`.
65    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
66        Self {
67            handle,
68            inner: ::std::default::Default::default(),
69            config_override: ::std::option::Option::None,
70        }
71    }
72    /// Access the CreateWorkflow as a reference.
73    pub fn as_input(&self) -> &crate::operation::create_workflow::builders::CreateWorkflowInputBuilder {
74        &self.inner
75    }
76    /// Sends the request and returns the response.
77    ///
78    /// If an error occurs, an `SdkError` will be returned with additional details that
79    /// can be matched against.
80    ///
81    /// By default, any retryable failures will be retried twice. Retry behavior
82    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
83    /// set when configuring the client.
84    pub async fn send(
85        self,
86    ) -> ::std::result::Result<
87        crate::operation::create_workflow::CreateWorkflowOutput,
88        ::aws_smithy_runtime_api::client::result::SdkError<
89            crate::operation::create_workflow::CreateWorkflowError,
90            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
91        >,
92    > {
93        let input = self
94            .inner
95            .build()
96            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
97        let runtime_plugins = crate::operation::create_workflow::CreateWorkflow::operation_runtime_plugins(
98            self.handle.runtime_plugins.clone(),
99            &self.handle.conf,
100            self.config_override,
101        );
102        crate::operation::create_workflow::CreateWorkflow::orchestrate(&runtime_plugins, input).await
103    }
104
105    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
106    pub fn customize(
107        self,
108    ) -> crate::client::customize::CustomizableOperation<
109        crate::operation::create_workflow::CreateWorkflowOutput,
110        crate::operation::create_workflow::CreateWorkflowError,
111        Self,
112    > {
113        crate::client::customize::CustomizableOperation::new(self)
114    }
115    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
116        self.set_config_override(::std::option::Option::Some(config_override.into()));
117        self
118    }
119
120    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
121        self.config_override = config_override;
122        self
123    }
124    /// <p>A name for the workflow.</p>
125    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.name(input.into());
127        self
128    }
129    /// <p>A name for the workflow.</p>
130    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_name(input);
132        self
133    }
134    /// <p>A name for the workflow.</p>
135    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_name()
137    }
138    /// <p>A description for the workflow.</p>
139    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.inner = self.inner.description(input.into());
141        self
142    }
143    /// <p>A description for the workflow.</p>
144    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.inner = self.inner.set_description(input);
146        self
147    }
148    /// <p>A description for the workflow.</p>
149    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
150        self.inner.get_description()
151    }
152    /// <p>The workflow engine for the workflow.</p>
153    pub fn engine(mut self, input: crate::types::WorkflowEngine) -> Self {
154        self.inner = self.inner.engine(input);
155        self
156    }
157    /// <p>The workflow engine for the workflow.</p>
158    pub fn set_engine(mut self, input: ::std::option::Option<crate::types::WorkflowEngine>) -> Self {
159        self.inner = self.inner.set_engine(input);
160        self
161    }
162    /// <p>The workflow engine for the workflow.</p>
163    pub fn get_engine(&self) -> &::std::option::Option<crate::types::WorkflowEngine> {
164        self.inner.get_engine()
165    }
166    /// <p>A ZIP archive for the workflow.</p>
167    pub fn definition_zip(mut self, input: ::aws_smithy_types::Blob) -> Self {
168        self.inner = self.inner.definition_zip(input);
169        self
170    }
171    /// <p>A ZIP archive for the workflow.</p>
172    pub fn set_definition_zip(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
173        self.inner = self.inner.set_definition_zip(input);
174        self
175    }
176    /// <p>A ZIP archive for the workflow.</p>
177    pub fn get_definition_zip(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
178        self.inner.get_definition_zip()
179    }
180    /// <p>The URI of a definition for the workflow.</p>
181    pub fn definition_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.inner = self.inner.definition_uri(input.into());
183        self
184    }
185    /// <p>The URI of a definition for the workflow.</p>
186    pub fn set_definition_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.inner = self.inner.set_definition_uri(input);
188        self
189    }
190    /// <p>The URI of a definition for the workflow.</p>
191    pub fn get_definition_uri(&self) -> &::std::option::Option<::std::string::String> {
192        self.inner.get_definition_uri()
193    }
194    /// <p>The path of the main definition file for the workflow.</p>
195    pub fn main(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.inner = self.inner.main(input.into());
197        self
198    }
199    /// <p>The path of the main definition file for the workflow.</p>
200    pub fn set_main(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.inner = self.inner.set_main(input);
202        self
203    }
204    /// <p>The path of the main definition file for the workflow.</p>
205    pub fn get_main(&self) -> &::std::option::Option<::std::string::String> {
206        self.inner.get_main()
207    }
208    ///
209    /// Adds a key-value pair to `parameterTemplate`.
210    ///
211    /// To override the contents of this collection use [`set_parameter_template`](Self::set_parameter_template).
212    ///
213    /// <p>A parameter template for the workflow.</p>
214    pub fn parameter_template(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::WorkflowParameter) -> Self {
215        self.inner = self.inner.parameter_template(k.into(), v);
216        self
217    }
218    /// <p>A parameter template for the workflow.</p>
219    pub fn set_parameter_template(
220        mut self,
221        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::WorkflowParameter>>,
222    ) -> Self {
223        self.inner = self.inner.set_parameter_template(input);
224        self
225    }
226    /// <p>A parameter template for the workflow.</p>
227    pub fn get_parameter_template(
228        &self,
229    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::WorkflowParameter>> {
230        self.inner.get_parameter_template()
231    }
232    /// <p>The default static storage capacity (in gibibytes) for runs that use this workflow or workflow version.</p>
233    pub fn storage_capacity(mut self, input: i32) -> Self {
234        self.inner = self.inner.storage_capacity(input);
235        self
236    }
237    /// <p>The default static storage capacity (in gibibytes) for runs that use this workflow or workflow version.</p>
238    pub fn set_storage_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
239        self.inner = self.inner.set_storage_capacity(input);
240        self
241    }
242    /// <p>The default static storage capacity (in gibibytes) for runs that use this workflow or workflow version.</p>
243    pub fn get_storage_capacity(&self) -> &::std::option::Option<i32> {
244        self.inner.get_storage_capacity()
245    }
246    ///
247    /// Adds a key-value pair to `tags`.
248    ///
249    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
250    ///
251    /// <p>Tags for the workflow.</p>
252    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
253        self.inner = self.inner.tags(k.into(), v.into());
254        self
255    }
256    /// <p>Tags for the workflow.</p>
257    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
258        self.inner = self.inner.set_tags(input);
259        self
260    }
261    /// <p>Tags for the workflow.</p>
262    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
263        self.inner.get_tags()
264    }
265    /// <p>To ensure that requests don't run multiple times, specify a unique ID for each request.</p>
266    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267        self.inner = self.inner.request_id(input.into());
268        self
269    }
270    /// <p>To ensure that requests don't run multiple times, specify a unique ID for each request.</p>
271    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272        self.inner = self.inner.set_request_id(input);
273        self
274    }
275    /// <p>To ensure that requests don't run multiple times, specify a unique ID for each request.</p>
276    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
277        self.inner.get_request_id()
278    }
279    /// <p>The computational accelerator specified to run the workflow.</p>
280    pub fn accelerators(mut self, input: crate::types::Accelerators) -> Self {
281        self.inner = self.inner.accelerators(input);
282        self
283    }
284    /// <p>The computational accelerator specified to run the workflow.</p>
285    pub fn set_accelerators(mut self, input: ::std::option::Option<crate::types::Accelerators>) -> Self {
286        self.inner = self.inner.set_accelerators(input);
287        self
288    }
289    /// <p>The computational accelerator specified to run the workflow.</p>
290    pub fn get_accelerators(&self) -> &::std::option::Option<crate::types::Accelerators> {
291        self.inner.get_accelerators()
292    }
293    /// <p>The default storage type for runs that use this workflow. STATIC storage allocates a fixed amount of storage. DYNAMIC storage dynamically scales the storage up or down, based on file system utilization. For more information about static and dynamic storage, see <a href="https://docs.aws.amazon.com/omics/latest/dev/Using-workflows.html">Running workflows</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
294    pub fn storage_type(mut self, input: crate::types::StorageType) -> Self {
295        self.inner = self.inner.storage_type(input);
296        self
297    }
298    /// <p>The default storage type for runs that use this workflow. STATIC storage allocates a fixed amount of storage. DYNAMIC storage dynamically scales the storage up or down, based on file system utilization. For more information about static and dynamic storage, see <a href="https://docs.aws.amazon.com/omics/latest/dev/Using-workflows.html">Running workflows</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
299    pub fn set_storage_type(mut self, input: ::std::option::Option<crate::types::StorageType>) -> Self {
300        self.inner = self.inner.set_storage_type(input);
301        self
302    }
303    /// <p>The default storage type for runs that use this workflow. STATIC storage allocates a fixed amount of storage. DYNAMIC storage dynamically scales the storage up or down, based on file system utilization. For more information about static and dynamic storage, see <a href="https://docs.aws.amazon.com/omics/latest/dev/Using-workflows.html">Running workflows</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
304    pub fn get_storage_type(&self) -> &::std::option::Option<crate::types::StorageType> {
305        self.inner.get_storage_type()
306    }
307}