aws_sdk_amplify/operation/create_branch/
builders.rs1pub use crate::operation::create_branch::_create_branch_output::CreateBranchOutputBuilder;
3
4pub use crate::operation::create_branch::_create_branch_input::CreateBranchInputBuilder;
5
6impl crate::operation::create_branch::builders::CreateBranchInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_branch::CreateBranchOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_branch::CreateBranchError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_branch();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateBranchFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_branch::builders::CreateBranchInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_branch::CreateBranchOutput,
35 crate::operation::create_branch::CreateBranchError,
36 > for CreateBranchFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::create_branch::CreateBranchOutput,
44 crate::operation::create_branch::CreateBranchError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateBranchFluentBuilder {
51 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 pub fn as_input(&self) -> &crate::operation::create_branch::builders::CreateBranchInputBuilder {
61 &self.inner
62 }
63 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::create_branch::CreateBranchOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_branch::CreateBranchError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::create_branch::CreateBranch::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_branch::CreateBranch::orchestrate(&runtime_plugins, input).await
90 }
91
92 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::create_branch::CreateBranchOutput,
97 crate::operation::create_branch::CreateBranchError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.app_id(input.into());
114 self
115 }
116 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_app_id(input);
119 self
120 }
121 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_app_id()
124 }
125 pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.branch_name(input.into());
128 self
129 }
130 pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_branch_name(input);
133 self
134 }
135 pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_branch_name()
138 }
139 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.inner = self.inner.description(input.into());
142 self
143 }
144 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.inner = self.inner.set_description(input);
147 self
148 }
149 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
151 self.inner.get_description()
152 }
153 pub fn stage(mut self, input: crate::types::Stage) -> Self {
155 self.inner = self.inner.stage(input);
156 self
157 }
158 pub fn set_stage(mut self, input: ::std::option::Option<crate::types::Stage>) -> Self {
160 self.inner = self.inner.set_stage(input);
161 self
162 }
163 pub fn get_stage(&self) -> &::std::option::Option<crate::types::Stage> {
165 self.inner.get_stage()
166 }
167 pub fn framework(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169 self.inner = self.inner.framework(input.into());
170 self
171 }
172 pub fn set_framework(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174 self.inner = self.inner.set_framework(input);
175 self
176 }
177 pub fn get_framework(&self) -> &::std::option::Option<::std::string::String> {
179 self.inner.get_framework()
180 }
181 pub fn enable_notification(mut self, input: bool) -> Self {
183 self.inner = self.inner.enable_notification(input);
184 self
185 }
186 pub fn set_enable_notification(mut self, input: ::std::option::Option<bool>) -> Self {
188 self.inner = self.inner.set_enable_notification(input);
189 self
190 }
191 pub fn get_enable_notification(&self) -> &::std::option::Option<bool> {
193 self.inner.get_enable_notification()
194 }
195 pub fn enable_auto_build(mut self, input: bool) -> Self {
197 self.inner = self.inner.enable_auto_build(input);
198 self
199 }
200 pub fn set_enable_auto_build(mut self, input: ::std::option::Option<bool>) -> Self {
202 self.inner = self.inner.set_enable_auto_build(input);
203 self
204 }
205 pub fn get_enable_auto_build(&self) -> &::std::option::Option<bool> {
207 self.inner.get_enable_auto_build()
208 }
209 pub fn enable_skew_protection(mut self, input: bool) -> Self {
212 self.inner = self.inner.enable_skew_protection(input);
213 self
214 }
215 pub fn set_enable_skew_protection(mut self, input: ::std::option::Option<bool>) -> Self {
218 self.inner = self.inner.set_enable_skew_protection(input);
219 self
220 }
221 pub fn get_enable_skew_protection(&self) -> &::std::option::Option<bool> {
224 self.inner.get_enable_skew_protection()
225 }
226 pub fn environment_variables(
233 mut self,
234 k: impl ::std::convert::Into<::std::string::String>,
235 v: impl ::std::convert::Into<::std::string::String>,
236 ) -> Self {
237 self.inner = self.inner.environment_variables(k.into(), v.into());
238 self
239 }
240 pub fn set_environment_variables(
242 mut self,
243 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
244 ) -> Self {
245 self.inner = self.inner.set_environment_variables(input);
246 self
247 }
248 pub fn get_environment_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
250 self.inner.get_environment_variables()
251 }
252 pub fn basic_auth_credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254 self.inner = self.inner.basic_auth_credentials(input.into());
255 self
256 }
257 pub fn set_basic_auth_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.inner = self.inner.set_basic_auth_credentials(input);
260 self
261 }
262 pub fn get_basic_auth_credentials(&self) -> &::std::option::Option<::std::string::String> {
264 self.inner.get_basic_auth_credentials()
265 }
266 pub fn enable_basic_auth(mut self, input: bool) -> Self {
268 self.inner = self.inner.enable_basic_auth(input);
269 self
270 }
271 pub fn set_enable_basic_auth(mut self, input: ::std::option::Option<bool>) -> Self {
273 self.inner = self.inner.set_enable_basic_auth(input);
274 self
275 }
276 pub fn get_enable_basic_auth(&self) -> &::std::option::Option<bool> {
278 self.inner.get_enable_basic_auth()
279 }
280 pub fn enable_performance_mode(mut self, input: bool) -> Self {
283 self.inner = self.inner.enable_performance_mode(input);
284 self
285 }
286 pub fn set_enable_performance_mode(mut self, input: ::std::option::Option<bool>) -> Self {
289 self.inner = self.inner.set_enable_performance_mode(input);
290 self
291 }
292 pub fn get_enable_performance_mode(&self) -> &::std::option::Option<bool> {
295 self.inner.get_enable_performance_mode()
296 }
297 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
304 self.inner = self.inner.tags(k.into(), v.into());
305 self
306 }
307 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
309 self.inner = self.inner.set_tags(input);
310 self
311 }
312 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
314 self.inner.get_tags()
315 }
316 pub fn build_spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
318 self.inner = self.inner.build_spec(input.into());
319 self
320 }
321 pub fn set_build_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
323 self.inner = self.inner.set_build_spec(input);
324 self
325 }
326 pub fn get_build_spec(&self) -> &::std::option::Option<::std::string::String> {
328 self.inner.get_build_spec()
329 }
330 pub fn ttl(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
332 self.inner = self.inner.ttl(input.into());
333 self
334 }
335 pub fn set_ttl(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
337 self.inner = self.inner.set_ttl(input);
338 self
339 }
340 pub fn get_ttl(&self) -> &::std::option::Option<::std::string::String> {
342 self.inner.get_ttl()
343 }
344 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346 self.inner = self.inner.display_name(input.into());
347 self
348 }
349 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
351 self.inner = self.inner.set_display_name(input);
352 self
353 }
354 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
356 self.inner.get_display_name()
357 }
358 pub fn enable_pull_request_preview(mut self, input: bool) -> Self {
360 self.inner = self.inner.enable_pull_request_preview(input);
361 self
362 }
363 pub fn set_enable_pull_request_preview(mut self, input: ::std::option::Option<bool>) -> Self {
365 self.inner = self.inner.set_enable_pull_request_preview(input);
366 self
367 }
368 pub fn get_enable_pull_request_preview(&self) -> &::std::option::Option<bool> {
370 self.inner.get_enable_pull_request_preview()
371 }
372 pub fn pull_request_environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374 self.inner = self.inner.pull_request_environment_name(input.into());
375 self
376 }
377 pub fn set_pull_request_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
379 self.inner = self.inner.set_pull_request_environment_name(input);
380 self
381 }
382 pub fn get_pull_request_environment_name(&self) -> &::std::option::Option<::std::string::String> {
384 self.inner.get_pull_request_environment_name()
385 }
386 pub fn backend_environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
389 self.inner = self.inner.backend_environment_arn(input.into());
390 self
391 }
392 pub fn set_backend_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
395 self.inner = self.inner.set_backend_environment_arn(input);
396 self
397 }
398 pub fn get_backend_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
401 self.inner.get_backend_environment_arn()
402 }
403 pub fn backend(mut self, input: crate::types::Backend) -> Self {
406 self.inner = self.inner.backend(input);
407 self
408 }
409 pub fn set_backend(mut self, input: ::std::option::Option<crate::types::Backend>) -> Self {
412 self.inner = self.inner.set_backend(input);
413 self
414 }
415 pub fn get_backend(&self) -> &::std::option::Option<crate::types::Backend> {
418 self.inner.get_backend()
419 }
420 pub fn compute_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
422 self.inner = self.inner.compute_role_arn(input.into());
423 self
424 }
425 pub fn set_compute_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
427 self.inner = self.inner.set_compute_role_arn(input);
428 self
429 }
430 pub fn get_compute_role_arn(&self) -> &::std::option::Option<::std::string::String> {
432 self.inner.get_compute_role_arn()
433 }
434}