aws-sdk-robomaker 1.81.0

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

/// <p>Compute information for the simulation job.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Compute {
    /// <p>The simulation unit limit. Your simulation is allocated CPU and memory proportional to the supplied simulation unit limit. A simulation unit is 1 vcpu and 2GB of memory. You are only billed for the SU utilization you consume up to the maximum value provided. The default is 15.</p>
    pub simulation_unit_limit: ::std::option::Option<i32>,
    /// <p>Compute type information for the simulation job.</p>
    pub compute_type: ::std::option::Option<crate::types::ComputeType>,
    /// <p>Compute GPU unit limit for the simulation job. It is the same as the number of GPUs allocated to the SimulationJob.</p>
    pub gpu_unit_limit: ::std::option::Option<i32>,
}
impl Compute {
    /// <p>The simulation unit limit. Your simulation is allocated CPU and memory proportional to the supplied simulation unit limit. A simulation unit is 1 vcpu and 2GB of memory. You are only billed for the SU utilization you consume up to the maximum value provided. The default is 15.</p>
    pub fn simulation_unit_limit(&self) -> ::std::option::Option<i32> {
        self.simulation_unit_limit
    }
    /// <p>Compute type information for the simulation job.</p>
    pub fn compute_type(&self) -> ::std::option::Option<&crate::types::ComputeType> {
        self.compute_type.as_ref()
    }
    /// <p>Compute GPU unit limit for the simulation job. It is the same as the number of GPUs allocated to the SimulationJob.</p>
    pub fn gpu_unit_limit(&self) -> ::std::option::Option<i32> {
        self.gpu_unit_limit
    }
}
impl Compute {
    /// Creates a new builder-style object to manufacture [`Compute`](crate::types::Compute).
    pub fn builder() -> crate::types::builders::ComputeBuilder {
        crate::types::builders::ComputeBuilder::default()
    }
}

/// A builder for [`Compute`](crate::types::Compute).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ComputeBuilder {
    pub(crate) simulation_unit_limit: ::std::option::Option<i32>,
    pub(crate) compute_type: ::std::option::Option<crate::types::ComputeType>,
    pub(crate) gpu_unit_limit: ::std::option::Option<i32>,
}
impl ComputeBuilder {
    /// <p>The simulation unit limit. Your simulation is allocated CPU and memory proportional to the supplied simulation unit limit. A simulation unit is 1 vcpu and 2GB of memory. You are only billed for the SU utilization you consume up to the maximum value provided. The default is 15.</p>
    pub fn simulation_unit_limit(mut self, input: i32) -> Self {
        self.simulation_unit_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The simulation unit limit. Your simulation is allocated CPU and memory proportional to the supplied simulation unit limit. A simulation unit is 1 vcpu and 2GB of memory. You are only billed for the SU utilization you consume up to the maximum value provided. The default is 15.</p>
    pub fn set_simulation_unit_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.simulation_unit_limit = input;
        self
    }
    /// <p>The simulation unit limit. Your simulation is allocated CPU and memory proportional to the supplied simulation unit limit. A simulation unit is 1 vcpu and 2GB of memory. You are only billed for the SU utilization you consume up to the maximum value provided. The default is 15.</p>
    pub fn get_simulation_unit_limit(&self) -> &::std::option::Option<i32> {
        &self.simulation_unit_limit
    }
    /// <p>Compute type information for the simulation job.</p>
    pub fn compute_type(mut self, input: crate::types::ComputeType) -> Self {
        self.compute_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Compute type information for the simulation job.</p>
    pub fn set_compute_type(mut self, input: ::std::option::Option<crate::types::ComputeType>) -> Self {
        self.compute_type = input;
        self
    }
    /// <p>Compute type information for the simulation job.</p>
    pub fn get_compute_type(&self) -> &::std::option::Option<crate::types::ComputeType> {
        &self.compute_type
    }
    /// <p>Compute GPU unit limit for the simulation job. It is the same as the number of GPUs allocated to the SimulationJob.</p>
    pub fn gpu_unit_limit(mut self, input: i32) -> Self {
        self.gpu_unit_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>Compute GPU unit limit for the simulation job. It is the same as the number of GPUs allocated to the SimulationJob.</p>
    pub fn set_gpu_unit_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.gpu_unit_limit = input;
        self
    }
    /// <p>Compute GPU unit limit for the simulation job. It is the same as the number of GPUs allocated to the SimulationJob.</p>
    pub fn get_gpu_unit_limit(&self) -> &::std::option::Option<i32> {
        &self.gpu_unit_limit
    }
    /// Consumes the builder and constructs a [`Compute`](crate::types::Compute).
    pub fn build(self) -> crate::types::Compute {
        crate::types::Compute {
            simulation_unit_limit: self.simulation_unit_limit,
            compute_type: self.compute_type,
            gpu_unit_limit: self.gpu_unit_limit,
        }
    }
}