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
118
119
120
121
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p></p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateMountTargetInput {
/// <p>The ID of the file system for which to create the mount target.</p>
#[doc(hidden)]
pub file_system_id: std::option::Option<std::string::String>,
/// <p>The ID of the subnet to add the mount target in. For file systems that use One Zone storage classes, use the subnet that is associated with the file system's Availability Zone.</p>
#[doc(hidden)]
pub subnet_id: std::option::Option<std::string::String>,
/// <p>Valid IPv4 address within the address range of the specified subnet.</p>
#[doc(hidden)]
pub ip_address: std::option::Option<std::string::String>,
/// <p>Up to five VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as subnet specified.</p>
#[doc(hidden)]
pub security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CreateMountTargetInput {
/// <p>The ID of the file system for which to create the mount target.</p>
pub fn file_system_id(&self) -> std::option::Option<&str> {
self.file_system_id.as_deref()
}
/// <p>The ID of the subnet to add the mount target in. For file systems that use One Zone storage classes, use the subnet that is associated with the file system's Availability Zone.</p>
pub fn subnet_id(&self) -> std::option::Option<&str> {
self.subnet_id.as_deref()
}
/// <p>Valid IPv4 address within the address range of the specified subnet.</p>
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>Up to five VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as subnet specified.</p>
pub fn security_groups(&self) -> std::option::Option<&[std::string::String]> {
self.security_groups.as_deref()
}
}
impl CreateMountTargetInput {
/// Creates a new builder-style object to manufacture [`CreateMountTargetInput`](crate::operation::create_mount_target::CreateMountTargetInput).
pub fn builder(
) -> crate::operation::create_mount_target::builders::CreateMountTargetInputBuilder {
crate::operation::create_mount_target::builders::CreateMountTargetInputBuilder::default()
}
}
/// A builder for [`CreateMountTargetInput`](crate::operation::create_mount_target::CreateMountTargetInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateMountTargetInputBuilder {
pub(crate) file_system_id: std::option::Option<std::string::String>,
pub(crate) subnet_id: std::option::Option<std::string::String>,
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) security_groups: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CreateMountTargetInputBuilder {
/// <p>The ID of the file system for which to create the mount target.</p>
pub fn file_system_id(mut self, input: impl Into<std::string::String>) -> Self {
self.file_system_id = Some(input.into());
self
}
/// <p>The ID of the file system for which to create the mount target.</p>
pub fn set_file_system_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.file_system_id = input;
self
}
/// <p>The ID of the subnet to add the mount target in. For file systems that use One Zone storage classes, use the subnet that is associated with the file system's Availability Zone.</p>
pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.subnet_id = Some(input.into());
self
}
/// <p>The ID of the subnet to add the mount target in. For file systems that use One Zone storage classes, use the subnet that is associated with the file system's Availability Zone.</p>
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subnet_id = input;
self
}
/// <p>Valid IPv4 address within the address range of the specified subnet.</p>
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
/// <p>Valid IPv4 address within the address range of the specified subnet.</p>
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
/// Appends an item to `security_groups`.
///
/// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
///
/// <p>Up to five VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as subnet specified.</p>
pub fn security_groups(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.security_groups.unwrap_or_default();
v.push(input.into());
self.security_groups = Some(v);
self
}
/// <p>Up to five VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as subnet specified.</p>
pub fn set_security_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.security_groups = input;
self
}
/// Consumes the builder and constructs a [`CreateMountTargetInput`](crate::operation::create_mount_target::CreateMountTargetInput).
pub fn build(
self,
) -> Result<
crate::operation::create_mount_target::CreateMountTargetInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::create_mount_target::CreateMountTargetInput {
file_system_id: self.file_system_id,
subnet_id: self.subnet_id,
ip_address: self.ip_address,
security_groups: self.security_groups,
},
)
}
}