aws_sdk_omics/operation/start_run/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_run::_start_run_output::StartRunOutputBuilder;
3
4pub use crate::operation::start_run::_start_run_input::StartRunInputBuilder;
5
6impl crate::operation::start_run::builders::StartRunInputBuilder {
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::start_run::StartRunOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::start_run::StartRunError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.start_run();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `StartRun`.
24///
25/// <p>Starts a workflow run. To duplicate a run, specify the run's ID and a role ARN. The remaining parameters are copied from the previous run.</p>
26/// <p>StartRun will not support re-run for a workflow that is shared with you.</p>
27/// <p>HealthOmics stores a fixed number of runs that are available to the console and API. By default, HealthOmics doesn't any remove any runs. If HealthOmics reaches the maximum number of runs, you must manually remove runs. To have older runs removed automatically, set the retention mode to <code>REMOVE</code>.</p>
28/// <p>By default, the run uses STATIC storage. For STATIC storage, set the <code>storageCapacity</code> field. You can set the storage type to DYNAMIC. You do not set <code>storageCapacity</code>, because HealthOmics dynamically scales the storage up or down as required. 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>AWS HealthOmics User Guide</i>.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct StartRunFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::start_run::builders::StartRunInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl crate::client::customize::internal::CustomizableSend<crate::operation::start_run::StartRunOutput, crate::operation::start_run::StartRunError>
36    for StartRunFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<crate::operation::start_run::StartRunOutput, crate::operation::start_run::StartRunError>,
43    > {
44        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
45    }
46}
47impl StartRunFluentBuilder {
48    /// Creates a new `StartRunFluentBuilder`.
49    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
50        Self {
51            handle,
52            inner: ::std::default::Default::default(),
53            config_override: ::std::option::Option::None,
54        }
55    }
56    /// Access the StartRun as a reference.
57    pub fn as_input(&self) -> &crate::operation::start_run::builders::StartRunInputBuilder {
58        &self.inner
59    }
60    /// Sends the request and returns the response.
61    ///
62    /// If an error occurs, an `SdkError` will be returned with additional details that
63    /// can be matched against.
64    ///
65    /// By default, any retryable failures will be retried twice. Retry behavior
66    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
67    /// set when configuring the client.
68    pub async fn send(
69        self,
70    ) -> ::std::result::Result<
71        crate::operation::start_run::StartRunOutput,
72        ::aws_smithy_runtime_api::client::result::SdkError<
73            crate::operation::start_run::StartRunError,
74            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
75        >,
76    > {
77        let input = self
78            .inner
79            .build()
80            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
81        let runtime_plugins = crate::operation::start_run::StartRun::operation_runtime_plugins(
82            self.handle.runtime_plugins.clone(),
83            &self.handle.conf,
84            self.config_override,
85        );
86        crate::operation::start_run::StartRun::orchestrate(&runtime_plugins, input).await
87    }
88
89    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
90    pub fn customize(
91        self,
92    ) -> crate::client::customize::CustomizableOperation<crate::operation::start_run::StartRunOutput, crate::operation::start_run::StartRunError, Self>
93    {
94        crate::client::customize::CustomizableOperation::new(self)
95    }
96    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
97        self.set_config_override(::std::option::Option::Some(config_override.into()));
98        self
99    }
100
101    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
102        self.config_override = config_override;
103        self
104    }
105    /// <p>The run's workflow ID.</p>
106    pub fn workflow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.inner = self.inner.workflow_id(input.into());
108        self
109    }
110    /// <p>The run's workflow ID.</p>
111    pub fn set_workflow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.inner = self.inner.set_workflow_id(input);
113        self
114    }
115    /// <p>The run's workflow ID.</p>
116    pub fn get_workflow_id(&self) -> &::std::option::Option<::std::string::String> {
117        self.inner.get_workflow_id()
118    }
119    /// <p>The run's workflow type.</p>
120    pub fn workflow_type(mut self, input: crate::types::WorkflowType) -> Self {
121        self.inner = self.inner.workflow_type(input);
122        self
123    }
124    /// <p>The run's workflow type.</p>
125    pub fn set_workflow_type(mut self, input: ::std::option::Option<crate::types::WorkflowType>) -> Self {
126        self.inner = self.inner.set_workflow_type(input);
127        self
128    }
129    /// <p>The run's workflow type.</p>
130    pub fn get_workflow_type(&self) -> &::std::option::Option<crate::types::WorkflowType> {
131        self.inner.get_workflow_type()
132    }
133    /// <p>The ID of a run to duplicate.</p>
134    pub fn run_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.inner = self.inner.run_id(input.into());
136        self
137    }
138    /// <p>The ID of a run to duplicate.</p>
139    pub fn set_run_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.inner = self.inner.set_run_id(input);
141        self
142    }
143    /// <p>The ID of a run to duplicate.</p>
144    pub fn get_run_id(&self) -> &::std::option::Option<::std::string::String> {
145        self.inner.get_run_id()
146    }
147    /// <p>A service role for the run.</p>
148    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.inner = self.inner.role_arn(input.into());
150        self
151    }
152    /// <p>A service role for the run.</p>
153    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.inner = self.inner.set_role_arn(input);
155        self
156    }
157    /// <p>A service role for the run.</p>
158    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
159        self.inner.get_role_arn()
160    }
161    /// <p>A name for the run.</p>
162    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.inner = self.inner.name(input.into());
164        self
165    }
166    /// <p>A name for the run.</p>
167    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.inner = self.inner.set_name(input);
169        self
170    }
171    /// <p>A name for the run.</p>
172    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
173        self.inner.get_name()
174    }
175    /// <p>Identifier of the cache associated with this run. If you don't specify a cache ID, no task outputs are cached for this run.</p>
176    pub fn cache_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.inner = self.inner.cache_id(input.into());
178        self
179    }
180    /// <p>Identifier of the cache associated with this run. If you don't specify a cache ID, no task outputs are cached for this run.</p>
181    pub fn set_cache_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.inner = self.inner.set_cache_id(input);
183        self
184    }
185    /// <p>Identifier of the cache associated with this run. If you don't specify a cache ID, no task outputs are cached for this run.</p>
186    pub fn get_cache_id(&self) -> &::std::option::Option<::std::string::String> {
187        self.inner.get_cache_id()
188    }
189    /// <p>The cache behavior for the run. You specify this value if you want to override the default behavior for the cache. You had set the default value when you created the cache. For more information, see <a href="https://docs.aws.amazon.com/omics/latest/dev/how-run-cache.html#run-cache-behavior">Run cache behavior</a> in the AWS HealthOmics User Guide.</p>
190    pub fn cache_behavior(mut self, input: crate::types::CacheBehavior) -> Self {
191        self.inner = self.inner.cache_behavior(input);
192        self
193    }
194    /// <p>The cache behavior for the run. You specify this value if you want to override the default behavior for the cache. You had set the default value when you created the cache. For more information, see <a href="https://docs.aws.amazon.com/omics/latest/dev/how-run-cache.html#run-cache-behavior">Run cache behavior</a> in the AWS HealthOmics User Guide.</p>
195    pub fn set_cache_behavior(mut self, input: ::std::option::Option<crate::types::CacheBehavior>) -> Self {
196        self.inner = self.inner.set_cache_behavior(input);
197        self
198    }
199    /// <p>The cache behavior for the run. You specify this value if you want to override the default behavior for the cache. You had set the default value when you created the cache. For more information, see <a href="https://docs.aws.amazon.com/omics/latest/dev/how-run-cache.html#run-cache-behavior">Run cache behavior</a> in the AWS HealthOmics User Guide.</p>
200    pub fn get_cache_behavior(&self) -> &::std::option::Option<crate::types::CacheBehavior> {
201        self.inner.get_cache_behavior()
202    }
203    /// <p>The run's group ID.</p>
204    pub fn run_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205        self.inner = self.inner.run_group_id(input.into());
206        self
207    }
208    /// <p>The run's group ID.</p>
209    pub fn set_run_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.inner = self.inner.set_run_group_id(input);
211        self
212    }
213    /// <p>The run's group ID.</p>
214    pub fn get_run_group_id(&self) -> &::std::option::Option<::std::string::String> {
215        self.inner.get_run_group_id()
216    }
217    /// <p>A priority for the run.</p>
218    pub fn priority(mut self, input: i32) -> Self {
219        self.inner = self.inner.priority(input);
220        self
221    }
222    /// <p>A priority for the run.</p>
223    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
224        self.inner = self.inner.set_priority(input);
225        self
226    }
227    /// <p>A priority for the run.</p>
228    pub fn get_priority(&self) -> &::std::option::Option<i32> {
229        self.inner.get_priority()
230    }
231    /// <p>Parameters for the run.</p>
232    pub fn parameters(mut self, input: ::aws_smithy_types::Document) -> Self {
233        self.inner = self.inner.parameters(input);
234        self
235    }
236    /// <p>Parameters for the run.</p>
237    pub fn set_parameters(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
238        self.inner = self.inner.set_parameters(input);
239        self
240    }
241    /// <p>Parameters for the run.</p>
242    pub fn get_parameters(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
243        self.inner.get_parameters()
244    }
245    /// <p>A storage capacity for the run in gibibytes. This field is not required if the storage type is dynamic (the system ignores any value that you enter).</p>
246    pub fn storage_capacity(mut self, input: i32) -> Self {
247        self.inner = self.inner.storage_capacity(input);
248        self
249    }
250    /// <p>A storage capacity for the run in gibibytes. This field is not required if the storage type is dynamic (the system ignores any value that you enter).</p>
251    pub fn set_storage_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
252        self.inner = self.inner.set_storage_capacity(input);
253        self
254    }
255    /// <p>A storage capacity for the run in gibibytes. This field is not required if the storage type is dynamic (the system ignores any value that you enter).</p>
256    pub fn get_storage_capacity(&self) -> &::std::option::Option<i32> {
257        self.inner.get_storage_capacity()
258    }
259    /// <p>An output URI for the run.</p>
260    pub fn output_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        self.inner = self.inner.output_uri(input.into());
262        self
263    }
264    /// <p>An output URI for the run.</p>
265    pub fn set_output_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
266        self.inner = self.inner.set_output_uri(input);
267        self
268    }
269    /// <p>An output URI for the run.</p>
270    pub fn get_output_uri(&self) -> &::std::option::Option<::std::string::String> {
271        self.inner.get_output_uri()
272    }
273    /// <p>A log level for the run.</p>
274    pub fn log_level(mut self, input: crate::types::RunLogLevel) -> Self {
275        self.inner = self.inner.log_level(input);
276        self
277    }
278    /// <p>A log level for the run.</p>
279    pub fn set_log_level(mut self, input: ::std::option::Option<crate::types::RunLogLevel>) -> Self {
280        self.inner = self.inner.set_log_level(input);
281        self
282    }
283    /// <p>A log level for the run.</p>
284    pub fn get_log_level(&self) -> &::std::option::Option<crate::types::RunLogLevel> {
285        self.inner.get_log_level()
286    }
287    ///
288    /// Adds a key-value pair to `tags`.
289    ///
290    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
291    ///
292    /// <p>Tags for the run.</p>
293    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
294        self.inner = self.inner.tags(k.into(), v.into());
295        self
296    }
297    /// <p>Tags for the run.</p>
298    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
299        self.inner = self.inner.set_tags(input);
300        self
301    }
302    /// <p>Tags for the run.</p>
303    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
304        self.inner.get_tags()
305    }
306    /// <p>To ensure that requests don't run multiple times, specify a unique ID for each request.</p>
307    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
308        self.inner = self.inner.request_id(input.into());
309        self
310    }
311    /// <p>To ensure that requests don't run multiple times, specify a unique ID for each request.</p>
312    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313        self.inner = self.inner.set_request_id(input);
314        self
315    }
316    /// <p>To ensure that requests don't run multiple times, specify a unique ID for each request.</p>
317    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
318        self.inner.get_request_id()
319    }
320    /// <p>The retention mode for the run. The default value is RETAIN.</p>
321    /// <p>HealthOmics stores a fixed number of runs that are available to the console and API. In the default mode (RETAIN), you need to remove runs manually when the number of run exceeds the maximum. If you set the retention mode to <code>REMOVE</code>, HealthOmics automatically removes runs (that have mode set to REMOVE) when the number of run exceeds the maximum. All run logs are available in CloudWatch logs, if you need information about a run that is no longer available to the API.</p>
322    /// <p>For more information about retention mode, see <a href="https://docs.aws.amazon.com/omics/latest/dev/starting-a-run.html">Specifying run retention mode</a> in the <i>AWS HealthOmics User Guide</i>.</p>
323    pub fn retention_mode(mut self, input: crate::types::RunRetentionMode) -> Self {
324        self.inner = self.inner.retention_mode(input);
325        self
326    }
327    /// <p>The retention mode for the run. The default value is RETAIN.</p>
328    /// <p>HealthOmics stores a fixed number of runs that are available to the console and API. In the default mode (RETAIN), you need to remove runs manually when the number of run exceeds the maximum. If you set the retention mode to <code>REMOVE</code>, HealthOmics automatically removes runs (that have mode set to REMOVE) when the number of run exceeds the maximum. All run logs are available in CloudWatch logs, if you need information about a run that is no longer available to the API.</p>
329    /// <p>For more information about retention mode, see <a href="https://docs.aws.amazon.com/omics/latest/dev/starting-a-run.html">Specifying run retention mode</a> in the <i>AWS HealthOmics User Guide</i>.</p>
330    pub fn set_retention_mode(mut self, input: ::std::option::Option<crate::types::RunRetentionMode>) -> Self {
331        self.inner = self.inner.set_retention_mode(input);
332        self
333    }
334    /// <p>The retention mode for the run. The default value is RETAIN.</p>
335    /// <p>HealthOmics stores a fixed number of runs that are available to the console and API. In the default mode (RETAIN), you need to remove runs manually when the number of run exceeds the maximum. If you set the retention mode to <code>REMOVE</code>, HealthOmics automatically removes runs (that have mode set to REMOVE) when the number of run exceeds the maximum. All run logs are available in CloudWatch logs, if you need information about a run that is no longer available to the API.</p>
336    /// <p>For more information about retention mode, see <a href="https://docs.aws.amazon.com/omics/latest/dev/starting-a-run.html">Specifying run retention mode</a> in the <i>AWS HealthOmics User Guide</i>.</p>
337    pub fn get_retention_mode(&self) -> &::std::option::Option<crate::types::RunRetentionMode> {
338        self.inner.get_retention_mode()
339    }
340    /// <p>The run's storage type. By default, the run uses STATIC storage type, which allocates a fixed amount of storage. If you set the storage type to DYNAMIC, HealthOmics dynamically scales the storage up or down, based on file system utilization.</p>
341    pub fn storage_type(mut self, input: crate::types::StorageType) -> Self {
342        self.inner = self.inner.storage_type(input);
343        self
344    }
345    /// <p>The run's storage type. By default, the run uses STATIC storage type, which allocates a fixed amount of storage. If you set the storage type to DYNAMIC, HealthOmics dynamically scales the storage up or down, based on file system utilization.</p>
346    pub fn set_storage_type(mut self, input: ::std::option::Option<crate::types::StorageType>) -> Self {
347        self.inner = self.inner.set_storage_type(input);
348        self
349    }
350    /// <p>The run's storage type. By default, the run uses STATIC storage type, which allocates a fixed amount of storage. If you set the storage type to DYNAMIC, HealthOmics dynamically scales the storage up or down, based on file system utilization.</p>
351    pub fn get_storage_type(&self) -> &::std::option::Option<crate::types::StorageType> {
352        self.inner.get_storage_type()
353    }
354    /// <p>The ID of the workflow owner.</p>
355    pub fn workflow_owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356        self.inner = self.inner.workflow_owner_id(input.into());
357        self
358    }
359    /// <p>The ID of the workflow owner.</p>
360    pub fn set_workflow_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
361        self.inner = self.inner.set_workflow_owner_id(input);
362        self
363    }
364    /// <p>The ID of the workflow owner.</p>
365    pub fn get_workflow_owner_id(&self) -> &::std::option::Option<::std::string::String> {
366        self.inner.get_workflow_owner_id()
367    }
368}