aws-sdk-sagemaker 1.196.0

AWS SDK for Amazon SageMaker Service
Documentation
// 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 UpdateTrainingJobInput {
    /// <p>The name of a training job to update the Debugger profiling configuration.</p>
    pub training_job_name: ::std::option::Option<::std::string::String>,
    /// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
    pub profiler_config: ::std::option::Option<crate::types::ProfilerConfigForUpdate>,
    /// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
    pub profiler_rule_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>>,
    /// <p>The training job <code>ResourceConfig</code> to update warm pool retention length.</p>
    pub resource_config: ::std::option::Option<crate::types::ResourceConfigForUpdate>,
    /// <p>Configuration for remote debugging while the training job is running. You can update the remote debugging configuration when the <code>SecondaryStatus</code> of the job is <code>Downloading</code> or <code>Training</code>.To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
    pub remote_debug_config: ::std::option::Option<crate::types::RemoteDebugConfigForUpdate>,
}
impl UpdateTrainingJobInput {
    /// <p>The name of a training job to update the Debugger profiling configuration.</p>
    pub fn training_job_name(&self) -> ::std::option::Option<&str> {
        self.training_job_name.as_deref()
    }
    /// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
    pub fn profiler_config(&self) -> ::std::option::Option<&crate::types::ProfilerConfigForUpdate> {
        self.profiler_config.as_ref()
    }
    /// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</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 `.profiler_rule_configurations.is_none()`.
    pub fn profiler_rule_configurations(&self) -> &[crate::types::ProfilerRuleConfiguration] {
        self.profiler_rule_configurations.as_deref().unwrap_or_default()
    }
    /// <p>The training job <code>ResourceConfig</code> to update warm pool retention length.</p>
    pub fn resource_config(&self) -> ::std::option::Option<&crate::types::ResourceConfigForUpdate> {
        self.resource_config.as_ref()
    }
    /// <p>Configuration for remote debugging while the training job is running. You can update the remote debugging configuration when the <code>SecondaryStatus</code> of the job is <code>Downloading</code> or <code>Training</code>.To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
    pub fn remote_debug_config(&self) -> ::std::option::Option<&crate::types::RemoteDebugConfigForUpdate> {
        self.remote_debug_config.as_ref()
    }
}
impl UpdateTrainingJobInput {
    /// Creates a new builder-style object to manufacture [`UpdateTrainingJobInput`](crate::operation::update_training_job::UpdateTrainingJobInput).
    pub fn builder() -> crate::operation::update_training_job::builders::UpdateTrainingJobInputBuilder {
        crate::operation::update_training_job::builders::UpdateTrainingJobInputBuilder::default()
    }
}

/// A builder for [`UpdateTrainingJobInput`](crate::operation::update_training_job::UpdateTrainingJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTrainingJobInputBuilder {
    pub(crate) training_job_name: ::std::option::Option<::std::string::String>,
    pub(crate) profiler_config: ::std::option::Option<crate::types::ProfilerConfigForUpdate>,
    pub(crate) profiler_rule_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>>,
    pub(crate) resource_config: ::std::option::Option<crate::types::ResourceConfigForUpdate>,
    pub(crate) remote_debug_config: ::std::option::Option<crate::types::RemoteDebugConfigForUpdate>,
}
impl UpdateTrainingJobInputBuilder {
    /// <p>The name of a training job to update the Debugger profiling configuration.</p>
    /// This field is required.
    pub fn training_job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.training_job_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of a training job to update the Debugger profiling configuration.</p>
    pub fn set_training_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.training_job_name = input;
        self
    }
    /// <p>The name of a training job to update the Debugger profiling configuration.</p>
    pub fn get_training_job_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.training_job_name
    }
    /// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
    pub fn profiler_config(mut self, input: crate::types::ProfilerConfigForUpdate) -> Self {
        self.profiler_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
    pub fn set_profiler_config(mut self, input: ::std::option::Option<crate::types::ProfilerConfigForUpdate>) -> Self {
        self.profiler_config = input;
        self
    }
    /// <p>Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.</p>
    pub fn get_profiler_config(&self) -> &::std::option::Option<crate::types::ProfilerConfigForUpdate> {
        &self.profiler_config
    }
    /// Appends an item to `profiler_rule_configurations`.
    ///
    /// To override the contents of this collection use [`set_profiler_rule_configurations`](Self::set_profiler_rule_configurations).
    ///
    /// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
    pub fn profiler_rule_configurations(mut self, input: crate::types::ProfilerRuleConfiguration) -> Self {
        let mut v = self.profiler_rule_configurations.unwrap_or_default();
        v.push(input);
        self.profiler_rule_configurations = ::std::option::Option::Some(v);
        self
    }
    /// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
    pub fn set_profiler_rule_configurations(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>>,
    ) -> Self {
        self.profiler_rule_configurations = input;
        self
    }
    /// <p>Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.</p>
    pub fn get_profiler_rule_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfilerRuleConfiguration>> {
        &self.profiler_rule_configurations
    }
    /// <p>The training job <code>ResourceConfig</code> to update warm pool retention length.</p>
    pub fn resource_config(mut self, input: crate::types::ResourceConfigForUpdate) -> Self {
        self.resource_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The training job <code>ResourceConfig</code> to update warm pool retention length.</p>
    pub fn set_resource_config(mut self, input: ::std::option::Option<crate::types::ResourceConfigForUpdate>) -> Self {
        self.resource_config = input;
        self
    }
    /// <p>The training job <code>ResourceConfig</code> to update warm pool retention length.</p>
    pub fn get_resource_config(&self) -> &::std::option::Option<crate::types::ResourceConfigForUpdate> {
        &self.resource_config
    }
    /// <p>Configuration for remote debugging while the training job is running. You can update the remote debugging configuration when the <code>SecondaryStatus</code> of the job is <code>Downloading</code> or <code>Training</code>.To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
    pub fn remote_debug_config(mut self, input: crate::types::RemoteDebugConfigForUpdate) -> Self {
        self.remote_debug_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration for remote debugging while the training job is running. You can update the remote debugging configuration when the <code>SecondaryStatus</code> of the job is <code>Downloading</code> or <code>Training</code>.To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
    pub fn set_remote_debug_config(mut self, input: ::std::option::Option<crate::types::RemoteDebugConfigForUpdate>) -> Self {
        self.remote_debug_config = input;
        self
    }
    /// <p>Configuration for remote debugging while the training job is running. You can update the remote debugging configuration when the <code>SecondaryStatus</code> of the job is <code>Downloading</code> or <code>Training</code>.To learn more about the remote debugging functionality of SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/train-remote-debugging.html">Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging</a>.</p>
    pub fn get_remote_debug_config(&self) -> &::std::option::Option<crate::types::RemoteDebugConfigForUpdate> {
        &self.remote_debug_config
    }
    /// Consumes the builder and constructs a [`UpdateTrainingJobInput`](crate::operation::update_training_job::UpdateTrainingJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_training_job::UpdateTrainingJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_training_job::UpdateTrainingJobInput {
            training_job_name: self.training_job_name,
            profiler_config: self.profiler_config,
            profiler_rule_configurations: self.profiler_rule_configurations,
            resource_config: self.resource_config,
            remote_debug_config: self.remote_debug_config,
        })
    }
}