1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct CreateBranchInput {
7 pub app_id: ::std::option::Option<::std::string::String>,
9 pub branch_name: ::std::option::Option<::std::string::String>,
11 pub description: ::std::option::Option<::std::string::String>,
13 pub stage: ::std::option::Option<crate::types::Stage>,
15 pub framework: ::std::option::Option<::std::string::String>,
17 pub enable_notification: ::std::option::Option<bool>,
19 pub enable_auto_build: ::std::option::Option<bool>,
21 pub enable_skew_protection: ::std::option::Option<bool>,
24 pub environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26 pub basic_auth_credentials: ::std::option::Option<::std::string::String>,
28 pub enable_basic_auth: ::std::option::Option<bool>,
30 pub enable_performance_mode: ::std::option::Option<bool>,
33 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
35 pub build_spec: ::std::option::Option<::std::string::String>,
37 pub ttl: ::std::option::Option<::std::string::String>,
39 pub display_name: ::std::option::Option<::std::string::String>,
41 pub enable_pull_request_preview: ::std::option::Option<bool>,
43 pub pull_request_environment_name: ::std::option::Option<::std::string::String>,
45 pub backend_environment_arn: ::std::option::Option<::std::string::String>,
48 pub backend: ::std::option::Option<crate::types::Backend>,
51 pub compute_role_arn: ::std::option::Option<::std::string::String>,
53}
54impl CreateBranchInput {
55 pub fn app_id(&self) -> ::std::option::Option<&str> {
57 self.app_id.as_deref()
58 }
59 pub fn branch_name(&self) -> ::std::option::Option<&str> {
61 self.branch_name.as_deref()
62 }
63 pub fn description(&self) -> ::std::option::Option<&str> {
65 self.description.as_deref()
66 }
67 pub fn stage(&self) -> ::std::option::Option<&crate::types::Stage> {
69 self.stage.as_ref()
70 }
71 pub fn framework(&self) -> ::std::option::Option<&str> {
73 self.framework.as_deref()
74 }
75 pub fn enable_notification(&self) -> ::std::option::Option<bool> {
77 self.enable_notification
78 }
79 pub fn enable_auto_build(&self) -> ::std::option::Option<bool> {
81 self.enable_auto_build
82 }
83 pub fn enable_skew_protection(&self) -> ::std::option::Option<bool> {
86 self.enable_skew_protection
87 }
88 pub fn environment_variables(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
90 self.environment_variables.as_ref()
91 }
92 pub fn basic_auth_credentials(&self) -> ::std::option::Option<&str> {
94 self.basic_auth_credentials.as_deref()
95 }
96 pub fn enable_basic_auth(&self) -> ::std::option::Option<bool> {
98 self.enable_basic_auth
99 }
100 pub fn enable_performance_mode(&self) -> ::std::option::Option<bool> {
103 self.enable_performance_mode
104 }
105 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
107 self.tags.as_ref()
108 }
109 pub fn build_spec(&self) -> ::std::option::Option<&str> {
111 self.build_spec.as_deref()
112 }
113 pub fn ttl(&self) -> ::std::option::Option<&str> {
115 self.ttl.as_deref()
116 }
117 pub fn display_name(&self) -> ::std::option::Option<&str> {
119 self.display_name.as_deref()
120 }
121 pub fn enable_pull_request_preview(&self) -> ::std::option::Option<bool> {
123 self.enable_pull_request_preview
124 }
125 pub fn pull_request_environment_name(&self) -> ::std::option::Option<&str> {
127 self.pull_request_environment_name.as_deref()
128 }
129 pub fn backend_environment_arn(&self) -> ::std::option::Option<&str> {
132 self.backend_environment_arn.as_deref()
133 }
134 pub fn backend(&self) -> ::std::option::Option<&crate::types::Backend> {
137 self.backend.as_ref()
138 }
139 pub fn compute_role_arn(&self) -> ::std::option::Option<&str> {
141 self.compute_role_arn.as_deref()
142 }
143}
144impl ::std::fmt::Debug for CreateBranchInput {
145 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
146 let mut formatter = f.debug_struct("CreateBranchInput");
147 formatter.field("app_id", &self.app_id);
148 formatter.field("branch_name", &self.branch_name);
149 formatter.field("description", &self.description);
150 formatter.field("stage", &self.stage);
151 formatter.field("framework", &self.framework);
152 formatter.field("enable_notification", &self.enable_notification);
153 formatter.field("enable_auto_build", &self.enable_auto_build);
154 formatter.field("enable_skew_protection", &self.enable_skew_protection);
155 formatter.field("environment_variables", &self.environment_variables);
156 formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
157 formatter.field("enable_basic_auth", &self.enable_basic_auth);
158 formatter.field("enable_performance_mode", &self.enable_performance_mode);
159 formatter.field("tags", &self.tags);
160 formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
161 formatter.field("ttl", &self.ttl);
162 formatter.field("display_name", &self.display_name);
163 formatter.field("enable_pull_request_preview", &self.enable_pull_request_preview);
164 formatter.field("pull_request_environment_name", &self.pull_request_environment_name);
165 formatter.field("backend_environment_arn", &self.backend_environment_arn);
166 formatter.field("backend", &self.backend);
167 formatter.field("compute_role_arn", &self.compute_role_arn);
168 formatter.finish()
169 }
170}
171impl CreateBranchInput {
172 pub fn builder() -> crate::operation::create_branch::builders::CreateBranchInputBuilder {
174 crate::operation::create_branch::builders::CreateBranchInputBuilder::default()
175 }
176}
177
178#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
180#[non_exhaustive]
181pub struct CreateBranchInputBuilder {
182 pub(crate) app_id: ::std::option::Option<::std::string::String>,
183 pub(crate) branch_name: ::std::option::Option<::std::string::String>,
184 pub(crate) description: ::std::option::Option<::std::string::String>,
185 pub(crate) stage: ::std::option::Option<crate::types::Stage>,
186 pub(crate) framework: ::std::option::Option<::std::string::String>,
187 pub(crate) enable_notification: ::std::option::Option<bool>,
188 pub(crate) enable_auto_build: ::std::option::Option<bool>,
189 pub(crate) enable_skew_protection: ::std::option::Option<bool>,
190 pub(crate) environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
191 pub(crate) basic_auth_credentials: ::std::option::Option<::std::string::String>,
192 pub(crate) enable_basic_auth: ::std::option::Option<bool>,
193 pub(crate) enable_performance_mode: ::std::option::Option<bool>,
194 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
195 pub(crate) build_spec: ::std::option::Option<::std::string::String>,
196 pub(crate) ttl: ::std::option::Option<::std::string::String>,
197 pub(crate) display_name: ::std::option::Option<::std::string::String>,
198 pub(crate) enable_pull_request_preview: ::std::option::Option<bool>,
199 pub(crate) pull_request_environment_name: ::std::option::Option<::std::string::String>,
200 pub(crate) backend_environment_arn: ::std::option::Option<::std::string::String>,
201 pub(crate) backend: ::std::option::Option<crate::types::Backend>,
202 pub(crate) compute_role_arn: ::std::option::Option<::std::string::String>,
203}
204impl CreateBranchInputBuilder {
205 pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208 self.app_id = ::std::option::Option::Some(input.into());
209 self
210 }
211 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213 self.app_id = input;
214 self
215 }
216 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
218 &self.app_id
219 }
220 pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.branch_name = ::std::option::Option::Some(input.into());
224 self
225 }
226 pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.branch_name = input;
229 self
230 }
231 pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
233 &self.branch_name
234 }
235 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237 self.description = ::std::option::Option::Some(input.into());
238 self
239 }
240 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242 self.description = input;
243 self
244 }
245 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
247 &self.description
248 }
249 pub fn stage(mut self, input: crate::types::Stage) -> Self {
251 self.stage = ::std::option::Option::Some(input);
252 self
253 }
254 pub fn set_stage(mut self, input: ::std::option::Option<crate::types::Stage>) -> Self {
256 self.stage = input;
257 self
258 }
259 pub fn get_stage(&self) -> &::std::option::Option<crate::types::Stage> {
261 &self.stage
262 }
263 pub fn framework(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265 self.framework = ::std::option::Option::Some(input.into());
266 self
267 }
268 pub fn set_framework(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
270 self.framework = input;
271 self
272 }
273 pub fn get_framework(&self) -> &::std::option::Option<::std::string::String> {
275 &self.framework
276 }
277 pub fn enable_notification(mut self, input: bool) -> Self {
279 self.enable_notification = ::std::option::Option::Some(input);
280 self
281 }
282 pub fn set_enable_notification(mut self, input: ::std::option::Option<bool>) -> Self {
284 self.enable_notification = input;
285 self
286 }
287 pub fn get_enable_notification(&self) -> &::std::option::Option<bool> {
289 &self.enable_notification
290 }
291 pub fn enable_auto_build(mut self, input: bool) -> Self {
293 self.enable_auto_build = ::std::option::Option::Some(input);
294 self
295 }
296 pub fn set_enable_auto_build(mut self, input: ::std::option::Option<bool>) -> Self {
298 self.enable_auto_build = input;
299 self
300 }
301 pub fn get_enable_auto_build(&self) -> &::std::option::Option<bool> {
303 &self.enable_auto_build
304 }
305 pub fn enable_skew_protection(mut self, input: bool) -> Self {
308 self.enable_skew_protection = ::std::option::Option::Some(input);
309 self
310 }
311 pub fn set_enable_skew_protection(mut self, input: ::std::option::Option<bool>) -> Self {
314 self.enable_skew_protection = input;
315 self
316 }
317 pub fn get_enable_skew_protection(&self) -> &::std::option::Option<bool> {
320 &self.enable_skew_protection
321 }
322 pub fn environment_variables(
328 mut self,
329 k: impl ::std::convert::Into<::std::string::String>,
330 v: impl ::std::convert::Into<::std::string::String>,
331 ) -> Self {
332 let mut hash_map = self.environment_variables.unwrap_or_default();
333 hash_map.insert(k.into(), v.into());
334 self.environment_variables = ::std::option::Option::Some(hash_map);
335 self
336 }
337 pub fn set_environment_variables(
339 mut self,
340 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
341 ) -> Self {
342 self.environment_variables = input;
343 self
344 }
345 pub fn get_environment_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
347 &self.environment_variables
348 }
349 pub fn basic_auth_credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351 self.basic_auth_credentials = ::std::option::Option::Some(input.into());
352 self
353 }
354 pub fn set_basic_auth_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356 self.basic_auth_credentials = input;
357 self
358 }
359 pub fn get_basic_auth_credentials(&self) -> &::std::option::Option<::std::string::String> {
361 &self.basic_auth_credentials
362 }
363 pub fn enable_basic_auth(mut self, input: bool) -> Self {
365 self.enable_basic_auth = ::std::option::Option::Some(input);
366 self
367 }
368 pub fn set_enable_basic_auth(mut self, input: ::std::option::Option<bool>) -> Self {
370 self.enable_basic_auth = input;
371 self
372 }
373 pub fn get_enable_basic_auth(&self) -> &::std::option::Option<bool> {
375 &self.enable_basic_auth
376 }
377 pub fn enable_performance_mode(mut self, input: bool) -> Self {
380 self.enable_performance_mode = ::std::option::Option::Some(input);
381 self
382 }
383 pub fn set_enable_performance_mode(mut self, input: ::std::option::Option<bool>) -> Self {
386 self.enable_performance_mode = input;
387 self
388 }
389 pub fn get_enable_performance_mode(&self) -> &::std::option::Option<bool> {
392 &self.enable_performance_mode
393 }
394 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
400 let mut hash_map = self.tags.unwrap_or_default();
401 hash_map.insert(k.into(), v.into());
402 self.tags = ::std::option::Option::Some(hash_map);
403 self
404 }
405 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
407 self.tags = input;
408 self
409 }
410 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
412 &self.tags
413 }
414 pub fn build_spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
416 self.build_spec = ::std::option::Option::Some(input.into());
417 self
418 }
419 pub fn set_build_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
421 self.build_spec = input;
422 self
423 }
424 pub fn get_build_spec(&self) -> &::std::option::Option<::std::string::String> {
426 &self.build_spec
427 }
428 pub fn ttl(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
430 self.ttl = ::std::option::Option::Some(input.into());
431 self
432 }
433 pub fn set_ttl(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
435 self.ttl = input;
436 self
437 }
438 pub fn get_ttl(&self) -> &::std::option::Option<::std::string::String> {
440 &self.ttl
441 }
442 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
444 self.display_name = ::std::option::Option::Some(input.into());
445 self
446 }
447 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
449 self.display_name = input;
450 self
451 }
452 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
454 &self.display_name
455 }
456 pub fn enable_pull_request_preview(mut self, input: bool) -> Self {
458 self.enable_pull_request_preview = ::std::option::Option::Some(input);
459 self
460 }
461 pub fn set_enable_pull_request_preview(mut self, input: ::std::option::Option<bool>) -> Self {
463 self.enable_pull_request_preview = input;
464 self
465 }
466 pub fn get_enable_pull_request_preview(&self) -> &::std::option::Option<bool> {
468 &self.enable_pull_request_preview
469 }
470 pub fn pull_request_environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
472 self.pull_request_environment_name = ::std::option::Option::Some(input.into());
473 self
474 }
475 pub fn set_pull_request_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
477 self.pull_request_environment_name = input;
478 self
479 }
480 pub fn get_pull_request_environment_name(&self) -> &::std::option::Option<::std::string::String> {
482 &self.pull_request_environment_name
483 }
484 pub fn backend_environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
487 self.backend_environment_arn = ::std::option::Option::Some(input.into());
488 self
489 }
490 pub fn set_backend_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
493 self.backend_environment_arn = input;
494 self
495 }
496 pub fn get_backend_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
499 &self.backend_environment_arn
500 }
501 pub fn backend(mut self, input: crate::types::Backend) -> Self {
504 self.backend = ::std::option::Option::Some(input);
505 self
506 }
507 pub fn set_backend(mut self, input: ::std::option::Option<crate::types::Backend>) -> Self {
510 self.backend = input;
511 self
512 }
513 pub fn get_backend(&self) -> &::std::option::Option<crate::types::Backend> {
516 &self.backend
517 }
518 pub fn compute_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
520 self.compute_role_arn = ::std::option::Option::Some(input.into());
521 self
522 }
523 pub fn set_compute_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
525 self.compute_role_arn = input;
526 self
527 }
528 pub fn get_compute_role_arn(&self) -> &::std::option::Option<::std::string::String> {
530 &self.compute_role_arn
531 }
532 pub fn build(
534 self,
535 ) -> ::std::result::Result<crate::operation::create_branch::CreateBranchInput, ::aws_smithy_types::error::operation::BuildError> {
536 ::std::result::Result::Ok(crate::operation::create_branch::CreateBranchInput {
537 app_id: self.app_id,
538 branch_name: self.branch_name,
539 description: self.description,
540 stage: self.stage,
541 framework: self.framework,
542 enable_notification: self.enable_notification,
543 enable_auto_build: self.enable_auto_build,
544 enable_skew_protection: self.enable_skew_protection,
545 environment_variables: self.environment_variables,
546 basic_auth_credentials: self.basic_auth_credentials,
547 enable_basic_auth: self.enable_basic_auth,
548 enable_performance_mode: self.enable_performance_mode,
549 tags: self.tags,
550 build_spec: self.build_spec,
551 ttl: self.ttl,
552 display_name: self.display_name,
553 enable_pull_request_preview: self.enable_pull_request_preview,
554 pull_request_environment_name: self.pull_request_environment_name,
555 backend_environment_arn: self.backend_environment_arn,
556 backend: self.backend,
557 compute_role_arn: self.compute_role_arn,
558 })
559 }
560}
561impl ::std::fmt::Debug for CreateBranchInputBuilder {
562 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
563 let mut formatter = f.debug_struct("CreateBranchInputBuilder");
564 formatter.field("app_id", &self.app_id);
565 formatter.field("branch_name", &self.branch_name);
566 formatter.field("description", &self.description);
567 formatter.field("stage", &self.stage);
568 formatter.field("framework", &self.framework);
569 formatter.field("enable_notification", &self.enable_notification);
570 formatter.field("enable_auto_build", &self.enable_auto_build);
571 formatter.field("enable_skew_protection", &self.enable_skew_protection);
572 formatter.field("environment_variables", &self.environment_variables);
573 formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
574 formatter.field("enable_basic_auth", &self.enable_basic_auth);
575 formatter.field("enable_performance_mode", &self.enable_performance_mode);
576 formatter.field("tags", &self.tags);
577 formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
578 formatter.field("ttl", &self.ttl);
579 formatter.field("display_name", &self.display_name);
580 formatter.field("enable_pull_request_preview", &self.enable_pull_request_preview);
581 formatter.field("pull_request_environment_name", &self.pull_request_environment_name);
582 formatter.field("backend_environment_arn", &self.backend_environment_arn);
583 formatter.field("backend", &self.backend);
584 formatter.field("compute_role_arn", &self.compute_role_arn);
585 formatter.finish()
586 }
587}