aws-sdk-batch 1.123.0

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

/// <p>Determine whether your data volume persists on the host container instance and where it's stored. If this parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Host {
    /// <p>The path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.</p><note>
    /// <p>This parameter isn't applicable to jobs that run on Fargate resources. Don't provide this for these jobs.</p>
    /// </note>
    pub source_path: ::std::option::Option<::std::string::String>,
}
impl Host {
    /// <p>The path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.</p><note>
    /// <p>This parameter isn't applicable to jobs that run on Fargate resources. Don't provide this for these jobs.</p>
    /// </note>
    pub fn source_path(&self) -> ::std::option::Option<&str> {
        self.source_path.as_deref()
    }
}
impl Host {
    /// Creates a new builder-style object to manufacture [`Host`](crate::types::Host).
    pub fn builder() -> crate::types::builders::HostBuilder {
        crate::types::builders::HostBuilder::default()
    }
}

/// A builder for [`Host`](crate::types::Host).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct HostBuilder {
    pub(crate) source_path: ::std::option::Option<::std::string::String>,
}
impl HostBuilder {
    /// <p>The path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.</p><note>
    /// <p>This parameter isn't applicable to jobs that run on Fargate resources. Don't provide this for these jobs.</p>
    /// </note>
    pub fn source_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.</p><note>
    /// <p>This parameter isn't applicable to jobs that run on Fargate resources. Don't provide this for these jobs.</p>
    /// </note>
    pub fn set_source_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_path = input;
        self
    }
    /// <p>The path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.</p><note>
    /// <p>This parameter isn't applicable to jobs that run on Fargate resources. Don't provide this for these jobs.</p>
    /// </note>
    pub fn get_source_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_path
    }
    /// Consumes the builder and constructs a [`Host`](crate::types::Host).
    pub fn build(self) -> crate::types::Host {
        crate::types::Host {
            source_path: self.source_path,
        }
    }
}