-
Notifications
You must be signed in to change notification settings - Fork 244
/
_modify_db_cluster_endpoint_input.rs
137 lines (136 loc) · 8.37 KB
/
_modify_db_cluster_endpoint_input.rs
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
127
128
129
130
131
132
133
134
135
136
137
// 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 ModifyDbClusterEndpointInput {
/// <p>The identifier of the endpoint to modify. This parameter is stored as a lowercase string.</p>
pub db_cluster_endpoint_identifier: ::std::option::Option<::std::string::String>,
/// <p>The type of the endpoint. One of: <code>READER</code>, <code>WRITER</code>, <code>ANY</code>.</p>
pub endpoint_type: ::std::option::Option<::std::string::String>,
/// <p>List of DB instance identifiers that are part of the custom endpoint group.</p>
pub static_members: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.</p>
pub excluded_members: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ModifyDbClusterEndpointInput {
/// <p>The identifier of the endpoint to modify. This parameter is stored as a lowercase string.</p>
pub fn db_cluster_endpoint_identifier(&self) -> ::std::option::Option<&str> {
self.db_cluster_endpoint_identifier.as_deref()
}
/// <p>The type of the endpoint. One of: <code>READER</code>, <code>WRITER</code>, <code>ANY</code>.</p>
pub fn endpoint_type(&self) -> ::std::option::Option<&str> {
self.endpoint_type.as_deref()
}
/// <p>List of DB instance identifiers that are part of the custom endpoint group.</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 `.static_members.is_none()`.
pub fn static_members(&self) -> &[::std::string::String] {
self.static_members.as_deref().unwrap_or_default()
}
/// <p>List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.</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 `.excluded_members.is_none()`.
pub fn excluded_members(&self) -> &[::std::string::String] {
self.excluded_members.as_deref().unwrap_or_default()
}
}
impl ModifyDbClusterEndpointInput {
/// Creates a new builder-style object to manufacture [`ModifyDbClusterEndpointInput`](crate::operation::modify_db_cluster_endpoint::ModifyDbClusterEndpointInput).
pub fn builder() -> crate::operation::modify_db_cluster_endpoint::builders::ModifyDbClusterEndpointInputBuilder {
crate::operation::modify_db_cluster_endpoint::builders::ModifyDbClusterEndpointInputBuilder::default()
}
}
/// A builder for [`ModifyDbClusterEndpointInput`](crate::operation::modify_db_cluster_endpoint::ModifyDbClusterEndpointInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyDbClusterEndpointInputBuilder {
pub(crate) db_cluster_endpoint_identifier: ::std::option::Option<::std::string::String>,
pub(crate) endpoint_type: ::std::option::Option<::std::string::String>,
pub(crate) static_members: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) excluded_members: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ModifyDbClusterEndpointInputBuilder {
/// <p>The identifier of the endpoint to modify. This parameter is stored as a lowercase string.</p>
/// This field is required.
pub fn db_cluster_endpoint_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.db_cluster_endpoint_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the endpoint to modify. This parameter is stored as a lowercase string.</p>
pub fn set_db_cluster_endpoint_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.db_cluster_endpoint_identifier = input;
self
}
/// <p>The identifier of the endpoint to modify. This parameter is stored as a lowercase string.</p>
pub fn get_db_cluster_endpoint_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.db_cluster_endpoint_identifier
}
/// <p>The type of the endpoint. One of: <code>READER</code>, <code>WRITER</code>, <code>ANY</code>.</p>
pub fn endpoint_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.endpoint_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of the endpoint. One of: <code>READER</code>, <code>WRITER</code>, <code>ANY</code>.</p>
pub fn set_endpoint_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.endpoint_type = input;
self
}
/// <p>The type of the endpoint. One of: <code>READER</code>, <code>WRITER</code>, <code>ANY</code>.</p>
pub fn get_endpoint_type(&self) -> &::std::option::Option<::std::string::String> {
&self.endpoint_type
}
/// Appends an item to `static_members`.
///
/// To override the contents of this collection use [`set_static_members`](Self::set_static_members).
///
/// <p>List of DB instance identifiers that are part of the custom endpoint group.</p>
pub fn static_members(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.static_members.unwrap_or_default();
v.push(input.into());
self.static_members = ::std::option::Option::Some(v);
self
}
/// <p>List of DB instance identifiers that are part of the custom endpoint group.</p>
pub fn set_static_members(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.static_members = input;
self
}
/// <p>List of DB instance identifiers that are part of the custom endpoint group.</p>
pub fn get_static_members(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.static_members
}
/// Appends an item to `excluded_members`.
///
/// To override the contents of this collection use [`set_excluded_members`](Self::set_excluded_members).
///
/// <p>List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.</p>
pub fn excluded_members(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.excluded_members.unwrap_or_default();
v.push(input.into());
self.excluded_members = ::std::option::Option::Some(v);
self
}
/// <p>List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.</p>
pub fn set_excluded_members(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.excluded_members = input;
self
}
/// <p>List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.</p>
pub fn get_excluded_members(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.excluded_members
}
/// Consumes the builder and constructs a [`ModifyDbClusterEndpointInput`](crate::operation::modify_db_cluster_endpoint::ModifyDbClusterEndpointInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::modify_db_cluster_endpoint::ModifyDbClusterEndpointInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::modify_db_cluster_endpoint::ModifyDbClusterEndpointInput {
db_cluster_endpoint_identifier: self.db_cluster_endpoint_identifier,
endpoint_type: self.endpoint_type,
static_members: self.static_members,
excluded_members: self.excluded_members,
})
}
}