aws_sdk_omics/operation/create_sequence_store/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_sequence_store::_create_sequence_store_output::CreateSequenceStoreOutputBuilder;
3
4pub use crate::operation::create_sequence_store::_create_sequence_store_input::CreateSequenceStoreInputBuilder;
5
6impl crate::operation::create_sequence_store::builders::CreateSequenceStoreInputBuilder {
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_sequence_store::CreateSequenceStoreOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_sequence_store::CreateSequenceStoreError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_sequence_store();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateSequenceStore`.
24///
25/// <p>Creates a sequence store and returns its metadata. Sequence stores are used to store sequence data files called read sets that are saved in FASTQ, BAM, uBAM, or CRAM formats. For aligned formats (BAM and CRAM), a sequence store can only use one reference genome. For unaligned formats (FASTQ and uBAM), a reference genome is not required. You can create multiple sequence stores per region per account.</p>
26/// <p>The following are optional parameters you can specify for your sequence store:</p>
27/// <ul>
28/// <li>
29/// <p>Use <code>s3AccessConfig</code> to configure your sequence store with S3 access logs (recommended).</p></li>
30/// <li>
31/// <p>Use <code>sseConfig</code> to define your own KMS key for encryption.</p></li>
32/// <li>
33/// <p>Use <code>eTagAlgorithmFamily</code> to define which algorithm to use for the HealthOmics eTag on objects.</p></li>
34/// <li>
35/// <p>Use <code>fallbackLocation</code> to define a backup location for storing files that have failed a direct upload.</p></li>
36/// <li>
37/// <p>Use <code>propagatedSetLevelTags</code> to configure tags that propagate to all objects in your store.</p></li>
38/// </ul>
39/// <p>For more information, see <a href="https://docs.aws.amazon.com/omics/latest/dev/create-sequence-store.html">Creating a HealthOmics sequence store</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
40#[derive(::std::clone::Clone, ::std::fmt::Debug)]
41pub struct CreateSequenceStoreFluentBuilder {
42    handle: ::std::sync::Arc<crate::client::Handle>,
43    inner: crate::operation::create_sequence_store::builders::CreateSequenceStoreInputBuilder,
44    config_override: ::std::option::Option<crate::config::Builder>,
45}
46impl
47    crate::client::customize::internal::CustomizableSend<
48        crate::operation::create_sequence_store::CreateSequenceStoreOutput,
49        crate::operation::create_sequence_store::CreateSequenceStoreError,
50    > for CreateSequenceStoreFluentBuilder
51{
52    fn send(
53        self,
54        config_override: crate::config::Builder,
55    ) -> crate::client::customize::internal::BoxFuture<
56        crate::client::customize::internal::SendResult<
57            crate::operation::create_sequence_store::CreateSequenceStoreOutput,
58            crate::operation::create_sequence_store::CreateSequenceStoreError,
59        >,
60    > {
61        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
62    }
63}
64impl CreateSequenceStoreFluentBuilder {
65    /// Creates a new `CreateSequenceStoreFluentBuilder`.
66    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
67        Self {
68            handle,
69            inner: ::std::default::Default::default(),
70            config_override: ::std::option::Option::None,
71        }
72    }
73    /// Access the CreateSequenceStore as a reference.
74    pub fn as_input(&self) -> &crate::operation::create_sequence_store::builders::CreateSequenceStoreInputBuilder {
75        &self.inner
76    }
77    /// Sends the request and returns the response.
78    ///
79    /// If an error occurs, an `SdkError` will be returned with additional details that
80    /// can be matched against.
81    ///
82    /// By default, any retryable failures will be retried twice. Retry behavior
83    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
84    /// set when configuring the client.
85    pub async fn send(
86        self,
87    ) -> ::std::result::Result<
88        crate::operation::create_sequence_store::CreateSequenceStoreOutput,
89        ::aws_smithy_runtime_api::client::result::SdkError<
90            crate::operation::create_sequence_store::CreateSequenceStoreError,
91            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
92        >,
93    > {
94        let input = self
95            .inner
96            .build()
97            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
98        let runtime_plugins = crate::operation::create_sequence_store::CreateSequenceStore::operation_runtime_plugins(
99            self.handle.runtime_plugins.clone(),
100            &self.handle.conf,
101            self.config_override,
102        );
103        crate::operation::create_sequence_store::CreateSequenceStore::orchestrate(&runtime_plugins, input).await
104    }
105
106    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107    pub fn customize(
108        self,
109    ) -> crate::client::customize::CustomizableOperation<
110        crate::operation::create_sequence_store::CreateSequenceStoreOutput,
111        crate::operation::create_sequence_store::CreateSequenceStoreError,
112        Self,
113    > {
114        crate::client::customize::CustomizableOperation::new(self)
115    }
116    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117        self.set_config_override(::std::option::Option::Some(config_override.into()));
118        self
119    }
120
121    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122        self.config_override = config_override;
123        self
124    }
125    /// <p>A name for the store.</p>
126    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.name(input.into());
128        self
129    }
130    /// <p>A name for the store.</p>
131    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_name(input);
133        self
134    }
135    /// <p>A name for the store.</p>
136    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_name()
138    }
139    /// <p>A description for the store.</p>
140    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.description(input.into());
142        self
143    }
144    /// <p>A description for the store.</p>
145    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_description(input);
147        self
148    }
149    /// <p>A description for the store.</p>
150    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_description()
152    }
153    /// <p>Server-side encryption (SSE) settings for the store.</p>
154    pub fn sse_config(mut self, input: crate::types::SseConfig) -> Self {
155        self.inner = self.inner.sse_config(input);
156        self
157    }
158    /// <p>Server-side encryption (SSE) settings for the store.</p>
159    pub fn set_sse_config(mut self, input: ::std::option::Option<crate::types::SseConfig>) -> Self {
160        self.inner = self.inner.set_sse_config(input);
161        self
162    }
163    /// <p>Server-side encryption (SSE) settings for the store.</p>
164    pub fn get_sse_config(&self) -> &::std::option::Option<crate::types::SseConfig> {
165        self.inner.get_sse_config()
166    }
167    ///
168    /// Adds a key-value pair to `tags`.
169    ///
170    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
171    ///
172    /// <p>Tags for the store. You can configure up to 50 tags.</p>
173    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.tags(k.into(), v.into());
175        self
176    }
177    /// <p>Tags for the store. You can configure up to 50 tags.</p>
178    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
179        self.inner = self.inner.set_tags(input);
180        self
181    }
182    /// <p>Tags for the store. You can configure up to 50 tags.</p>
183    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
184        self.inner.get_tags()
185    }
186    /// <p>An idempotency token used to dedupe retry requests so that duplicate runs are not created.</p>
187    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.inner = self.inner.client_token(input.into());
189        self
190    }
191    /// <p>An idempotency token used to dedupe retry requests so that duplicate runs are not created.</p>
192    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.inner = self.inner.set_client_token(input);
194        self
195    }
196    /// <p>An idempotency token used to dedupe retry requests so that duplicate runs are not created.</p>
197    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
198        self.inner.get_client_token()
199    }
200    /// <p>An S3 location that is used to store files that have failed a direct upload. You can add or change the <code>fallbackLocation</code> after creating a sequence store. This is not required if you are uploading files from a different S3 bucket.</p>
201    pub fn fallback_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.inner = self.inner.fallback_location(input.into());
203        self
204    }
205    /// <p>An S3 location that is used to store files that have failed a direct upload. You can add or change the <code>fallbackLocation</code> after creating a sequence store. This is not required if you are uploading files from a different S3 bucket.</p>
206    pub fn set_fallback_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.inner = self.inner.set_fallback_location(input);
208        self
209    }
210    /// <p>An S3 location that is used to store files that have failed a direct upload. You can add or change the <code>fallbackLocation</code> after creating a sequence store. This is not required if you are uploading files from a different S3 bucket.</p>
211    pub fn get_fallback_location(&self) -> &::std::option::Option<::std::string::String> {
212        self.inner.get_fallback_location()
213    }
214    /// <p>The ETag algorithm family to use for ingested read sets. The default value is MD5up. For more information on ETags, see <a href="https://docs.aws.amazon.com/omics/latest/dev/etags-and-provenance.html">ETags and data provenance</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
215    pub fn e_tag_algorithm_family(mut self, input: crate::types::ETagAlgorithmFamily) -> Self {
216        self.inner = self.inner.e_tag_algorithm_family(input);
217        self
218    }
219    /// <p>The ETag algorithm family to use for ingested read sets. The default value is MD5up. For more information on ETags, see <a href="https://docs.aws.amazon.com/omics/latest/dev/etags-and-provenance.html">ETags and data provenance</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
220    pub fn set_e_tag_algorithm_family(mut self, input: ::std::option::Option<crate::types::ETagAlgorithmFamily>) -> Self {
221        self.inner = self.inner.set_e_tag_algorithm_family(input);
222        self
223    }
224    /// <p>The ETag algorithm family to use for ingested read sets. The default value is MD5up. For more information on ETags, see <a href="https://docs.aws.amazon.com/omics/latest/dev/etags-and-provenance.html">ETags and data provenance</a> in the <i>Amazon Web Services HealthOmics User Guide</i>.</p>
225    pub fn get_e_tag_algorithm_family(&self) -> &::std::option::Option<crate::types::ETagAlgorithmFamily> {
226        self.inner.get_e_tag_algorithm_family()
227    }
228    ///
229    /// Appends an item to `propagatedSetLevelTags`.
230    ///
231    /// To override the contents of this collection use [`set_propagated_set_level_tags`](Self::set_propagated_set_level_tags).
232    ///
233    /// <p>The tags keys to propagate to the S3 objects associated with read sets in the sequence store. These tags can be used as input to add metadata to your read sets.</p>
234    pub fn propagated_set_level_tags(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235        self.inner = self.inner.propagated_set_level_tags(input.into());
236        self
237    }
238    /// <p>The tags keys to propagate to the S3 objects associated with read sets in the sequence store. These tags can be used as input to add metadata to your read sets.</p>
239    pub fn set_propagated_set_level_tags(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
240        self.inner = self.inner.set_propagated_set_level_tags(input);
241        self
242    }
243    /// <p>The tags keys to propagate to the S3 objects associated with read sets in the sequence store. These tags can be used as input to add metadata to your read sets.</p>
244    pub fn get_propagated_set_level_tags(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
245        self.inner.get_propagated_set_level_tags()
246    }
247    /// <p>S3 access configuration parameters. This specifies the parameters needed to access logs stored in S3 buckets. The S3 bucket must be in the same region and account as the sequence store.</p>
248    pub fn s3_access_config(mut self, input: crate::types::S3AccessConfig) -> Self {
249        self.inner = self.inner.s3_access_config(input);
250        self
251    }
252    /// <p>S3 access configuration parameters. This specifies the parameters needed to access logs stored in S3 buckets. The S3 bucket must be in the same region and account as the sequence store.</p>
253    pub fn set_s3_access_config(mut self, input: ::std::option::Option<crate::types::S3AccessConfig>) -> Self {
254        self.inner = self.inner.set_s3_access_config(input);
255        self
256    }
257    /// <p>S3 access configuration parameters. This specifies the parameters needed to access logs stored in S3 buckets. The S3 bucket must be in the same region and account as the sequence store.</p>
258    pub fn get_s3_access_config(&self) -> &::std::option::Option<crate::types::S3AccessConfig> {
259        self.inner.get_s3_access_config()
260    }
261}