aws_sdk_omics/types/
_import_reference_job_item.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ImportReferenceJobItem {
7 pub id: ::std::string::String,
9 pub reference_store_id: ::std::string::String,
11 pub role_arn: ::std::string::String,
13 pub status: crate::types::ReferenceImportJobStatus,
15 pub creation_time: ::aws_smithy_types::DateTime,
17 pub completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19}
20impl ImportReferenceJobItem {
21 pub fn id(&self) -> &str {
23 use std::ops::Deref;
24 self.id.deref()
25 }
26 pub fn reference_store_id(&self) -> &str {
28 use std::ops::Deref;
29 self.reference_store_id.deref()
30 }
31 pub fn role_arn(&self) -> &str {
33 use std::ops::Deref;
34 self.role_arn.deref()
35 }
36 pub fn status(&self) -> &crate::types::ReferenceImportJobStatus {
38 &self.status
39 }
40 pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
42 &self.creation_time
43 }
44 pub fn completion_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
46 self.completion_time.as_ref()
47 }
48}
49impl ImportReferenceJobItem {
50 pub fn builder() -> crate::types::builders::ImportReferenceJobItemBuilder {
52 crate::types::builders::ImportReferenceJobItemBuilder::default()
53 }
54}
55
56#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct ImportReferenceJobItemBuilder {
60 pub(crate) id: ::std::option::Option<::std::string::String>,
61 pub(crate) reference_store_id: ::std::option::Option<::std::string::String>,
62 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
63 pub(crate) status: ::std::option::Option<crate::types::ReferenceImportJobStatus>,
64 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
65 pub(crate) completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
66}
67impl ImportReferenceJobItemBuilder {
68 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.id = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.id = input;
77 self
78 }
79 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
81 &self.id
82 }
83 pub fn reference_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.reference_store_id = ::std::option::Option::Some(input.into());
87 self
88 }
89 pub fn set_reference_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.reference_store_id = input;
92 self
93 }
94 pub fn get_reference_store_id(&self) -> &::std::option::Option<::std::string::String> {
96 &self.reference_store_id
97 }
98 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.role_arn = ::std::option::Option::Some(input.into());
102 self
103 }
104 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.role_arn = input;
107 self
108 }
109 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
111 &self.role_arn
112 }
113 pub fn status(mut self, input: crate::types::ReferenceImportJobStatus) -> Self {
116 self.status = ::std::option::Option::Some(input);
117 self
118 }
119 pub fn set_status(mut self, input: ::std::option::Option<crate::types::ReferenceImportJobStatus>) -> Self {
121 self.status = input;
122 self
123 }
124 pub fn get_status(&self) -> &::std::option::Option<crate::types::ReferenceImportJobStatus> {
126 &self.status
127 }
128 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
131 self.creation_time = ::std::option::Option::Some(input);
132 self
133 }
134 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
136 self.creation_time = input;
137 self
138 }
139 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
141 &self.creation_time
142 }
143 pub fn completion_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
145 self.completion_time = ::std::option::Option::Some(input);
146 self
147 }
148 pub fn set_completion_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
150 self.completion_time = input;
151 self
152 }
153 pub fn get_completion_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
155 &self.completion_time
156 }
157 pub fn build(self) -> ::std::result::Result<crate::types::ImportReferenceJobItem, ::aws_smithy_types::error::operation::BuildError> {
165 ::std::result::Result::Ok(crate::types::ImportReferenceJobItem {
166 id: self.id.ok_or_else(|| {
167 ::aws_smithy_types::error::operation::BuildError::missing_field(
168 "id",
169 "id was not specified but it is required when building ImportReferenceJobItem",
170 )
171 })?,
172 reference_store_id: self.reference_store_id.ok_or_else(|| {
173 ::aws_smithy_types::error::operation::BuildError::missing_field(
174 "reference_store_id",
175 "reference_store_id was not specified but it is required when building ImportReferenceJobItem",
176 )
177 })?,
178 role_arn: self.role_arn.ok_or_else(|| {
179 ::aws_smithy_types::error::operation::BuildError::missing_field(
180 "role_arn",
181 "role_arn was not specified but it is required when building ImportReferenceJobItem",
182 )
183 })?,
184 status: self.status.ok_or_else(|| {
185 ::aws_smithy_types::error::operation::BuildError::missing_field(
186 "status",
187 "status was not specified but it is required when building ImportReferenceJobItem",
188 )
189 })?,
190 creation_time: self.creation_time.ok_or_else(|| {
191 ::aws_smithy_types::error::operation::BuildError::missing_field(
192 "creation_time",
193 "creation_time was not specified but it is required when building ImportReferenceJobItem",
194 )
195 })?,
196 completion_time: self.completion_time,
197 })
198 }
199}