aws-sdk-batch 1.114.0

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

/// <p>The container path, mount options, and size of the <code>tmpfs</code> mount.</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 Tmpfs {
    /// <p>The absolute file path in the container where the <code>tmpfs</code> volume is mounted.</p>
    pub container_path: ::std::option::Option<::std::string::String>,
    /// <p>The size (in MiB) of the <code>tmpfs</code> volume.</p>
    pub size: ::std::option::Option<i32>,
    /// <p>The list of <code>tmpfs</code> volume mount options.</p>
    /// <p>Valid values: "<code>defaults</code>" | "<code>ro</code>" | "<code>rw</code>" | "<code>suid</code>" | "<code>nosuid</code>" | "<code>dev</code>" | "<code>nodev</code>" | "<code>exec</code>" | "<code>noexec</code>" | "<code>sync</code>" | "<code>async</code>" | "<code>dirsync</code>" | "<code>remount</code>" | "<code>mand</code>" | "<code>nomand</code>" | "<code>atime</code>" | "<code>noatime</code>" | "<code>diratime</code>" | "<code>nodiratime</code>" | "<code>bind</code>" | "<code>rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime</code>" | "<code>norelatime</code>" | "<code>strictatime</code>" | "<code>nostrictatime</code>" | "<code>mode</code>" | "<code>uid</code>" | "<code>gid</code>" | "<code>nr_inodes</code>" | "<code>nr_blocks</code>" | "<code>mpol</code>"</p>
    pub mount_options: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Tmpfs {
    /// <p>The absolute file path in the container where the <code>tmpfs</code> volume is mounted.</p>
    pub fn container_path(&self) -> ::std::option::Option<&str> {
        self.container_path.as_deref()
    }
    /// <p>The size (in MiB) of the <code>tmpfs</code> volume.</p>
    pub fn size(&self) -> ::std::option::Option<i32> {
        self.size
    }
    /// <p>The list of <code>tmpfs</code> volume mount options.</p>
    /// <p>Valid values: "<code>defaults</code>" | "<code>ro</code>" | "<code>rw</code>" | "<code>suid</code>" | "<code>nosuid</code>" | "<code>dev</code>" | "<code>nodev</code>" | "<code>exec</code>" | "<code>noexec</code>" | "<code>sync</code>" | "<code>async</code>" | "<code>dirsync</code>" | "<code>remount</code>" | "<code>mand</code>" | "<code>nomand</code>" | "<code>atime</code>" | "<code>noatime</code>" | "<code>diratime</code>" | "<code>nodiratime</code>" | "<code>bind</code>" | "<code>rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime</code>" | "<code>norelatime</code>" | "<code>strictatime</code>" | "<code>nostrictatime</code>" | "<code>mode</code>" | "<code>uid</code>" | "<code>gid</code>" | "<code>nr_inodes</code>" | "<code>nr_blocks</code>" | "<code>mpol</code>"</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 `.mount_options.is_none()`.
    pub fn mount_options(&self) -> &[::std::string::String] {
        self.mount_options.as_deref().unwrap_or_default()
    }
}
impl Tmpfs {
    /// Creates a new builder-style object to manufacture [`Tmpfs`](crate::types::Tmpfs).
    pub fn builder() -> crate::types::builders::TmpfsBuilder {
        crate::types::builders::TmpfsBuilder::default()
    }
}

