aws-sdk-sagemaker 1.189.0

AWS SDK for Amazon SageMaker Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The trial that a trial component is associated with and the experiment the trial is part of. A component might not be associated with a trial. A component can be associated with multiple trials.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Parent {
    /// <p>The name of the trial.</p>
    pub trial_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the experiment.</p>
    pub experiment_name: ::std::option::Option<::std::string::String>,
}
impl Parent {
    /// <p>The name of the trial.</p>
    pub fn trial_name(&self) -> ::std::option::Option<&str> {
        self.trial_name.as_deref()
    }
    /// <p>The name of the experiment.</p>
    pub fn experiment_name(&self) -> ::std::option::Option<&str> {
        self.experiment_name.as_deref()
    }
}
impl Parent {
    /// Creates a new builder-style object to manufacture [`Parent`](crate::types::Parent).
    pub fn builder() -> crate::types::builders::ParentBuilder {
        crate::types::builders::ParentBuilder::default()
    }
}

/// A builder for [`Parent`](crate::types::Parent).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ParentBuilder {
    pub(crate) trial_name: ::std::option::Option<::std::string::String>,
    pub(crate) experiment_name: ::std::option::Option<::std::string::String>,
}
impl ParentBuilder {
    /// <p>The name of the trial.</p>
    pub fn trial_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.trial_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the trial.</p>
    pub fn set_trial_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.trial_name = input;
        self
    }
    /// <p>The name of the trial.</p>
    pub fn get_trial_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.trial_name
    }
    /// <p>The name of the experiment.</p>
    pub fn experiment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.experiment_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the experiment.</p>
    pub fn set_experiment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.experiment_name = input;
        self
    }
    /// <p>The name of the experiment.</p>
    pub fn get_experiment_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.experiment_name
    }
    /// Consumes the builder and constructs a [`Parent`](crate::types::Parent).
    pub fn build(self) -> crate::types::Parent {
        crate::types::Parent {
            trial_name: self.trial_name,
            experiment_name: self.experiment_name,
        }
    }
}