aws-sdk-batch 1.119.0

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

/// <p>The <code>ulimit</code> settings to pass to the container. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Ulimit.html">Ulimit</a>.</p><note>
/// <p>This object isn't applicable to jobs that are running on Fargate resources.</p>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Ulimit {
    /// <p>The hard limit for the <code>ulimit</code> type.</p>
    pub hard_limit: ::std::option::Option<i32>,
    /// <p>The <code>type</code> of the <code>ulimit</code>. Valid values are: <code>core</code> | <code>cpu</code> | <code>data</code> | <code>fsize</code> | <code>locks</code> | <code>memlock</code> | <code>msgqueue</code> | <code>nice</code> | <code>nofile</code> | <code>nproc</code> | <code>rss</code> | <code>rtprio</code> | <code>rttime</code> | <code>sigpending</code> | <code>stack</code>.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The soft limit for the <code>ulimit</code> type.</p>
    pub soft_limit: ::std::option::Option<i32>,
}
impl Ulimit {
    /// <p>The hard limit for the <code>ulimit</code> type.</p>
    pub fn hard_limit(&self) -> ::std::option::Option<i32> {
        self.hard_limit
    }
    /// <p>The <code>type</code> of the <code>ulimit</code>. Valid values are: <code>core</code> | <code>cpu</code> | <code>data</code> | <code>fsize</code> | <code>locks</code> | <code>memlock</code> | <code>msgqueue</code> | <code>nice</code> | <code>nofile</code> | <code>nproc</code> | <code>rss</code> | <code>rtprio</code> | <code>rttime</code> | <code>sigpending</code> | <code>stack</code>.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The soft limit for the <code>ulimit</code> type.</p>
    pub fn soft_limit(&self) -> ::std::option::Option<i32> {
        self.soft_limit
    }
}
impl Ulimit {
    /// Creates a new builder-style object to manufacture [`Ulimit`](crate::types::Ulimit).
    pub fn builder() -> crate::types::builders::UlimitBuilder {
        crate::types::builders::UlimitBuilder::default()
    }
}

/// A builder for [`Ulimit`](crate::types::Ulimit).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UlimitBuilder {
    pub(crate) hard_limit: ::std::option::Option<i32>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) soft_limit: ::std::option::Option<i32>,
}
impl UlimitBuilder {
    /// <p>The hard limit for the <code>ulimit</code> type.</p>
    /// This field is required.
    pub fn hard_limit(mut self, input: i32) -> Self {
        self.hard_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The hard limit for the <code>ulimit</code> type.</p>
    pub fn set_hard_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.hard_limit = input;
        self
    }
    /// <p>The hard limit for the <code>ulimit</code> type.</p>
    pub fn get_hard_limit(&self) -> &::std::option::Option<i32> {
        &self.hard_limit
    }
    /// <p>The <code>type</code> of the <code>ulimit</code>. Valid values are: <code>core</code> | <code>cpu</code> | <code>data</code> | <code>fsize</code> | <code>locks</code> | <code>memlock</code> | <code>msgqueue</code> | <code>nice</code> | <code>nofile</code> | <code>nproc</code> | <code>rss</code> | <code>rtprio</code> | <code>rttime</code> | <code>sigpending</code> | <code>stack</code>.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>type</code> of the <code>ulimit</code>. Valid values are: <code>core</code> | <code>cpu</code> | <code>data</code> | <code>fsize</code> | <code>locks</code> | <code>memlock</code> | <code>msgqueue</code> | <code>nice</code> | <code>nofile</code> | <code>nproc</code> | <code>rss</code> | <code>rtprio</code> | <code>rttime</code> | <code>sigpending</code> | <code>stack</code>.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The <code>type</code> of the <code>ulimit</code>. Valid values are: <code>core</code> | <code>cpu</code> | <code>data</code> | <code>fsize</code> | <code>locks</code> | <code>memlock</code> | <code>msgqueue</code> | <code>nice</code> | <code>nofile</code> | <code>nproc</code> | <code>rss</code> | <code>rtprio</code> | <code>rttime</code> | <code>sigpending</code> | <code>stack</code>.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The soft limit for the <code>ulimit</code> type.</p>
    /// This field is required.
    pub fn soft_limit(mut self, input: i32) -> Self {
        self.soft_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The soft limit for the <code>ulimit</code> type.</p>
    pub fn set_soft_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.soft_limit = input;
        self
    }
    /// <p>The soft limit for the <code>ulimit</code> type.</p>
    pub fn get_soft_limit(&self) -> &::std::option::Option<i32> {
        &self.soft_limit
    }
    /// Consumes the builder and constructs a [`Ulimit`](crate::types::Ulimit).
    pub fn build(self) -> crate::types::Ulimit {
        crate::types::Ulimit {
            hard_limit: self.hard_limit,
            name: self.name,
            soft_limit: self.soft_limit,
        }
    }
}