Skip to main content

aws_sdk_sagemaker/types/
_experiment_config.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
4/// <ul>
5/// <li>
6/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
7/// <li>
8/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
9/// <li>
10/// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
11/// </ul>
12#[non_exhaustive]
13#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
14pub struct ExperimentConfig {
15    /// <p>The name of an existing experiment to associate with the trial component.</p>
16    pub experiment_name: ::std::option::Option<::std::string::String>,
17    /// <p>The name of an existing trial to associate the trial component with. If not specified, a new trial is created.</p>
18    pub trial_name: ::std::option::Option<::std::string::String>,
19    /// <p>The display name for the trial component. If this key isn't specified, the display name is the trial component name.</p>
20    pub trial_component_display_name: ::std::option::Option<::std::string::String>,
21    /// <p>The name of the experiment run to associate with the trial component.</p>
22    pub run_name: ::std::option::Option<::std::string::String>,
23}
24impl ExperimentConfig {
25    /// <p>The name of an existing experiment to associate with the trial component.</p>
26    pub fn experiment_name(&self) -> ::std::option::Option<&str> {
27        self.experiment_name.as_deref()
28    }
29    /// <p>The name of an existing trial to associate the trial component with. If not specified, a new trial is created.</p>
30    pub fn trial_name(&self) -> ::std::option::Option<&str> {
31        self.trial_name.as_deref()
32    }
33    /// <p>The display name for the trial component. If this key isn't specified, the display name is the trial component name.</p>
34    pub fn trial_component_display_name(&self) -> ::std::option::Option<&str> {
35        self.trial_component_display_name.as_deref()
36    }
37    /// <p>The name of the experiment run to associate with the trial component.</p>
38    pub fn run_name(&self) -> ::std::option::Option<&str> {
39        self.run_name.as_deref()
40    }
41}
42impl ExperimentConfig {
43    /// Creates a new builder-style object to manufacture [`ExperimentConfig`](crate::types::ExperimentConfig).
44    pub fn builder() -> crate::types::builders::ExperimentConfigBuilder {
45        crate::types::builders::ExperimentConfigBuilder::default()
46    }
47}
48
49/// A builder for [`ExperimentConfig`](crate::types::ExperimentConfig).
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct ExperimentConfigBuilder {
53    pub(crate) experiment_name: ::std::option::Option<::std::string::String>,
54    pub(crate) trial_name: ::std::option::Option<::std::string::String>,
55    pub(crate) trial_component_display_name: ::std::option::Option<::std::string::String>,
56    pub(crate) run_name: ::std::option::Option<::std::string::String>,
57}
58impl ExperimentConfigBuilder {
59    /// <p>The name of an existing experiment to associate with the trial component.</p>
60    pub fn experiment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.experiment_name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of an existing experiment to associate with the trial component.</p>
65    pub fn set_experiment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.experiment_name = input;
67        self
68    }
69    /// <p>The name of an existing experiment to associate with the trial component.</p>
70    pub fn get_experiment_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.experiment_name
72    }
73    /// <p>The name of an existing trial to associate the trial component with. If not specified, a new trial is created.</p>
74    pub fn trial_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.trial_name = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The name of an existing trial to associate the trial component with. If not specified, a new trial is created.</p>
79    pub fn set_trial_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.trial_name = input;
81        self
82    }
83    /// <p>The name of an existing trial to associate the trial component with. If not specified, a new trial is created.</p>
84    pub fn get_trial_name(&self) -> &::std::option::Option<::std::string::String> {
85        &self.trial_name
86    }
87    /// <p>The display name for the trial component. If this key isn't specified, the display name is the trial component name.</p>
88    pub fn trial_component_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.trial_component_display_name = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>The display name for the trial component. If this key isn't specified, the display name is the trial component name.</p>
93    pub fn set_trial_component_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.trial_component_display_name = input;
95        self
96    }
97    /// <p>The display name for the trial component. If this key isn't specified, the display name is the trial component name.</p>
98    pub fn get_trial_component_display_name(&self) -> &::std::option::Option<::std::string::String> {
99        &self.trial_component_display_name
100    }
101    /// <p>The name of the experiment run to associate with the trial component.</p>
102    pub fn run_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.run_name = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The name of the experiment run to associate with the trial component.</p>
107    pub fn set_run_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.run_name = input;
109        self
110    }
111    /// <p>The name of the experiment run to associate with the trial component.</p>
112    pub fn get_run_name(&self) -> &::std::option::Option<::std::string::String> {
113        &self.run_name
114    }
115    /// Consumes the builder and constructs a [`ExperimentConfig`](crate::types::ExperimentConfig).
116    pub fn build(self) -> crate::types::ExperimentConfig {
117        crate::types::ExperimentConfig {
118            experiment_name: self.experiment_name,
119            trial_name: self.trial_name,
120            trial_component_display_name: self.trial_component_display_name,
121            run_name: self.run_name,
122        }
123    }
124}