aws_sdk_cloudformation/operation/get_template/_get_template_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The input for a <code>GetTemplate</code> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetTemplateInput {
7 /// <p>The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:</p>
8 /// <ul>
9 /// <li>
10 /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
11 /// <li>
12 /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
13 /// </ul>
14 pub stack_name: ::std::option::Option<::std::string::String>,
15 /// <p>The name or Amazon Resource Name (ARN) of a change set for which CloudFormation returns the associated template. If you specify a name, you must also specify the <code>StackName</code>.</p>
16 pub change_set_name: ::std::option::Option<::std::string::String>,
17 /// <p>For templates that include transforms, the stage of the template that CloudFormation returns. To get the user-submitted template, specify <code>Original</code>. To get the template after CloudFormation has processed all transforms, specify <code>Processed</code>.</p>
18 /// <p>If the template doesn't include transforms, <code>Original</code> and <code>Processed</code> return the same template. By default, CloudFormation specifies <code>Processed</code>.</p>
19 pub template_stage: ::std::option::Option<crate::types::TemplateStage>,
20}
21impl GetTemplateInput {
22 /// <p>The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:</p>
23 /// <ul>
24 /// <li>
25 /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
26 /// <li>
27 /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
28 /// </ul>
29 pub fn stack_name(&self) -> ::std::option::Option<&str> {
30 self.stack_name.as_deref()
31 }
32 /// <p>The name or Amazon Resource Name (ARN) of a change set for which CloudFormation returns the associated template. If you specify a name, you must also specify the <code>StackName</code>.</p>
33 pub fn change_set_name(&self) -> ::std::option::Option<&str> {
34 self.change_set_name.as_deref()
35 }
36 /// <p>For templates that include transforms, the stage of the template that CloudFormation returns. To get the user-submitted template, specify <code>Original</code>. To get the template after CloudFormation has processed all transforms, specify <code>Processed</code>.</p>
37 /// <p>If the template doesn't include transforms, <code>Original</code> and <code>Processed</code> return the same template. By default, CloudFormation specifies <code>Processed</code>.</p>
38 pub fn template_stage(&self) -> ::std::option::Option<&crate::types::TemplateStage> {
39 self.template_stage.as_ref()
40 }
41}
42impl GetTemplateInput {
43 /// Creates a new builder-style object to manufacture [`GetTemplateInput`](crate::operation::get_template::GetTemplateInput).
44 pub fn builder() -> crate::operation::get_template::builders::GetTemplateInputBuilder {
45 crate::operation::get_template::builders::GetTemplateInputBuilder::default()
46 }
47}
48
49/// A builder for [`GetTemplateInput`](crate::operation::get_template::GetTemplateInput).
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct GetTemplateInputBuilder {
53 pub(crate) stack_name: ::std::option::Option<::std::string::String>,
54 pub(crate) change_set_name: ::std::option::Option<::std::string::String>,
55 pub(crate) template_stage: ::std::option::Option<crate::types::TemplateStage>,
56}
57impl GetTemplateInputBuilder {
58 /// <p>The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:</p>
59 /// <ul>
60 /// <li>
61 /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
62 /// <li>
63 /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
64 /// </ul>
65 pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.stack_name = ::std::option::Option::Some(input.into());
67 self
68 }
69 /// <p>The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:</p>
70 /// <ul>
71 /// <li>
72 /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
73 /// <li>
74 /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
75 /// </ul>
76 pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77 self.stack_name = input;
78 self
79 }
80 /// <p>The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:</p>
81 /// <ul>
82 /// <li>
83 /// <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p></li>
84 /// <li>
85 /// <p>Deleted stacks: You must specify the unique stack ID.</p></li>
86 /// </ul>
87 pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
88 &self.stack_name
89 }
90 /// <p>The name or Amazon Resource Name (ARN) of a change set for which CloudFormation returns the associated template. If you specify a name, you must also specify the <code>StackName</code>.</p>
91 pub fn change_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.change_set_name = ::std::option::Option::Some(input.into());
93 self
94 }
95 /// <p>The name or Amazon Resource Name (ARN) of a change set for which CloudFormation returns the associated template. If you specify a name, you must also specify the <code>StackName</code>.</p>
96 pub fn set_change_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.change_set_name = input;
98 self
99 }
100 /// <p>The name or Amazon Resource Name (ARN) of a change set for which CloudFormation returns the associated template. If you specify a name, you must also specify the <code>StackName</code>.</p>
101 pub fn get_change_set_name(&self) -> &::std::option::Option<::std::string::String> {
102 &self.change_set_name
103 }
104 /// <p>For templates that include transforms, the stage of the template that CloudFormation returns. To get the user-submitted template, specify <code>Original</code>. To get the template after CloudFormation has processed all transforms, specify <code>Processed</code>.</p>
105 /// <p>If the template doesn't include transforms, <code>Original</code> and <code>Processed</code> return the same template. By default, CloudFormation specifies <code>Processed</code>.</p>
106 pub fn template_stage(mut self, input: crate::types::TemplateStage) -> Self {
107 self.template_stage = ::std::option::Option::Some(input);
108 self
109 }
110 /// <p>For templates that include transforms, the stage of the template that CloudFormation returns. To get the user-submitted template, specify <code>Original</code>. To get the template after CloudFormation has processed all transforms, specify <code>Processed</code>.</p>
111 /// <p>If the template doesn't include transforms, <code>Original</code> and <code>Processed</code> return the same template. By default, CloudFormation specifies <code>Processed</code>.</p>
112 pub fn set_template_stage(mut self, input: ::std::option::Option<crate::types::TemplateStage>) -> Self {
113 self.template_stage = input;
114 self
115 }
116 /// <p>For templates that include transforms, the stage of the template that CloudFormation returns. To get the user-submitted template, specify <code>Original</code>. To get the template after CloudFormation has processed all transforms, specify <code>Processed</code>.</p>
117 /// <p>If the template doesn't include transforms, <code>Original</code> and <code>Processed</code> return the same template. By default, CloudFormation specifies <code>Processed</code>.</p>
118 pub fn get_template_stage(&self) -> &::std::option::Option<crate::types::TemplateStage> {
119 &self.template_stage
120 }
121 /// Consumes the builder and constructs a [`GetTemplateInput`](crate::operation::get_template::GetTemplateInput).
122 pub fn build(self) -> ::std::result::Result<crate::operation::get_template::GetTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
123 ::std::result::Result::Ok(crate::operation::get_template::GetTemplateInput {
124 stack_name: self.stack_name,
125 change_set_name: self.change_set_name,
126 template_stage: self.template_stage,
127 })
128 }
129}