aws_sdk_sagemaker/operation/describe_trial/
_describe_trial_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 DescribeTrialOutput {
6    /// <p>The name of the trial.</p>
7    pub trial_name: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the trial.</p>
9    pub trial_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the trial as displayed. If <code>DisplayName</code> isn't specified, <code>TrialName</code> is displayed.</p>
11    pub display_name: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the experiment the trial is part of.</p>
13    pub experiment_name: ::std::option::Option<::std::string::String>,
14    /// <p>The Amazon Resource Name (ARN) of the source and, optionally, the job type.</p>
15    pub source: ::std::option::Option<crate::types::TrialSource>,
16    /// <p>When the trial was created.</p>
17    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18    /// <p>Who created the trial.</p>
19    pub created_by: ::std::option::Option<crate::types::UserContext>,
20    /// <p>When the trial was last modified.</p>
21    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22    /// <p>Who last modified the trial.</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    _request_id: Option<String>,
27}
28impl DescribeTrialOutput {
29    /// <p>The name of the trial.</p>
30    pub fn trial_name(&self) -> ::std::option::Option<&str> {
31        self.trial_name.as_deref()
32    }
33    /// <p>The Amazon Resource Name (ARN) of the trial.</p>
34    pub fn trial_arn(&self) -> ::std::option::Option<&str> {
35        self.trial_arn.as_deref()
36    }
37    /// <p>The name of the trial as displayed. If <code>DisplayName</code> isn't specified, <code>TrialName</code> is displayed.</p>
38    pub fn display_name(&self) -> ::std::option::Option<&str> {
39        self.display_name.as_deref()
40    }
41    /// <p>The name of the experiment the trial is part of.</p>
42    pub fn experiment_name(&self) -> ::std::option::Option<&str> {
43        self.experiment_name.as_deref()
44    }
45    /// <p>The Amazon Resource Name (ARN) of the source and, optionally, the job type.</p>
46    pub fn source(&self) -> ::std::option::Option<&crate::types::TrialSource> {
47        self.source.as_ref()
48    }
49    /// <p>When the trial was created.</p>
50    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51        self.creation_time.as_ref()
52    }
53    /// <p>Who created the trial.</p>
54    pub fn created_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
55        self.created_by.as_ref()
56    }
57    /// <p>When the trial was last modified.</p>
58    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59        self.last_modified_time.as_ref()
60    }
61    /// <p>Who last modified the trial.</p>
62    pub fn last_modified_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
63        self.last_modified_by.as_ref()
64    }
65    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
66    pub fn metadata_properties(&self) -> ::std::option::Option<&crate::types::MetadataProperties> {
67        self.metadata_properties.as_ref()
68    }
69}
70impl ::aws_types::request_id::RequestId for DescribeTrialOutput {
71    fn request_id(&self) -> Option<&str> {
72        self._request_id.as_deref()
73    }
74}
75impl DescribeTrialOutput {
76    /// Creates a new builder-style object to manufacture [`DescribeTrialOutput`](crate::operation::describe_trial::DescribeTrialOutput).
77    pub fn builder() -> crate::operation::describe_trial::builders::DescribeTrialOutputBuilder {
78        crate::operation::describe_trial::builders::DescribeTrialOutputBuilder::default()
79    }
80}
81
82/// A builder for [`DescribeTrialOutput`](crate::operation::describe_trial::DescribeTrialOutput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct DescribeTrialOutputBuilder {
86    pub(crate) trial_name: ::std::option::Option<::std::string::String>,
87    pub(crate) trial_arn: ::std::option::Option<::std::string::String>,
88    pub(crate) display_name: ::std::option::Option<::std::string::String>,
89    pub(crate) experiment_name: ::std::option::Option<::std::string::String>,
90    pub(crate) source: ::std::option::Option<crate::types::TrialSource>,
91    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
92    pub(crate) created_by: ::std::option::Option<crate::types::UserContext>,
93    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
94    pub(crate) last_modified_by: ::std::option::Option<crate::types::UserContext>,
95    pub(crate) metadata_properties: ::std::option::Option<crate::types::MetadataProperties>,
96    _request_id: Option<String>,
97}
98impl DescribeTrialOutputBuilder {
99    /// <p>The name of the trial.</p>
100    pub fn trial_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.trial_name = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The name of the trial.</p>
105    pub fn set_trial_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.trial_name = input;
107        self
108    }
109    /// <p>The name of the trial.</p>
110    pub fn get_trial_name(&self) -> &::std::option::Option<::std::string::String> {
111        &self.trial_name
112    }
113    /// <p>The Amazon Resource Name (ARN) of the trial.</p>
114    pub fn trial_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.trial_arn = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The Amazon Resource Name (ARN) of the trial.</p>
119    pub fn set_trial_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.trial_arn = input;
121        self
122    }
123    /// <p>The Amazon Resource Name (ARN) of the trial.</p>
124    pub fn get_trial_arn(&self) -> &::std::option::Option<::std::string::String> {
125        &self.trial_arn
126    }
127    /// <p>The name of the trial as displayed. If <code>DisplayName</code> isn't specified, <code>TrialName</code> is displayed.</p>
128    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.display_name = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The name of the trial as displayed. If <code>DisplayName</code> isn't specified, <code>TrialName</code> is displayed.</p>
133    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.display_name = input;
135        self
136    }
137    /// <p>The name of the trial as displayed. If <code>DisplayName</code> isn't specified, <code>TrialName</code> is displayed.</p>
138    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
139        &self.display_name
140    }
141    /// <p>The name of the experiment the trial is part of.</p>
142    pub fn experiment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.experiment_name = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The name of the experiment the trial is part of.</p>
147    pub fn set_experiment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.experiment_name = input;
149        self
150    }
151    /// <p>The name of the experiment the trial is part of.</p>
152    pub fn get_experiment_name(&self) -> &::std::option::Option<::std::string::String> {
153        &self.experiment_name
154    }
155    /// <p>The Amazon Resource Name (ARN) of the source and, optionally, the job type.</p>
156    pub fn source(mut self, input: crate::types::TrialSource) -> Self {
157        self.source = ::std::option::Option::Some(input);
158        self
159    }
160    /// <p>The Amazon Resource Name (ARN) of the source and, optionally, the job type.</p>
161    pub fn set_source(mut self, input: ::std::option::Option<crate::types::TrialSource>) -> Self {
162        self.source = input;
163        self
164    }
165    /// <p>The Amazon Resource Name (ARN) of the source and, optionally, the job type.</p>
166    pub fn get_source(&self) -> &::std::option::Option<crate::types::TrialSource> {
167        &self.source
168    }
169    /// <p>When the trial was created.</p>
170    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
171        self.creation_time = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>When the trial was created.</p>
175    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
176        self.creation_time = input;
177        self
178    }
179    /// <p>When the trial was created.</p>
180    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
181        &self.creation_time
182    }
183    /// <p>Who created the trial.</p>
184    pub fn created_by(mut self, input: crate::types::UserContext) -> Self {
185        self.created_by = ::std::option::Option::Some(input);
186        self
187    }
188    /// <p>Who created the trial.</p>
189    pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
190        self.created_by = input;
191        self
192    }
193    /// <p>Who created the trial.</p>
194    pub fn get_created_by(&self) -> &::std::option::Option<crate::types::UserContext> {
195        &self.created_by
196    }
197    /// <p>When the trial was last modified.</p>
198    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
199        self.last_modified_time = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>When the trial was last modified.</p>
203    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
204        self.last_modified_time = input;
205        self
206    }
207    /// <p>When the trial was last modified.</p>
208    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
209        &self.last_modified_time
210    }
211    /// <p>Who last modified the trial.</p>
212    pub fn last_modified_by(mut self, input: crate::types::UserContext) -> Self {
213        self.last_modified_by = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>Who last modified the trial.</p>
217    pub fn set_last_modified_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
218        self.last_modified_by = input;
219        self
220    }
221    /// <p>Who last modified the trial.</p>
222    pub fn get_last_modified_by(&self) -> &::std::option::Option<crate::types::UserContext> {
223        &self.last_modified_by
224    }
225    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
226    pub fn metadata_properties(mut self, input: crate::types::MetadataProperties) -> Self {
227        self.metadata_properties = ::std::option::Option::Some(input);
228        self
229    }
230    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
231    pub fn set_metadata_properties(mut self, input: ::std::option::Option<crate::types::MetadataProperties>) -> Self {
232        self.metadata_properties = input;
233        self
234    }
235    /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
236    pub fn get_metadata_properties(&self) -> &::std::option::Option<crate::types::MetadataProperties> {
237        &self.metadata_properties
238    }
239    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
240        self._request_id = Some(request_id.into());
241        self
242    }
243
244    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
245        self._request_id = request_id;
246        self
247    }
248    /// Consumes the builder and constructs a [`DescribeTrialOutput`](crate::operation::describe_trial::DescribeTrialOutput).
249    pub fn build(self) -> crate::operation::describe_trial::DescribeTrialOutput {
250        crate::operation::describe_trial::DescribeTrialOutput {
251            trial_name: self.trial_name,
252            trial_arn: self.trial_arn,
253            display_name: self.display_name,
254            experiment_name: self.experiment_name,
255            source: self.source,
256            creation_time: self.creation_time,
257            created_by: self.created_by,
258            last_modified_time: self.last_modified_time,
259            last_modified_by: self.last_modified_by,
260            metadata_properties: self.metadata_properties,
261            _request_id: self._request_id,
262        }
263    }
264}