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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes a resize cluster operation. For example, a scheduled action to run the <code>ResizeCluster</code> API operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ResizeClusterInput {
/// <p>The unique identifier for the cluster to resize.</p>
pub cluster_identifier: ::std::option::Option<::std::string::String>,
/// <p>The new cluster type for the specified cluster.</p>
pub cluster_type: ::std::option::Option<::std::string::String>,
/// <p>The new node type for the nodes you are adding. If not specified, the cluster's current node type is used.</p>
pub node_type: ::std::option::Option<::std::string::String>,
/// <p>The new number of nodes for the cluster. If not specified, the cluster's current number of nodes is used.</p>
pub number_of_nodes: ::std::option::Option<i32>,
/// <p>A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to <code>false</code>, the resize type is elastic.</p>
pub classic: ::std::option::Option<bool>,
/// <p>The identifier of the reserved node.</p>
pub reserved_node_id: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the target reserved node offering.</p>
pub target_reserved_node_offering_id: ::std::option::Option<::std::string::String>,
}
impl ResizeClusterInput {
/// <p>The unique identifier for the cluster to resize.</p>
pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
self.cluster_identifier.as_deref()
}
/// <p>The new cluster type for the specified cluster.</p>
pub fn cluster_type(&self) -> ::std::option::Option<&str> {
self.cluster_type.as_deref()
}
/// <p>The new node type for the nodes you are adding. If not specified, the cluster's current node type is used.</p>
pub fn node_type(&self) -> ::std::option::Option<&str> {
self.node_type.as_deref()
}
/// <p>The new number of nodes for the cluster. If not specified, the cluster's current number of nodes is used.</p>
pub fn number_of_nodes(&self) -> ::std::option::Option<i32> {
self.number_of_nodes
}
/// <p>A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to <code>false</code>, the resize type is elastic.</p>
pub fn classic(&self) -> ::std::option::Option<bool> {
self.classic
}
/// <p>The identifier of the reserved node.</p>
pub fn reserved_node_id(&self) -> ::std::option::Option<&str> {
self.reserved_node_id.as_deref()
}
/// <p>The identifier of the target reserved node offering.</p>
pub fn target_reserved_node_offering_id(&self) -> ::std::option::Option<&str> {
self.target_reserved_node_offering_id.as_deref()
}
}
impl ResizeClusterInput {
/// Creates a new builder-style object to manufacture [`ResizeClusterInput`](crate::operation::resize_cluster::ResizeClusterInput).
pub fn builder() -> crate::operation::resize_cluster::builders::ResizeClusterInputBuilder {
crate::operation::resize_cluster::builders::ResizeClusterInputBuilder::default()
}
}
/// A builder for [`ResizeClusterInput`](crate::operation::resize_cluster::ResizeClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ResizeClusterInputBuilder {
pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) cluster_type: ::std::option::Option<::std::string::String>,
pub(crate) node_type: ::std::option::Option<::std::string::String>,
pub(crate) number_of_nodes: ::std::option::Option<i32>,
pub(crate) classic: ::std::option::Option<bool>,
pub(crate) reserved_node_id: ::std::option::Option<::std::string::String>,
pub(crate) target_reserved_node_offering_id: ::std::option::Option<::std::string::String>,
}
impl ResizeClusterInputBuilder {
/// <p>The unique identifier for the cluster to resize.</p>
/// This field is required.
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 unique identifier for the cluster to resize.</p>
pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_identifier = input;
self
}
/// <p>The unique identifier for the cluster to resize.</p>
pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_identifier
}
/// <p>The new cluster type for the specified cluster.</p>
pub fn cluster_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The new cluster type for the specified cluster.</p>
pub fn set_cluster_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_type = input;
self
}
/// <p>The new cluster type for the specified cluster.</p>
pub fn get_cluster_type(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_type
}
/// <p>The new node type for the nodes you are adding. If not specified, the cluster's current node type is used.</p>
pub fn node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.node_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The new node type for the nodes you are adding. If not specified, the cluster's current node type is used.</p>
pub fn set_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.node_type = input;
self
}
/// <p>The new node type for the nodes you are adding. If not specified, the cluster's current node type is used.</p>
pub fn get_node_type(&self) -> &::std::option::Option<::std::string::String> {
&self.node_type
}
/// <p>The new number of nodes for the cluster. If not specified, the cluster's current number of nodes is used.</p>
pub fn number_of_nodes(mut self, input: i32) -> Self {
self.number_of_nodes = ::std::option::Option::Some(input);
self
}
/// <p>The new number of nodes for the cluster. If not specified, the cluster's current number of nodes is used.</p>
pub fn set_number_of_nodes(mut self, input: ::std::option::Option<i32>) -> Self {
self.number_of_nodes = input;
self
}
/// <p>The new number of nodes for the cluster. If not specified, the cluster's current number of nodes is used.</p>
pub fn get_number_of_nodes(&self) -> &::std::option::Option<i32> {
&self.number_of_nodes
}
/// <p>A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to <code>false</code>, the resize type is elastic.</p>
pub fn classic(mut self, input: bool) -> Self {
self.classic = ::std::option::Option::Some(input);
self
}
/// <p>A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to <code>false</code>, the resize type is elastic.</p>
pub fn set_classic(mut self, input: ::std::option::Option<bool>) -> Self {
self.classic = input;
self
}
/// <p>A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to <code>false</code>, the resize type is elastic.</p>
pub fn get_classic(&self) -> &::std::option::Option<bool> {
&self.classic
}
/// <p>The identifier of the reserved node.</p>
pub fn reserved_node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reserved_node_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the reserved node.</p>
pub fn set_reserved_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reserved_node_id = input;
self
}
/// <p>The identifier of the reserved node.</p>
pub fn get_reserved_node_id(&self) -> &::std::option::Option<::std::string::String> {
&self.reserved_node_id
}
/// <p>The identifier of the target reserved node offering.</p>
pub fn target_reserved_node_offering_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_reserved_node_offering_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the target reserved node offering.</p>
pub fn set_target_reserved_node_offering_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_reserved_node_offering_id = input;
self
}
/// <p>The identifier of the target reserved node offering.</p>
pub fn get_target_reserved_node_offering_id(&self) -> &::std::option::Option<::std::string::String> {
&self.target_reserved_node_offering_id
}
/// Consumes the builder and constructs a [`ResizeClusterInput`](crate::operation::resize_cluster::ResizeClusterInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::resize_cluster::ResizeClusterInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::resize_cluster::ResizeClusterInput {
cluster_identifier: self.cluster_identifier,
cluster_type: self.cluster_type,
node_type: self.node_type,
number_of_nodes: self.number_of_nodes,
classic: self.classic,
reserved_node_id: self.reserved_node_id,
target_reserved_node_offering_id: self.target_reserved_node_offering_id,
})
}
}