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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The details of user parameters of an environment blueprint.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CustomParameter {
    /// <p>The key name of the parameter.</p>
    pub key_name: ::std::string::String,
    /// <p>The description of the parameter.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The filed type of the parameter.</p>
    pub field_type: ::std::string::String,
    /// <p>The default value of the parameter.</p>
    pub default_value: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether the parameter is editable.</p>
    pub is_editable: ::std::option::Option<bool>,
    /// <p>Specifies whether the custom parameter is optional.</p>
    pub is_optional: ::std::option::Option<bool>,
}
impl CustomParameter {
    /// <p>The key name of the parameter.</p>
    pub fn key_name(&self) -> &str {
        use std::ops::Deref;
        self.key_name.deref()
    }
    /// <p>The description of the parameter.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The filed type of the parameter.</p>
    pub fn field_type(&self) -> &str {
        use std::ops::Deref;
        self.field_type.deref()
    }
    /// <p>The default value of the parameter.</p>
    pub fn default_value(&self) -> ::std::option::Option<&str> {
        self.default_value.as_deref()
    }
    /// <p>Specifies whether the parameter is editable.</p>
    pub fn is_editable(&self) -> ::std::option::Option<bool> {
        self.is_editable
    }
    /// <p>Specifies whether the custom parameter is optional.</p>
    pub fn is_optional(&self) -> ::std::option::Option<bool> {
        self.is_optional
    }
}
impl ::std::fmt::Debug for CustomParameter {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CustomParameter");
        formatter.field("key_name", &self.key_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("field_type", &self.field_type);
        formatter.field("default_value", &self.default_value);
        formatter.field("is_editable", &self.is_editable);
        formatter.field("is_optional", &self.is_optional);
        formatter.finish()
    }
}
impl CustomParameter {
    /// Creates a new builder-style object to manufacture [`CustomParameter`](crate::types::CustomParameter).
    pub fn builder() -> crate::types::builders::CustomParameterBuilder {
        crate::types::builders::CustomParameterBuilder::default()
    }
}

/// A builder for [`CustomParameter`](crate::types::CustomParameter).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct CustomParameterBuilder {
    pub(crate) key_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) field_type: ::std::option::Option<::std::string::String>,
    pub(crate) default_value: ::std::option::Option<::std::string::String>,
    pub(crate) is_editable: ::std::option::Option<bool>,
    pub(crate) is_optional: ::std::option::Option<bool>,
}
impl CustomParameterBuilder {
    /// <p>The key name of the parameter.</p>
    /// This field is required.
    pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The key name of the parameter.</p>
    pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_name = input;
        self
    }
    /// <p>The key name of the parameter.</p>
    pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_name
    }
    /// <p>The description of the parameter.</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 of the parameter.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the parameter.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The filed type of the parameter.</p>
    /// This field is required.
    pub fn field_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.field_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The filed type of the parameter.</p>
    pub fn set_field_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.field_type = input;
        self
    }
    /// <p>The filed type of the parameter.</p>
    pub fn get_field_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.field_type
    }
    /// <p>The default value of the parameter.</p>
    pub fn default_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.default_value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The default value of the parameter.</p>
    pub fn set_default_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.default_value = input;
        self
    }
    /// <p>The default value of the parameter.</p>
    pub fn get_default_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.default_value
    }
    /// <p>Specifies whether the parameter is editable.</p>
    pub fn is_editable(mut self, input: bool) -> Self {
        self.is_editable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the parameter is editable.</p>
    pub fn set_is_editable(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_editable = input;
        self
    }
    /// <p>Specifies whether the parameter is editable.</p>
    pub fn get_is_editable(&self) -> &::std::option::Option<bool> {
        &self.is_editable
    }
    /// <p>Specifies whether the custom parameter is optional.</p>
    pub fn is_optional(mut self, input: bool) -> Self {
        self.is_optional = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the custom parameter is optional.</p>
    pub fn set_is_optional(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_optional = input;
        self
    }
    /// <p>Specifies whether the custom parameter is optional.</p>
    pub fn get_is_optional(&self) -> &::std::option::Option<bool> {
        &self.is_optional
    }
    /// Consumes the builder and constructs a [`CustomParameter`](crate::types::CustomParameter).
    /// This method will fail if any of the following fields are not set:
    /// - [`key_name`](crate::types::builders::CustomParameterBuilder::key_name)
    /// - [`field_type`](crate::types::builders::CustomParameterBuilder::field_type)
    pub fn build(self) -> ::std::result::Result<crate::types::CustomParameter, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::CustomParameter {
            key_name: self.key_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "key_name",
                    "key_name was not specified but it is required when building CustomParameter",
                )
            })?,
            description: self.description,
            field_type: self.field_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "field_type",
                    "field_type was not specified but it is required when building CustomParameter",
                )
            })?,
            default_value: self.default_value,
            is_editable: self.is_editable,
            is_optional: self.is_optional,
        })
    }
}
impl ::std::fmt::Debug for CustomParameterBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CustomParameterBuilder");
        formatter.field("key_name", &self.key_name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("field_type", &self.field_type);
        formatter.field("default_value", &self.default_value);
        formatter.field("is_editable", &self.is_editable);
        formatter.field("is_optional", &self.is_optional);
        formatter.finish()
    }
}