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 UpdateComputeQuotaInput {
    /// <p>ID of the compute allocation definition.</p>
    pub compute_quota_id: ::std::option::Option<::std::string::String>,
    /// <p>Target version.</p>
    pub target_version: ::std::option::Option<i32>,
    /// <p>Configuration of the compute allocation definition. This includes the resource sharing option, and the setting to preempt low priority tasks.</p>
    pub compute_quota_config: ::std::option::Option<crate::types::ComputeQuotaConfig>,
    /// <p>The target entity to allocate compute resources to.</p>
    pub compute_quota_target: ::std::option::Option<crate::types::ComputeQuotaTarget>,
    /// <p>The state of the compute allocation being described. Use to enable or disable compute allocation.</p>
    /// <p>Default is <code>Enabled</code>.</p>
    pub activation_state: ::std::option::Option<crate::types::ActivationState>,
    /// <p>Description of the compute allocation definition.</p>
    pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateComputeQuotaInput {
    /// <p>ID of the compute allocation definition.</p>
    pub fn compute_quota_id(&self) -> ::std::option::Option<&str> {
        self.compute_quota_id.as_deref()
    }
    /// <p>Target version.</p>
    pub fn target_version(&self) -> ::std::option::Option<i32> {
        self.target_version
    }
    /// <p>Configuration of the compute allocation definition. This includes the resource sharing option, and the setting to preempt low priority tasks.</p>
    pub fn compute_quota_config(&self) -> ::std::option::Option<&crate::types::ComputeQuotaConfig> {
        self.compute_quota_config.as_ref()
    }
    /// <p>The target entity to allocate compute resources to.</p>
    pub fn compute_quota_target(&self) -> ::std::option::Option<&crate::types::ComputeQuotaTarget> {
        self.compute_quota_target.as_ref()
    }
    /// <p>The state of the compute allocation being described. Use to enable or disable compute allocation.</p>
    /// <p>Default is <code>Enabled</code>.</p>
    pub fn activation_state(&self) -> ::std::option::Option<&crate::types::ActivationState> {
        self.activation_state.as_ref()
    }
    /// <p>Description of the compute allocation definition.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl UpdateComputeQuotaInput {
    /// Creates a new builder-style object to manufacture [`UpdateComputeQuotaInput`](crate::operation::update_compute_quota::UpdateComputeQuotaInput).
    pub fn builder() -> crate::operation::update_compute_quota::builders::UpdateComputeQuotaInputBuilder {
        crate::operation::update_compute_quota::builders::UpdateComputeQuotaInputBuilder::default()
    }
}

/// A builder for [`UpdateComputeQuotaInput`](crate::operation::update_compute_quota::UpdateComputeQuotaInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateComputeQuotaInputBuilder {
    pub(crate) compute_quota_id: ::std::option::Option<::std::string::String>,
    pub(crate) target_version: ::std::option::Option<i32>,
    pub(crate) compute_quota_config: ::std::option::Option<crate::types::ComputeQuotaConfig>,
    pub(crate) compute_quota_target: ::std::option::Option<crate::types::ComputeQuotaTarget>,
    pub(crate) activation_state: ::std::option::Option<crate::types::ActivationState>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl UpdateComputeQuotaInputBuilder {
    /// <p>ID of the compute allocation definition.</p>
    /// This field is required.
    pub fn compute_quota_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.compute_quota_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID of the compute allocation definition.</p>
    pub fn set_compute_quota_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.compute_quota_id = input;
        self
    }
    /// <p>ID of the compute allocation definition.</p>
    pub fn get_compute_quota_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.compute_quota_id
    }
    /// <p>Target version.</p>
    /// This field is required.
    pub fn target_version(mut self, input: i32) -> Self {
        self.target_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>Target version.</p>
    pub fn set_target_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.target_version = input;
        self
    }
    /// <p>Target version.</p>
    pub fn get_target_version(&self) -> &::std::option::Option<i32> {
        &self.target_version
    }
    /// <p>Configuration of the compute allocation definition. This includes the resource sharing option, and the setting to preempt low priority tasks.</p>
    pub fn compute_quota_config(mut self, input: crate::types::ComputeQuotaConfig) -> Self {
        self.compute_quota_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration of the compute allocation definition. This includes the resource sharing option, and the setting to preempt low priority tasks.</p>
    pub fn set_compute_quota_config(mut self, input: ::std::option::Option<crate::types::ComputeQuotaConfig>) -> Self {
        self.compute_quota_config = input;
        self
    }
    /// <p>Configuration of the compute allocation definition. This includes the resource sharing option, and the setting to preempt low priority tasks.</p>
    pub fn get_compute_quota_config(&self) -> &::std::option::Option<crate::types::ComputeQuotaConfig> {
        &self.compute_quota_config
    }
    /// <p>The target entity to allocate compute resources to.</p>
    pub fn compute_quota_target(mut self, input: crate::types::ComputeQuotaTarget) -> Self {
        self.compute_quota_target = ::std::option::Option::Some(input);
        self
    }
    /// <p>The target entity to allocate compute resources to.</p>
    pub fn set_compute_quota_target(mut self, input: ::std::option::Option<crate::types::ComputeQuotaTarget>) -> Self {
        self.compute_quota_target = input;
        self
    }
    /// <p>The target entity to allocate compute resources to.</p>
    pub fn get_compute_quota_target(&self) -> &::std::option::Option<crate::types::ComputeQuotaTarget> {
        &self.compute_quota_target
    }
    /// <p>The state of the compute allocation being described. Use to enable or disable compute allocation.</p>
    /// <p>Default is <code>Enabled</code>.</p>
    pub fn activation_state(mut self, input: crate::types::ActivationState) -> Self {
        self.activation_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the compute allocation being described. Use to enable or disable compute allocation.</p>
    /// <p>Default is <code>Enabled</code>.</p>
    pub fn set_activation_state(mut self, input: ::std::option::Option<crate::types::ActivationState>) -> Self {
        self.activation_state = input;
        self
    }
    /// <p>The state of the compute allocation being described. Use to enable or disable compute allocation.</p>
    /// <p>Default is <code>Enabled</code>.</p>
    pub fn get_activation_state(&self) -> &::std::option::Option<crate::types::ActivationState> {
        &self.activation_state
    }
    /// <p>Description of the compute allocation definition.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Description of the compute allocation definition.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Description of the compute allocation definition.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`UpdateComputeQuotaInput`](crate::operation::update_compute_quota::UpdateComputeQuotaInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_compute_quota::UpdateComputeQuotaInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_compute_quota::UpdateComputeQuotaInput {
            compute_quota_id: self.compute_quota_id,
            target_version: self.target_version,
            compute_quota_config: self.compute_quota_config,
            compute_quota_target: self.compute_quota_target,
            activation_state: self.activation_state,
            description: self.description,
        })
    }
}