aws_sdk_omics/operation/get_annotation_store/
_get_annotation_store_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetAnnotationStoreOutput {
6 pub id: ::std::string::String,
8 pub reference: ::std::option::Option<crate::types::ReferenceItem>,
10 pub status: crate::types::StoreStatus,
12 pub store_arn: ::std::string::String,
14 pub name: ::std::string::String,
16 pub description: ::std::string::String,
18 pub sse_config: ::std::option::Option<crate::types::SseConfig>,
20 pub creation_time: ::aws_smithy_types::DateTime,
22 pub update_time: ::aws_smithy_types::DateTime,
24 pub tags: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
26 pub store_options: ::std::option::Option<crate::types::StoreOptions>,
28 pub store_format: ::std::option::Option<crate::types::StoreFormat>,
30 pub status_message: ::std::string::String,
32 pub store_size_bytes: i64,
34 pub num_versions: i32,
36 _request_id: Option<String>,
37}
38impl GetAnnotationStoreOutput {
39 pub fn id(&self) -> &str {
41 use std::ops::Deref;
42 self.id.deref()
43 }
44 pub fn reference(&self) -> ::std::option::Option<&crate::types::ReferenceItem> {
46 self.reference.as_ref()
47 }
48 pub fn status(&self) -> &crate::types::StoreStatus {
50 &self.status
51 }
52 pub fn store_arn(&self) -> &str {
54 use std::ops::Deref;
55 self.store_arn.deref()
56 }
57 pub fn name(&self) -> &str {
59 use std::ops::Deref;
60 self.name.deref()
61 }
62 pub fn description(&self) -> &str {
64 use std::ops::Deref;
65 self.description.deref()
66 }
67 pub fn sse_config(&self) -> ::std::option::Option<&crate::types::SseConfig> {
69 self.sse_config.as_ref()
70 }
71 pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
73 &self.creation_time
74 }
75 pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
77 &self.update_time
78 }
79 pub fn tags(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
81 &self.tags
82 }
83 pub fn store_options(&self) -> ::std::option::Option<&crate::types::StoreOptions> {
85 self.store_options.as_ref()
86 }
87 pub fn store_format(&self) -> ::std::option::Option<&crate::types::StoreFormat> {
89 self.store_format.as_ref()
90 }
91 pub fn status_message(&self) -> &str {
93 use std::ops::Deref;
94 self.status_message.deref()
95 }
96 pub fn store_size_bytes(&self) -> i64 {
98 self.store_size_bytes
99 }
100 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 pub fn builder() -> crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder {
113 crate::operation::get_annotation_store::builders::GetAnnotationStoreOutputBuilder::default()
114 }
115}
116
117#[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 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.id = input;
148 self
149 }
150 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
152 &self.id
153 }
154 pub fn reference(mut self, input: crate::types::ReferenceItem) -> Self {
157 self.reference = ::std::option::Option::Some(input);
158 self
159 }
160 pub fn set_reference(mut self, input: ::std::option::Option<crate::types::ReferenceItem>) -> Self {
162 self.reference = input;
163 self
164 }
165 pub fn get_reference(&self) -> &::std::option::Option<crate::types::ReferenceItem> {
167 &self.reference
168 }
169 pub fn status(mut self, input: crate::types::StoreStatus) -> Self {
172 self.status = ::std::option::Option::Some(input);
173 self
174 }
175 pub fn set_status(mut self, input: ::std::option::Option<crate::types::StoreStatus>) -> Self {
177 self.status = input;
178 self
179 }
180 pub fn get_status(&self) -> &::std::option::Option<crate::types::StoreStatus> {
182 &self.status
183 }
184 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 pub fn set_store_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192 self.store_arn = input;
193 self
194 }
195 pub fn get_store_arn(&self) -> &::std::option::Option<::std::string::String> {
197 &self.store_arn
198 }
199 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.name = input;
208 self
209 }
210 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
212 &self.name
213 }
214 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222 self.description = input;
223 self
224 }
225 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
227 &self.description
228 }
229 pub fn sse_config(mut self, input: crate::types::SseConfig) -> Self {
232 self.sse_config = ::std::option::Option::Some(input);
233 self
234 }
235 pub fn set_sse_config(mut self, input: ::std::option::Option<crate::types::SseConfig>) -> Self {
237 self.sse_config = input;
238 self
239 }
240 pub fn get_sse_config(&self) -> &::std::option::Option<crate::types::SseConfig> {
242 &self.sse_config
243 }
244 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 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 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
257 &self.creation_time
258 }
259 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 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 pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
272 &self.update_time
273 }
274 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
292 &self.tags
293 }
294 pub fn store_options(mut self, input: crate::types::StoreOptions) -> Self {
296 self.store_options = ::std::option::Option::Some(input);
297 self
298 }
299 pub fn set_store_options(mut self, input: ::std::option::Option<crate::types::StoreOptions>) -> Self {
301 self.store_options = input;
302 self
303 }
304 pub fn get_store_options(&self) -> &::std::option::Option<crate::types::StoreOptions> {
306 &self.store_options
307 }
308 pub fn store_format(mut self, input: crate::types::StoreFormat) -> Self {
310 self.store_format = ::std::option::Option::Some(input);
311 self
312 }
313 pub fn set_store_format(mut self, input: ::std::option::Option<crate::types::StoreFormat>) -> Self {
315 self.store_format = input;
316 self
317 }
318 pub fn get_store_format(&self) -> &::std::option::Option<crate::types::StoreFormat> {
320 &self.store_format
321 }
322 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 pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
330 self.status_message = input;
331 self
332 }
333 pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
335 &self.status_message
336 }
337 pub fn store_size_bytes(mut self, input: i64) -> Self {
340 self.store_size_bytes = ::std::option::Option::Some(input);
341 self
342 }
343 pub fn set_store_size_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
345 self.store_size_bytes = input;
346 self
347 }
348 pub fn get_store_size_bytes(&self) -> &::std::option::Option<i64> {
350 &self.store_size_bytes
351 }
352 pub fn num_versions(mut self, input: i32) -> Self {
355 self.num_versions = ::std::option::Option::Some(input);
356 self
357 }
358 pub fn set_num_versions(mut self, input: ::std::option::Option<i32>) -> Self {
360 self.num_versions = input;
361 self
362 }
363 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 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}