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
122
123
124
125
126
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RevokeEndpointAccessInput {
/// <p>The cluster to revoke access from.</p>
pub cluster_identifier: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Web Services account ID whose access is to be revoked.</p>
pub account: ::std::option::Option<::std::string::String>,
/// <p>The virtual private cloud (VPC) identifiers for which access is to be revoked.</p>
pub vpc_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.</p>
pub force: ::std::option::Option<bool>,
}
impl RevokeEndpointAccessInput {
/// <p>The cluster to revoke access from.</p>
pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
self.cluster_identifier.as_deref()
}
/// <p>The Amazon Web Services account ID whose access is to be revoked.</p>
pub fn account(&self) -> ::std::option::Option<&str> {
self.account.as_deref()
}
/// <p>The virtual private cloud (VPC) identifiers for which access is to be revoked.</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 `.vpc_ids.is_none()`.
pub fn vpc_ids(&self) -> &[::std::string::String] {
self.vpc_ids.as_deref().unwrap_or_default()
}
/// <p>Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.</p>
pub fn force(&self) -> ::std::option::Option<bool> {
self.force
}
}
impl RevokeEndpointAccessInput {
/// Creates a new builder-style object to manufacture [`RevokeEndpointAccessInput`](crate::operation::revoke_endpoint_access::RevokeEndpointAccessInput).
pub fn builder() -> crate::operation::revoke_endpoint_access::builders::RevokeEndpointAccessInputBuilder {
crate::operation::revoke_endpoint_access::builders::RevokeEndpointAccessInputBuilder::default()
}
}
/// A builder for [`RevokeEndpointAccessInput`](crate::operation::revoke_endpoint_access::RevokeEndpointAccessInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RevokeEndpointAccessInputBuilder {
pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) account: ::std::option::Option<::std::string::String>,
pub(crate) vpc_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) force: ::std::option::Option<bool>,
}
impl RevokeEndpointAccessInputBuilder {
/// <p>The cluster to revoke access from.</p>
pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The cluster to revoke access from.</p>
pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_identifier = input;
self
}
/// <p>The cluster to revoke access from.</p>
pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_identifier
}
/// <p>The Amazon Web Services account ID whose access is to be revoked.</p>
pub fn account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services account ID whose access is to be revoked.</p>
pub fn set_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account = input;
self
}
/// <p>The Amazon Web Services account ID whose access is to be revoked.</p>
pub fn get_account(&self) -> &::std::option::Option<::std::string::String> {
&self.account
}
/// Appends an item to `vpc_ids`.
///
/// To override the contents of this collection use [`set_vpc_ids`](Self::set_vpc_ids).
///
/// <p>The virtual private cloud (VPC) identifiers for which access is to be revoked.</p>
pub fn vpc_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.vpc_ids.unwrap_or_default();
v.push(input.into());
self.vpc_ids = ::std::option::Option::Some(v);
self
}
/// <p>The virtual private cloud (VPC) identifiers for which access is to be revoked.</p>
pub fn set_vpc_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.vpc_ids = input;
self
}
/// <p>The virtual private cloud (VPC) identifiers for which access is to be revoked.</p>
pub fn get_vpc_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.vpc_ids
}
/// <p>Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.</p>
pub fn force(mut self, input: bool) -> Self {
self.force = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.</p>
pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// <p>Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.</p>
pub fn get_force(&self) -> &::std::option::Option<bool> {
&self.force
}
/// Consumes the builder and constructs a [`RevokeEndpointAccessInput`](crate::operation::revoke_endpoint_access::RevokeEndpointAccessInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::revoke_endpoint_access::RevokeEndpointAccessInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::revoke_endpoint_access::RevokeEndpointAccessInput {
cluster_identifier: self.cluster_identifier,
account: self.account,
vpc_ids: self.vpc_ids,
force: self.force,
})
}
}