aws_sdk_redshift/operation/resize_cluster/
builders.rs1pub use crate::operation::resize_cluster::_resize_cluster_output::ResizeClusterOutputBuilder;
3
4pub use crate::operation::resize_cluster::_resize_cluster_input::ResizeClusterInputBuilder;
5
6impl crate::operation::resize_cluster::builders::ResizeClusterInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::resize_cluster::ResizeClusterOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::resize_cluster::ResizeClusterError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.resize_cluster();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
48pub struct ResizeClusterFluentBuilder {
49 handle: ::std::sync::Arc<crate::client::Handle>,
50 inner: crate::operation::resize_cluster::builders::ResizeClusterInputBuilder,
51 config_override: ::std::option::Option<crate::config::Builder>,
52}
53impl
54 crate::client::customize::internal::CustomizableSend<
55 crate::operation::resize_cluster::ResizeClusterOutput,
56 crate::operation::resize_cluster::ResizeClusterError,
57 > for ResizeClusterFluentBuilder
58{
59 fn send(
60 self,
61 config_override: crate::config::Builder,
62 ) -> crate::client::customize::internal::BoxFuture<
63 crate::client::customize::internal::SendResult<
64 crate::operation::resize_cluster::ResizeClusterOutput,
65 crate::operation::resize_cluster::ResizeClusterError,
66 >,
67 > {
68 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
69 }
70}
71impl ResizeClusterFluentBuilder {
72 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
74 Self {
75 handle,
76 inner: ::std::default::Default::default(),
77 config_override: ::std::option::Option::None,
78 }
79 }
80 pub fn as_input(&self) -> &crate::operation::resize_cluster::builders::ResizeClusterInputBuilder {
82 &self.inner
83 }
84 pub async fn send(
93 self,
94 ) -> ::std::result::Result<
95 crate::operation::resize_cluster::ResizeClusterOutput,
96 ::aws_smithy_runtime_api::client::result::SdkError<
97 crate::operation::resize_cluster::ResizeClusterError,
98 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
99 >,
100 > {
101 let input = self
102 .inner
103 .build()
104 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
105 let runtime_plugins = crate::operation::resize_cluster::ResizeCluster::operation_runtime_plugins(
106 self.handle.runtime_plugins.clone(),
107 &self.handle.conf,
108 self.config_override,
109 );
110 crate::operation::resize_cluster::ResizeCluster::orchestrate(&runtime_plugins, input).await
111 }
112
113 pub fn customize(
115 self,
116 ) -> crate::client::customize::CustomizableOperation<
117 crate::operation::resize_cluster::ResizeClusterOutput,
118 crate::operation::resize_cluster::ResizeClusterError,
119 Self,
120 > {
121 crate::client::customize::CustomizableOperation::new(self)
122 }
123 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
124 self.set_config_override(::std::option::Option::Some(config_override.into()));
125 self
126 }
127
128 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
129 self.config_override = config_override;
130 self
131 }
132 pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.cluster_identifier(input.into());
135 self
136 }
137 pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.inner = self.inner.set_cluster_identifier(input);
140 self
141 }
142 pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
144 self.inner.get_cluster_identifier()
145 }
146 pub fn cluster_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.inner = self.inner.cluster_type(input.into());
149 self
150 }
151 pub fn set_cluster_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.inner = self.inner.set_cluster_type(input);
154 self
155 }
156 pub fn get_cluster_type(&self) -> &::std::option::Option<::std::string::String> {
158 self.inner.get_cluster_type()
159 }
160 pub fn node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.inner = self.inner.node_type(input.into());
163 self
164 }
165 pub fn set_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.inner = self.inner.set_node_type(input);
168 self
169 }
170 pub fn get_node_type(&self) -> &::std::option::Option<::std::string::String> {
172 self.inner.get_node_type()
173 }
174 pub fn number_of_nodes(mut self, input: i32) -> Self {
176 self.inner = self.inner.number_of_nodes(input);
177 self
178 }
179 pub fn set_number_of_nodes(mut self, input: ::std::option::Option<i32>) -> Self {
181 self.inner = self.inner.set_number_of_nodes(input);
182 self
183 }
184 pub fn get_number_of_nodes(&self) -> &::std::option::Option<i32> {
186 self.inner.get_number_of_nodes()
187 }
188 pub fn classic(mut self, input: bool) -> Self {
190 self.inner = self.inner.classic(input);
191 self
192 }
193 pub fn set_classic(mut self, input: ::std::option::Option<bool>) -> Self {
195 self.inner = self.inner.set_classic(input);
196 self
197 }
198 pub fn get_classic(&self) -> &::std::option::Option<bool> {
200 self.inner.get_classic()
201 }
202 pub fn reserved_node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.inner = self.inner.reserved_node_id(input.into());
205 self
206 }
207 pub fn set_reserved_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.inner = self.inner.set_reserved_node_id(input);
210 self
211 }
212 pub fn get_reserved_node_id(&self) -> &::std::option::Option<::std::string::String> {
214 self.inner.get_reserved_node_id()
215 }
216 pub fn target_reserved_node_offering_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218 self.inner = self.inner.target_reserved_node_offering_id(input.into());
219 self
220 }
221 pub fn set_target_reserved_node_offering_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.inner = self.inner.set_target_reserved_node_offering_id(input);
224 self
225 }
226 pub fn get_target_reserved_node_offering_id(&self) -> &::std::option::Option<::std::string::String> {
228 self.inner.get_target_reserved_node_offering_id()
229 }
230}