aws_sdk_sagemaker/operation/describe_experiment/
_describe_experiment_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeExperimentOutput {
6 pub experiment_name: ::std::option::Option<::std::string::String>,
8 pub experiment_arn: ::std::option::Option<::std::string::String>,
10 pub display_name: ::std::option::Option<::std::string::String>,
12 pub source: ::std::option::Option<crate::types::ExperimentSource>,
14 pub description: ::std::option::Option<::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 _request_id: Option<String>,
25}
26impl DescribeExperimentOutput {
27 pub fn experiment_name(&self) -> ::std::option::Option<&str> {
29 self.experiment_name.as_deref()
30 }
31 pub fn experiment_arn(&self) -> ::std::option::Option<&str> {
33 self.experiment_arn.as_deref()
34 }
35 pub fn display_name(&self) -> ::std::option::Option<&str> {
37 self.display_name.as_deref()
38 }
39 pub fn source(&self) -> ::std::option::Option<&crate::types::ExperimentSource> {
41 self.source.as_ref()
42 }
43 pub fn description(&self) -> ::std::option::Option<&str> {
45 self.description.as_deref()
46 }
47 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
49 self.creation_time.as_ref()
50 }
51 pub fn created_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
53 self.created_by.as_ref()
54 }
55 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.last_modified_time.as_ref()
58 }
59 pub fn last_modified_by(&self) -> ::std::option::Option<&crate::types::UserContext> {
61 self.last_modified_by.as_ref()
62 }
63}
64impl ::aws_types::request_id::RequestId for DescribeExperimentOutput {
65 fn request_id(&self) -> Option<&str> {
66 self._request_id.as_deref()
67 }
68}
69impl DescribeExperimentOutput {
70 pub fn builder() -> crate::operation::describe_experiment::builders::DescribeExperimentOutputBuilder {
72 crate::operation::describe_experiment::builders::DescribeExperimentOutputBuilder::default()
73 }
74}
75
76#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct DescribeExperimentOutputBuilder {
80 pub(crate) experiment_name: ::std::option::Option<::std::string::String>,
81 pub(crate) experiment_arn: ::std::option::Option<::std::string::String>,
82 pub(crate) display_name: ::std::option::Option<::std::string::String>,
83 pub(crate) source: ::std::option::Option<crate::types::ExperimentSource>,
84 pub(crate) description: ::std::option::Option<::std::string::String>,
85 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
86 pub(crate) created_by: ::std::option::Option<crate::types::UserContext>,
87 pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
88 pub(crate) last_modified_by: ::std::option::Option<crate::types::UserContext>,
89 _request_id: Option<String>,
90}
91impl DescribeExperimentOutputBuilder {
92 pub fn experiment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.experiment_name = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_experiment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.experiment_name = input;
100 self
101 }
102 pub fn get_experiment_name(&self) -> &::std::option::Option<::std::string::String> {
104 &self.experiment_name
105 }
106 pub fn experiment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.experiment_arn = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_experiment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.experiment_arn = input;
114 self
115 }
116 pub fn get_experiment_arn(&self) -> &::std::option::Option<::std::string::String> {
118 &self.experiment_arn
119 }
120 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.display_name = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.display_name = input;
128 self
129 }
130 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
132 &self.display_name
133 }
134 pub fn source(mut self, input: crate::types::ExperimentSource) -> 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::ExperimentSource>) -> Self {
141 self.source = input;
142 self
143 }
144 pub fn get_source(&self) -> &::std::option::Option<crate::types::ExperimentSource> {
146 &self.source
147 }
148 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.description = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.description = input;
156 self
157 }
158 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
160 &self.description
161 }
162 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
164 self.creation_time = ::std::option::Option::Some(input);
165 self
166 }
167 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
169 self.creation_time = input;
170 self
171 }
172 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
174 &self.creation_time
175 }
176 pub fn created_by(mut self, input: crate::types::UserContext) -> Self {
178 self.created_by = ::std::option::Option::Some(input);
179 self
180 }
181 pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
183 self.created_by = input;
184 self
185 }
186 pub fn get_created_by(&self) -> &::std::option::Option<crate::types::UserContext> {
188 &self.created_by
189 }
190 pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
192 self.last_modified_time = ::std::option::Option::Some(input);
193 self
194 }
195 pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
197 self.last_modified_time = input;
198 self
199 }
200 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
202 &self.last_modified_time
203 }
204 pub fn last_modified_by(mut self, input: crate::types::UserContext) -> Self {
206 self.last_modified_by = ::std::option::Option::Some(input);
207 self
208 }
209 pub fn set_last_modified_by(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
211 self.last_modified_by = input;
212 self
213 }
214 pub fn get_last_modified_by(&self) -> &::std::option::Option<crate::types::UserContext> {
216 &self.last_modified_by
217 }
218 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
219 self._request_id = Some(request_id.into());
220 self
221 }
222
223 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
224 self._request_id = request_id;
225 self
226 }
227 pub fn build(self) -> crate::operation::describe_experiment::DescribeExperimentOutput {
229 crate::operation::describe_experiment::DescribeExperimentOutput {
230 experiment_name: self.experiment_name,
231 experiment_arn: self.experiment_arn,
232 display_name: self.display_name,
233 source: self.source,
234 description: self.description,
235 creation_time: self.creation_time,
236 created_by: self.created_by,
237 last_modified_time: self.last_modified_time,
238 last_modified_by: self.last_modified_by,
239 _request_id: self._request_id,
240 }
241 }
242}