Skip to main content

aws_sdk_omics/operation/update_annotation_store/
_update_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 UpdateAnnotationStoreOutput {
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 name.</p>
13    pub name: ::std::string::String,
14    /// <p>The store's description.</p>
15    pub description: ::std::string::String,
16    /// <p>When the store was created.</p>
17    pub creation_time: ::aws_smithy_types::DateTime,
18    /// <p>When the store was updated.</p>
19    pub update_time: ::aws_smithy_types::DateTime,
20    /// <p>Parsing options for the store.</p>
21    pub store_options: ::std::option::Option<crate::types::StoreOptions>,
22    /// <p>The annotation file format of the store.</p>
23    pub store_format: ::std::option::Option<crate::types::StoreFormat>,
24    _request_id: Option<String>,
25}
26impl UpdateAnnotationStoreOutput {
27    /// <p>The store's ID.</p>
28    pub fn id(&self) -> &str {
29        use std::ops::Deref;
30        self.id.deref()
31    }
32    /// <p>The store's genome reference.</p>
33    pub fn reference(&self) -> ::std::option::Option<&crate::types::ReferenceItem> {
34        self.reference.as_ref()
35    }
36    /// <p>The store's status.</p>
37    pub fn status(&self) -> &crate::types::StoreStatus {
38        &self.status
39    }
40    /// <p>The store's name.</p>
41    pub fn name(&self) -> &str {
42        use std::ops::Deref;
43        self.name.deref()
44    }
45    /// <p>The store's description.</p>
46    pub fn description(&self) -> &str {
47        use std::ops::Deref;
48        self.description.deref()
49    }
50    /// <p>When the store was created.</p>
51    pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
52        &self.creation_time
53    }
54    /// <p>When the store was updated.</p>
55    pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
56        &self.update_time
57    }
58    /// <p>Parsing options for the store.</p>
59    pub fn store_options(&self) -> ::std::option::Option<&crate::types::StoreOptions> {
60        self.store_options.as_ref()
61    }
62    /// <p>The annotation file format of the store.</p>
63    pub fn store_format(&self) -> ::std::option::Option<&crate::types::StoreFormat> {
64        self.store_format.as_ref()
65    }
66}
67impl ::aws_types::request_id::RequestId for UpdateAnnotationStoreOutput {
68    fn request_id(&self) -> Option<&str> {
69        self._request_id.as_deref()
70    }
71}
72impl UpdateAnnotationStoreOutput {
73    /// Creates a new builder-style object to manufacture [`UpdateAnnotationStoreOutput`](crate::operation::update_annotation_store::UpdateAnnotationStoreOutput).
74    pub fn builder() -> crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder {
75        crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::default()
76    }
77}
78
79/// A builder for [`UpdateAnnotationStoreOutput`](crate::operation::update_annotation_store::UpdateAnnotationStoreOutput).
80#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
81#[non_exhaustive]
82pub struct UpdateAnnotationStoreOutputBuilder {
83    pub(crate) id: ::std::option::Option<::std::string::String>,
84    pub(crate) reference: ::std::option::Option<crate::types::ReferenceItem>,
85    pub(crate) status: ::std::option::Option<crate::types::StoreStatus>,
86    pub(crate) name: ::std::option::Option<::std::string::String>,
87    pub(crate) description: ::std::option::Option<::std::string::String>,
88    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
89    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
90    pub(crate) store_options: ::std::option::Option<crate::types::StoreOptions>,
91    pub(crate) store_format: ::std::option::Option<crate::types::StoreFormat>,
92    _request_id: Option<String>,
93}
94impl UpdateAnnotationStoreOutputBuilder {
95    /// <p>The store's ID.</p>
96    /// This field is required.
97    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.id = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The store's ID.</p>
102    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.id = input;
104        self
105    }
106    /// <p>The store's ID.</p>
107    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
108        &self.id
109    }
110    /// <p>The store's genome reference.</p>
111    /// This field is required.
112    pub fn reference(mut self, input: crate::types::ReferenceItem) -> Self {
113        self.reference = ::std::option::Option::Some(input);
114        self
115    }
116    /// <p>The store's genome reference.</p>
117    pub fn set_reference(mut self, input: ::std::option::Option<crate::types::ReferenceItem>) -> Self {
118        self.reference = input;
119        self
120    }
121    /// <p>The store's genome reference.</p>
122    pub fn get_reference(&self) -> &::std::option::Option<crate::types::ReferenceItem> {
123        &self.reference
124    }
125    /// <p>The store's status.</p>
126    /// This field is required.
127    pub fn status(mut self, input: crate::types::StoreStatus) -> Self {
128        self.status = ::std::option::Option::Some(input);
129        self
130    }
131    /// <p>The store's status.</p>
132    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StoreStatus>) -> Self {
133        self.status = input;
134        self
135    }
136    /// <p>The store's status.</p>
137    pub fn get_status(&self) -> &::std::option::Option<crate::types::StoreStatus> {
138        &self.status
139    }
140    /// <p>The store's name.</p>
141    /// This field is required.
142    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.name = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The store's name.</p>
147    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.name = input;
149        self
150    }
151    /// <p>The store's name.</p>
152    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153        &self.name
154    }
155    /// <p>The store's description.</p>
156    /// This field is required.
157    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.description = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The store's description.</p>
162    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.description = input;
164        self
165    }
166    /// <p>The store's description.</p>
167    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
168        &self.description
169    }
170    /// <p>When the store was created.</p>
171    /// This field is required.
172    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
173        self.creation_time = ::std::option::Option::Some(input);
174        self
175    }
176    /// <p>When the store was created.</p>
177    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
178        self.creation_time = input;
179        self
180    }
181    /// <p>When the store was created.</p>
182    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
183        &self.creation_time
184    }
185    /// <p>When the store was updated.</p>
186    /// This field is required.
187    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
188        self.update_time = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>When the store was updated.</p>
192    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
193        self.update_time = input;
194        self
195    }
196    /// <p>When the store was updated.</p>
197    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
198        &self.update_time
199    }
200    /// <p>Parsing options for the store.</p>
201    pub fn store_options(mut self, input: crate::types::StoreOptions) -> Self {
202        self.store_options = ::std::option::Option::Some(input);
203        self
204    }
205    /// <p>Parsing options for the store.</p>
206    pub fn set_store_options(mut self, input: ::std::option::Option<crate::types::StoreOptions>) -> Self {
207        self.store_options = input;
208        self
209    }
210    /// <p>Parsing options for the store.</p>
211    pub fn get_store_options(&self) -> &::std::option::Option<crate::types::StoreOptions> {
212        &self.store_options
213    }
214    /// <p>The annotation file format of the store.</p>
215    pub fn store_format(mut self, input: crate::types::StoreFormat) -> Self {
216        self.store_format = ::std::option::Option::Some(input);
217        self
218    }
219    /// <p>The annotation file format of the store.</p>
220    pub fn set_store_format(mut self, input: ::std::option::Option<crate::types::StoreFormat>) -> Self {
221        self.store_format = input;
222        self
223    }
224    /// <p>The annotation file format of the store.</p>
225    pub fn get_store_format(&self) -> &::std::option::Option<crate::types::StoreFormat> {
226        &self.store_format
227    }
228    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
229        self._request_id = Some(request_id.into());
230        self
231    }
232
233    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
234        self._request_id = request_id;
235        self
236    }
237    /// Consumes the builder and constructs a [`UpdateAnnotationStoreOutput`](crate::operation::update_annotation_store::UpdateAnnotationStoreOutput).
238    /// This method will fail if any of the following fields are not set:
239    /// - [`id`](crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::id)
240    /// - [`status`](crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::status)
241    /// - [`name`](crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::name)
242    /// - [`description`](crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::description)
243    /// - [`creation_time`](crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::creation_time)
244    /// - [`update_time`](crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::update_time)
245    pub fn build(
246        self,
247    ) -> ::std::result::Result<crate::operation::update_annotation_store::UpdateAnnotationStoreOutput, ::aws_smithy_types::error::operation::BuildError>
248    {
249        ::std::result::Result::Ok(crate::operation::update_annotation_store::UpdateAnnotationStoreOutput {
250            id: self.id.ok_or_else(|| {
251                ::aws_smithy_types::error::operation::BuildError::missing_field(
252                    "id",
253                    "id was not specified but it is required when building UpdateAnnotationStoreOutput",
254                )
255            })?,
256            reference: self.reference,
257            status: self.status.ok_or_else(|| {
258                ::aws_smithy_types::error::operation::BuildError::missing_field(
259                    "status",
260                    "status was not specified but it is required when building UpdateAnnotationStoreOutput",
261                )
262            })?,
263            name: self.name.ok_or_else(|| {
264                ::aws_smithy_types::error::operation::BuildError::missing_field(
265                    "name",
266                    "name was not specified but it is required when building UpdateAnnotationStoreOutput",
267                )
268            })?,
269            description: self.description.ok_or_else(|| {
270                ::aws_smithy_types::error::operation::BuildError::missing_field(
271                    "description",
272                    "description was not specified but it is required when building UpdateAnnotationStoreOutput",
273                )
274            })?,
275            creation_time: self.creation_time.ok_or_else(|| {
276                ::aws_smithy_types::error::operation::BuildError::missing_field(
277                    "creation_time",
278                    "creation_time was not specified but it is required when building UpdateAnnotationStoreOutput",
279                )
280            })?,
281            update_time: self.update_time.ok_or_else(|| {
282                ::aws_smithy_types::error::operation::BuildError::missing_field(
283                    "update_time",
284                    "update_time was not specified but it is required when building UpdateAnnotationStoreOutput",
285                )
286            })?,
287            store_options: self.store_options,
288            store_format: self.store_format,
289            _request_id: self._request_id,
290        })
291    }
292}