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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents the input to <code>CreateGlobalCluster</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateGlobalClusterInput {
/// <p>The cluster identifier of the new global cluster.</p>
pub global_cluster_identifier: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
pub source_db_cluster_identifier: ::std::option::Option<::std::string::String>,
/// <p>The name of the database engine to be used for this cluster.</p>
pub engine: ::std::option::Option<::std::string::String>,
/// <p>The engine version of the global cluster.</p>
pub engine_version: ::std::option::Option<::std::string::String>,
/// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
pub deletion_protection: ::std::option::Option<bool>,
/// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
pub database_name: ::std::option::Option<::std::string::String>,
/// <p>The storage encryption setting for the new global cluster.</p>
pub storage_encrypted: ::std::option::Option<bool>,
}
impl CreateGlobalClusterInput {
/// <p>The cluster identifier of the new global cluster.</p>
pub fn global_cluster_identifier(&self) -> ::std::option::Option<&str> {
self.global_cluster_identifier.as_deref()
}
/// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
pub fn source_db_cluster_identifier(&self) -> ::std::option::Option<&str> {
self.source_db_cluster_identifier.as_deref()
}
/// <p>The name of the database engine to be used for this cluster.</p>
pub fn engine(&self) -> ::std::option::Option<&str> {
self.engine.as_deref()
}
/// <p>The engine version of the global cluster.</p>
pub fn engine_version(&self) -> ::std::option::Option<&str> {
self.engine_version.as_deref()
}
/// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
self.deletion_protection
}
/// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
pub fn database_name(&self) -> ::std::option::Option<&str> {
self.database_name.as_deref()
}
/// <p>The storage encryption setting for the new global cluster.</p>
pub fn storage_encrypted(&self) -> ::std::option::Option<bool> {
self.storage_encrypted
}
}
impl CreateGlobalClusterInput {
/// Creates a new builder-style object to manufacture [`CreateGlobalClusterInput`](crate::operation::create_global_cluster::CreateGlobalClusterInput).
pub fn builder() -> crate::operation::create_global_cluster::builders::CreateGlobalClusterInputBuilder {
crate::operation::create_global_cluster::builders::CreateGlobalClusterInputBuilder::default()
}
}
/// A builder for [`CreateGlobalClusterInput`](crate::operation::create_global_cluster::CreateGlobalClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateGlobalClusterInputBuilder {
pub(crate) global_cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) source_db_cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) engine: ::std::option::Option<::std::string::String>,
pub(crate) engine_version: ::std::option::Option<::std::string::String>,
pub(crate) deletion_protection: ::std::option::Option<bool>,
pub(crate) database_name: ::std::option::Option<::std::string::String>,
pub(crate) storage_encrypted: ::std::option::Option<bool>,
}
impl CreateGlobalClusterInputBuilder {
/// <p>The cluster identifier of the new global cluster.</p>
/// This field is required.
pub fn global_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.global_cluster_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The cluster identifier of the new global cluster.</p>
pub fn set_global_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.global_cluster_identifier = input;
self
}
/// <p>The cluster identifier of the new global cluster.</p>
pub fn get_global_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.global_cluster_identifier
}
/// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
pub fn source_db_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_db_cluster_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
pub fn set_source_db_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_db_cluster_identifier = input;
self
}
/// <p>The Amazon Resource Name (ARN) to use as the primary cluster of the global cluster. This parameter is optional.</p>
pub fn get_source_db_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.source_db_cluster_identifier
}
/// <p>The name of the database engine to be used for this cluster.</p>
pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.engine = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the database engine to be used for this cluster.</p>
pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.engine = input;
self
}
/// <p>The name of the database engine to be used for this cluster.</p>
pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
&self.engine
}
/// <p>The engine version of the global cluster.</p>
pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.engine_version = ::std::option::Option::Some(input.into());
self
}
/// <p>The engine version of the global cluster.</p>
pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.engine_version = input;
self
}
/// <p>The engine version of the global cluster.</p>
pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
&self.engine_version
}
/// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
pub fn deletion_protection(mut self, input: bool) -> Self {
self.deletion_protection = ::std::option::Option::Some(input);
self
}
/// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
self.deletion_protection = input;
self
}
/// <p>The deletion protection setting for the new global cluster. The global cluster can't be deleted when deletion protection is enabled.</p>
pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
&self.deletion_protection
}
/// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.database_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.database_name = input;
self
}
/// <p>The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon DocumentDB will not create a database in the global cluster you are creating.</p>
pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
&self.database_name
}
/// <p>The storage encryption setting for the new global cluster.</p>
pub fn storage_encrypted(mut self, input: bool) -> Self {
self.storage_encrypted = ::std::option::Option::Some(input);
self
}
/// <p>The storage encryption setting for the new global cluster.</p>
pub fn set_storage_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
self.storage_encrypted = input;
self
}
/// <p>The storage encryption setting for the new global cluster.</p>
pub fn get_storage_encrypted(&self) -> &::std::option::Option<bool> {
&self.storage_encrypted
}
/// Consumes the builder and constructs a [`CreateGlobalClusterInput`](crate::operation::create_global_cluster::CreateGlobalClusterInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_global_cluster::CreateGlobalClusterInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_global_cluster::CreateGlobalClusterInput {
global_cluster_identifier: self.global_cluster_identifier,
source_db_cluster_identifier: self.source_db_cluster_identifier,
engine: self.engine,
engine_version: self.engine_version,
deletion_protection: self.deletion_protection,
database_name: self.database_name,
storage_encrypted: self.storage_encrypted,
})
}
}