1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The container path, mount options, and size of the tmpfs mount.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Tmpfs {
/// <p>The absolute file path where the tmpfs volume is to be mounted.</p>
pub container_path: ::std::string::String,
/// <p>The maximum size (in MiB) of the tmpfs volume.</p>
pub size: i32,
/// <p>The list of tmpfs volume mount options.</p>
/// <p>Valid values: <code>"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol"</code></p>
pub mount_options: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Tmpfs {
/// <p>The absolute file path where the tmpfs volume is to be mounted.</p>
pub fn container_path(&self) -> &str {
use std::ops::Deref;
self.container_path.deref()
}
/// <p>The maximum size (in MiB) of the tmpfs volume.</p>
pub fn size(&self) -> i32 {
self.size
}
/// <p>The list of tmpfs volume mount options.</p>
/// <p>Valid values: <code>"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "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 where the tmpfs volume is to be 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 where the tmpfs volume is to be 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 where the tmpfs volume is to be mounted.</p>
pub fn get_container_path(&self) -> &::std::option::Option<::std::string::String> {
&self.container_path
}
/// <p>The maximum size (in MiB) of the tmpfs volume.</p>
/// This field is required.
pub fn size(mut self, input: i32) -> Self {
self.size = ::std::option::Option::Some(input);
self
}
/// <p>The maximum size (in MiB) of the tmpfs volume.</p>
pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
self.size = input;
self
}
/// <p>The maximum size (in MiB) of the tmpfs 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 tmpfs volume mount options.</p>
/// <p>Valid values: <code>"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "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 tmpfs volume mount options.</p>
/// <p>Valid values: <code>"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "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 tmpfs volume mount options.</p>
/// <p>Valid values: <code>"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "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).
/// This method will fail if any of the following fields are not set:
/// - [`container_path`](crate::types::builders::TmpfsBuilder::container_path)
pub fn build(self) -> ::std::result::Result<crate::types::Tmpfs, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Tmpfs {
container_path: self.container_path.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"container_path",
"container_path was not specified but it is required when building Tmpfs",
)
})?,
size: self.size.unwrap_or_default(),
mount_options: self.mount_options,
})
}
}