aws_sdk_omics/operation/get_annotation_store/
_get_annotation_store_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetAnnotationStoreOutput {
6    /// <p>The store's ID.</p>
7    pub id: ::std::string::String,
8    /// <p>The store's genome reference.</p>
9    pub reference: ::std::option::Option<crate::types::ReferenceItem>,
10    /// <p>The store's status.</p>
11    pub status: crate::types::StoreStatus,
12    /// <p>The store's ARN.</p>
13    pub store_arn: ::std::string::String,
14    /// <p>The store's name.</p>
15    pub name: ::std::string::String,
16    /// <p>The store's description.</p>
17    pub description: ::std::string::String,
18    /// <p>The store's server-side encryption (SSE) settings.</p>
19    pub sse_config: ::std::option::Option<crate::types::SseConfig>,
20    /// <p>When the store was created.</p>
21    pub creation_time: ::aws_smithy_types::DateTime,
22    /// <p>When the store was updated.</p>
23    pub update_time: ::aws_smithy_types::DateTime,
24    /// <p>The store's tags.</p>
25    pub tags: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
26    /// <p>The store's parsing options.</p>
27    pub store_options: ::std::option::Option<crate::types::StoreOptions>,
28    /// <p>The store's annotation file format.</p>
29    pub store_format: ::std::option::Option<crate::types::StoreFormat>,
30    /// <p>A status message.</p>
31    pub status_message: ::std::string::String,
32    /// <p>The store's size in bytes.</p>
33    pub store_size_bytes: i64,
34    /// <p>An integer indicating how many versions of an annotation store exist.</p>
35    pub num_versions: i32,
36    _request_id: Option<String>,
37}
38impl GetAnnotationStoreOutput {
39    /// <p>The store's ID.</p>
40    pub fn id(&self) -> &str {
41        use std::ops::Deref;
42        self.id.deref()
43    }
44    /// <p>The store's genome reference.</p>
45    pub fn reference(&self) -> ::std::option::Option<&crate::types::ReferenceItem> {
46        self.reference.as_ref()
47    }
48    /// <p>The store's status.</p>
49    pub fn status(&self) -> &crate::types::StoreStatus {
50        &self.status
51    }
52    /// <p>The store's ARN.</p>
53    pub fn store_arn(&self) -> &str {
54        use std::ops::Deref;
55        self.store_arn.deref()
56    }
57    /// <p>The store's name.</p>
58    pub fn name(&self) -> &str {
59        use std::ops::Deref;
60        self.name.deref()
61    }
62    /// <p>The store's description.</p>
63    pub fn description(&self) -> &str {
64        use std::ops::Deref;
65        self.description.deref()
66    }
67    /// <p>The store's server-side encryption (SSE) settings.</p>
68    pub fn sse_config(&self) -> ::std::option::Option<&crate::types::SseConfig> {
69        self.sse_config.as_ref()
70    }
71    /// <p>When the store was created.</p>
72    pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
73        &self.creation_time
74    }
75    /// <p>When the store was updated.</p>
76    pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
77        &self.update_time
78    }
79    /// <p>The store's tags.</p>
80    pub fn tags(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
81        &self.tags
82    }
83    /// <p>The store's parsing options.</p>
84    pub fn store_options(&self) -> ::std::option::Option<&crate::types::StoreOptions> {
85        self.store_options.as_ref()
86    }
87    /// <p>The store's annotation file format.</p>
88    pub fn store_format(&self) -> ::std::option::Option<&crate::types::StoreFormat> {
89        self.store_format.as_ref()
90    }
91    /// <p>A status message.</p>
92    pub fn status_message(&self) -> &str {
93        use std::ops::Deref;
94        self.status_message.deref()
95    }
96    /// <p>The store's size in bytes.</p>
97    pub fn store_size_bytes(&self) -> i64 {
98        self.store_size_bytes
99    }
100    /// <p>An integer indicating how many versions of an annotation store exist.</p>
101    pub fn num_versions(&self) -> i32 {
102        self.num_versions
103    }
104}
105impl ::aws_types::request_id::RequestId for GetAnnotationStoreOutput {
106    fn request_id(&self) -> Option<&str> {
107        self._request_id.as_deref()
108    }
109}
110impl GetAnnotationStoreOutput {
111    /// Creates a new builder-style object to manufacture [`GetAnnotationStoreOutput`](crate::operation::get_annotation_store::GetAnnotationStoreOutput).
112    pub fn builder() -> crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder {
113        crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::default()
114    }
115}
116
117/// A builder for [`GetAnnotationStoreOutput`](crate::operation::get_annotation_store::GetAnnotationStoreOutput).
118#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
119#[non_exhaustive]
120pub struct GetAnnotationStoreOutputBuilder {
121    pub(crate) id: ::std::option::Option<::std::string::String>,
122    pub(crate) reference: ::std::option::Option<crate::types::ReferenceItem>,
123    pub(crate) status: ::std::option::Option<crate::types::StoreStatus>,
124    pub(crate) store_arn: ::std::option::Option<::std::string::String>,
125    pub(crate) name: ::std::option::Option<::std::string::String>,
126    pub(crate) description: ::std::option::Option<::std::string::String>,
127    pub(crate) sse_config: ::std::option::Option<crate::types::SseConfig>,
128    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
129    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
130    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
131    pub(crate) store_options: ::std::option::Option<crate::types::StoreOptions>,
132    pub(crate) store_format: ::std::option::Option<crate::types::StoreFormat>,
133    pub(crate) status_message: ::std::option::Option<::std::string::String>,
134    pub(crate) store_size_bytes: ::std::option::Option<i64>,
135    pub(crate) num_versions: ::std::option::Option<i32>,
136    _request_id: Option<String>,
137}
138impl GetAnnotationStoreOutputBuilder {
139    /// <p>The store's ID.</p>
140    /// This field is required.
141    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.id = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>The store's ID.</p>
146    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.id = input;
148        self
149    }
150    /// <p>The store's ID.</p>
151    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
152        &self.id
153    }
154    /// <p>The store's genome reference.</p>
155    /// This field is required.
156    pub fn reference(mut self, input: crate::types::ReferenceItem) -> Self {
157        self.reference = ::std::option::Option::Some(input);
158        self
159    }
160    /// <p>The store's genome reference.</p>
161    pub fn set_reference(mut self, input: ::std::option::Option<crate::types::ReferenceItem>) -> Self {
162        self.reference = input;
163        self
164    }
165    /// <p>The store's genome reference.</p>
166    pub fn get_reference(&self) -> &::std::option::Option<crate::types::ReferenceItem> {
167        &self.reference
168    }
169    /// <p>The store's status.</p>
170    /// This field is required.
171    pub fn status(mut self, input: crate::types::StoreStatus) -> Self {
172        self.status = ::std::option::Option::Some(input);
173        self
174    }
175    /// <p>The store's status.</p>
176    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StoreStatus>) -> Self {
177        self.status = input;
178        self
179    }
180    /// <p>The store's status.</p>
181    pub fn get_status(&self) -> &::std::option::Option<crate::types::StoreStatus> {
182        &self.status
183    }
184    /// <p>The store's ARN.</p>
185    /// This field is required.
186    pub fn store_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.store_arn = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>The store's ARN.</p>
191    pub fn set_store_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.store_arn = input;
193        self
194    }
195    /// <p>The store's ARN.</p>
196    pub fn get_store_arn(&self) -> &::std::option::Option<::std::string::String> {
197        &self.store_arn
198    }
199    /// <p>The store's name.</p>
200    /// This field is required.
201    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.name = ::std::option::Option::Some(input.into());
203        self
204    }
205    /// <p>The store's name.</p>
206    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.name = input;
208        self
209    }
210    /// <p>The store's name.</p>
211    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
212        &self.name
213    }
214    /// <p>The store's description.</p>
215    /// This field is required.
216    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.description = ::std::option::Option::Some(input.into());
218        self
219    }
220    /// <p>The store's description.</p>
221    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.description = input;
223        self
224    }
225    /// <p>The store's description.</p>
226    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
227        &self.description
228    }
229    /// <p>The store's server-side encryption (SSE) settings.</p>
230    /// This field is required.
231    pub fn sse_config(mut self, input: crate::types::SseConfig) -> Self {
232        self.sse_config = ::std::option::Option::Some(input);
233        self
234    }
235    /// <p>The store's server-side encryption (SSE) settings.</p>
236    pub fn set_sse_config(mut self, input: ::std::option::Option<crate::types::SseConfig>) -> Self {
237        self.sse_config = input;
238        self
239    }
240    /// <p>The store's server-side encryption (SSE) settings.</p>
241    pub fn get_sse_config(&self) -> &::std::option::Option<crate::types::SseConfig> {
242        &self.sse_config
243    }
244    /// <p>When the store was created.</p>
245    /// This field is required.
246    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
247        self.creation_time = ::std::option::Option::Some(input);
248        self
249    }
250    /// <p>When the store was created.</p>
251    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
252        self.creation_time = input;
253        self
254    }
255    /// <p>When the store was created.</p>
256    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
257        &self.creation_time
258    }
259    /// <p>When the store was updated.</p>
260    /// This field is required.
261    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
262        self.update_time = ::std::option::Option::Some(input);
263        self
264    }
265    /// <p>When the store was updated.</p>
266    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
267        self.update_time = input;
268        self
269    }
270    /// <p>When the store was updated.</p>
271    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
272        &self.update_time
273    }
274    /// Adds a key-value pair to `tags`.
275    ///
276    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
277    ///
278    /// <p>The store's tags.</p>
279    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
280        let mut hash_map = self.tags.unwrap_or_default();
281        hash_map.insert(k.into(), v.into());
282        self.tags = ::std::option::Option::Some(hash_map);
283        self
284    }
285    /// <p>The store's tags.</p>
286    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
287        self.tags = input;
288        self
289    }
290    /// <p>The store's tags.</p>
291    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
292        &self.tags
293    }
294    /// <p>The store's parsing options.</p>
295    pub fn store_options(mut self, input: crate::types::StoreOptions) -> Self {
296        self.store_options = ::std::option::Option::Some(input);
297        self
298    }
299    /// <p>The store's parsing options.</p>
300    pub fn set_store_options(mut self, input: ::std::option::Option<crate::types::StoreOptions>) -> Self {
301        self.store_options = input;
302        self
303    }
304    /// <p>The store's parsing options.</p>
305    pub fn get_store_options(&self) -> &::std::option::Option<crate::types::StoreOptions> {
306        &self.store_options
307    }
308    /// <p>The store's annotation file format.</p>
309    pub fn store_format(mut self, input: crate::types::StoreFormat) -> Self {
310        self.store_format = ::std::option::Option::Some(input);
311        self
312    }
313    /// <p>The store's annotation file format.</p>
314    pub fn set_store_format(mut self, input: ::std::option::Option<crate::types::StoreFormat>) -> Self {
315        self.store_format = input;
316        self
317    }
318    /// <p>The store's annotation file format.</p>
319    pub fn get_store_format(&self) -> &::std::option::Option<crate::types::StoreFormat> {
320        &self.store_format
321    }
322    /// <p>A status message.</p>
323    /// This field is required.
324    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
325        self.status_message = ::std::option::Option::Some(input.into());
326        self
327    }
328    /// <p>A status message.</p>
329    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
330        self.status_message = input;
331        self
332    }
333    /// <p>A status message.</p>
334    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
335        &self.status_message
336    }
337    /// <p>The store's size in bytes.</p>
338    /// This field is required.
339    pub fn store_size_bytes(mut self, input: i64) -> Self {
340        self.store_size_bytes = ::std::option::Option::Some(input);
341        self
342    }
343    /// <p>The store's size in bytes.</p>
344    pub fn set_store_size_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
345        self.store_size_bytes = input;
346        self
347    }
348    /// <p>The store's size in bytes.</p>
349    pub fn get_store_size_bytes(&self) -> &::std::option::Option<i64> {
350        &self.store_size_bytes
351    }
352    /// <p>An integer indicating how many versions of an annotation store exist.</p>
353    /// This field is required.
354    pub fn num_versions(mut self, input: i32) -> Self {
355        self.num_versions = ::std::option::Option::Some(input);
356        self
357    }
358    /// <p>An integer indicating how many versions of an annotation store exist.</p>
359    pub fn set_num_versions(mut self, input: ::std::option::Option<i32>) -> Self {
360        self.num_versions = input;
361        self
362    }
363    /// <p>An integer indicating how many versions of an annotation store exist.</p>
364    pub fn get_num_versions(&self) -> &::std::option::Option<i32> {
365        &self.num_versions
366    }
367    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
368        self._request_id = Some(request_id.into());
369        self
370    }
371
372    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
373        self._request_id = request_id;
374        self
375    }
376    /// Consumes the builder and constructs a [`GetAnnotationStoreOutput`](crate::operation::get_annotation_store::GetAnnotationStoreOutput).
377    /// This method will fail if any of the following fields are not set:
378    /// - [`id`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::id)
379    /// - [`status`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::status)
380    /// - [`store_arn`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::store_arn)
381    /// - [`name`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::name)
382    /// - [`description`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::description)
383    /// - [`creation_time`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::creation_time)
384    /// - [`update_time`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::update_time)
385    /// - [`tags`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::tags)
386    /// - [`status_message`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::status_message)
387    /// - [`store_size_bytes`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::store_size_bytes)
388    /// - [`num_versions`](crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::num_versions)
389    pub fn build(
390        self,
391    ) -> ::std::result::Result<crate::operation::get_annotation_store::GetAnnotationStoreOutput, ::aws_smithy_types::error::operation::BuildError>
392    {
393        ::std::result::Result::Ok(crate::operation::get_annotation_store::GetAnnotationStoreOutput {
394            id: self.id.ok_or_else(|| {
395                ::aws_smithy_types::error::operation::BuildError::missing_field(
396                    "id",
397                    "id was not specified but it is required when building GetAnnotationStoreOutput",
398                )
399            })?,
400            reference: self.reference,
401            status: self.status.ok_or_else(|| {
402                ::aws_smithy_types::error::operation::BuildError::missing_field(
403                    "status",
404                    "status was not specified but it is required when building GetAnnotationStoreOutput",
405                )
406            })?,
407            store_arn: self.store_arn.ok_or_else(|| {
408                ::aws_smithy_types::error::operation::BuildError::missing_field(
409                    "store_arn",
410                    "store_arn was not specified but it is required when building GetAnnotationStoreOutput",
411                )
412            })?,
413            name: self.name.ok_or_else(|| {
414                ::aws_smithy_types::error::operation::BuildError::missing_field(
415                    "name",
416                    "name was not specified but it is required when building GetAnnotationStoreOutput",
417                )
418            })?,
419            description: self.description.ok_or_else(|| {
420                ::aws_smithy_types::error::operation::BuildError::missing_field(
421                    "description",
422                    "description was not specified but it is required when building GetAnnotationStoreOutput",
423                )
424            })?,
425            sse_config: self.sse_config,
426            creation_time: self.creation_time.ok_or_else(|| {
427                ::aws_smithy_types::error::operation::BuildError::missing_field(
428                    "creation_time",
429                    "creation_time was not specified but it is required when building GetAnnotationStoreOutput",
430                )
431            })?,
432            update_time: self.update_time.ok_or_else(|| {
433                ::aws_smithy_types::error::operation::BuildError::missing_field(
434                    "update_time",
435                    "update_time was not specified but it is required when building GetAnnotationStoreOutput",
436                )
437            })?,
438            tags: self.tags.ok_or_else(|| {
439                ::aws_smithy_types::error::operation::BuildError::missing_field(
440                    "tags",
441                    "tags was not specified but it is required when building GetAnnotationStoreOutput",
442                )
443            })?,
444            store_options: self.store_options,
445            store_format: self.store_format,
446            status_message: self.status_message.ok_or_else(|| {
447                ::aws_smithy_types::error::operation::BuildError::missing_field(
448                    "status_message",
449                    "status_message was not specified but it is required when building GetAnnotationStoreOutput",
450                )
451            })?,
452            store_size_bytes: self.store_size_bytes.ok_or_else(|| {
453                ::aws_smithy_types::error::operation::BuildError::missing_field(
454                    "store_size_bytes",
455                    "store_size_bytes was not specified but it is required when building GetAnnotationStoreOutput",
456                )
457            })?,
458            num_versions: self.num_versions.ok_or_else(|| {
459                ::aws_smithy_types::error::operation::BuildError::missing_field(
460                    "num_versions",
461                    "num_versions was not specified but it is required when building GetAnnotationStoreOutput",
462                )
463            })?,
464            _request_id: self._request_id,
465        })
466    }
467}