aws_sdk_s3outposts/operation/create_endpoint/_create_endpoint_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateEndpointInput {
6 /// <p>The ID of the Outposts.</p>
7 pub outpost_id: ::std::option::Option<::std::string::String>,
8 /// <p>The ID of the subnet in the selected VPC. The endpoint subnet must belong to the Outpost that has Amazon S3 on Outposts provisioned.</p>
9 pub subnet_id: ::std::option::Option<::std::string::String>,
10 /// <p>The ID of the security group to use with the endpoint.</p>
11 pub security_group_id: ::std::option::Option<::std::string::String>,
12 /// <p>The type of access for the network connectivity for the Amazon S3 on Outposts endpoint. To use the Amazon Web Services VPC, choose <code>Private</code>. To use the endpoint with an on-premises network, choose <code>CustomerOwnedIp</code>. If you choose <code>CustomerOwnedIp</code>, you must also provide the customer-owned IP address pool (CoIP pool).</p><note>
13 /// <p><code>Private</code> is the default access type value.</p>
14 /// </note>
15 pub access_type: ::std::option::Option<crate::types::EndpointAccessType>,
16 /// <p>The ID of the customer-owned IPv4 address pool (CoIP pool) for the endpoint. IP addresses are allocated from this pool for the endpoint.</p>
17 pub customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
18}
19impl CreateEndpointInput {
20 /// <p>The ID of the Outposts.</p>
21 pub fn outpost_id(&self) -> ::std::option::Option<&str> {
22 self.outpost_id.as_deref()
23 }
24 /// <p>The ID of the subnet in the selected VPC. The endpoint subnet must belong to the Outpost that has Amazon S3 on Outposts provisioned.</p>
25 pub fn subnet_id(&self) -> ::std::option::Option<&str> {
26 self.subnet_id.as_deref()
27 }
28 /// <p>The ID of the security group to use with the endpoint.</p>
29 pub fn security_group_id(&self) -> ::std::option::Option<&str> {
30 self.security_group_id.as_deref()
31 }
32 /// <p>The type of access for the network connectivity for the Amazon S3 on Outposts endpoint. To use the Amazon Web Services VPC, choose <code>Private</code>. To use the endpoint with an on-premises network, choose <code>CustomerOwnedIp</code>. If you choose <code>CustomerOwnedIp</code>, you must also provide the customer-owned IP address pool (CoIP pool).</p><note>
33 /// <p><code>Private</code> is the default access type value.</p>
34 /// </note>
35 pub fn access_type(&self) -> ::std::option::Option<&crate::types::EndpointAccessType> {
36 self.access_type.as_ref()
37 }
38 /// <p>The ID of the customer-owned IPv4 address pool (CoIP pool) for the endpoint. IP addresses are allocated from this pool for the endpoint.</p>
39 pub fn customer_owned_ipv4_pool(&self) -> ::std::option::Option<&str> {
40 self.customer_owned_ipv4_pool.as_deref()
41 }
42}
43impl CreateEndpointInput {
44 /// Creates a new builder-style object to manufacture [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
45 pub fn builder() -> crate::operation::create_endpoint::builders::CreateEndpointInputBuilder {
46 crate::operation::create_endpoint::builders::CreateEndpointInputBuilder::default()
47 }
48}
49
50/// A builder for [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct CreateEndpointInputBuilder {
54 pub(crate) outpost_id: ::std::option::Option<::std::string::String>,
55 pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
56 pub(crate) security_group_id: ::std::option::Option<::std::string::String>,
57 pub(crate) access_type: ::std::option::Option<crate::types::EndpointAccessType>,
58 pub(crate) customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
59}
60impl CreateEndpointInputBuilder {
61 /// <p>The ID of the Outposts.</p>
62 /// This field is required.
63 pub fn outpost_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.outpost_id = ::std::option::Option::Some(input.into());
65 self
66 }
67 /// <p>The ID of the Outposts.</p>
68 pub fn set_outpost_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.outpost_id = input;
70 self
71 }
72 /// <p>The ID of the Outposts.</p>
73 pub fn get_outpost_id(&self) -> &::std::option::Option<::std::string::String> {
74 &self.outpost_id
75 }
76 /// <p>The ID of the subnet in the selected VPC. The endpoint subnet must belong to the Outpost that has Amazon S3 on Outposts provisioned.</p>
77 /// This field is required.
78 pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.subnet_id = ::std::option::Option::Some(input.into());
80 self
81 }
82 /// <p>The ID of the subnet in the selected VPC. The endpoint subnet must belong to the Outpost that has Amazon S3 on Outposts provisioned.</p>
83 pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.subnet_id = input;
85 self
86 }
87 /// <p>The ID of the subnet in the selected VPC. The endpoint subnet must belong to the Outpost that has Amazon S3 on Outposts provisioned.</p>
88 pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
89 &self.subnet_id
90 }
91 /// <p>The ID of the security group to use with the endpoint.</p>
92 /// This field is required.
93 pub fn security_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.security_group_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 /// <p>The ID of the security group to use with the endpoint.</p>
98 pub fn set_security_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.security_group_id = input;
100 self
101 }
102 /// <p>The ID of the security group to use with the endpoint.</p>
103 pub fn get_security_group_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.security_group_id
105 }
106 /// <p>The type of access for the network connectivity for the Amazon S3 on Outposts endpoint. To use the Amazon Web Services VPC, choose <code>Private</code>. To use the endpoint with an on-premises network, choose <code>CustomerOwnedIp</code>. If you choose <code>CustomerOwnedIp</code>, you must also provide the customer-owned IP address pool (CoIP pool).</p><note>
107 /// <p><code>Private</code> is the default access type value.</p>
108 /// </note>
109 pub fn access_type(mut self, input: crate::types::EndpointAccessType) -> Self {
110 self.access_type = ::std::option::Option::Some(input);
111 self
112 }
113 /// <p>The type of access for the network connectivity for the Amazon S3 on Outposts endpoint. To use the Amazon Web Services VPC, choose <code>Private</code>. To use the endpoint with an on-premises network, choose <code>CustomerOwnedIp</code>. If you choose <code>CustomerOwnedIp</code>, you must also provide the customer-owned IP address pool (CoIP pool).</p><note>
114 /// <p><code>Private</code> is the default access type value.</p>
115 /// </note>
116 pub fn set_access_type(mut self, input: ::std::option::Option<crate::types::EndpointAccessType>) -> Self {
117 self.access_type = input;
118 self
119 }
120 /// <p>The type of access for the network connectivity for the Amazon S3 on Outposts endpoint. To use the Amazon Web Services VPC, choose <code>Private</code>. To use the endpoint with an on-premises network, choose <code>CustomerOwnedIp</code>. If you choose <code>CustomerOwnedIp</code>, you must also provide the customer-owned IP address pool (CoIP pool).</p><note>
121 /// <p><code>Private</code> is the default access type value.</p>
122 /// </note>
123 pub fn get_access_type(&self) -> &::std::option::Option<crate::types::EndpointAccessType> {
124 &self.access_type
125 }
126 /// <p>The ID of the customer-owned IPv4 address pool (CoIP pool) for the endpoint. IP addresses are allocated from this pool for the endpoint.</p>
127 pub fn customer_owned_ipv4_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.customer_owned_ipv4_pool = ::std::option::Option::Some(input.into());
129 self
130 }
131 /// <p>The ID of the customer-owned IPv4 address pool (CoIP pool) for the endpoint. IP addresses are allocated from this pool for the endpoint.</p>
132 pub fn set_customer_owned_ipv4_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.customer_owned_ipv4_pool = input;
134 self
135 }
136 /// <p>The ID of the customer-owned IPv4 address pool (CoIP pool) for the endpoint. IP addresses are allocated from this pool for the endpoint.</p>
137 pub fn get_customer_owned_ipv4_pool(&self) -> &::std::option::Option<::std::string::String> {
138 &self.customer_owned_ipv4_pool
139 }
140 /// Consumes the builder and constructs a [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
141 pub fn build(
142 self,
143 ) -> ::std::result::Result<crate::operation::create_endpoint::CreateEndpointInput, ::aws_smithy_types::error::operation::BuildError> {
144 ::std::result::Result::Ok(crate::operation::create_endpoint::CreateEndpointInput {
145 outpost_id: self.outpost_id,
146 subnet_id: self.subnet_id,
147 security_group_id: self.security_group_id,
148 access_type: self.access_type,
149 customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
150 })
151 }
152}