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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateStageOutput {
    /// <p>Settings for logging access in this stage.</p>
    pub access_log_settings: ::std::option::Option<crate::types::AccessLogSettings>,
    /// <p>Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.</p>
    pub api_gateway_managed: ::std::option::Option<bool>,
    /// <p>Specifies whether updates to an API automatically trigger a new deployment. The default value is false.</p>
    pub auto_deploy: ::std::option::Option<bool>,
    /// <p>The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.</p>
    pub client_certificate_id: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp when the stage was created.</p>
    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Default route settings for the stage.</p>
    pub default_route_settings: ::std::option::Option<crate::types::RouteSettings>,
    /// <p>The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.</p>
    pub deployment_id: ::std::option::Option<::std::string::String>,
    /// <p>The description of the stage.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.</p>
    pub last_deployment_status_message: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp when the stage was last updated.</p>
    pub last_updated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Route settings for the stage, by routeKey.</p>
    pub route_settings: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::RouteSettings>>,
    /// <p>The name of the stage.</p>
    pub stage_name: ::std::option::Option<::std::string::String>,
    /// <p>A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+.</p>
    pub stage_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The collection of tags. Each tag element is associated with a given resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl UpdateStageOutput {
    /// <p>Settings for logging access in this stage.</p>
    pub fn access_log_settings(&self) -> ::std::option::Option<&crate::types::AccessLogSettings> {
        self.access_log_settings.as_ref()
    }
    /// <p>Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.</p>
    pub fn api_gateway_managed(&self) -> ::std::option::Option<bool> {
        self.api_gateway_managed
    }
    /// <p>Specifies whether updates to an API automatically trigger a new deployment. The default value is false.</p>
    pub fn auto_deploy(&self) -> ::std::option::Option<bool> {
        self.auto_deploy
    }
    /// <p>The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.</p>
    pub fn client_certificate_id(&self) -> ::std::option::Option<&str> {
        self.client_certificate_id.as_deref()
    }
    /// <p>The timestamp when the stage was created.</p>
    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_date.as_ref()
    }
    /// <p>Default route settings for the stage.</p>
    pub fn default_route_settings(&self) -> ::std::option::Option<&crate::types::RouteSettings> {
        self.default_route_settings.as_ref()
    }
    /// <p>The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.</p>
    pub fn deployment_id(&self) -> ::std::option::Option<&str> {
        self.deployment_id.as_deref()
    }
    /// <p>The description of the stage.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.</p>
    pub fn last_deployment_status_message(&self) -> ::std::option::Option<&str> {
        self.last_deployment_status_message.as_deref()
    }
    /// <p>The timestamp when the stage was last updated.</p>
    pub fn last_updated_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_date.as_ref()
    }
    /// <p>Route settings for the stage, by routeKey.</p>
    pub fn route_settings(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::RouteSettings>> {
        self.route_settings.as_ref()
    }
    /// <p>The name of the stage.</p>
    pub fn stage_name(&self) -> ::std::option::Option<&str> {
        self.stage_name.as_deref()
    }
    /// <p>A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+.</p>
    pub fn stage_variables(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.stage_variables.as_ref()
    }
    /// <p>The collection of tags. Each tag element is associated with a given resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateStageOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateStageOutput {
    /// Creates a new builder-style object to manufacture [`UpdateStageOutput`](crate::operation::update_stage::UpdateStageOutput).
    pub fn builder() -> crate::operation::update_stage::builders::UpdateStageOutputBuilder {
        crate::operation::update_stage::builders::UpdateStageOutputBuilder::default()
    }
}

