aws_sdk_sagemaker/operation/describe_artifact/
_describe_artifact_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 DescribeArtifactOutput {
6    /// <p>The name of the artifact.</p>
7    pub artifact_name: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the artifact.</p>
9    pub artifact_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The source of the artifact.</p>
11    pub source: ::std::option::Option<crate::types::ArtifactSource>,
12    /// <p>The type of the artifact.</p>
13    pub artifact_type: ::std::option::Option<::std::string::String>,
14    /// <p>A list of the artifact's properties.</p>
15    pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16    /// <p>When the artifact was created.</p>
17    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
19    pub created_by: ::std::option::Option<crate::types::UserContext>,
20    /// <p>When the artifact was last modified.</p>
21    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
23    pub last_modified_by: ::std::option::Option<crate::types::UserContext>,
24    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
25    pub metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
26    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
27    pub lineage_group_arn: ::std::option::Option<::std::string::String>,
28    _request_id: Option<String>,
29}
30impl DescribeArtifactOutput {
31    /// <p>The name of the artifact.</p>
32    pub fn artifact_name(&self) -> ::std::option::Option<&str> {
33        self.artifact_name.as_deref()
34    }
35    /// <p>The Amazon Resource Name (ARN) of the artifact.</p>
36    pub fn artifact_arn(&self) -> ::std::option::Option<&str> {
37        self.artifact_arn.as_deref()
38    }
39    /// <p>The source of the artifact.</p>
40    pub fn source(&self) -> ::std::option::Option<&crate::types::ArtifactSource> {
41        self.source.as_ref()
42    }
43    /// <p>The type of the artifact.</p>
44    pub fn artifact_type(&self) -> ::std::option::Option<&str> {
45        self.artifact_type.as_deref()
46    }
47    /// <p>A list of the artifact's properties.</p>
48    pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
49        self.properties.as_ref()
50    }
51    /// <p>When the artifact was created.</p>
52    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
53        self.creation_time.as_ref()
54    }
55    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
56    pub fn created_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
57        self.created_by.as_ref()
58    }
59    /// <p>When the artifact was last modified.</p>
60    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61        self.last_modified_time.as_ref()
62    }
63    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
64    pub fn last_modified_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
65        self.last_modified_by.as_ref()
66    }
67    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
68    pub fn metadata_properties(&self) -> ::std::option::Option<&crate::types::MetadataProperties> {
69        self.metadata_properties.as_ref()
70    }
71    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
72    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    /// Creates a new builder-style object to manufacture [`DescribeArtifactOutput`](crate::operation::describe_artifact::DescribeArtifactOutput).
83    pub fn builder() -> crate::operation::describe_artifact::builders::DescribeArtifactOutputBuilder {
84        crate::operation::describe_artifact::builders::DescribeArtifactOutputBuilder::default()
85    }
86}
87
88/// A builder for [`DescribeArtifactOutput`](crate::operation::describe_artifact::DescribeArtifactOutput).
89#[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    /// <p>The name of the artifact.</p>
107    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    /// <p>The name of the artifact.</p>
112    pub fn set_artifact_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.artifact_name = input;
114        self
115    }
116    /// <p>The name of the artifact.</p>
117    pub fn get_artifact_name(&self) -> &::std::option::Option<::std::string::String> {
118        &self.artifact_name
119    }
120    /// <p>The Amazon Resource Name (ARN) of the artifact.</p>
121    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    /// <p>The Amazon Resource Name (ARN) of the artifact.</p>
126    pub fn set_artifact_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.artifact_arn = input;
128        self
129    }
130    /// <p>The Amazon Resource Name (ARN) of the artifact.</p>
131    pub fn get_artifact_arn(&self) -> &::std::option::Option<::std::string::String> {
132        &self.artifact_arn
133    }
134    /// <p>The source of the artifact.</p>
135    pub fn source(mut self, input: crate::types::ArtifactSource) -> Self {
136        self.source = ::std::option::Option::Some(input);
137        self
138    }
139    /// <p>The source of the artifact.</p>
140    pub fn set_source(mut self, input: ::std::option::Option<crate::types::ArtifactSource>) -> Self {
141        self.source = input;
142        self
143    }
144    /// <p>The source of the artifact.</p>
145    pub fn get_source(&self) -> &::std::option::Option<crate::types::ArtifactSource> {
146        &self.source
147    }
148    /// <p>The type of the artifact.</p>
149    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    /// <p>The type of the artifact.</p>
154    pub fn set_artifact_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.artifact_type = input;
156        self
157    }
158    /// <p>The type of the artifact.</p>
159    pub fn get_artifact_type(&self) -> &::std::option::Option<::std::string::String> {
160        &self.artifact_type
161    }
162    /// Adds a key-value pair to `properties`.
163    ///
164    /// To override the contents of this collection use [`set_properties`](Self::set_properties).
165    ///
166    /// <p>A list of the artifact's properties.</p>
167    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    /// <p>A list of the artifact's properties.</p>
174    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    /// <p>A list of the artifact's properties.</p>
179    pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
180        &self.properties
181    }
182    /// <p>When the artifact was created.</p>
183    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    /// <p>When the artifact was created.</p>
188    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    /// <p>When the artifact was created.</p>
193    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
194        &self.creation_time
195    }
196    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
197    pub fn created_by(mut self, input: crate::types::UserContext) -> Self {
198        self.created_by = ::std::option::Option::Some(input);
199        self
200    }
201    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
202    pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
203        self.created_by = input;
204        self
205    }
206    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
207    pub fn get_created_by(&self) -> &::std::option::Option<crate::types::UserContext> {
208        &self.created_by
209    }
210    /// <p>When the artifact was last modified.</p>
211    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    /// <p>When the artifact was last modified.</p>
216    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    /// <p>When the artifact was last modified.</p>
221    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
222        &self.last_modified_time
223    }
224    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
225    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    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
230    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    /// <p>Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.</p>
235    pub fn get_last_modified_by(&self) -> &::std::option::Option<crate::types::UserContext> {
236        &self.last_modified_by
237    }
238    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
239    pub fn metadata_properties(mut self, input: crate::types::MetadataProperties) -> Self {
240        self.metadata_properties = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
244    pub fn set_metadata_properties(mut self, input: ::std::option::Option<crate::types::MetadataProperties>) -> Self {
245        self.metadata_properties = input;
246        self
247    }
248    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
249    pub fn get_metadata_properties(&self) -> &::std::option::Option<crate::types::MetadataProperties> {
250        &self.metadata_properties
251    }
252    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
253    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    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
258    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    /// <p>The Amazon Resource Name (ARN) of the lineage group.</p>
263    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    /// Consumes the builder and constructs a [`DescribeArtifactOutput`](crate::operation::describe_artifact::DescribeArtifactOutput).
276    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}