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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The output for <code>ValidateTemplate</code> action.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ValidateTemplateOutput {
    /// <p>A list of <code>TemplateParameter</code> structures.</p>
    pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::TemplateParameter>>,
    /// <p>The description found within the template.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an InsufficientCapabilities error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub capabilities_reason: ::std::option::Option<::std::string::String>,
    /// <p>A list of the transforms that are declared in the template.</p>
    pub declared_transforms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    _request_id: Option<String>,
}
impl ValidateTemplateOutput {
    /// <p>A list of <code>TemplateParameter</code> structures.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters.is_none()`.
    pub fn parameters(&self) -> &[crate::types::TemplateParameter] {
        self.parameters.as_deref().unwrap_or_default()
    }
    /// <p>The description found within the template.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an InsufficientCapabilities error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capabilities.is_none()`.
    pub fn capabilities(&self) -> &[crate::types::Capability] {
        self.capabilities.as_deref().unwrap_or_default()
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn capabilities_reason(&self) -> ::std::option::Option<&str> {
        self.capabilities_reason.as_deref()
    }
    /// <p>A list of the transforms that are declared in the template.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.declared_transforms.is_none()`.
    pub fn declared_transforms(&self) -> &[::std::string::String] {
        self.declared_transforms.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for ValidateTemplateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ValidateTemplateOutput {
    /// Creates a new builder-style object to manufacture [`ValidateTemplateOutput`](crate::operation::validate_template::ValidateTemplateOutput).
    pub fn builder() -> crate::operation::validate_template::builders::ValidateTemplateOutputBuilder {
        crate::operation::validate_template::builders::ValidateTemplateOutputBuilder::default()
    }
}

/// A builder for [`ValidateTemplateOutput`](crate::operation::validate_template::ValidateTemplateOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ValidateTemplateOutputBuilder {
    pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::TemplateParameter>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
    pub(crate) capabilities_reason: ::std::option::Option<::std::string::String>,
    pub(crate) declared_transforms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    _request_id: Option<String>,
}
impl ValidateTemplateOutputBuilder {
    /// Appends an item to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>A list of <code>TemplateParameter</code> structures.</p>
    pub fn parameters(mut self, input: crate::types::TemplateParameter) -> Self {
        let mut v = self.parameters.unwrap_or_default();
        v.push(input);
        self.parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of <code>TemplateParameter</code> structures.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TemplateParameter>>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>A list of <code>TemplateParameter</code> structures.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TemplateParameter>> {
        &self.parameters
    }
    /// <p>The description found within the template.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description found within the template.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description found within the template.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `capabilities`.
    ///
    /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
    ///
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an InsufficientCapabilities error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub fn capabilities(mut self, input: crate::types::Capability) -> Self {
        let mut v = self.capabilities.unwrap_or_default();
        v.push(input);
        self.capabilities = ::std::option::Option::Some(v);
        self
    }
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an InsufficientCapabilities error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>) -> Self {
        self.capabilities = input;
        self
    }
    /// <p>The capabilities found within the template. If your template contains IAM resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use the <code>CreateStack</code> or <code>UpdateStack</code> actions with your template; otherwise, those actions return an InsufficientCapabilities error.</p>
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities">Acknowledging IAM Resources in CloudFormation Templates</a>.</p>
    pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Capability>> {
        &self.capabilities
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn capabilities_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capabilities_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn set_capabilities_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capabilities_reason = input;
        self
    }
    /// <p>The list of resources that generated the values in the <code>Capabilities</code> response element.</p>
    pub fn get_capabilities_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.capabilities_reason
    }
    /// Appends an item to `declared_transforms`.
    ///
    /// To override the contents of this collection use [`set_declared_transforms`](Self::set_declared_transforms).
    ///
    /// <p>A list of the transforms that are declared in the template.</p>
    pub fn declared_transforms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.declared_transforms.unwrap_or_default();
        v.push(input.into());
        self.declared_transforms = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of the transforms that are declared in the template.</p>
    pub fn set_declared_transforms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.declared_transforms = input;
        self
    }
    /// <p>A list of the transforms that are declared in the template.</p>
    pub fn get_declared_transforms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.declared_transforms
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ValidateTemplateOutput`](crate::operation::validate_template::ValidateTemplateOutput).
    pub fn build(self) -> crate::operation::validate_template::ValidateTemplateOutput {
        crate::operation::validate_template::ValidateTemplateOutput {
            parameters: self.parameters,
            description: self.description,
            capabilities: self.capabilities,
            capabilities_reason: self.capabilities_reason,
            declared_transforms: self.declared_transforms,
            _request_id: self._request_id,
        }
    }
}