aws_sdk_omics/operation/update_annotation_store/
_update_annotation_store_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateAnnotationStoreOutput {
6 pub id: ::std::string::String,
8 pub reference: ::std::option::Option<crate::types::ReferenceItem>,
10 pub status: crate::types::StoreStatus,
12 pub name: ::std::string::String,
14 pub description: ::std::string::String,
16 pub creation_time: ::aws_smithy_types::DateTime,
18 pub update_time: ::aws_smithy_types::DateTime,
20 pub store_options: ::std::option::Option<crate::types::StoreOptions>,
22 pub store_format: ::std::option::Option<crate::types::StoreFormat>,
24 _request_id: Option<String>,
25}
26impl UpdateAnnotationStoreOutput {
27 pub fn id(&self) -> &str {
29 use std::ops::Deref;
30 self.id.deref()
31 }
32 pub fn reference(&self) -> ::std::option::Option<&crate::types::ReferenceItem> {
34 self.reference.as_ref()
35 }
36 pub fn status(&self) -> &crate::types::StoreStatus {
38 &self.status
39 }
40 pub fn name(&self) -> &str {
42 use std::ops::Deref;
43 self.name.deref()
44 }
45 pub fn description(&self) -> &str {
47 use std::ops::Deref;
48 self.description.deref()
49 }
50 pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
52 &self.creation_time
53 }
54 pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
56 &self.update_time
57 }
58 pub fn store_options(&self) -> ::std::option::Option<&crate::types::StoreOptions> {
60 self.store_options.as_ref()
61 }
62 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 pub fn builder() -> crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder {
75 crate::operation::update_annotation_store::builders::UpdateAnnotationStoreOutputBuilder::default()
76 }
77}
78
79#[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 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.id = input;
104 self
105 }
106 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
108 &self.id
109 }
110 pub fn reference(mut self, input: crate::types::ReferenceItem) -> Self {
113 self.reference = ::std::option::Option::Some(input);
114 self
115 }
116 pub fn set_reference(mut self, input: ::std::option::Option<crate::types::ReferenceItem>) -> Self {
118 self.reference = input;
119 self
120 }
121 pub fn get_reference(&self) -> &::std::option::Option<crate::types::ReferenceItem> {
123 &self.reference
124 }
125 pub fn status(mut self, input: crate::types::StoreStatus) -> Self {
128 self.status = ::std::option::Option::Some(input);
129 self
130 }
131 pub fn set_status(mut self, input: ::std::option::Option<crate::types::StoreStatus>) -> Self {
133 self.status = input;
134 self
135 }
136 pub fn get_status(&self) -> &::std::option::Option<crate::types::StoreStatus> {
138 &self.status
139 }
140 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.name = input;
149 self
150 }
151 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153 &self.name
154 }
155 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.description = input;
164 self
165 }
166 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
168 &self.description
169 }
170 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 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 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
183 &self.creation_time
184 }
185 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 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 pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
198 &self.update_time
199 }
200 pub fn store_options(mut self, input: crate::types::StoreOptions) -> Self {
202 self.store_options = ::std::option::Option::Some(input);
203 self
204 }
205 pub fn set_store_options(mut self, input: ::std::option::Option<crate::types::StoreOptions>) -> Self {
207 self.store_options = input;
208 self
209 }
210 pub fn get_store_options(&self) -> &::std::option::Option<crate::types::StoreOptions> {
212 &self.store_options
213 }
214 pub fn store_format(mut self, input: crate::types::StoreFormat) -> Self {
216 self.store_format = ::std::option::Option::Some(input);
217 self
218 }
219 pub fn set_store_format(mut self, input: ::std::option::Option<crate::types::StoreFormat>) -> Self {
221 self.store_format = input;
222 self
223 }
224 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 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}