aws_sdk_redshift/operation/modify_endpoint_access/
_modify_endpoint_access_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes a Redshift-managed VPC endpoint.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ModifyEndpointAccessOutput {
7    /// <p>The cluster identifier of the cluster associated with the endpoint.</p>
8    pub cluster_identifier: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Web Services account ID of the owner of the cluster.</p>
10    pub resource_owner: ::std::option::Option<::std::string::String>,
11    /// <p>The subnet group name where Amazon Redshift chooses to deploy the endpoint.</p>
12    pub subnet_group_name: ::std::option::Option<::std::string::String>,
13    /// <p>The status of the endpoint.</p>
14    pub endpoint_status: ::std::option::Option<::std::string::String>,
15    /// <p>The name of the endpoint.</p>
16    pub endpoint_name: ::std::option::Option<::std::string::String>,
17    /// <p>The time (UTC) that the endpoint was created.</p>
18    pub endpoint_create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19    /// <p>The port number on which the cluster accepts incoming connections.</p>
20    pub port: ::std::option::Option<i32>,
21    /// <p>The DNS address of the endpoint.</p>
22    pub address: ::std::option::Option<::std::string::String>,
23    /// <p>The security groups associated with the endpoint.</p>
24    pub vpc_security_groups: ::std::option::Option<::std::vec::Vec<crate::types::VpcSecurityGroupMembership>>,
25    /// <p>The connection endpoint for connecting to an Amazon Redshift cluster through the proxy.</p>
26    pub vpc_endpoint: ::std::option::Option<crate::types::VpcEndpoint>,
27    _request_id: Option<String>,
28}
29impl ModifyEndpointAccessOutput {
30    /// <p>The cluster identifier of the cluster associated with the endpoint.</p>
31    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
32        self.cluster_identifier.as_deref()
33    }
34    /// <p>The Amazon Web Services account ID of the owner of the cluster.</p>
35    pub fn resource_owner(&self) -> ::std::option::Option<&str> {
36        self.resource_owner.as_deref()
37    }
38    /// <p>The subnet group name where Amazon Redshift chooses to deploy the endpoint.</p>
39    pub fn subnet_group_name(&self) -> ::std::option::Option<&str> {
40        self.subnet_group_name.as_deref()
41    }
42    /// <p>The status of the endpoint.</p>
43    pub fn endpoint_status(&self) -> ::std::option::Option<&str> {
44        self.endpoint_status.as_deref()
45    }
46    /// <p>The name of the endpoint.</p>
47    pub fn endpoint_name(&self) -> ::std::option::Option<&str> {
48        self.endpoint_name.as_deref()
49    }
50    /// <p>The time (UTC) that the endpoint was created.</p>
51    pub fn endpoint_create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
52        self.endpoint_create_time.as_ref()
53    }
54    /// <p>The port number on which the cluster accepts incoming connections.</p>
55    pub fn port(&self) -> ::std::option::Option<i32> {
56        self.port
57    }
58    /// <p>The DNS address of the endpoint.</p>
59    pub fn address(&self) -> ::std::option::Option<&str> {
60        self.address.as_deref()
61    }
62    /// <p>The security groups associated with the endpoint.</p>
63    ///
64    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_security_groups.is_none()`.
65    pub fn vpc_security_groups(&self) -> &[crate::types::VpcSecurityGroupMembership] {
66        self.vpc_security_groups.as_deref().unwrap_or_default()
67    }
68    /// <p>The connection endpoint for connecting to an Amazon Redshift cluster through the proxy.</p>
69    pub fn vpc_endpoint(&self) -> ::std::option::Option<&crate::types::VpcEndpoint> {
70        self.vpc_endpoint.as_ref()
71    }
72}
73impl ::aws_types::request_id::RequestId for ModifyEndpointAccessOutput {
74    fn request_id(&self) -> Option<&str> {
75        self._request_id.as_deref()
76    }
77}
78impl ModifyEndpointAccessOutput {
79    /// Creates a new builder-style object to manufacture [`ModifyEndpointAccessOutput`](crate::operation::modify_endpoint_access::ModifyEndpointAccessOutput).
80    pub fn builder() -> crate::operation::modify_endpoint_access::builders::ModifyEndpointAccessOutputBuilder {
81        crate::operation::modify_endpoint_access::builders::ModifyEndpointAccessOutputBuilder::default()
82    }
83}
84
85/// A builder for [`ModifyEndpointAccessOutput`](crate::operation::modify_endpoint_access::ModifyEndpointAccessOutput).
86#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
87#[non_exhaustive]
88pub struct ModifyEndpointAccessOutputBuilder {
89    pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
90    pub(crate) resource_owner: ::std::option::Option<::std::string::String>,
91    pub(crate) subnet_group_name: ::std::option::Option<::std::string::String>,
92    pub(crate) endpoint_status: ::std::option::Option<::std::string::String>,
93    pub(crate) endpoint_name: ::std::option::Option<::std::string::String>,
94    pub(crate) endpoint_create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
95    pub(crate) port: ::std::option::Option<i32>,
96    pub(crate) address: ::std::option::Option<::std::string::String>,
97    pub(crate) vpc_security_groups: ::std::option::Option<::std::vec::Vec<crate::types::VpcSecurityGroupMembership>>,
98    pub(crate) vpc_endpoint: ::std::option::Option<crate::types::VpcEndpoint>,
99    _request_id: Option<String>,
100}
101impl ModifyEndpointAccessOutputBuilder {
102    /// <p>The cluster identifier of the cluster associated with the endpoint.</p>
103    pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.cluster_identifier = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The cluster identifier of the cluster associated with the endpoint.</p>
108    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.cluster_identifier = input;
110        self
111    }
112    /// <p>The cluster identifier of the cluster associated with the endpoint.</p>
113    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
114        &self.cluster_identifier
115    }
116    /// <p>The Amazon Web Services account ID of the owner of the cluster.</p>
117    pub fn resource_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.resource_owner = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The Amazon Web Services account ID of the owner of the cluster.</p>
122    pub fn set_resource_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.resource_owner = input;
124        self
125    }
126    /// <p>The Amazon Web Services account ID of the owner of the cluster.</p>
127    pub fn get_resource_owner(&self) -> &::std::option::Option<::std::string::String> {
128        &self.resource_owner
129    }
130    /// <p>The subnet group name where Amazon Redshift chooses to deploy the endpoint.</p>
131    pub fn subnet_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.subnet_group_name = ::std::option::Option::Some(input.into());
133        self
134    }
135    /// <p>The subnet group name where Amazon Redshift chooses to deploy the endpoint.</p>
136    pub fn set_subnet_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.subnet_group_name = input;
138        self
139    }
140    /// <p>The subnet group name where Amazon Redshift chooses to deploy the endpoint.</p>
141    pub fn get_subnet_group_name(&self) -> &::std::option::Option<::std::string::String> {
142        &self.subnet_group_name
143    }
144    /// <p>The status of the endpoint.</p>
145    pub fn endpoint_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.endpoint_status = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The status of the endpoint.</p>
150    pub fn set_endpoint_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.endpoint_status = input;
152        self
153    }
154    /// <p>The status of the endpoint.</p>
155    pub fn get_endpoint_status(&self) -> &::std::option::Option<::std::string::String> {
156        &self.endpoint_status
157    }
158    /// <p>The name of the endpoint.</p>
159    pub fn endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.endpoint_name = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// <p>The name of the endpoint.</p>
164    pub fn set_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.endpoint_name = input;
166        self
167    }
168    /// <p>The name of the endpoint.</p>
169    pub fn get_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
170        &self.endpoint_name
171    }
172    /// <p>The time (UTC) that the endpoint was created.</p>
173    pub fn endpoint_create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
174        self.endpoint_create_time = ::std::option::Option::Some(input);
175        self
176    }
177    /// <p>The time (UTC) that the endpoint was created.</p>
178    pub fn set_endpoint_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
179        self.endpoint_create_time = input;
180        self
181    }
182    /// <p>The time (UTC) that the endpoint was created.</p>
183    pub fn get_endpoint_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
184        &self.endpoint_create_time
185    }
186    /// <p>The port number on which the cluster accepts incoming connections.</p>
187    pub fn port(mut self, input: i32) -> Self {
188        self.port = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>The port number on which the cluster accepts incoming connections.</p>
192    pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
193        self.port = input;
194        self
195    }
196    /// <p>The port number on which the cluster accepts incoming connections.</p>
197    pub fn get_port(&self) -> &::std::option::Option<i32> {
198        &self.port
199    }
200    /// <p>The DNS address of the endpoint.</p>
201    pub fn address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.address = ::std::option::Option::Some(input.into());
203        self
204    }
205    /// <p>The DNS address of the endpoint.</p>
206    pub fn set_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.address = input;
208        self
209    }
210    /// <p>The DNS address of the endpoint.</p>
211    pub fn get_address(&self) -> &::std::option::Option<::std::string::String> {
212        &self.address
213    }
214    /// Appends an item to `vpc_security_groups`.
215    ///
216    /// To override the contents of this collection use [`set_vpc_security_groups`](Self::set_vpc_security_groups).
217    ///
218    /// <p>The security groups associated with the endpoint.</p>
219    pub fn vpc_security_groups(mut self, input: crate::types::VpcSecurityGroupMembership) -> Self {
220        let mut v = self.vpc_security_groups.unwrap_or_default();
221        v.push(input);
222        self.vpc_security_groups = ::std::option::Option::Some(v);
223        self
224    }
225    /// <p>The security groups associated with the endpoint.</p>
226    pub fn set_vpc_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcSecurityGroupMembership>>) -> Self {
227        self.vpc_security_groups = input;
228        self
229    }
230    /// <p>The security groups associated with the endpoint.</p>
231    pub fn get_vpc_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcSecurityGroupMembership>> {
232        &self.vpc_security_groups
233    }
234    /// <p>The connection endpoint for connecting to an Amazon Redshift cluster through the proxy.</p>
235    pub fn vpc_endpoint(mut self, input: crate::types::VpcEndpoint) -> Self {
236        self.vpc_endpoint = ::std::option::Option::Some(input);
237        self
238    }
239    /// <p>The connection endpoint for connecting to an Amazon Redshift cluster through the proxy.</p>
240    pub fn set_vpc_endpoint(mut self, input: ::std::option::Option<crate::types::VpcEndpoint>) -> Self {
241        self.vpc_endpoint = input;
242        self
243    }
244    /// <p>The connection endpoint for connecting to an Amazon Redshift cluster through the proxy.</p>
245    pub fn get_vpc_endpoint(&self) -> &::std::option::Option<crate::types::VpcEndpoint> {
246        &self.vpc_endpoint
247    }
248    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
249        self._request_id = Some(request_id.into());
250        self
251    }
252
253    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
254        self._request_id = request_id;
255        self
256    }
257    /// Consumes the builder and constructs a [`ModifyEndpointAccessOutput`](crate::operation::modify_endpoint_access::ModifyEndpointAccessOutput).
258    pub fn build(self) -> crate::operation::modify_endpoint_access::ModifyEndpointAccessOutput {
259        crate::operation::modify_endpoint_access::ModifyEndpointAccessOutput {
260            cluster_identifier: self.cluster_identifier,
261            resource_owner: self.resource_owner,
262            subnet_group_name: self.subnet_group_name,
263            endpoint_status: self.endpoint_status,
264            endpoint_name: self.endpoint_name,
265            endpoint_create_time: self.endpoint_create_time,
266            port: self.port,
267            address: self.address,
268            vpc_security_groups: self.vpc_security_groups,
269            vpc_endpoint: self.vpc_endpoint,
270            _request_id: self._request_id,
271        }
272    }
273}