aws_sdk_omics/operation/create_multipart_read_set_upload/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_multipart_read_set_upload::_create_multipart_read_set_upload_output::CreateMultipartReadSetUploadOutputBuilder;
3
4pub use crate::operation::create_multipart_read_set_upload::_create_multipart_read_set_upload_input::CreateMultipartReadSetUploadInputBuilder;
5
6impl crate::operation::create_multipart_read_set_upload::builders::CreateMultipartReadSetUploadInputBuilder {
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_multipart_read_set_upload::CreateMultipartReadSetUploadOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_multipart_read_set_upload();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateMultipartReadSetUpload`.
24///
25/// <p>Initiates a multipart read set upload for uploading partitioned source files into a sequence store. You can directly import source files from an EC2 instance and other local compute, or from an S3 bucket. To separate these source files into parts, use the <code>split</code> operation. Each part cannot be larger than 100 MB. If the operation is successful, it provides an <code>uploadId</code> which is required by the <code>UploadReadSetPart</code> API operation to upload parts into a sequence store.</p>
26/// <p>To continue uploading a multipart read set into your sequence store, you must use the <code>UploadReadSetPart</code> API operation to upload each part individually following the steps below:</p>
27/// <ul>
28/// <li>
29/// <p>Specify the <code>uploadId</code> obtained from the previous call to <code>CreateMultipartReadSetUpload</code>.</p></li>
30/// <li>
31/// <p>Upload parts for that <code>uploadId</code>.</p></li>
32/// </ul>
33/// <p>When you have finished uploading parts, use the <code>CompleteMultipartReadSetUpload</code> API to complete the multipart read set upload and to retrieve the final read set IDs in the response.</p>
34/// <p>To learn more about creating parts and the <code>split</code> operation, see <a href="https://docs.aws.amazon.com/omics/latest/dev/synchronous-uploads.html">Direct upload to a sequence store</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
35#[derive(::std::clone::Clone, ::std::fmt::Debug)]
36pub struct CreateMultipartReadSetUploadFluentBuilder {
37    handle: ::std::sync::Arc<crate::client::Handle>,
38    inner: crate::operation::create_multipart_read_set_upload::builders::CreateMultipartReadSetUploadInputBuilder,
39    config_override: ::std::option::Option<crate::config::Builder>,
40}
41impl
42    crate::client::customize::internal::CustomizableSend<
43        crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadOutput,
44        crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadError,
45    > for CreateMultipartReadSetUploadFluentBuilder
46{
47    fn send(
48        self,
49        config_override: crate::config::Builder,
50    ) -> crate::client::customize::internal::BoxFuture<
51        crate::client::customize::internal::SendResult<
52            crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadOutput,
53            crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadError,
54        >,
55    > {
56        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57    }
58}
59impl CreateMultipartReadSetUploadFluentBuilder {
60    /// Creates a new `CreateMultipartReadSetUploadFluentBuilder`.
61    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62        Self {
63            handle,
64            inner: ::std::default::Default::default(),
65            config_override: ::std::option::Option::None,
66        }
67    }
68    /// Access the CreateMultipartReadSetUpload as a reference.
69    pub fn as_input(&self) -> &crate::operation::create_multipart_read_set_upload::builders::CreateMultipartReadSetUploadInputBuilder {
70        &self.inner
71    }
72    /// Sends the request and returns the response.
73    ///
74    /// If an error occurs, an `SdkError` will be returned with additional details that
75    /// can be matched against.
76    ///
77    /// By default, any retryable failures will be retried twice. Retry behavior
78    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
79    /// set when configuring the client.
80    pub async fn send(
81        self,
82    ) -> ::std::result::Result<
83        crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadOutput,
84        ::aws_smithy_runtime_api::client::result::SdkError<
85            crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadError,
86            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
87        >,
88    > {
89        let input = self
90            .inner
91            .build()
92            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
93        let runtime_plugins = crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUpload::operation_runtime_plugins(
94            self.handle.runtime_plugins.clone(),
95            &self.handle.conf,
96            self.config_override,
97        );
98        crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUpload::orchestrate(&runtime_plugins, input).await
99    }
100
101    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
102    pub fn customize(
103        self,
104    ) -> crate::client::customize::CustomizableOperation<
105        crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadOutput,
106        crate::operation::create_multipart_read_set_upload::CreateMultipartReadSetUploadError,
107        Self,
108    > {
109        crate::client::customize::CustomizableOperation::new(self)
110    }
111    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
112        self.set_config_override(::std::option::Option::Some(config_override.into()));
113        self
114    }
115
116    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
117        self.config_override = config_override;
118        self
119    }
120    /// <p>The sequence store ID for the store that is the destination of the multipart uploads.</p>
121    pub fn sequence_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.inner = self.inner.sequence_store_id(input.into());
123        self
124    }
125    /// <p>The sequence store ID for the store that is the destination of the multipart uploads.</p>
126    pub fn set_sequence_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.inner = self.inner.set_sequence_store_id(input);
128        self
129    }
130    /// <p>The sequence store ID for the store that is the destination of the multipart uploads.</p>
131    pub fn get_sequence_store_id(&self) -> &::std::option::Option<::std::string::String> {
132        self.inner.get_sequence_store_id()
133    }
134    /// <p>An idempotency token that can be used to avoid triggering multiple multipart uploads.</p>
135    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.client_token(input.into());
137        self
138    }
139    /// <p>An idempotency token that can be used to avoid triggering multiple multipart uploads.</p>
140    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.inner = self.inner.set_client_token(input);
142        self
143    }
144    /// <p>An idempotency token that can be used to avoid triggering multiple multipart uploads.</p>
145    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
146        self.inner.get_client_token()
147    }
148    /// <p>The type of file being uploaded.</p>
149    pub fn source_file_type(mut self, input: crate::types::FileType) -> Self {
150        self.inner = self.inner.source_file_type(input);
151        self
152    }
153    /// <p>The type of file being uploaded.</p>
154    pub fn set_source_file_type(mut self, input: ::std::option::Option<crate::types::FileType>) -> Self {
155        self.inner = self.inner.set_source_file_type(input);
156        self
157    }
158    /// <p>The type of file being uploaded.</p>
159    pub fn get_source_file_type(&self) -> &::std::option::Option<crate::types::FileType> {
160        self.inner.get_source_file_type()
161    }
162    /// <p>The source's subject ID.</p>
163    pub fn subject_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.inner = self.inner.subject_id(input.into());
165        self
166    }
167    /// <p>The source's subject ID.</p>
168    pub fn set_subject_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.inner = self.inner.set_subject_id(input);
170        self
171    }
172    /// <p>The source's subject ID.</p>
173    pub fn get_subject_id(&self) -> &::std::option::Option<::std::string::String> {
174        self.inner.get_subject_id()
175    }
176    /// <p>The source's sample ID.</p>
177    pub fn sample_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178        self.inner = self.inner.sample_id(input.into());
179        self
180    }
181    /// <p>The source's sample ID.</p>
182    pub fn set_sample_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183        self.inner = self.inner.set_sample_id(input);
184        self
185    }
186    /// <p>The source's sample ID.</p>
187    pub fn get_sample_id(&self) -> &::std::option::Option<::std::string::String> {
188        self.inner.get_sample_id()
189    }
190    /// <p>Where the source originated.</p>
191    pub fn generated_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192        self.inner = self.inner.generated_from(input.into());
193        self
194    }
195    /// <p>Where the source originated.</p>
196    pub fn set_generated_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197        self.inner = self.inner.set_generated_from(input);
198        self
199    }
200    /// <p>Where the source originated.</p>
201    pub fn get_generated_from(&self) -> &::std::option::Option<::std::string::String> {
202        self.inner.get_generated_from()
203    }
204    /// <p>The ARN of the reference.</p>
205    pub fn reference_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.inner = self.inner.reference_arn(input.into());
207        self
208    }
209    /// <p>The ARN of the reference.</p>
210    pub fn set_reference_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_reference_arn(input);
212        self
213    }
214    /// <p>The ARN of the reference.</p>
215    pub fn get_reference_arn(&self) -> &::std::option::Option<::std::string::String> {
216        self.inner.get_reference_arn()
217    }
218    /// <p>The name of the read set.</p>
219    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220        self.inner = self.inner.name(input.into());
221        self
222    }
223    /// <p>The name of the read set.</p>
224    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
225        self.inner = self.inner.set_name(input);
226        self
227    }
228    /// <p>The name of the read set.</p>
229    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
230        self.inner.get_name()
231    }
232    /// <p>The description of the read set.</p>
233    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234        self.inner = self.inner.description(input.into());
235        self
236    }
237    /// <p>The description of the read set.</p>
238    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239        self.inner = self.inner.set_description(input);
240        self
241    }
242    /// <p>The description of the read set.</p>
243    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
244        self.inner.get_description()
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>Any tags to add to the read set.</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>Any tags to add to the read set.</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>Any tags to add to the read set.</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}