aws_sdk_ec2/types/
_verified_access_endpoint_load_balancer_options.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct VerifiedAccessEndpointLoadBalancerOptions {
7 pub protocol: ::std::option::Option<crate::types::VerifiedAccessEndpointProtocol>,
9 pub port: ::std::option::Option<i32>,
11 pub load_balancer_arn: ::std::option::Option<::std::string::String>,
13 pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
15 pub port_ranges: ::std::option::Option<::std::vec::Vec<crate::types::VerifiedAccessEndpointPortRange>>,
17}
18impl VerifiedAccessEndpointLoadBalancerOptions {
19 pub fn protocol(&self) -> ::std::option::Option<&crate::types::VerifiedAccessEndpointProtocol> {
21 self.protocol.as_ref()
22 }
23 pub fn port(&self) -> ::std::option::Option<i32> {
25 self.port
26 }
27 pub fn load_balancer_arn(&self) -> ::std::option::Option<&str> {
29 self.load_balancer_arn.as_deref()
30 }
31 pub fn subnet_ids(&self) -> &[::std::string::String] {
35 self.subnet_ids.as_deref().unwrap_or_default()
36 }
37 pub fn port_ranges(&self) -> &[crate::types::VerifiedAccessEndpointPortRange] {
41 self.port_ranges.as_deref().unwrap_or_default()
42 }
43}
44impl VerifiedAccessEndpointLoadBalancerOptions {
45 pub fn builder() -> crate::types::builders::VerifiedAccessEndpointLoadBalancerOptionsBuilder {
47 crate::types::builders::VerifiedAccessEndpointLoadBalancerOptionsBuilder::default()
48 }
49}
50
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
53#[non_exhaustive]
54pub struct VerifiedAccessEndpointLoadBalancerOptionsBuilder {
55 pub(crate) protocol: ::std::option::Option<crate::types::VerifiedAccessEndpointProtocol>,
56 pub(crate) port: ::std::option::Option<i32>,
57 pub(crate) load_balancer_arn: ::std::option::Option<::std::string::String>,
58 pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
59 pub(crate) port_ranges: ::std::option::Option<::std::vec::Vec<crate::types::VerifiedAccessEndpointPortRange>>,
60}
61impl VerifiedAccessEndpointLoadBalancerOptionsBuilder {
62 pub fn protocol(mut self, input: crate::types::VerifiedAccessEndpointProtocol) -> Self {
64 self.protocol = ::std::option::Option::Some(input);
65 self
66 }
67 pub fn set_protocol(mut self, input: ::std::option::Option<crate::types::VerifiedAccessEndpointProtocol>) -> Self {
69 self.protocol = input;
70 self
71 }
72 pub fn get_protocol(&self) -> &::std::option::Option<crate::types::VerifiedAccessEndpointProtocol> {
74 &self.protocol
75 }
76 pub fn port(mut self, input: i32) -> Self {
78 self.port = ::std::option::Option::Some(input);
79 self
80 }
81 pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
83 self.port = input;
84 self
85 }
86 pub fn get_port(&self) -> &::std::option::Option<i32> {
88 &self.port
89 }
90 pub fn load_balancer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.load_balancer_arn = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_load_balancer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.load_balancer_arn = input;
98 self
99 }
100 pub fn get_load_balancer_arn(&self) -> &::std::option::Option<::std::string::String> {
102 &self.load_balancer_arn
103 }
104 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 let mut v = self.subnet_ids.unwrap_or_default();
111 v.push(input.into());
112 self.subnet_ids = ::std::option::Option::Some(v);
113 self
114 }
115 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
117 self.subnet_ids = input;
118 self
119 }
120 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
122 &self.subnet_ids
123 }
124 pub fn port_ranges(mut self, input: crate::types::VerifiedAccessEndpointPortRange) -> Self {
130 let mut v = self.port_ranges.unwrap_or_default();
131 v.push(input);
132 self.port_ranges = ::std::option::Option::Some(v);
133 self
134 }
135 pub fn set_port_ranges(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VerifiedAccessEndpointPortRange>>) -> Self {
137 self.port_ranges = input;
138 self
139 }
140 pub fn get_port_ranges(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VerifiedAccessEndpointPortRange>> {
142 &self.port_ranges
143 }
144 pub fn build(self) -> crate::types::VerifiedAccessEndpointLoadBalancerOptions {
146 crate::types::VerifiedAccessEndpointLoadBalancerOptions {
147 protocol: self.protocol,
148 port: self.port,
149 load_balancer_arn: self.load_balancer_arn,
150 subnet_ids: self.subnet_ids,
151 port_ranges: self.port_ranges,
152 }
153 }
154}