/// A builder for [`Tmpfs`](crate::types::Tmpfs).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TmpfsBuilder {
    pub(crate) container_path: ::std::option::Option<::std::string::String>,
    pub(crate) size: ::std::option::Option<i32>,
    pub(crate) mount_options: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl TmpfsBuilder {
    /// <p>The absolute file path in the container where the <code>tmpfs</code> volume is mounted.</p>
    /// This field is required.
    pub fn container_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.container_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The absolute file path in the container where the <code>tmpfs</code> volume is mounted.</p>
    pub fn set_container_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.container_path = input;
        self
    }
    /// <p>The absolute file path in the container where the <code>tmpfs</code> volume is mounted.</p>
    pub fn get_container_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.container_path
    }
    /// <p>The size (in MiB) of the <code>tmpfs</code> volume.</p>
    /// This field is required.
    pub fn size(mut self, input: i32) -> Self {
        self.size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size (in MiB) of the <code>tmpfs</code> volume.</p>
    pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.size = input;
        self
    }
    /// <p>The size (in MiB) of the <code>tmpfs</code> volume.</p>
    pub fn get_size(&self) -> &::std::option::Option<i32> {
        &self.size
    }
    /// Appends an item to `mount_options`.
    ///
    /// To override the contents of this collection use [`set_mount_options`](Self::set_mount_options).
    ///
    /// <p>The list of <code>tmpfs</code> volume mount options.</p>
    /// <p>Valid values: "<code>defaults</code>" | "<code>ro</code>" | "<code>rw</code>" | "<code>suid</code>" | "<code>nosuid</code>" | "<code>dev</code>" | "<code>nodev</code>" | "<code>exec</code>" | "<code>noexec</code>" | "<code>sync</code>" | "<code>async</code>" | "<code>dirsync</code>" | "<code>remount</code>" | "<code>mand</code>" | "<code>nomand</code>" | "<code>atime</code>" | "<code>noatime</code>" | "<code>diratime</code>" | "<code>nodiratime</code>" | "<code>bind</code>" | "<code>rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime</code>" | "<code>norelatime</code>" | "<code>strictatime</code>" | "<code>nostrictatime</code>" | "<code>mode</code>" | "<code>uid</code>" | "<code>gid</code>" | "<code>nr_inodes</code>" | "<code>nr_blocks</code>" | "<code>mpol</code>"</p>
    pub fn mount_options(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.mount_options.unwrap_or_default();
        v.push(input.into());
        self.mount_options = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of <code>tmpfs</code> volume mount options.</p>
    /// <p>Valid values: "<code>defaults</code>" | "<code>ro</code>" | "<code>rw</code>" | "<code>suid</code>" | "<code>nosuid</code>" | "<code>dev</code>" | "<code>nodev</code>" | "<code>exec</code>" | "<code>noexec</code>" | "<code>sync</code>" | "<code>async</code>" | "<code>dirsync</code>" | "<code>remount</code>" | "<code>mand</code>" | "<code>nomand</code>" | "<code>atime</code>" | "<code>noatime</code>" | "<code>diratime</code>" | "<code>nodiratime</code>" | "<code>bind</code>" | "<code>rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime</code>" | "<code>norelatime</code>" | "<code>strictatime</code>" | "<code>nostrictatime</code>" | "<code>mode</code>" | "<code>uid</code>" | "<code>gid</code>" | "<code>nr_inodes</code>" | "<code>nr_blocks</code>" | "<code>mpol</code>"</p>
    pub fn set_mount_options(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.mount_options = input;
        self
    }
    /// <p>The list of <code>tmpfs</code> volume mount options.</p>
    /// <p>Valid values: "<code>defaults</code>" | "<code>ro</code>" | "<code>rw</code>" | "<code>suid</code>" | "<code>nosuid</code>" | "<code>dev</code>" | "<code>nodev</code>" | "<code>exec</code>" | "<code>noexec</code>" | "<code>sync</code>" | "<code>async</code>" | "<code>dirsync</code>" | "<code>remount</code>" | "<code>mand</code>" | "<code>nomand</code>" | "<code>atime</code>" | "<code>noatime</code>" | "<code>diratime</code>" | "<code>nodiratime</code>" | "<code>bind</code>" | "<code>rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime</code>" | "<code>norelatime</code>" | "<code>strictatime</code>" | "<code>nostrictatime</code>" | "<code>mode</code>" | "<code>uid</code>" | "<code>gid</code>" | "<code>nr_inodes</code>" | "<code>nr_blocks</code>" | "<code>mpol</code>"</p>
    pub fn get_mount_options(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.mount_options
    }
    /// Consumes the builder and constructs a [`Tmpfs`](crate::types::Tmpfs).
    pub fn build(self) -> crate::types::Tmpfs {
        crate::types::Tmpfs {
            container_path: self.container_path,
            size: self.size,
            mount_options: self.mount_options,
        }
    }
}