1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateTrialComponentInput {
/// <p>The name of the component to update.</p>
pub trial_component_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the component as displayed. The name doesn't need to be unique. If <code>DisplayName</code> isn't specified, <code>TrialComponentName</code> is displayed.</p>
pub display_name: ::std::option::Option<::std::string::String>,
/// <p>The new status of the component.</p>
pub status: ::std::option::Option<crate::types::TrialComponentStatus>,
/// <p>When the component started.</p>
pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>When the component ended.</p>
pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.</p>
pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentParameterValue>>,
/// <p>The hyperparameters to remove from the component.</p>
pub parameters_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts. Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.</p>
pub input_artifacts: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>>,
/// <p>The input artifacts to remove from the component.</p>
pub input_artifacts_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts. Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.</p>
pub output_artifacts: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>>,
/// <p>The output artifacts to remove from the component.</p>
pub output_artifacts_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateTrialComponentInput {
/// <p>The name of the component to update.</p>
pub fn trial_component_name(&self) -> ::std::option::Option<&str> {
self.trial_component_name.as_deref()
}
/// <p>The name of the component as displayed. The name doesn't need to be unique. If <code>DisplayName</code> isn't specified, <code>TrialComponentName</code> is displayed.</p>
pub fn display_name(&self) -> ::std::option::Option<&str> {
self.display_name.as_deref()
}
/// <p>The new status of the component.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::TrialComponentStatus> {
self.status.as_ref()
}
/// <p>When the component started.</p>
pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.start_time.as_ref()
}
/// <p>When the component ended.</p>
pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_time.as_ref()
}
/// <p>Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.</p>
pub fn parameters(
&self,
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::TrialComponentParameterValue>> {
self.parameters.as_ref()
}
/// <p>The hyperparameters to remove from the component.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters_to_remove.is_none()`.
pub fn parameters_to_remove(&self) -> &[::std::string::String] {
self.parameters_to_remove.as_deref().unwrap_or_default()
}
/// <p>Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts. Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.</p>
pub fn input_artifacts(
&self,
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>> {
self.input_artifacts.as_ref()
}
/// <p>The input artifacts to remove from the component.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.input_artifacts_to_remove.is_none()`.
pub fn input_artifacts_to_remove(&self) -> &[::std::string::String] {
self.input_artifacts_to_remove.as_deref().unwrap_or_default()
}
/// <p>Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts. Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.</p>
pub fn output_artifacts(
&self,
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>> {
self.output_artifacts.as_ref()
}
/// <p>The output artifacts to remove from the component.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.output_artifacts_to_remove.is_none()`.
pub fn output_artifacts_to_remove(&self) -> &[::std::string::String] {
self.output_artifacts_to_remove.as_deref().unwrap_or_default()
}
}
impl UpdateTrialComponentInput {
/// Creates a new builder-style object to manufacture [`UpdateTrialComponentInput`](crate::operation::update_trial_component::UpdateTrialComponentInput).
pub fn builder() -> crate::operation::update_trial_component::builders::UpdateTrialComponentInputBuilder {
crate::operation::update_trial_component::builders::UpdateTrialComponentInputBuilder::default()
}
}
/// A builder for [`UpdateTrialComponentInput`](crate::operation::update_trial_component::UpdateTrialComponentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTrialComponentInputBuilder {
pub(crate) trial_component_name: ::std::option::Option<::std::string::String>,
pub(crate) display_name: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::TrialComponentStatus>,
pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentParameterValue>>,
pub(crate) parameters_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) input_artifacts: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>>,
pub(crate) input_artifacts_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) output_artifacts: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>>,
pub(crate) output_artifacts_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateTrialComponentInputBuilder {
/// <p>The name of the component to update.</p>
/// This field is required.
pub fn trial_component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.trial_component_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the component to update.</p>
pub fn set_trial_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.trial_component_name = input;
self
}
/// <p>The name of the component to update.</p>
pub fn get_trial_component_name(&self) -> &::std::option::Option<::std::string::String> {
&self.trial_component_name
}
/// <p>The name of the component as displayed. The name doesn't need to be unique. If <code>DisplayName</code> isn't specified, <code>TrialComponentName</code> is displayed.</p>
pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.display_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the component as displayed. The name doesn't need to be unique. If <code>DisplayName</code> isn't specified, <code>TrialComponentName</code> is displayed.</p>
pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.display_name = input;
self
}
/// <p>The name of the component as displayed. The name doesn't need to be unique. If <code>DisplayName</code> isn't specified, <code>TrialComponentName</code> is displayed.</p>
pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.display_name
}
/// <p>The new status of the component.</p>
pub fn status(mut self, input: crate::types::TrialComponentStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The new status of the component.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::TrialComponentStatus>) -> Self {
self.status = input;
self
}
/// <p>The new status of the component.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::TrialComponentStatus> {
&self.status
}
/// <p>When the component started.</p>
pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_time = ::std::option::Option::Some(input);
self
}
/// <p>When the component started.</p>
pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_time = input;
self
}
/// <p>When the component started.</p>
pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_time
}
/// <p>When the component ended.</p>
pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_time = ::std::option::Option::Some(input);
self
}
/// <p>When the component ended.</p>
pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.end_time = input;
self
}
/// <p>When the component ended.</p>
pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_time
}
/// Adds a key-value pair to `parameters`.
///
/// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
///
/// <p>Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.</p>
pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::TrialComponentParameterValue) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v);
self.parameters = ::std::option::Option::Some(hash_map);
self
}
/// <p>Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.</p>
pub fn set_parameters(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentParameterValue>>,
) -> Self {
self.parameters = input;
self
}
/// <p>Replaces all of the component's hyperparameters with the specified hyperparameters or add new hyperparameters. Existing hyperparameters are replaced if the trial component is updated with an identical hyperparameter key.</p>
pub fn get_parameters(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentParameterValue>> {
&self.parameters
}
/// Appends an item to `parameters_to_remove`.
///
/// To override the contents of this collection use [`set_parameters_to_remove`](Self::set_parameters_to_remove).
///
/// <p>The hyperparameters to remove from the component.</p>
pub fn parameters_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.parameters_to_remove.unwrap_or_default();
v.push(input.into());
self.parameters_to_remove = ::std::option::Option::Some(v);
self
}
/// <p>The hyperparameters to remove from the component.</p>
pub fn set_parameters_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.parameters_to_remove = input;
self
}
/// <p>The hyperparameters to remove from the component.</p>
pub fn get_parameters_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.parameters_to_remove
}
/// Adds a key-value pair to `input_artifacts`.
///
/// To override the contents of this collection use [`set_input_artifacts`](Self::set_input_artifacts).
///
/// <p>Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts. Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.</p>
pub fn input_artifacts(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::TrialComponentArtifact) -> Self {
let mut hash_map = self.input_artifacts.unwrap_or_default();
hash_map.insert(k.into(), v);
self.input_artifacts = ::std::option::Option::Some(hash_map);
self
}
/// <p>Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts. Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.</p>
pub fn set_input_artifacts(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>>,
) -> Self {
self.input_artifacts = input;
self
}
/// <p>Replaces all of the component's input artifacts with the specified artifacts or adds new input artifacts. Existing input artifacts are replaced if the trial component is updated with an identical input artifact key.</p>
pub fn get_input_artifacts(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>> {
&self.input_artifacts
}
/// Appends an item to `input_artifacts_to_remove`.
///
/// To override the contents of this collection use [`set_input_artifacts_to_remove`](Self::set_input_artifacts_to_remove).
///
/// <p>The input artifacts to remove from the component.</p>
pub fn input_artifacts_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.input_artifacts_to_remove.unwrap_or_default();
v.push(input.into());
self.input_artifacts_to_remove = ::std::option::Option::Some(v);
self
}
/// <p>The input artifacts to remove from the component.</p>
pub fn set_input_artifacts_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.input_artifacts_to_remove = input;
self
}
/// <p>The input artifacts to remove from the component.</p>
pub fn get_input_artifacts_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.input_artifacts_to_remove
}
/// Adds a key-value pair to `output_artifacts`.
///
/// To override the contents of this collection use [`set_output_artifacts`](Self::set_output_artifacts).
///
/// <p>Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts. Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.</p>
pub fn output_artifacts(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::TrialComponentArtifact) -> Self {
let mut hash_map = self.output_artifacts.unwrap_or_default();
hash_map.insert(k.into(), v);
self.output_artifacts = ::std::option::Option::Some(hash_map);
self
}
/// <p>Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts. Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.</p>
pub fn set_output_artifacts(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>>,
) -> Self {
self.output_artifacts = input;
self
}
/// <p>Replaces all of the component's output artifacts with the specified artifacts or adds new output artifacts. Existing output artifacts are replaced if the trial component is updated with an identical output artifact key.</p>
pub fn get_output_artifacts(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::TrialComponentArtifact>> {
&self.output_artifacts
}
/// Appends an item to `output_artifacts_to_remove`.
///
/// To override the contents of this collection use [`set_output_artifacts_to_remove`](Self::set_output_artifacts_to_remove).
///
/// <p>The output artifacts to remove from the component.</p>
pub fn output_artifacts_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.output_artifacts_to_remove.unwrap_or_default();
v.push(input.into());
self.output_artifacts_to_remove = ::std::option::Option::Some(v);
self
}
/// <p>The output artifacts to remove from the component.</p>
pub fn set_output_artifacts_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.output_artifacts_to_remove = input;
self
}
/// <p>The output artifacts to remove from the component.</p>
pub fn get_output_artifacts_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.output_artifacts_to_remove
}
/// Consumes the builder and constructs a [`UpdateTrialComponentInput`](crate::operation::update_trial_component::UpdateTrialComponentInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_trial_component::UpdateTrialComponentInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_trial_component::UpdateTrialComponentInput {
trial_component_name: self.trial_component_name,
display_name: self.display_name,
status: self.status,
start_time: self.start_time,
end_time: self.end_time,
parameters: self.parameters,
parameters_to_remove: self.parameters_to_remove,
input_artifacts: self.input_artifacts,
input_artifacts_to_remove: self.input_artifacts_to_remove,
output_artifacts: self.output_artifacts,
output_artifacts_to_remove: self.output_artifacts_to_remove,
})
}
}