aws_sdk_sagemaker/operation/describe_artifact/
_describe_artifact_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeArtifactOutput {
6 pub artifact_name: ::std::option::Option<::std::string::String>,
8 pub artifact_arn: ::std::option::Option<::std::string::String>,
10 pub source: ::std::option::Option<crate::types::ArtifactSource>,
12 pub artifact_type: ::std::option::Option<::std::string::String>,
14 pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18 pub created_by: ::std::option::Option<crate::types::UserContext>,
20 pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22 pub last_modified_by: ::std::option::Option<crate::types::UserContext>,
24 pub metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
26 pub lineage_group_arn: ::std::option::Option<::std::string::String>,
28 _request_id: Option<String>,
29}
30impl DescribeArtifactOutput {
31 pub fn artifact_name(&self) -> ::std::option::Option<&str> {
33 self.artifact_name.as_deref()
34 }
35 pub fn artifact_arn(&self) -> ::std::option::Option<&str> {
37 self.artifact_arn.as_deref()
38 }
39 pub fn source(&self) -> ::std::option::Option<&crate::types::ArtifactSource> {
41 self.source.as_ref()
42 }
43 pub fn artifact_type(&self) -> ::std::option::Option<&str> {
45 self.artifact_type.as_deref()
46 }
47 pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
49 self.properties.as_ref()
50 }
51 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
53 self.creation_time.as_ref()
54 }
55 pub fn created_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
57 self.created_by.as_ref()
58 }
59 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61 self.last_modified_time.as_ref()
62 }
63 pub fn last_modified_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
65 self.last_modified_by.as_ref()
66 }
67 pub fn metadata_properties(&self) -> ::std::option::Option<&crate::types::MetadataProperties> {
69 self.metadata_properties.as_ref()
70 }
71 pub fn lineage_group_arn(&self) -> ::std::option::Option<&str> {
73 self.lineage_group_arn.as_deref()
74 }
75}
76impl ::aws_types::request_id::RequestId for DescribeArtifactOutput {
77 fn request_id(&self) -> Option<&str> {
78 self._request_id.as_deref()
79 }
80}
81impl DescribeArtifactOutput {
82 pub fn builder() -> crate::operation::describe_artifact::builders::DescribeArtifactOutputBuilder {
84 crate::operation::describe_artifact::builders::DescribeArtifactOutputBuilder::default()
85 }
86}
87
88#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
90#[non_exhaustive]
91pub struct DescribeArtifactOutputBuilder {
92 pub(crate) artifact_name: ::std::option::Option<::std::string::String>,
93 pub(crate) artifact_arn: ::std::option::Option<::std::string::String>,
94 pub(crate) source: ::std::option::Option<crate::types::ArtifactSource>,
95 pub(crate) artifact_type: ::std::option::Option<::std::string::String>,
96 pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
97 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
98 pub(crate) created_by: ::std::option::Option<crate::types::UserContext>,
99 pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
100 pub(crate) last_modified_by: ::std::option::Option<crate::types::UserContext>,
101 pub(crate) metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
102 pub(crate) lineage_group_arn: ::std::option::Option<::std::string::String>,
103 _request_id: Option<String>,
104}
105impl DescribeArtifactOutputBuilder {
106 pub fn artifact_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.artifact_name = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_artifact_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.artifact_name = input;
114 self
115 }
116 pub fn get_artifact_name(&self) -> &::std::option::Option<::std::string::String> {
118 &self.artifact_name
119 }
120 pub fn artifact_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.artifact_arn = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_artifact_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.artifact_arn = input;
128 self
129 }
130 pub fn get_artifact_arn(&self) -> &::std::option::Option<::std::string::String> {
132 &self.artifact_arn
133 }
134 pub fn source(mut self, input: crate::types::ArtifactSource) -> Self {
136 self.source = ::std::option::Option::Some(input);
137 self
138 }
139 pub fn set_source(mut self, input: ::std::option::Option<crate::types::ArtifactSource>) -> Self {
141 self.source = input;
142 self
143 }
144 pub fn get_source(&self) -> &::std::option::Option<crate::types::ArtifactSource> {
146 &self.source
147 }
148 pub fn artifact_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.artifact_type = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_artifact_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.artifact_type = input;
156 self
157 }
158 pub fn get_artifact_type(&self) -> &::std::option::Option<::std::string::String> {
160 &self.artifact_type
161 }
162 pub fn properties(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
168 let mut hash_map = self.properties.unwrap_or_default();
169 hash_map.insert(k.into(), v.into());
170 self.properties = ::std::option::Option::Some(hash_map);
171 self
172 }
173 pub fn set_properties(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
175 self.properties = input;
176 self
177 }
178 pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
180 &self.properties
181 }
182 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
184 self.creation_time = ::std::option::Option::Some(input);
185 self
186 }
187 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
189 self.creation_time = input;
190 self
191 }
192 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
194 &self.creation_time
195 }
196 pub fn created_by(mut self, input: crate::types::UserContext) -> Self {
198 self.created_by = ::std::option::Option::Some(input);
199 self
200 }
201 pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
203 self.created_by = input;
204 self
205 }
206 pub fn get_created_by(&self) -> &::std::option::Option<crate::types::UserContext> {
208 &self.created_by
209 }
210 pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
212 self.last_modified_time = ::std::option::Option::Some(input);
213 self
214 }
215 pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
217 self.last_modified_time = input;
218 self
219 }
220 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
222 &self.last_modified_time
223 }
224 pub fn last_modified_by(mut self, input: crate::types::UserContext) -> Self {
226 self.last_modified_by = ::std::option::Option::Some(input);
227 self
228 }
229 pub fn set_last_modified_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
231 self.last_modified_by = input;
232 self
233 }
234 pub fn get_last_modified_by(&self) -> &::std::option::Option<crate::types::UserContext> {
236 &self.last_modified_by
237 }
238 pub fn metadata_properties(mut self, input: crate::types::MetadataProperties) -> Self {
240 self.metadata_properties = ::std::option::Option::Some(input);
241 self
242 }
243 pub fn set_metadata_properties(mut self, input: ::std::option::Option<crate::types::MetadataProperties>) -> Self {
245 self.metadata_properties = input;
246 self
247 }
248 pub fn get_metadata_properties(&self) -> &::std::option::Option<crate::types::MetadataProperties> {
250 &self.metadata_properties
251 }
252 pub fn lineage_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254 self.lineage_group_arn = ::std::option::Option::Some(input.into());
255 self
256 }
257 pub fn set_lineage_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.lineage_group_arn = input;
260 self
261 }
262 pub fn get_lineage_group_arn(&self) -> &::std::option::Option<::std::string::String> {
264 &self.lineage_group_arn
265 }
266 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
267 self._request_id = Some(request_id.into());
268 self
269 }
270
271 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
272 self._request_id = request_id;
273 self
274 }
275 pub fn build(self) -> crate::operation::describe_artifact::DescribeArtifactOutput {
277 crate::operation::describe_artifact::DescribeArtifactOutput {
278 artifact_name: self.artifact_name,
279 artifact_arn: self.artifact_arn,
280 source: self.source,
281 artifact_type: self.artifact_type,
282 properties: self.properties,
283 creation_time: self.creation_time,
284 created_by: self.created_by,
285 last_modified_time: self.last_modified_time,
286 last_modified_by: self.last_modified_by,
287 metadata_properties: self.metadata_properties,
288 lineage_group_arn: self.lineage_group_arn,
289 _request_id: self._request_id,
290 }
291 }
292}