/// A builder for [`UpdateStageOutput`](crate::operation::update_stage::UpdateStageOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateStageOutputBuilder {
    pub(crate) access_log_settings: ::std::option::Option<crate::types::AccessLogSettings>,
    pub(crate) api_gateway_managed: ::std::option::Option<bool>,
    pub(crate) auto_deploy: ::std::option::Option<bool>,
    pub(crate) client_certificate_id: ::std::option::Option<::std::string::String>,
    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) default_route_settings: ::std::option::Option<crate::types::RouteSettings>,
    pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) last_deployment_status_message: ::std::option::Option<::std::string::String>,
    pub(crate) last_updated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) route_settings: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::RouteSettings>>,
    pub(crate) stage_name: ::std::option::Option<::std::string::String>,
    pub(crate) stage_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl UpdateStageOutputBuilder {
    /// <p>Settings for logging access in this stage.</p>
    pub fn access_log_settings(mut self, input: crate::types::AccessLogSettings) -> Self {
        self.access_log_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>Settings for logging access in this stage.</p>
    pub fn set_access_log_settings(mut self, input: ::std::option::Option<crate::types::AccessLogSettings>) -> Self {
        self.access_log_settings = input;
        self
    }
    /// <p>Settings for logging access in this stage.</p>
    pub fn get_access_log_settings(&self) -> &::std::option::Option<crate::types::AccessLogSettings> {
        &self.access_log_settings
    }
    /// <p>Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.</p>
    pub fn api_gateway_managed(mut self, input: bool) -> Self {
        self.api_gateway_managed = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.</p>
    pub fn set_api_gateway_managed(mut self, input: ::std::option::Option<bool>) -> Self {
        self.api_gateway_managed = input;
        self
    }
    /// <p>Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.</p>
    pub fn get_api_gateway_managed(&self) -> &::std::option::Option<bool> {
        &self.api_gateway_managed
    }
    /// <p>Specifies whether updates to an API automatically trigger a new deployment. The default value is false.</p>
    pub fn auto_deploy(mut self, input: bool) -> Self {
        self.auto_deploy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether updates to an API automatically trigger a new deployment. The default value is false.</p>
    pub fn set_auto_deploy(mut self, input: ::std::option::Option<bool>) -> Self {
        self.auto_deploy = input;
        self
    }
    /// <p>Specifies whether updates to an API automatically trigger a new deployment. The default value is false.</p>
    pub fn get_auto_deploy(&self) -> &::std::option::Option<bool> {
        &self.auto_deploy
    }
    /// <p>The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.</p>
    pub fn client_certificate_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_certificate_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.</p>
    pub fn set_client_certificate_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_certificate_id = input;
        self
    }
    /// <p>The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.</p>
    pub fn get_client_certificate_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_certificate_id
    }
    /// <p>The timestamp when the stage was created.</p>
    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the stage was created.</p>
    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_date = input;
        self
    }
    /// <p>The timestamp when the stage was created.</p>
    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_date
    }
    /// <p>Default route settings for the stage.</p>
    pub fn default_route_settings(mut self, input: crate::types::RouteSettings) -> Self {
        self.default_route_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>Default route settings for the stage.</p>
    pub fn set_default_route_settings(mut self, input: ::std::option::Option<crate::types::RouteSettings>) -> Self {
        self.default_route_settings = input;
        self
    }
    /// <p>Default route settings for the stage.</p>
    pub fn get_default_route_settings(&self) -> &::std::option::Option<crate::types::RouteSettings> {
        &self.default_route_settings
    }
    /// <p>The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.</p>
    pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deployment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.</p>
    pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.deployment_id = input;
        self
    }
    /// <p>The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.</p>
    pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_id
    }
    /// <p>The description of the stage.</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 stage.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the stage.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.</p>
    pub fn last_deployment_status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_deployment_status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.</p>
    pub fn set_last_deployment_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_deployment_status_message = input;
        self
    }
    /// <p>Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.</p>
    pub fn get_last_deployment_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_deployment_status_message
    }
    /// <p>The timestamp when the stage was last updated.</p>
    pub fn last_updated_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the stage was last updated.</p>
    pub fn set_last_updated_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_date = input;
        self
    }
    /// <p>The timestamp when the stage was last updated.</p>
    pub fn get_last_updated_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_date
    }
    /// Adds a key-value pair to `route_settings`.
    ///
    /// To override the contents of this collection use [`set_route_settings`](Self::set_route_settings).
    ///
    /// <p>Route settings for the stage, by routeKey.</p>
    pub fn route_settings(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::RouteSettings) -> Self {
        let mut hash_map = self.route_settings.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.route_settings = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Route settings for the stage, by routeKey.</p>
    pub fn set_route_settings(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::RouteSettings>>,
    ) -> Self {
        self.route_settings = input;
        self
    }
    /// <p>Route settings for the stage, by routeKey.</p>
    pub fn get_route_settings(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::RouteSettings>> {
        &self.route_settings
    }
    /// <p>The name of the stage.</p>
    pub fn stage_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stage_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the stage.</p>
    pub fn set_stage_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stage_name = input;
        self
    }
    /// <p>The name of the stage.</p>
    pub fn get_stage_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.stage_name
    }
    /// Adds a key-value pair to `stage_variables`.
    ///
    /// To override the contents of this collection use [`set_stage_variables`](Self::set_stage_variables).
    ///
    /// <p>A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+.</p>
    pub fn stage_variables(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.stage_variables.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.stage_variables = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+.</p>
    pub fn set_stage_variables(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.stage_variables = input;
        self
    }
    /// <p>A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+.</p>
    pub fn get_stage_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.stage_variables
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The collection of tags. Each tag element is associated with a given resource.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The collection of tags. Each tag element is associated with a given resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The collection of tags. Each tag element is associated with a given resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    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 [`UpdateStageOutput`](crate::operation::update_stage::UpdateStageOutput).
    pub fn build(self) -> crate::operation::update_stage::UpdateStageOutput {
        crate::operation::update_stage::UpdateStageOutput {
            access_log_settings: self.access_log_settings,
            api_gateway_managed: self.api_gateway_managed,
            auto_deploy: self.auto_deploy,
            client_certificate_id: self.client_certificate_id,
            created_date: self.created_date,
            default_route_settings: self.default_route_settings,
            deployment_id: self.deployment_id,
            description: self.description,
            last_deployment_status_message: self.last_deployment_status_message,
            last_updated_date: self.last_updated_date,
            route_settings: self.route_settings,
            stage_name: self.stage_name,
            stage_variables: self.stage_variables,
            tags: self.tags,
            _request_id: self._request_id,
        }
    }
}