aws_sdk_batch/types/
_ephemeral_storage.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EphemeralStorage {
7    /// <p>The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is <code>21</code> GiB and the maximum supported value is <code>200</code> GiB.</p>
8    pub size_in_gib: ::std::option::Option<i32>,
9}
10impl EphemeralStorage {
11    /// <p>The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is <code>21</code> GiB and the maximum supported value is <code>200</code> GiB.</p>
12    pub fn size_in_gib(&self) -> ::std::option::Option<i32> {
13        self.size_in_gib
14    }
15}
16impl EphemeralStorage {
17    /// Creates a new builder-style object to manufacture [`EphemeralStorage`](crate::types::EphemeralStorage).
18    pub fn builder() -> crate::types::builders::EphemeralStorageBuilder {
19        crate::types::builders::EphemeralStorageBuilder::default()
20    }
21}
22
23/// A builder for [`EphemeralStorage`](crate::types::EphemeralStorage).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct EphemeralStorageBuilder {
27    pub(crate) size_in_gib: ::std::option::Option<i32>,
28}
29impl EphemeralStorageBuilder {
30    /// <p>The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is <code>21</code> GiB and the maximum supported value is <code>200</code> GiB.</p>
31    /// This field is required.
32    pub fn size_in_gib(mut self, input: i32) -> Self {
33        self.size_in_gib = ::std::option::Option::Some(input);
34        self
35    }
36    /// <p>The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is <code>21</code> GiB and the maximum supported value is <code>200</code> GiB.</p>
37    pub fn set_size_in_gib(mut self, input: ::std::option::Option<i32>) -> Self {
38        self.size_in_gib = input;
39        self
40    }
41    /// <p>The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is <code>21</code> GiB and the maximum supported value is <code>200</code> GiB.</p>
42    pub fn get_size_in_gib(&self) -> &::std::option::Option<i32> {
43        &self.size_in_gib
44    }
45    /// Consumes the builder and constructs a [`EphemeralStorage`](crate::types::EphemeralStorage).
46    pub fn build(self) -> crate::types::EphemeralStorage {
47        crate::types::EphemeralStorage {
48            size_in_gib: self.size_in_gib,
49        }
50    }
51}