rusoto_elbv2/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto::xml::error::*;
24use rusoto_core::proto::xml::util::{
25    self as xml_util, deserialize_elements, find_start_element, skip_tree,
26};
27use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
28use rusoto_core::request::HttpResponse;
29use rusoto_core::signature::SignedRequest;
30#[cfg(feature = "deserialize_structs")]
31use serde::Deserialize;
32#[cfg(feature = "serialize_structs")]
33use serde::Serialize;
34use serde_urlencoded;
35use std::str::FromStr;
36use xml::EventReader;
37
38impl ElbClient {
39    fn new_params(&self, operation_name: &str) -> Params {
40        let mut params = Params::new();
41
42        params.put("Action", operation_name);
43        params.put("Version", "2015-12-01");
44
45        params
46    }
47
48    async fn sign_and_dispatch<E>(
49        &self,
50        request: SignedRequest,
51        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
52    ) -> Result<HttpResponse, RusotoError<E>> {
53        let mut response = self.client.sign_and_dispatch(request).await?;
54        if !response.status.is_success() {
55            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
56            return Err(from_response(response));
57        }
58
59        Ok(response)
60    }
61}
62
63/// <p>Information about an action.</p>
64#[derive(Clone, Debug, Default, PartialEq)]
65#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
66#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
67pub struct Action {
68    /// <p>[HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when <code>Type</code> is <code>authenticate-cognito</code>.</p>
69    pub authenticate_cognito_config: Option<AuthenticateCognitoActionConfig>,
70    /// <p>[HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when <code>Type</code> is <code>authenticate-oidc</code>.</p>
71    pub authenticate_oidc_config: Option<AuthenticateOidcActionConfig>,
72    /// <p>[Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when <code>Type</code> is <code>fixed-response</code>.</p>
73    pub fixed_response_config: Option<FixedResponseActionConfig>,
74    /// <p>Information for creating an action that distributes requests among one or more target groups. For Network Load Balancers, you can specify a single target group. Specify only when <code>Type</code> is <code>forward</code>. If you specify both <code>ForwardConfig</code> and <code>TargetGroupArn</code>, you can specify only one target group using <code>ForwardConfig</code> and it must be the same target group specified in <code>TargetGroupArn</code>.</p>
75    pub forward_config: Option<ForwardActionConfig>,
76    /// <p>The order for the action. This value is required for rules with multiple actions. The action with the lowest value for order is performed first. The last action to be performed must be one of the following types of actions: a <code>forward</code>, <code>fixed-response</code>, or <code>redirect</code>.</p>
77    pub order: Option<i64>,
78    /// <p>[Application Load Balancer] Information for creating a redirect action. Specify only when <code>Type</code> is <code>redirect</code>.</p>
79    pub redirect_config: Option<RedirectActionConfig>,
80    /// <p>The Amazon Resource Name (ARN) of the target group. Specify only when <code>Type</code> is <code>forward</code> and you want to route to a single target group. To route to one or more target groups, use <code>ForwardConfig</code> instead.</p>
81    pub target_group_arn: Option<String>,
82    /// <p>The type of action.</p>
83    pub type_: String,
84}
85
86#[allow(dead_code)]
87struct ActionDeserializer;
88impl ActionDeserializer {
89    #[allow(dead_code, unused_variables)]
90    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Action, XmlParseError> {
91        deserialize_elements::<_, Action, _>(tag_name, stack, |name, stack, obj| {
92            match name {
93                "AuthenticateCognitoConfig" => {
94                    obj.authenticate_cognito_config =
95                        Some(AuthenticateCognitoActionConfigDeserializer::deserialize(
96                            "AuthenticateCognitoConfig",
97                            stack,
98                        )?);
99                }
100                "AuthenticateOidcConfig" => {
101                    obj.authenticate_oidc_config =
102                        Some(AuthenticateOidcActionConfigDeserializer::deserialize(
103                            "AuthenticateOidcConfig",
104                            stack,
105                        )?);
106                }
107                "FixedResponseConfig" => {
108                    obj.fixed_response_config =
109                        Some(FixedResponseActionConfigDeserializer::deserialize(
110                            "FixedResponseConfig",
111                            stack,
112                        )?);
113                }
114                "ForwardConfig" => {
115                    obj.forward_config = Some(ForwardActionConfigDeserializer::deserialize(
116                        "ForwardConfig",
117                        stack,
118                    )?);
119                }
120                "Order" => {
121                    obj.order = Some(ActionOrderDeserializer::deserialize("Order", stack)?);
122                }
123                "RedirectConfig" => {
124                    obj.redirect_config = Some(RedirectActionConfigDeserializer::deserialize(
125                        "RedirectConfig",
126                        stack,
127                    )?);
128                }
129                "TargetGroupArn" => {
130                    obj.target_group_arn = Some(TargetGroupArnDeserializer::deserialize(
131                        "TargetGroupArn",
132                        stack,
133                    )?);
134                }
135                "Type" => {
136                    obj.type_ = ActionTypeEnumDeserializer::deserialize("Type", stack)?;
137                }
138                _ => skip_tree(stack),
139            }
140            Ok(())
141        })
142    }
143}
144
145/// Serialize `Action` contents to a `SignedRequest`.
146struct ActionSerializer;
147impl ActionSerializer {
148    fn serialize(params: &mut Params, name: &str, obj: &Action) {
149        let mut prefix = name.to_string();
150        if prefix != "" {
151            prefix.push_str(".");
152        }
153
154        if let Some(ref field_value) = obj.authenticate_cognito_config {
155            AuthenticateCognitoActionConfigSerializer::serialize(
156                params,
157                &format!("{}{}", prefix, "AuthenticateCognitoConfig"),
158                field_value,
159            );
160        }
161        if let Some(ref field_value) = obj.authenticate_oidc_config {
162            AuthenticateOidcActionConfigSerializer::serialize(
163                params,
164                &format!("{}{}", prefix, "AuthenticateOidcConfig"),
165                field_value,
166            );
167        }
168        if let Some(ref field_value) = obj.fixed_response_config {
169            FixedResponseActionConfigSerializer::serialize(
170                params,
171                &format!("{}{}", prefix, "FixedResponseConfig"),
172                field_value,
173            );
174        }
175        if let Some(ref field_value) = obj.forward_config {
176            ForwardActionConfigSerializer::serialize(
177                params,
178                &format!("{}{}", prefix, "ForwardConfig"),
179                field_value,
180            );
181        }
182        if let Some(ref field_value) = obj.order {
183            params.put(&format!("{}{}", prefix, "Order"), &field_value);
184        }
185        if let Some(ref field_value) = obj.redirect_config {
186            RedirectActionConfigSerializer::serialize(
187                params,
188                &format!("{}{}", prefix, "RedirectConfig"),
189                field_value,
190            );
191        }
192        if let Some(ref field_value) = obj.target_group_arn {
193            params.put(&format!("{}{}", prefix, "TargetGroupArn"), &field_value);
194        }
195        params.put(&format!("{}{}", prefix, "Type"), &obj.type_);
196    }
197}
198
199#[allow(dead_code)]
200struct ActionOrderDeserializer;
201impl ActionOrderDeserializer {
202    #[allow(dead_code, unused_variables)]
203    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
204        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
205    }
206}
207#[allow(dead_code)]
208struct ActionTypeEnumDeserializer;
209impl ActionTypeEnumDeserializer {
210    #[allow(dead_code, unused_variables)]
211    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
212        xml_util::deserialize_primitive(tag_name, stack, Ok)
213    }
214}
215#[allow(dead_code)]
216struct ActionsDeserializer;
217impl ActionsDeserializer {
218    #[allow(dead_code, unused_variables)]
219    fn deserialize<T: Peek + Next>(
220        tag_name: &str,
221        stack: &mut T,
222    ) -> Result<Vec<Action>, XmlParseError> {
223        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
224            if name == "member" {
225                obj.push(ActionDeserializer::deserialize("member", stack)?);
226            } else {
227                skip_tree(stack);
228            }
229            Ok(())
230        })
231    }
232}
233
234/// Serialize `Actions` contents to a `SignedRequest`.
235struct ActionsSerializer;
236impl ActionsSerializer {
237    fn serialize(params: &mut Params, name: &str, obj: &Vec<Action>) {
238        for (index, obj) in obj.iter().enumerate() {
239            let key = format!("{}.member.{}", name, index + 1);
240            ActionSerializer::serialize(params, &key, obj);
241        }
242    }
243}
244
245#[derive(Clone, Debug, Default, PartialEq)]
246#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
247pub struct AddListenerCertificatesInput {
248    /// <p>The certificate to add. You can specify one certificate per call. Set <code>CertificateArn</code> to the certificate ARN but do not set <code>IsDefault</code>.</p>
249    pub certificates: Vec<Certificate>,
250    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
251    pub listener_arn: String,
252}
253
254/// Serialize `AddListenerCertificatesInput` contents to a `SignedRequest`.
255struct AddListenerCertificatesInputSerializer;
256impl AddListenerCertificatesInputSerializer {
257    fn serialize(params: &mut Params, name: &str, obj: &AddListenerCertificatesInput) {
258        let mut prefix = name.to_string();
259        if prefix != "" {
260            prefix.push_str(".");
261        }
262
263        CertificateListSerializer::serialize(
264            params,
265            &format!("{}{}", prefix, "Certificates"),
266            &obj.certificates,
267        );
268        params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
269    }
270}
271
272#[derive(Clone, Debug, Default, PartialEq)]
273#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
274pub struct AddListenerCertificatesOutput {
275    /// <p>Information about the certificates in the certificate list.</p>
276    pub certificates: Option<Vec<Certificate>>,
277}
278
279#[allow(dead_code)]
280struct AddListenerCertificatesOutputDeserializer;
281impl AddListenerCertificatesOutputDeserializer {
282    #[allow(dead_code, unused_variables)]
283    fn deserialize<T: Peek + Next>(
284        tag_name: &str,
285        stack: &mut T,
286    ) -> Result<AddListenerCertificatesOutput, XmlParseError> {
287        deserialize_elements::<_, AddListenerCertificatesOutput, _>(
288            tag_name,
289            stack,
290            |name, stack, obj| {
291                match name {
292                    "Certificates" => {
293                        obj.certificates.get_or_insert(vec![]).extend(
294                            CertificateListDeserializer::deserialize("Certificates", stack)?,
295                        );
296                    }
297                    _ => skip_tree(stack),
298                }
299                Ok(())
300            },
301        )
302    }
303}
304#[derive(Clone, Debug, Default, PartialEq)]
305#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
306pub struct AddTagsInput {
307    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
308    pub resource_arns: Vec<String>,
309    /// <p>The tags.</p>
310    pub tags: Vec<Tag>,
311}
312
313/// Serialize `AddTagsInput` contents to a `SignedRequest`.
314struct AddTagsInputSerializer;
315impl AddTagsInputSerializer {
316    fn serialize(params: &mut Params, name: &str, obj: &AddTagsInput) {
317        let mut prefix = name.to_string();
318        if prefix != "" {
319            prefix.push_str(".");
320        }
321
322        ResourceArnsSerializer::serialize(
323            params,
324            &format!("{}{}", prefix, "ResourceArns"),
325            &obj.resource_arns,
326        );
327        TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), &obj.tags);
328    }
329}
330
331#[derive(Clone, Debug, Default, PartialEq)]
332#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
333pub struct AddTagsOutput {}
334
335#[allow(dead_code)]
336struct AddTagsOutputDeserializer;
337impl AddTagsOutputDeserializer {
338    #[allow(dead_code, unused_variables)]
339    fn deserialize<T: Peek + Next>(
340        tag_name: &str,
341        stack: &mut T,
342    ) -> Result<AddTagsOutput, XmlParseError> {
343        xml_util::start_element(tag_name, stack)?;
344
345        let obj = AddTagsOutput::default();
346
347        xml_util::end_element(tag_name, stack)?;
348
349        Ok(obj)
350    }
351}
352#[allow(dead_code)]
353struct AllocationIdDeserializer;
354impl AllocationIdDeserializer {
355    #[allow(dead_code, unused_variables)]
356    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
357        xml_util::deserialize_primitive(tag_name, stack, Ok)
358    }
359}
360#[allow(dead_code)]
361struct AlpnPolicyNameDeserializer;
362impl AlpnPolicyNameDeserializer {
363    #[allow(dead_code, unused_variables)]
364    fn deserialize<T: Peek + Next>(
365        tag_name: &str,
366        stack: &mut T,
367    ) -> Result<Vec<String>, XmlParseError> {
368        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
369            if name == "member" {
370                obj.push(AlpnPolicyValueDeserializer::deserialize("member", stack)?);
371            } else {
372                skip_tree(stack);
373            }
374            Ok(())
375        })
376    }
377}
378
379/// Serialize `AlpnPolicyName` contents to a `SignedRequest`.
380struct AlpnPolicyNameSerializer;
381impl AlpnPolicyNameSerializer {
382    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
383        for (index, obj) in obj.iter().enumerate() {
384            let key = format!("{}.member.{}", name, index + 1);
385            params.put(&key, &obj);
386        }
387    }
388}
389
390#[allow(dead_code)]
391struct AlpnPolicyValueDeserializer;
392impl AlpnPolicyValueDeserializer {
393    #[allow(dead_code, unused_variables)]
394    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
395        xml_util::deserialize_primitive(tag_name, stack, Ok)
396    }
397}
398#[allow(dead_code)]
399struct AuthenticateCognitoActionAuthenticationRequestExtraParamsDeserializer;
400impl AuthenticateCognitoActionAuthenticationRequestExtraParamsDeserializer {
401    #[allow(dead_code, unused_variables)]
402    fn deserialize<T: Peek + Next>(
403        tag_name: &str,
404        stack: &mut T,
405    ) -> Result<::std::collections::HashMap<String, String>, XmlParseError> {
406        xml_util::start_element(tag_name, stack)?;
407
408        let mut obj = ::std::collections::HashMap::new();
409
410        while xml_util::peek_at_name(stack)? == "entry" {
411            xml_util::start_element("entry", stack)?;
412            let key =
413                AuthenticateCognitoActionAuthenticationRequestParamNameDeserializer::deserialize(
414                    "key", stack,
415                )?;
416            let value =
417                AuthenticateCognitoActionAuthenticationRequestParamValueDeserializer::deserialize(
418                    "value", stack,
419                )?;
420            obj.insert(key, value);
421            xml_util::end_element("entry", stack)?;
422        }
423
424        xml_util::end_element(tag_name, stack)?;
425        Ok(obj)
426    }
427}
428
429/// Serialize `AuthenticateCognitoActionAuthenticationRequestExtraParams` contents to a `SignedRequest`.
430struct AuthenticateCognitoActionAuthenticationRequestExtraParamsSerializer;
431impl AuthenticateCognitoActionAuthenticationRequestExtraParamsSerializer {
432    fn serialize(
433        params: &mut Params,
434        name: &str,
435        obj: &::std::collections::HashMap<String, String>,
436    ) {
437        for (index, (key, value)) in obj.iter().enumerate() {
438            let prefix = format!("{}.{}", name, index + 1);
439            params.put(&format!("{}.{}", prefix, "key"), &key);
440            params.put(&format!("{}.{}", prefix, "Value"), &value);
441        }
442    }
443}
444
445#[allow(dead_code)]
446struct AuthenticateCognitoActionAuthenticationRequestParamNameDeserializer;
447impl AuthenticateCognitoActionAuthenticationRequestParamNameDeserializer {
448    #[allow(dead_code, unused_variables)]
449    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
450        xml_util::deserialize_primitive(tag_name, stack, Ok)
451    }
452}
453#[allow(dead_code)]
454struct AuthenticateCognitoActionAuthenticationRequestParamValueDeserializer;
455impl AuthenticateCognitoActionAuthenticationRequestParamValueDeserializer {
456    #[allow(dead_code, unused_variables)]
457    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
458        xml_util::deserialize_primitive(tag_name, stack, Ok)
459    }
460}
461#[allow(dead_code)]
462struct AuthenticateCognitoActionConditionalBehaviorEnumDeserializer;
463impl AuthenticateCognitoActionConditionalBehaviorEnumDeserializer {
464    #[allow(dead_code, unused_variables)]
465    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
466        xml_util::deserialize_primitive(tag_name, stack, Ok)
467    }
468}
469/// <p>Request parameters to use when integrating with Amazon Cognito to authenticate users.</p>
470#[derive(Clone, Debug, Default, PartialEq)]
471#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
472#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
473pub struct AuthenticateCognitoActionConfig {
474    /// <p>The query parameters (up to 10) to include in the redirect request to the authorization endpoint.</p>
475    pub authentication_request_extra_params: Option<::std::collections::HashMap<String, String>>,
476    /// <p><p>The behavior if the user is not authenticated. The following are possible values:</p> <ul> <li> <p>deny<code/> - Return an HTTP 401 Unauthorized error.</p> </li> <li> <p>allow<code/> - Allow the request to be forwarded to the target.</p> </li> <li> <p>authenticate<code/> - Redirect the request to the IdP authorization endpoint. This is the default value.</p> </li> </ul></p>
477    pub on_unauthenticated_request: Option<String>,
478    /// <p>The set of user claims to be requested from the IdP. The default is <code>openid</code>.</p> <p>To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.</p>
479    pub scope: Option<String>,
480    /// <p>The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.</p>
481    pub session_cookie_name: Option<String>,
482    /// <p>The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).</p>
483    pub session_timeout: Option<i64>,
484    /// <p>The Amazon Resource Name (ARN) of the Amazon Cognito user pool.</p>
485    pub user_pool_arn: String,
486    /// <p>The ID of the Amazon Cognito user pool client.</p>
487    pub user_pool_client_id: String,
488    /// <p>The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.</p>
489    pub user_pool_domain: String,
490}
491
492#[allow(dead_code)]
493struct AuthenticateCognitoActionConfigDeserializer;
494impl AuthenticateCognitoActionConfigDeserializer {
495    #[allow(dead_code, unused_variables)]
496    fn deserialize<T: Peek + Next>(
497        tag_name: &str,
498        stack: &mut T,
499    ) -> Result<AuthenticateCognitoActionConfig, XmlParseError> {
500        deserialize_elements::<_, AuthenticateCognitoActionConfig, _>(
501            tag_name,
502            stack,
503            |name, stack, obj| {
504                match name {
505                    "AuthenticationRequestExtraParams" => {
506                        obj.authentication_request_extra_params = Some(AuthenticateCognitoActionAuthenticationRequestExtraParamsDeserializer::deserialize("AuthenticationRequestExtraParams", stack)?);
507                    }
508                    "OnUnauthenticatedRequest" => {
509                        obj.on_unauthenticated_request = Some(AuthenticateCognitoActionConditionalBehaviorEnumDeserializer::deserialize("OnUnauthenticatedRequest", stack)?);
510                    }
511                    "Scope" => {
512                        obj.scope = Some(AuthenticateCognitoActionScopeDeserializer::deserialize(
513                            "Scope", stack,
514                        )?);
515                    }
516                    "SessionCookieName" => {
517                        obj.session_cookie_name = Some(
518                            AuthenticateCognitoActionSessionCookieNameDeserializer::deserialize(
519                                "SessionCookieName",
520                                stack,
521                            )?,
522                        );
523                    }
524                    "SessionTimeout" => {
525                        obj.session_timeout = Some(
526                            AuthenticateCognitoActionSessionTimeoutDeserializer::deserialize(
527                                "SessionTimeout",
528                                stack,
529                            )?,
530                        );
531                    }
532                    "UserPoolArn" => {
533                        obj.user_pool_arn =
534                            AuthenticateCognitoActionUserPoolArnDeserializer::deserialize(
535                                "UserPoolArn",
536                                stack,
537                            )?;
538                    }
539                    "UserPoolClientId" => {
540                        obj.user_pool_client_id =
541                            AuthenticateCognitoActionUserPoolClientIdDeserializer::deserialize(
542                                "UserPoolClientId",
543                                stack,
544                            )?;
545                    }
546                    "UserPoolDomain" => {
547                        obj.user_pool_domain =
548                            AuthenticateCognitoActionUserPoolDomainDeserializer::deserialize(
549                                "UserPoolDomain",
550                                stack,
551                            )?;
552                    }
553                    _ => skip_tree(stack),
554                }
555                Ok(())
556            },
557        )
558    }
559}
560
561/// Serialize `AuthenticateCognitoActionConfig` contents to a `SignedRequest`.
562struct AuthenticateCognitoActionConfigSerializer;
563impl AuthenticateCognitoActionConfigSerializer {
564    fn serialize(params: &mut Params, name: &str, obj: &AuthenticateCognitoActionConfig) {
565        let mut prefix = name.to_string();
566        if prefix != "" {
567            prefix.push_str(".");
568        }
569
570        if let Some(ref field_value) = obj.authentication_request_extra_params {
571            AuthenticateCognitoActionAuthenticationRequestExtraParamsSerializer::serialize(
572                params,
573                &format!("{}{}", prefix, "AuthenticationRequestExtraParams"),
574                field_value,
575            );
576        }
577        if let Some(ref field_value) = obj.on_unauthenticated_request {
578            params.put(
579                &format!("{}{}", prefix, "OnUnauthenticatedRequest"),
580                &field_value,
581            );
582        }
583        if let Some(ref field_value) = obj.scope {
584            params.put(&format!("{}{}", prefix, "Scope"), &field_value);
585        }
586        if let Some(ref field_value) = obj.session_cookie_name {
587            params.put(&format!("{}{}", prefix, "SessionCookieName"), &field_value);
588        }
589        if let Some(ref field_value) = obj.session_timeout {
590            params.put(&format!("{}{}", prefix, "SessionTimeout"), &field_value);
591        }
592        params.put(&format!("{}{}", prefix, "UserPoolArn"), &obj.user_pool_arn);
593        params.put(
594            &format!("{}{}", prefix, "UserPoolClientId"),
595            &obj.user_pool_client_id,
596        );
597        params.put(
598            &format!("{}{}", prefix, "UserPoolDomain"),
599            &obj.user_pool_domain,
600        );
601    }
602}
603
604#[allow(dead_code)]
605struct AuthenticateCognitoActionScopeDeserializer;
606impl AuthenticateCognitoActionScopeDeserializer {
607    #[allow(dead_code, unused_variables)]
608    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
609        xml_util::deserialize_primitive(tag_name, stack, Ok)
610    }
611}
612#[allow(dead_code)]
613struct AuthenticateCognitoActionSessionCookieNameDeserializer;
614impl AuthenticateCognitoActionSessionCookieNameDeserializer {
615    #[allow(dead_code, unused_variables)]
616    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
617        xml_util::deserialize_primitive(tag_name, stack, Ok)
618    }
619}
620#[allow(dead_code)]
621struct AuthenticateCognitoActionSessionTimeoutDeserializer;
622impl AuthenticateCognitoActionSessionTimeoutDeserializer {
623    #[allow(dead_code, unused_variables)]
624    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
625        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
626    }
627}
628#[allow(dead_code)]
629struct AuthenticateCognitoActionUserPoolArnDeserializer;
630impl AuthenticateCognitoActionUserPoolArnDeserializer {
631    #[allow(dead_code, unused_variables)]
632    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
633        xml_util::deserialize_primitive(tag_name, stack, Ok)
634    }
635}
636#[allow(dead_code)]
637struct AuthenticateCognitoActionUserPoolClientIdDeserializer;
638impl AuthenticateCognitoActionUserPoolClientIdDeserializer {
639    #[allow(dead_code, unused_variables)]
640    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
641        xml_util::deserialize_primitive(tag_name, stack, Ok)
642    }
643}
644#[allow(dead_code)]
645struct AuthenticateCognitoActionUserPoolDomainDeserializer;
646impl AuthenticateCognitoActionUserPoolDomainDeserializer {
647    #[allow(dead_code, unused_variables)]
648    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
649        xml_util::deserialize_primitive(tag_name, stack, Ok)
650    }
651}
652#[allow(dead_code)]
653struct AuthenticateOidcActionAuthenticationRequestExtraParamsDeserializer;
654impl AuthenticateOidcActionAuthenticationRequestExtraParamsDeserializer {
655    #[allow(dead_code, unused_variables)]
656    fn deserialize<T: Peek + Next>(
657        tag_name: &str,
658        stack: &mut T,
659    ) -> Result<::std::collections::HashMap<String, String>, XmlParseError> {
660        xml_util::start_element(tag_name, stack)?;
661
662        let mut obj = ::std::collections::HashMap::new();
663
664        while xml_util::peek_at_name(stack)? == "entry" {
665            xml_util::start_element("entry", stack)?;
666            let key =
667                AuthenticateOidcActionAuthenticationRequestParamNameDeserializer::deserialize(
668                    "key", stack,
669                )?;
670            let value =
671                AuthenticateOidcActionAuthenticationRequestParamValueDeserializer::deserialize(
672                    "value", stack,
673                )?;
674            obj.insert(key, value);
675            xml_util::end_element("entry", stack)?;
676        }
677
678        xml_util::end_element(tag_name, stack)?;
679        Ok(obj)
680    }
681}
682
683/// Serialize `AuthenticateOidcActionAuthenticationRequestExtraParams` contents to a `SignedRequest`.
684struct AuthenticateOidcActionAuthenticationRequestExtraParamsSerializer;
685impl AuthenticateOidcActionAuthenticationRequestExtraParamsSerializer {
686    fn serialize(
687        params: &mut Params,
688        name: &str,
689        obj: &::std::collections::HashMap<String, String>,
690    ) {
691        for (index, (key, value)) in obj.iter().enumerate() {
692            let prefix = format!("{}.{}", name, index + 1);
693            params.put(&format!("{}.{}", prefix, "key"), &key);
694            params.put(&format!("{}.{}", prefix, "Value"), &value);
695        }
696    }
697}
698
699#[allow(dead_code)]
700struct AuthenticateOidcActionAuthenticationRequestParamNameDeserializer;
701impl AuthenticateOidcActionAuthenticationRequestParamNameDeserializer {
702    #[allow(dead_code, unused_variables)]
703    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
704        xml_util::deserialize_primitive(tag_name, stack, Ok)
705    }
706}
707#[allow(dead_code)]
708struct AuthenticateOidcActionAuthenticationRequestParamValueDeserializer;
709impl AuthenticateOidcActionAuthenticationRequestParamValueDeserializer {
710    #[allow(dead_code, unused_variables)]
711    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
712        xml_util::deserialize_primitive(tag_name, stack, Ok)
713    }
714}
715#[allow(dead_code)]
716struct AuthenticateOidcActionAuthorizationEndpointDeserializer;
717impl AuthenticateOidcActionAuthorizationEndpointDeserializer {
718    #[allow(dead_code, unused_variables)]
719    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
720        xml_util::deserialize_primitive(tag_name, stack, Ok)
721    }
722}
723#[allow(dead_code)]
724struct AuthenticateOidcActionClientIdDeserializer;
725impl AuthenticateOidcActionClientIdDeserializer {
726    #[allow(dead_code, unused_variables)]
727    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
728        xml_util::deserialize_primitive(tag_name, stack, Ok)
729    }
730}
731#[allow(dead_code)]
732struct AuthenticateOidcActionClientSecretDeserializer;
733impl AuthenticateOidcActionClientSecretDeserializer {
734    #[allow(dead_code, unused_variables)]
735    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
736        xml_util::deserialize_primitive(tag_name, stack, Ok)
737    }
738}
739#[allow(dead_code)]
740struct AuthenticateOidcActionConditionalBehaviorEnumDeserializer;
741impl AuthenticateOidcActionConditionalBehaviorEnumDeserializer {
742    #[allow(dead_code, unused_variables)]
743    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
744        xml_util::deserialize_primitive(tag_name, stack, Ok)
745    }
746}
747/// <p>Request parameters when using an identity provider (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.</p>
748#[derive(Clone, Debug, Default, PartialEq)]
749#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
750#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
751pub struct AuthenticateOidcActionConfig {
752    /// <p>The query parameters (up to 10) to include in the redirect request to the authorization endpoint.</p>
753    pub authentication_request_extra_params: Option<::std::collections::HashMap<String, String>>,
754    /// <p>The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p>
755    pub authorization_endpoint: String,
756    /// <p>The OAuth 2.0 client identifier.</p>
757    pub client_id: String,
758    /// <p>The OAuth 2.0 client secret. This parameter is required if you are creating a rule. If you are modifying a rule, you can omit this parameter if you set <code>UseExistingClientSecret</code> to true.</p>
759    pub client_secret: Option<String>,
760    /// <p>The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p>
761    pub issuer: String,
762    /// <p><p>The behavior if the user is not authenticated. The following are possible values:</p> <ul> <li> <p>deny<code/> - Return an HTTP 401 Unauthorized error.</p> </li> <li> <p>allow<code/> - Allow the request to be forwarded to the target.</p> </li> <li> <p>authenticate<code/> - Redirect the request to the IdP authorization endpoint. This is the default value.</p> </li> </ul></p>
763    pub on_unauthenticated_request: Option<String>,
764    /// <p>The set of user claims to be requested from the IdP. The default is <code>openid</code>.</p> <p>To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.</p>
765    pub scope: Option<String>,
766    /// <p>The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.</p>
767    pub session_cookie_name: Option<String>,
768    /// <p>The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).</p>
769    pub session_timeout: Option<i64>,
770    /// <p>The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p>
771    pub token_endpoint: String,
772    /// <p>Indicates whether to use the existing client secret when modifying a rule. If you are creating a rule, you can omit this parameter or set it to false.</p>
773    pub use_existing_client_secret: Option<bool>,
774    /// <p>The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.</p>
775    pub user_info_endpoint: String,
776}
777
778#[allow(dead_code)]
779struct AuthenticateOidcActionConfigDeserializer;
780impl AuthenticateOidcActionConfigDeserializer {
781    #[allow(dead_code, unused_variables)]
782    fn deserialize<T: Peek + Next>(
783        tag_name: &str,
784        stack: &mut T,
785    ) -> Result<AuthenticateOidcActionConfig, XmlParseError> {
786        deserialize_elements::<_, AuthenticateOidcActionConfig, _>(
787            tag_name,
788            stack,
789            |name, stack, obj| {
790                match name {
791                    "AuthenticationRequestExtraParams" => {
792                        obj.authentication_request_extra_params = Some(AuthenticateOidcActionAuthenticationRequestExtraParamsDeserializer::deserialize("AuthenticationRequestExtraParams", stack)?);
793                    }
794                    "AuthorizationEndpoint" => {
795                        obj.authorization_endpoint =
796                            AuthenticateOidcActionAuthorizationEndpointDeserializer::deserialize(
797                                "AuthorizationEndpoint",
798                                stack,
799                            )?;
800                    }
801                    "ClientId" => {
802                        obj.client_id = AuthenticateOidcActionClientIdDeserializer::deserialize(
803                            "ClientId", stack,
804                        )?;
805                    }
806                    "ClientSecret" => {
807                        obj.client_secret =
808                            Some(AuthenticateOidcActionClientSecretDeserializer::deserialize(
809                                "ClientSecret",
810                                stack,
811                            )?);
812                    }
813                    "Issuer" => {
814                        obj.issuer =
815                            AuthenticateOidcActionIssuerDeserializer::deserialize("Issuer", stack)?;
816                    }
817                    "OnUnauthenticatedRequest" => {
818                        obj.on_unauthenticated_request = Some(
819                            AuthenticateOidcActionConditionalBehaviorEnumDeserializer::deserialize(
820                                "OnUnauthenticatedRequest",
821                                stack,
822                            )?,
823                        );
824                    }
825                    "Scope" => {
826                        obj.scope = Some(AuthenticateOidcActionScopeDeserializer::deserialize(
827                            "Scope", stack,
828                        )?);
829                    }
830                    "SessionCookieName" => {
831                        obj.session_cookie_name = Some(
832                            AuthenticateOidcActionSessionCookieNameDeserializer::deserialize(
833                                "SessionCookieName",
834                                stack,
835                            )?,
836                        );
837                    }
838                    "SessionTimeout" => {
839                        obj.session_timeout = Some(
840                            AuthenticateOidcActionSessionTimeoutDeserializer::deserialize(
841                                "SessionTimeout",
842                                stack,
843                            )?,
844                        );
845                    }
846                    "TokenEndpoint" => {
847                        obj.token_endpoint =
848                            AuthenticateOidcActionTokenEndpointDeserializer::deserialize(
849                                "TokenEndpoint",
850                                stack,
851                            )?;
852                    }
853                    "UseExistingClientSecret" => {
854                        obj.use_existing_client_secret = Some(
855                            AuthenticateOidcActionUseExistingClientSecretDeserializer::deserialize(
856                                "UseExistingClientSecret",
857                                stack,
858                            )?,
859                        );
860                    }
861                    "UserInfoEndpoint" => {
862                        obj.user_info_endpoint =
863                            AuthenticateOidcActionUserInfoEndpointDeserializer::deserialize(
864                                "UserInfoEndpoint",
865                                stack,
866                            )?;
867                    }
868                    _ => skip_tree(stack),
869                }
870                Ok(())
871            },
872        )
873    }
874}
875
876/// Serialize `AuthenticateOidcActionConfig` contents to a `SignedRequest`.
877struct AuthenticateOidcActionConfigSerializer;
878impl AuthenticateOidcActionConfigSerializer {
879    fn serialize(params: &mut Params, name: &str, obj: &AuthenticateOidcActionConfig) {
880        let mut prefix = name.to_string();
881        if prefix != "" {
882            prefix.push_str(".");
883        }
884
885        if let Some(ref field_value) = obj.authentication_request_extra_params {
886            AuthenticateOidcActionAuthenticationRequestExtraParamsSerializer::serialize(
887                params,
888                &format!("{}{}", prefix, "AuthenticationRequestExtraParams"),
889                field_value,
890            );
891        }
892        params.put(
893            &format!("{}{}", prefix, "AuthorizationEndpoint"),
894            &obj.authorization_endpoint,
895        );
896        params.put(&format!("{}{}", prefix, "ClientId"), &obj.client_id);
897        if let Some(ref field_value) = obj.client_secret {
898            params.put(&format!("{}{}", prefix, "ClientSecret"), &field_value);
899        }
900        params.put(&format!("{}{}", prefix, "Issuer"), &obj.issuer);
901        if let Some(ref field_value) = obj.on_unauthenticated_request {
902            params.put(
903                &format!("{}{}", prefix, "OnUnauthenticatedRequest"),
904                &field_value,
905            );
906        }
907        if let Some(ref field_value) = obj.scope {
908            params.put(&format!("{}{}", prefix, "Scope"), &field_value);
909        }
910        if let Some(ref field_value) = obj.session_cookie_name {
911            params.put(&format!("{}{}", prefix, "SessionCookieName"), &field_value);
912        }
913        if let Some(ref field_value) = obj.session_timeout {
914            params.put(&format!("{}{}", prefix, "SessionTimeout"), &field_value);
915        }
916        params.put(
917            &format!("{}{}", prefix, "TokenEndpoint"),
918            &obj.token_endpoint,
919        );
920        if let Some(ref field_value) = obj.use_existing_client_secret {
921            params.put(
922                &format!("{}{}", prefix, "UseExistingClientSecret"),
923                &field_value,
924            );
925        }
926        params.put(
927            &format!("{}{}", prefix, "UserInfoEndpoint"),
928            &obj.user_info_endpoint,
929        );
930    }
931}
932
933#[allow(dead_code)]
934struct AuthenticateOidcActionIssuerDeserializer;
935impl AuthenticateOidcActionIssuerDeserializer {
936    #[allow(dead_code, unused_variables)]
937    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
938        xml_util::deserialize_primitive(tag_name, stack, Ok)
939    }
940}
941#[allow(dead_code)]
942struct AuthenticateOidcActionScopeDeserializer;
943impl AuthenticateOidcActionScopeDeserializer {
944    #[allow(dead_code, unused_variables)]
945    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
946        xml_util::deserialize_primitive(tag_name, stack, Ok)
947    }
948}
949#[allow(dead_code)]
950struct AuthenticateOidcActionSessionCookieNameDeserializer;
951impl AuthenticateOidcActionSessionCookieNameDeserializer {
952    #[allow(dead_code, unused_variables)]
953    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
954        xml_util::deserialize_primitive(tag_name, stack, Ok)
955    }
956}
957#[allow(dead_code)]
958struct AuthenticateOidcActionSessionTimeoutDeserializer;
959impl AuthenticateOidcActionSessionTimeoutDeserializer {
960    #[allow(dead_code, unused_variables)]
961    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
962        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
963    }
964}
965#[allow(dead_code)]
966struct AuthenticateOidcActionTokenEndpointDeserializer;
967impl AuthenticateOidcActionTokenEndpointDeserializer {
968    #[allow(dead_code, unused_variables)]
969    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
970        xml_util::deserialize_primitive(tag_name, stack, Ok)
971    }
972}
973#[allow(dead_code)]
974struct AuthenticateOidcActionUseExistingClientSecretDeserializer;
975impl AuthenticateOidcActionUseExistingClientSecretDeserializer {
976    #[allow(dead_code, unused_variables)]
977    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
978        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
979    }
980}
981#[allow(dead_code)]
982struct AuthenticateOidcActionUserInfoEndpointDeserializer;
983impl AuthenticateOidcActionUserInfoEndpointDeserializer {
984    #[allow(dead_code, unused_variables)]
985    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
986        xml_util::deserialize_primitive(tag_name, stack, Ok)
987    }
988}
989/// <p>Information about an Availability Zone.</p>
990#[derive(Clone, Debug, Default, PartialEq)]
991#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
992pub struct AvailabilityZone {
993    /// <p>[Network Load Balancers] If you need static IP addresses for your load balancer, you can specify one Elastic IP address per Availability Zone when you create an internal-facing load balancer. For internal load balancers, you can specify a private IP address from the IPv4 range of the subnet.</p>
994    pub load_balancer_addresses: Option<Vec<LoadBalancerAddress>>,
995    /// <p>The ID of the subnet. You can specify one subnet per Availability Zone.</p>
996    pub subnet_id: Option<String>,
997    /// <p>The name of the Availability Zone.</p>
998    pub zone_name: Option<String>,
999}
1000
1001#[allow(dead_code)]
1002struct AvailabilityZoneDeserializer;
1003impl AvailabilityZoneDeserializer {
1004    #[allow(dead_code, unused_variables)]
1005    fn deserialize<T: Peek + Next>(
1006        tag_name: &str,
1007        stack: &mut T,
1008    ) -> Result<AvailabilityZone, XmlParseError> {
1009        deserialize_elements::<_, AvailabilityZone, _>(tag_name, stack, |name, stack, obj| {
1010            match name {
1011                "LoadBalancerAddresses" => {
1012                    obj.load_balancer_addresses.get_or_insert(vec![]).extend(
1013                        LoadBalancerAddressesDeserializer::deserialize(
1014                            "LoadBalancerAddresses",
1015                            stack,
1016                        )?,
1017                    );
1018                }
1019                "SubnetId" => {
1020                    obj.subnet_id = Some(SubnetIdDeserializer::deserialize("SubnetId", stack)?);
1021                }
1022                "ZoneName" => {
1023                    obj.zone_name = Some(ZoneNameDeserializer::deserialize("ZoneName", stack)?);
1024                }
1025                _ => skip_tree(stack),
1026            }
1027            Ok(())
1028        })
1029    }
1030}
1031#[allow(dead_code)]
1032struct AvailabilityZonesDeserializer;
1033impl AvailabilityZonesDeserializer {
1034    #[allow(dead_code, unused_variables)]
1035    fn deserialize<T: Peek + Next>(
1036        tag_name: &str,
1037        stack: &mut T,
1038    ) -> Result<Vec<AvailabilityZone>, XmlParseError> {
1039        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1040            if name == "member" {
1041                obj.push(AvailabilityZoneDeserializer::deserialize("member", stack)?);
1042            } else {
1043                skip_tree(stack);
1044            }
1045            Ok(())
1046        })
1047    }
1048}
1049#[allow(dead_code)]
1050struct CanonicalHostedZoneIdDeserializer;
1051impl CanonicalHostedZoneIdDeserializer {
1052    #[allow(dead_code, unused_variables)]
1053    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1054        xml_util::deserialize_primitive(tag_name, stack, Ok)
1055    }
1056}
1057/// <p>Information about an SSL server certificate.</p>
1058#[derive(Clone, Debug, Default, PartialEq)]
1059#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1060#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1061pub struct Certificate {
1062    /// <p>The Amazon Resource Name (ARN) of the certificate.</p>
1063    pub certificate_arn: Option<String>,
1064    /// <p>Indicates whether the certificate is the default certificate. Do not set this value when specifying a certificate as an input. This value is not included in the output when describing a listener, but is included when describing listener certificates.</p>
1065    pub is_default: Option<bool>,
1066}
1067
1068#[allow(dead_code)]
1069struct CertificateDeserializer;
1070impl CertificateDeserializer {
1071    #[allow(dead_code, unused_variables)]
1072    fn deserialize<T: Peek + Next>(
1073        tag_name: &str,
1074        stack: &mut T,
1075    ) -> Result<Certificate, XmlParseError> {
1076        deserialize_elements::<_, Certificate, _>(tag_name, stack, |name, stack, obj| {
1077            match name {
1078                "CertificateArn" => {
1079                    obj.certificate_arn = Some(CertificateArnDeserializer::deserialize(
1080                        "CertificateArn",
1081                        stack,
1082                    )?);
1083                }
1084                "IsDefault" => {
1085                    obj.is_default = Some(DefaultDeserializer::deserialize("IsDefault", stack)?);
1086                }
1087                _ => skip_tree(stack),
1088            }
1089            Ok(())
1090        })
1091    }
1092}
1093
1094/// Serialize `Certificate` contents to a `SignedRequest`.
1095struct CertificateSerializer;
1096impl CertificateSerializer {
1097    fn serialize(params: &mut Params, name: &str, obj: &Certificate) {
1098        let mut prefix = name.to_string();
1099        if prefix != "" {
1100            prefix.push_str(".");
1101        }
1102
1103        if let Some(ref field_value) = obj.certificate_arn {
1104            params.put(&format!("{}{}", prefix, "CertificateArn"), &field_value);
1105        }
1106        if let Some(ref field_value) = obj.is_default {
1107            params.put(&format!("{}{}", prefix, "IsDefault"), &field_value);
1108        }
1109    }
1110}
1111
1112#[allow(dead_code)]
1113struct CertificateArnDeserializer;
1114impl CertificateArnDeserializer {
1115    #[allow(dead_code, unused_variables)]
1116    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1117        xml_util::deserialize_primitive(tag_name, stack, Ok)
1118    }
1119}
1120#[allow(dead_code)]
1121struct CertificateListDeserializer;
1122impl CertificateListDeserializer {
1123    #[allow(dead_code, unused_variables)]
1124    fn deserialize<T: Peek + Next>(
1125        tag_name: &str,
1126        stack: &mut T,
1127    ) -> Result<Vec<Certificate>, XmlParseError> {
1128        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1129            if name == "member" {
1130                obj.push(CertificateDeserializer::deserialize("member", stack)?);
1131            } else {
1132                skip_tree(stack);
1133            }
1134            Ok(())
1135        })
1136    }
1137}
1138
1139/// Serialize `CertificateList` contents to a `SignedRequest`.
1140struct CertificateListSerializer;
1141impl CertificateListSerializer {
1142    fn serialize(params: &mut Params, name: &str, obj: &Vec<Certificate>) {
1143        for (index, obj) in obj.iter().enumerate() {
1144            let key = format!("{}.member.{}", name, index + 1);
1145            CertificateSerializer::serialize(params, &key, obj);
1146        }
1147    }
1148}
1149
1150/// <p>Information about a cipher used in a policy.</p>
1151#[derive(Clone, Debug, Default, PartialEq)]
1152#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1153pub struct Cipher {
1154    /// <p>The name of the cipher.</p>
1155    pub name: Option<String>,
1156    /// <p>The priority of the cipher.</p>
1157    pub priority: Option<i64>,
1158}
1159
1160#[allow(dead_code)]
1161struct CipherDeserializer;
1162impl CipherDeserializer {
1163    #[allow(dead_code, unused_variables)]
1164    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Cipher, XmlParseError> {
1165        deserialize_elements::<_, Cipher, _>(tag_name, stack, |name, stack, obj| {
1166            match name {
1167                "Name" => {
1168                    obj.name = Some(CipherNameDeserializer::deserialize("Name", stack)?);
1169                }
1170                "Priority" => {
1171                    obj.priority =
1172                        Some(CipherPriorityDeserializer::deserialize("Priority", stack)?);
1173                }
1174                _ => skip_tree(stack),
1175            }
1176            Ok(())
1177        })
1178    }
1179}
1180#[allow(dead_code)]
1181struct CipherNameDeserializer;
1182impl CipherNameDeserializer {
1183    #[allow(dead_code, unused_variables)]
1184    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1185        xml_util::deserialize_primitive(tag_name, stack, Ok)
1186    }
1187}
1188#[allow(dead_code)]
1189struct CipherPriorityDeserializer;
1190impl CipherPriorityDeserializer {
1191    #[allow(dead_code, unused_variables)]
1192    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
1193        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
1194    }
1195}
1196#[allow(dead_code)]
1197struct CiphersDeserializer;
1198impl CiphersDeserializer {
1199    #[allow(dead_code, unused_variables)]
1200    fn deserialize<T: Peek + Next>(
1201        tag_name: &str,
1202        stack: &mut T,
1203    ) -> Result<Vec<Cipher>, XmlParseError> {
1204        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1205            if name == "member" {
1206                obj.push(CipherDeserializer::deserialize("member", stack)?);
1207            } else {
1208                skip_tree(stack);
1209            }
1210            Ok(())
1211        })
1212    }
1213}
1214#[allow(dead_code)]
1215struct ConditionFieldNameDeserializer;
1216impl ConditionFieldNameDeserializer {
1217    #[allow(dead_code, unused_variables)]
1218    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1219        xml_util::deserialize_primitive(tag_name, stack, Ok)
1220    }
1221}
1222#[derive(Clone, Debug, Default, PartialEq)]
1223#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1224pub struct CreateListenerInput {
1225    /// <p>[TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:</p> <ul> <li> <p> <code>HTTP1Only</code> </p> </li> <li> <p> <code>HTTP2Only</code> </p> </li> <li> <p> <code>HTTP2Optional</code> </p> </li> <li> <p> <code>HTTP2Preferred</code> </p> </li> <li> <p> <code>None</code> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#alpn-policies">ALPN Policies</a> in the <i>Network Load Balancers Guide</i>.</p>
1226    pub alpn_policy: Option<Vec<String>>,
1227    /// <p>[HTTPS and TLS listeners] The default certificate for the listener. You must provide exactly one certificate. Set <code>CertificateArn</code> to the certificate ARN but do not set <code>IsDefault</code>.</p> <p>To create a certificate list for the listener, use <a>AddListenerCertificates</a>.</p>
1228    pub certificates: Option<Vec<Certificate>>,
1229    /// <p>The actions for the default rule. The rule must include one forward action or one or more fixed-response actions.</p> <p>If the action type is <code>forward</code>, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-oidc</code>, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-cognito</code>, you authenticate users through the user pools supported by Amazon Cognito.</p> <p>[Application Load Balancer] If the action type is <code>redirect</code>, you redirect specified client requests from one URL to another.</p> <p>[Application Load Balancer] If the action type is <code>fixed-response</code>, you drop specified client requests and return a custom HTTP response.</p>
1230    pub default_actions: Vec<Action>,
1231    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
1232    pub load_balancer_arn: String,
1233    /// <p>The port on which the load balancer is listening.</p>
1234    pub port: i64,
1235    /// <p>The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP.</p>
1236    pub protocol: String,
1237    /// <p>[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. The following are the possible values:</p> <ul> <li> <p> <code>ELBSecurityPolicy-2016-08</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-0-2015-04</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-1-2017-01</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-2-2017-01</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-2-Ext-2018-06</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-2018-06</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-1-1-2019-08</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-1-2-2019-08</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-1-2-Res-2019-08</code> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies">Security Policies</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies">Security Policies</a> in the <i>Network Load Balancers Guide</i>.</p>
1238    pub ssl_policy: Option<String>,
1239}
1240
1241/// Serialize `CreateListenerInput` contents to a `SignedRequest`.
1242struct CreateListenerInputSerializer;
1243impl CreateListenerInputSerializer {
1244    fn serialize(params: &mut Params, name: &str, obj: &CreateListenerInput) {
1245        let mut prefix = name.to_string();
1246        if prefix != "" {
1247            prefix.push_str(".");
1248        }
1249
1250        if let Some(ref field_value) = obj.alpn_policy {
1251            AlpnPolicyNameSerializer::serialize(
1252                params,
1253                &format!("{}{}", prefix, "AlpnPolicy"),
1254                field_value,
1255            );
1256        }
1257        if let Some(ref field_value) = obj.certificates {
1258            CertificateListSerializer::serialize(
1259                params,
1260                &format!("{}{}", prefix, "Certificates"),
1261                field_value,
1262            );
1263        }
1264        ActionsSerializer::serialize(
1265            params,
1266            &format!("{}{}", prefix, "DefaultActions"),
1267            &obj.default_actions,
1268        );
1269        params.put(
1270            &format!("{}{}", prefix, "LoadBalancerArn"),
1271            &obj.load_balancer_arn,
1272        );
1273        params.put(&format!("{}{}", prefix, "Port"), &obj.port);
1274        params.put(&format!("{}{}", prefix, "Protocol"), &obj.protocol);
1275        if let Some(ref field_value) = obj.ssl_policy {
1276            params.put(&format!("{}{}", prefix, "SslPolicy"), &field_value);
1277        }
1278    }
1279}
1280
1281#[derive(Clone, Debug, Default, PartialEq)]
1282#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1283pub struct CreateListenerOutput {
1284    /// <p>Information about the listener.</p>
1285    pub listeners: Option<Vec<Listener>>,
1286}
1287
1288#[allow(dead_code)]
1289struct CreateListenerOutputDeserializer;
1290impl CreateListenerOutputDeserializer {
1291    #[allow(dead_code, unused_variables)]
1292    fn deserialize<T: Peek + Next>(
1293        tag_name: &str,
1294        stack: &mut T,
1295    ) -> Result<CreateListenerOutput, XmlParseError> {
1296        deserialize_elements::<_, CreateListenerOutput, _>(tag_name, stack, |name, stack, obj| {
1297            match name {
1298                "Listeners" => {
1299                    obj.listeners
1300                        .get_or_insert(vec![])
1301                        .extend(ListenersDeserializer::deserialize("Listeners", stack)?);
1302                }
1303                _ => skip_tree(stack),
1304            }
1305            Ok(())
1306        })
1307    }
1308}
1309#[derive(Clone, Debug, Default, PartialEq)]
1310#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1311pub struct CreateLoadBalancerInput {
1312    /// <p>[Application Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are <code>ipv4</code> (for IPv4 addresses) and <code>dualstack</code> (for IPv4 and IPv6 addresses). Internal load balancers must use <code>ipv4</code>.</p>
1313    pub ip_address_type: Option<String>,
1314    /// <p>The name of the load balancer.</p> <p>This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, must not begin or end with a hyphen, and must not begin with "internal-".</p>
1315    pub name: String,
1316    /// <p>The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.</p> <p>The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route requests only from clients with access to the VPC for the load balancer.</p> <p>The default is an Internet-facing load balancer.</p>
1317    pub scheme: Option<String>,
1318    /// <p>[Application Load Balancers] The IDs of the security groups for the load balancer.</p>
1319    pub security_groups: Option<Vec<String>>,
1320    /// <p>The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p> <p>[Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.</p> <p>[Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet if you need static IP addresses for your internet-facing load balancer. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet.</p>
1321    pub subnet_mappings: Option<Vec<SubnetMapping>>,
1322    /// <p>The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p> <p>[Application Load Balancers] You must specify subnets from at least two Availability Zones.</p> <p>[Network Load Balancers] You can specify subnets from one or more Availability Zones.</p>
1323    pub subnets: Option<Vec<String>>,
1324    /// <p>One or more tags to assign to the load balancer.</p>
1325    pub tags: Option<Vec<Tag>>,
1326    /// <p>The type of load balancer. The default is <code>application</code>.</p>
1327    pub type_: Option<String>,
1328}
1329
1330/// Serialize `CreateLoadBalancerInput` contents to a `SignedRequest`.
1331struct CreateLoadBalancerInputSerializer;
1332impl CreateLoadBalancerInputSerializer {
1333    fn serialize(params: &mut Params, name: &str, obj: &CreateLoadBalancerInput) {
1334        let mut prefix = name.to_string();
1335        if prefix != "" {
1336            prefix.push_str(".");
1337        }
1338
1339        if let Some(ref field_value) = obj.ip_address_type {
1340            params.put(&format!("{}{}", prefix, "IpAddressType"), &field_value);
1341        }
1342        params.put(&format!("{}{}", prefix, "Name"), &obj.name);
1343        if let Some(ref field_value) = obj.scheme {
1344            params.put(&format!("{}{}", prefix, "Scheme"), &field_value);
1345        }
1346        if let Some(ref field_value) = obj.security_groups {
1347            SecurityGroupsSerializer::serialize(
1348                params,
1349                &format!("{}{}", prefix, "SecurityGroups"),
1350                field_value,
1351            );
1352        }
1353        if let Some(ref field_value) = obj.subnet_mappings {
1354            SubnetMappingsSerializer::serialize(
1355                params,
1356                &format!("{}{}", prefix, "SubnetMappings"),
1357                field_value,
1358            );
1359        }
1360        if let Some(ref field_value) = obj.subnets {
1361            SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), field_value);
1362        }
1363        if let Some(ref field_value) = obj.tags {
1364            TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
1365        }
1366        if let Some(ref field_value) = obj.type_ {
1367            params.put(&format!("{}{}", prefix, "Type"), &field_value);
1368        }
1369    }
1370}
1371
1372#[derive(Clone, Debug, Default, PartialEq)]
1373#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1374pub struct CreateLoadBalancerOutput {
1375    /// <p>Information about the load balancer.</p>
1376    pub load_balancers: Option<Vec<LoadBalancer>>,
1377}
1378
1379#[allow(dead_code)]
1380struct CreateLoadBalancerOutputDeserializer;
1381impl CreateLoadBalancerOutputDeserializer {
1382    #[allow(dead_code, unused_variables)]
1383    fn deserialize<T: Peek + Next>(
1384        tag_name: &str,
1385        stack: &mut T,
1386    ) -> Result<CreateLoadBalancerOutput, XmlParseError> {
1387        deserialize_elements::<_, CreateLoadBalancerOutput, _>(
1388            tag_name,
1389            stack,
1390            |name, stack, obj| {
1391                match name {
1392                    "LoadBalancers" => {
1393                        obj.load_balancers.get_or_insert(vec![]).extend(
1394                            LoadBalancersDeserializer::deserialize("LoadBalancers", stack)?,
1395                        );
1396                    }
1397                    _ => skip_tree(stack),
1398                }
1399                Ok(())
1400            },
1401        )
1402    }
1403}
1404#[derive(Clone, Debug, Default, PartialEq)]
1405#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1406pub struct CreateRuleInput {
1407    /// <p>The actions. Each rule must include exactly one of the following types of actions: <code>forward</code>, <code>fixed-response</code>, or <code>redirect</code>, and it must be the last action to be performed.</p> <p>If the action type is <code>forward</code>, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-oidc</code>, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-cognito</code>, you authenticate users through the user pools supported by Amazon Cognito.</p> <p>[Application Load Balancer] If the action type is <code>redirect</code>, you redirect specified client requests from one URL to another.</p> <p>[Application Load Balancer] If the action type is <code>fixed-response</code>, you drop specified client requests and return a custom HTTP response.</p>
1408    pub actions: Vec<Action>,
1409    /// <p>The conditions. Each rule can include zero or one of the following conditions: <code>http-request-method</code>, <code>host-header</code>, <code>path-pattern</code>, and <code>source-ip</code>, and zero or more of the following conditions: <code>http-header</code> and <code>query-string</code>.</p>
1410    pub conditions: Vec<RuleCondition>,
1411    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
1412    pub listener_arn: String,
1413    /// <p>The rule priority. A listener can't have multiple rules with the same priority.</p>
1414    pub priority: i64,
1415}
1416
1417/// Serialize `CreateRuleInput` contents to a `SignedRequest`.
1418struct CreateRuleInputSerializer;
1419impl CreateRuleInputSerializer {
1420    fn serialize(params: &mut Params, name: &str, obj: &CreateRuleInput) {
1421        let mut prefix = name.to_string();
1422        if prefix != "" {
1423            prefix.push_str(".");
1424        }
1425
1426        ActionsSerializer::serialize(params, &format!("{}{}", prefix, "Actions"), &obj.actions);
1427        RuleConditionListSerializer::serialize(
1428            params,
1429            &format!("{}{}", prefix, "Conditions"),
1430            &obj.conditions,
1431        );
1432        params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
1433        params.put(&format!("{}{}", prefix, "Priority"), &obj.priority);
1434    }
1435}
1436
1437#[derive(Clone, Debug, Default, PartialEq)]
1438#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1439pub struct CreateRuleOutput {
1440    /// <p>Information about the rule.</p>
1441    pub rules: Option<Vec<Rule>>,
1442}
1443
1444#[allow(dead_code)]
1445struct CreateRuleOutputDeserializer;
1446impl CreateRuleOutputDeserializer {
1447    #[allow(dead_code, unused_variables)]
1448    fn deserialize<T: Peek + Next>(
1449        tag_name: &str,
1450        stack: &mut T,
1451    ) -> Result<CreateRuleOutput, XmlParseError> {
1452        deserialize_elements::<_, CreateRuleOutput, _>(tag_name, stack, |name, stack, obj| {
1453            match name {
1454                "Rules" => {
1455                    obj.rules
1456                        .get_or_insert(vec![])
1457                        .extend(RulesDeserializer::deserialize("Rules", stack)?);
1458                }
1459                _ => skip_tree(stack),
1460            }
1461            Ok(())
1462        })
1463    }
1464}
1465#[derive(Clone, Debug, Default, PartialEq)]
1466#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1467pub struct CreateTargetGroupInput {
1468    /// <p>Indicates whether health checks are enabled. If the target type is <code>lambda</code>, health checks are disabled by default but can be enabled. If the target type is <code>instance</code> or <code>ip</code>, health checks are always enabled and cannot be disabled.</p>
1469    pub health_check_enabled: Option<bool>,
1470    /// <p>The approximate amount of time, in seconds, between health checks of an individual target. For HTTP and HTTPS health checks, the range is 5–300 seconds. For TCP health checks, the supported values are 10 and 30 seconds. If the target type is <code>instance</code> or <code>ip</code>, the default is 30 seconds. If the target type is <code>lambda</code>, the default is 35 seconds.</p>
1471    pub health_check_interval_seconds: Option<i64>,
1472    /// <p>[HTTP/HTTPS health checks] The ping path that is the destination on the targets for health checks. The default is /.</p>
1473    pub health_check_path: Option<String>,
1474    /// <p>The port the load balancer uses when performing health checks on targets. The default is <code>traffic-port</code>, which is the port on which each target receives traffic from the load balancer.</p>
1475    pub health_check_port: Option<String>,
1476    /// <p>The protocol the load balancer uses when performing health checks on targets. For Application Load Balancers, the default is HTTP. For Network Load Balancers, the default is TCP. The TCP protocol is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The TLS, UDP, and TCP_UDP protocols are not supported for health checks.</p>
1477    pub health_check_protocol: Option<String>,
1478    /// <p>The amount of time, in seconds, during which no response from a target means a failed health check. For target groups with a protocol of HTTP or HTTPS, the default is 5 seconds. For target groups with a protocol of TCP or TLS, this value must be 6 seconds for HTTP health checks and 10 seconds for TCP and HTTPS health checks. If the target type is <code>lambda</code>, the default is 30 seconds.</p>
1479    pub health_check_timeout_seconds: Option<i64>,
1480    /// <p>The number of consecutive health checks successes required before considering an unhealthy target healthy. For target groups with a protocol of HTTP or HTTPS, the default is 5. For target groups with a protocol of TCP or TLS, the default is 3. If the target type is <code>lambda</code>, the default is 5.</p>
1481    pub healthy_threshold_count: Option<i64>,
1482    /// <p>[HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target.</p>
1483    pub matcher: Option<Matcher>,
1484    /// <p>The name of the target group.</p> <p>This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.</p>
1485    pub name: String,
1486    /// <p>The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply.</p>
1487    pub port: Option<i64>,
1488    /// <p>The protocol to use for routing traffic to the targets. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, or TCP_UDP. A TCP_UDP listener must be associated with a TCP_UDP target group. If the target is a Lambda function, this parameter does not apply.</p>
1489    pub protocol: Option<String>,
1490    /// <p><p>The type of target that you must specify when registering targets with this target group. You can&#39;t specify targets for a target group using more than one target type.</p> <ul> <li> <p> <code>instance</code> - Targets are specified by instance ID. This is the default value. If the target group protocol is UDP or TCP_UDP, the target type must be <code>instance</code>.</p> </li> <li> <p> <code>ip</code> - Targets are specified by IP address. You can specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can&#39;t specify publicly routable IP addresses.</p> </li> <li> <p> <code>lambda</code> - The target groups contains a single Lambda function.</p> </li> </ul></p>
1491    pub target_type: Option<String>,
1492    /// <p>The number of consecutive health check failures required before considering a target unhealthy. For target groups with a protocol of HTTP or HTTPS, the default is 2. For target groups with a protocol of TCP or TLS, this value must be the same as the healthy threshold count. If the target type is <code>lambda</code>, the default is 2.</p>
1493    pub unhealthy_threshold_count: Option<i64>,
1494    /// <p>The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply. Otherwise, this parameter is required.</p>
1495    pub vpc_id: Option<String>,
1496}
1497
1498/// Serialize `CreateTargetGroupInput` contents to a `SignedRequest`.
1499struct CreateTargetGroupInputSerializer;
1500impl CreateTargetGroupInputSerializer {
1501    fn serialize(params: &mut Params, name: &str, obj: &CreateTargetGroupInput) {
1502        let mut prefix = name.to_string();
1503        if prefix != "" {
1504            prefix.push_str(".");
1505        }
1506
1507        if let Some(ref field_value) = obj.health_check_enabled {
1508            params.put(&format!("{}{}", prefix, "HealthCheckEnabled"), &field_value);
1509        }
1510        if let Some(ref field_value) = obj.health_check_interval_seconds {
1511            params.put(
1512                &format!("{}{}", prefix, "HealthCheckIntervalSeconds"),
1513                &field_value,
1514            );
1515        }
1516        if let Some(ref field_value) = obj.health_check_path {
1517            params.put(&format!("{}{}", prefix, "HealthCheckPath"), &field_value);
1518        }
1519        if let Some(ref field_value) = obj.health_check_port {
1520            params.put(&format!("{}{}", prefix, "HealthCheckPort"), &field_value);
1521        }
1522        if let Some(ref field_value) = obj.health_check_protocol {
1523            params.put(
1524                &format!("{}{}", prefix, "HealthCheckProtocol"),
1525                &field_value,
1526            );
1527        }
1528        if let Some(ref field_value) = obj.health_check_timeout_seconds {
1529            params.put(
1530                &format!("{}{}", prefix, "HealthCheckTimeoutSeconds"),
1531                &field_value,
1532            );
1533        }
1534        if let Some(ref field_value) = obj.healthy_threshold_count {
1535            params.put(
1536                &format!("{}{}", prefix, "HealthyThresholdCount"),
1537                &field_value,
1538            );
1539        }
1540        if let Some(ref field_value) = obj.matcher {
1541            MatcherSerializer::serialize(params, &format!("{}{}", prefix, "Matcher"), field_value);
1542        }
1543        params.put(&format!("{}{}", prefix, "Name"), &obj.name);
1544        if let Some(ref field_value) = obj.port {
1545            params.put(&format!("{}{}", prefix, "Port"), &field_value);
1546        }
1547        if let Some(ref field_value) = obj.protocol {
1548            params.put(&format!("{}{}", prefix, "Protocol"), &field_value);
1549        }
1550        if let Some(ref field_value) = obj.target_type {
1551            params.put(&format!("{}{}", prefix, "TargetType"), &field_value);
1552        }
1553        if let Some(ref field_value) = obj.unhealthy_threshold_count {
1554            params.put(
1555                &format!("{}{}", prefix, "UnhealthyThresholdCount"),
1556                &field_value,
1557            );
1558        }
1559        if let Some(ref field_value) = obj.vpc_id {
1560            params.put(&format!("{}{}", prefix, "VpcId"), &field_value);
1561        }
1562    }
1563}
1564
1565#[derive(Clone, Debug, Default, PartialEq)]
1566#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1567pub struct CreateTargetGroupOutput {
1568    /// <p>Information about the target group.</p>
1569    pub target_groups: Option<Vec<TargetGroup>>,
1570}
1571
1572#[allow(dead_code)]
1573struct CreateTargetGroupOutputDeserializer;
1574impl CreateTargetGroupOutputDeserializer {
1575    #[allow(dead_code, unused_variables)]
1576    fn deserialize<T: Peek + Next>(
1577        tag_name: &str,
1578        stack: &mut T,
1579    ) -> Result<CreateTargetGroupOutput, XmlParseError> {
1580        deserialize_elements::<_, CreateTargetGroupOutput, _>(
1581            tag_name,
1582            stack,
1583            |name, stack, obj| {
1584                match name {
1585                    "TargetGroups" => {
1586                        obj.target_groups.get_or_insert(vec![]).extend(
1587                            TargetGroupsDeserializer::deserialize("TargetGroups", stack)?,
1588                        );
1589                    }
1590                    _ => skip_tree(stack),
1591                }
1592                Ok(())
1593            },
1594        )
1595    }
1596}
1597#[allow(dead_code)]
1598struct CreatedTimeDeserializer;
1599impl CreatedTimeDeserializer {
1600    #[allow(dead_code, unused_variables)]
1601    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1602        xml_util::deserialize_primitive(tag_name, stack, Ok)
1603    }
1604}
1605#[allow(dead_code)]
1606struct DNSNameDeserializer;
1607impl DNSNameDeserializer {
1608    #[allow(dead_code, unused_variables)]
1609    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1610        xml_util::deserialize_primitive(tag_name, stack, Ok)
1611    }
1612}
1613#[allow(dead_code)]
1614struct DefaultDeserializer;
1615impl DefaultDeserializer {
1616    #[allow(dead_code, unused_variables)]
1617    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
1618        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
1619    }
1620}
1621#[derive(Clone, Debug, Default, PartialEq)]
1622#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1623pub struct DeleteListenerInput {
1624    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
1625    pub listener_arn: String,
1626}
1627
1628/// Serialize `DeleteListenerInput` contents to a `SignedRequest`.
1629struct DeleteListenerInputSerializer;
1630impl DeleteListenerInputSerializer {
1631    fn serialize(params: &mut Params, name: &str, obj: &DeleteListenerInput) {
1632        let mut prefix = name.to_string();
1633        if prefix != "" {
1634            prefix.push_str(".");
1635        }
1636
1637        params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
1638    }
1639}
1640
1641#[derive(Clone, Debug, Default, PartialEq)]
1642#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1643pub struct DeleteListenerOutput {}
1644
1645#[allow(dead_code)]
1646struct DeleteListenerOutputDeserializer;
1647impl DeleteListenerOutputDeserializer {
1648    #[allow(dead_code, unused_variables)]
1649    fn deserialize<T: Peek + Next>(
1650        tag_name: &str,
1651        stack: &mut T,
1652    ) -> Result<DeleteListenerOutput, XmlParseError> {
1653        xml_util::start_element(tag_name, stack)?;
1654
1655        let obj = DeleteListenerOutput::default();
1656
1657        xml_util::end_element(tag_name, stack)?;
1658
1659        Ok(obj)
1660    }
1661}
1662#[derive(Clone, Debug, Default, PartialEq)]
1663#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1664pub struct DeleteLoadBalancerInput {
1665    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
1666    pub load_balancer_arn: String,
1667}
1668
1669/// Serialize `DeleteLoadBalancerInput` contents to a `SignedRequest`.
1670struct DeleteLoadBalancerInputSerializer;
1671impl DeleteLoadBalancerInputSerializer {
1672    fn serialize(params: &mut Params, name: &str, obj: &DeleteLoadBalancerInput) {
1673        let mut prefix = name.to_string();
1674        if prefix != "" {
1675            prefix.push_str(".");
1676        }
1677
1678        params.put(
1679            &format!("{}{}", prefix, "LoadBalancerArn"),
1680            &obj.load_balancer_arn,
1681        );
1682    }
1683}
1684
1685#[derive(Clone, Debug, Default, PartialEq)]
1686#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1687pub struct DeleteLoadBalancerOutput {}
1688
1689#[allow(dead_code)]
1690struct DeleteLoadBalancerOutputDeserializer;
1691impl DeleteLoadBalancerOutputDeserializer {
1692    #[allow(dead_code, unused_variables)]
1693    fn deserialize<T: Peek + Next>(
1694        tag_name: &str,
1695        stack: &mut T,
1696    ) -> Result<DeleteLoadBalancerOutput, XmlParseError> {
1697        xml_util::start_element(tag_name, stack)?;
1698
1699        let obj = DeleteLoadBalancerOutput::default();
1700
1701        xml_util::end_element(tag_name, stack)?;
1702
1703        Ok(obj)
1704    }
1705}
1706#[derive(Clone, Debug, Default, PartialEq)]
1707#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1708pub struct DeleteRuleInput {
1709    /// <p>The Amazon Resource Name (ARN) of the rule.</p>
1710    pub rule_arn: String,
1711}
1712
1713/// Serialize `DeleteRuleInput` contents to a `SignedRequest`.
1714struct DeleteRuleInputSerializer;
1715impl DeleteRuleInputSerializer {
1716    fn serialize(params: &mut Params, name: &str, obj: &DeleteRuleInput) {
1717        let mut prefix = name.to_string();
1718        if prefix != "" {
1719            prefix.push_str(".");
1720        }
1721
1722        params.put(&format!("{}{}", prefix, "RuleArn"), &obj.rule_arn);
1723    }
1724}
1725
1726#[derive(Clone, Debug, Default, PartialEq)]
1727#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1728pub struct DeleteRuleOutput {}
1729
1730#[allow(dead_code)]
1731struct DeleteRuleOutputDeserializer;
1732impl DeleteRuleOutputDeserializer {
1733    #[allow(dead_code, unused_variables)]
1734    fn deserialize<T: Peek + Next>(
1735        tag_name: &str,
1736        stack: &mut T,
1737    ) -> Result<DeleteRuleOutput, XmlParseError> {
1738        xml_util::start_element(tag_name, stack)?;
1739
1740        let obj = DeleteRuleOutput::default();
1741
1742        xml_util::end_element(tag_name, stack)?;
1743
1744        Ok(obj)
1745    }
1746}
1747#[derive(Clone, Debug, Default, PartialEq)]
1748#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1749pub struct DeleteTargetGroupInput {
1750    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
1751    pub target_group_arn: String,
1752}
1753
1754/// Serialize `DeleteTargetGroupInput` contents to a `SignedRequest`.
1755struct DeleteTargetGroupInputSerializer;
1756impl DeleteTargetGroupInputSerializer {
1757    fn serialize(params: &mut Params, name: &str, obj: &DeleteTargetGroupInput) {
1758        let mut prefix = name.to_string();
1759        if prefix != "" {
1760            prefix.push_str(".");
1761        }
1762
1763        params.put(
1764            &format!("{}{}", prefix, "TargetGroupArn"),
1765            &obj.target_group_arn,
1766        );
1767    }
1768}
1769
1770#[derive(Clone, Debug, Default, PartialEq)]
1771#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1772pub struct DeleteTargetGroupOutput {}
1773
1774#[allow(dead_code)]
1775struct DeleteTargetGroupOutputDeserializer;
1776impl DeleteTargetGroupOutputDeserializer {
1777    #[allow(dead_code, unused_variables)]
1778    fn deserialize<T: Peek + Next>(
1779        tag_name: &str,
1780        stack: &mut T,
1781    ) -> Result<DeleteTargetGroupOutput, XmlParseError> {
1782        xml_util::start_element(tag_name, stack)?;
1783
1784        let obj = DeleteTargetGroupOutput::default();
1785
1786        xml_util::end_element(tag_name, stack)?;
1787
1788        Ok(obj)
1789    }
1790}
1791#[derive(Clone, Debug, Default, PartialEq)]
1792#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1793pub struct DeregisterTargetsInput {
1794    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
1795    pub target_group_arn: String,
1796    /// <p>The targets. If you specified a port override when you registered a target, you must specify both the target ID and the port when you deregister it.</p>
1797    pub targets: Vec<TargetDescription>,
1798}
1799
1800/// Serialize `DeregisterTargetsInput` contents to a `SignedRequest`.
1801struct DeregisterTargetsInputSerializer;
1802impl DeregisterTargetsInputSerializer {
1803    fn serialize(params: &mut Params, name: &str, obj: &DeregisterTargetsInput) {
1804        let mut prefix = name.to_string();
1805        if prefix != "" {
1806            prefix.push_str(".");
1807        }
1808
1809        params.put(
1810            &format!("{}{}", prefix, "TargetGroupArn"),
1811            &obj.target_group_arn,
1812        );
1813        TargetDescriptionsSerializer::serialize(
1814            params,
1815            &format!("{}{}", prefix, "Targets"),
1816            &obj.targets,
1817        );
1818    }
1819}
1820
1821#[derive(Clone, Debug, Default, PartialEq)]
1822#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1823pub struct DeregisterTargetsOutput {}
1824
1825#[allow(dead_code)]
1826struct DeregisterTargetsOutputDeserializer;
1827impl DeregisterTargetsOutputDeserializer {
1828    #[allow(dead_code, unused_variables)]
1829    fn deserialize<T: Peek + Next>(
1830        tag_name: &str,
1831        stack: &mut T,
1832    ) -> Result<DeregisterTargetsOutput, XmlParseError> {
1833        xml_util::start_element(tag_name, stack)?;
1834
1835        let obj = DeregisterTargetsOutput::default();
1836
1837        xml_util::end_element(tag_name, stack)?;
1838
1839        Ok(obj)
1840    }
1841}
1842#[derive(Clone, Debug, Default, PartialEq)]
1843#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1844pub struct DescribeAccountLimitsInput {
1845    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1846    pub marker: Option<String>,
1847    /// <p>The maximum number of results to return with this call.</p>
1848    pub page_size: Option<i64>,
1849}
1850
1851/// Serialize `DescribeAccountLimitsInput` contents to a `SignedRequest`.
1852struct DescribeAccountLimitsInputSerializer;
1853impl DescribeAccountLimitsInputSerializer {
1854    fn serialize(params: &mut Params, name: &str, obj: &DescribeAccountLimitsInput) {
1855        let mut prefix = name.to_string();
1856        if prefix != "" {
1857            prefix.push_str(".");
1858        }
1859
1860        if let Some(ref field_value) = obj.marker {
1861            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
1862        }
1863        if let Some(ref field_value) = obj.page_size {
1864            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
1865        }
1866    }
1867}
1868
1869#[derive(Clone, Debug, Default, PartialEq)]
1870#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1871pub struct DescribeAccountLimitsOutput {
1872    /// <p>Information about the limits.</p>
1873    pub limits: Option<Vec<Limit>>,
1874    /// <p>If there are additional results, this is the marker for the next set of results. Otherwise, this is null.</p>
1875    pub next_marker: Option<String>,
1876}
1877
1878#[allow(dead_code)]
1879struct DescribeAccountLimitsOutputDeserializer;
1880impl DescribeAccountLimitsOutputDeserializer {
1881    #[allow(dead_code, unused_variables)]
1882    fn deserialize<T: Peek + Next>(
1883        tag_name: &str,
1884        stack: &mut T,
1885    ) -> Result<DescribeAccountLimitsOutput, XmlParseError> {
1886        deserialize_elements::<_, DescribeAccountLimitsOutput, _>(
1887            tag_name,
1888            stack,
1889            |name, stack, obj| {
1890                match name {
1891                    "Limits" => {
1892                        obj.limits
1893                            .get_or_insert(vec![])
1894                            .extend(LimitsDeserializer::deserialize("Limits", stack)?);
1895                    }
1896                    "NextMarker" => {
1897                        obj.next_marker =
1898                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
1899                    }
1900                    _ => skip_tree(stack),
1901                }
1902                Ok(())
1903            },
1904        )
1905    }
1906}
1907#[derive(Clone, Debug, Default, PartialEq)]
1908#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1909pub struct DescribeListenerCertificatesInput {
1910    /// <p>The Amazon Resource Names (ARN) of the listener.</p>
1911    pub listener_arn: String,
1912    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1913    pub marker: Option<String>,
1914    /// <p>The maximum number of results to return with this call.</p>
1915    pub page_size: Option<i64>,
1916}
1917
1918/// Serialize `DescribeListenerCertificatesInput` contents to a `SignedRequest`.
1919struct DescribeListenerCertificatesInputSerializer;
1920impl DescribeListenerCertificatesInputSerializer {
1921    fn serialize(params: &mut Params, name: &str, obj: &DescribeListenerCertificatesInput) {
1922        let mut prefix = name.to_string();
1923        if prefix != "" {
1924            prefix.push_str(".");
1925        }
1926
1927        params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
1928        if let Some(ref field_value) = obj.marker {
1929            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
1930        }
1931        if let Some(ref field_value) = obj.page_size {
1932            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
1933        }
1934    }
1935}
1936
1937#[derive(Clone, Debug, Default, PartialEq)]
1938#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1939pub struct DescribeListenerCertificatesOutput {
1940    /// <p>Information about the certificates.</p>
1941    pub certificates: Option<Vec<Certificate>>,
1942    /// <p>If there are additional results, this is the marker for the next set of results. Otherwise, this is null.</p>
1943    pub next_marker: Option<String>,
1944}
1945
1946#[allow(dead_code)]
1947struct DescribeListenerCertificatesOutputDeserializer;
1948impl DescribeListenerCertificatesOutputDeserializer {
1949    #[allow(dead_code, unused_variables)]
1950    fn deserialize<T: Peek + Next>(
1951        tag_name: &str,
1952        stack: &mut T,
1953    ) -> Result<DescribeListenerCertificatesOutput, XmlParseError> {
1954        deserialize_elements::<_, DescribeListenerCertificatesOutput, _>(
1955            tag_name,
1956            stack,
1957            |name, stack, obj| {
1958                match name {
1959                    "Certificates" => {
1960                        obj.certificates.get_or_insert(vec![]).extend(
1961                            CertificateListDeserializer::deserialize("Certificates", stack)?,
1962                        );
1963                    }
1964                    "NextMarker" => {
1965                        obj.next_marker =
1966                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
1967                    }
1968                    _ => skip_tree(stack),
1969                }
1970                Ok(())
1971            },
1972        )
1973    }
1974}
1975#[derive(Clone, Debug, Default, PartialEq)]
1976#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1977pub struct DescribeListenersInput {
1978    /// <p>The Amazon Resource Names (ARN) of the listeners.</p>
1979    pub listener_arns: Option<Vec<String>>,
1980    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
1981    pub load_balancer_arn: Option<String>,
1982    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1983    pub marker: Option<String>,
1984    /// <p>The maximum number of results to return with this call.</p>
1985    pub page_size: Option<i64>,
1986}
1987
1988/// Serialize `DescribeListenersInput` contents to a `SignedRequest`.
1989struct DescribeListenersInputSerializer;
1990impl DescribeListenersInputSerializer {
1991    fn serialize(params: &mut Params, name: &str, obj: &DescribeListenersInput) {
1992        let mut prefix = name.to_string();
1993        if prefix != "" {
1994            prefix.push_str(".");
1995        }
1996
1997        if let Some(ref field_value) = obj.listener_arns {
1998            ListenerArnsSerializer::serialize(
1999                params,
2000                &format!("{}{}", prefix, "ListenerArns"),
2001                field_value,
2002            );
2003        }
2004        if let Some(ref field_value) = obj.load_balancer_arn {
2005            params.put(&format!("{}{}", prefix, "LoadBalancerArn"), &field_value);
2006        }
2007        if let Some(ref field_value) = obj.marker {
2008            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
2009        }
2010        if let Some(ref field_value) = obj.page_size {
2011            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
2012        }
2013    }
2014}
2015
2016#[derive(Clone, Debug, Default, PartialEq)]
2017#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2018pub struct DescribeListenersOutput {
2019    /// <p>Information about the listeners.</p>
2020    pub listeners: Option<Vec<Listener>>,
2021    /// <p>If there are additional results, this is the marker for the next set of results. Otherwise, this is null.</p>
2022    pub next_marker: Option<String>,
2023}
2024
2025#[allow(dead_code)]
2026struct DescribeListenersOutputDeserializer;
2027impl DescribeListenersOutputDeserializer {
2028    #[allow(dead_code, unused_variables)]
2029    fn deserialize<T: Peek + Next>(
2030        tag_name: &str,
2031        stack: &mut T,
2032    ) -> Result<DescribeListenersOutput, XmlParseError> {
2033        deserialize_elements::<_, DescribeListenersOutput, _>(
2034            tag_name,
2035            stack,
2036            |name, stack, obj| {
2037                match name {
2038                    "Listeners" => {
2039                        obj.listeners
2040                            .get_or_insert(vec![])
2041                            .extend(ListenersDeserializer::deserialize("Listeners", stack)?);
2042                    }
2043                    "NextMarker" => {
2044                        obj.next_marker =
2045                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
2046                    }
2047                    _ => skip_tree(stack),
2048                }
2049                Ok(())
2050            },
2051        )
2052    }
2053}
2054#[derive(Clone, Debug, Default, PartialEq)]
2055#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2056pub struct DescribeLoadBalancerAttributesInput {
2057    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
2058    pub load_balancer_arn: String,
2059}
2060
2061/// Serialize `DescribeLoadBalancerAttributesInput` contents to a `SignedRequest`.
2062struct DescribeLoadBalancerAttributesInputSerializer;
2063impl DescribeLoadBalancerAttributesInputSerializer {
2064    fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancerAttributesInput) {
2065        let mut prefix = name.to_string();
2066        if prefix != "" {
2067            prefix.push_str(".");
2068        }
2069
2070        params.put(
2071            &format!("{}{}", prefix, "LoadBalancerArn"),
2072            &obj.load_balancer_arn,
2073        );
2074    }
2075}
2076
2077#[derive(Clone, Debug, Default, PartialEq)]
2078#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2079pub struct DescribeLoadBalancerAttributesOutput {
2080    /// <p>Information about the load balancer attributes.</p>
2081    pub attributes: Option<Vec<LoadBalancerAttribute>>,
2082}
2083
2084#[allow(dead_code)]
2085struct DescribeLoadBalancerAttributesOutputDeserializer;
2086impl DescribeLoadBalancerAttributesOutputDeserializer {
2087    #[allow(dead_code, unused_variables)]
2088    fn deserialize<T: Peek + Next>(
2089        tag_name: &str,
2090        stack: &mut T,
2091    ) -> Result<DescribeLoadBalancerAttributesOutput, XmlParseError> {
2092        deserialize_elements::<_, DescribeLoadBalancerAttributesOutput, _>(
2093            tag_name,
2094            stack,
2095            |name, stack, obj| {
2096                match name {
2097                    "Attributes" => {
2098                        obj.attributes.get_or_insert(vec![]).extend(
2099                            LoadBalancerAttributesDeserializer::deserialize("Attributes", stack)?,
2100                        );
2101                    }
2102                    _ => skip_tree(stack),
2103                }
2104                Ok(())
2105            },
2106        )
2107    }
2108}
2109#[derive(Clone, Debug, Default, PartialEq)]
2110#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2111pub struct DescribeLoadBalancersInput {
2112    /// <p>The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call.</p>
2113    pub load_balancer_arns: Option<Vec<String>>,
2114    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
2115    pub marker: Option<String>,
2116    /// <p>The names of the load balancers.</p>
2117    pub names: Option<Vec<String>>,
2118    /// <p>The maximum number of results to return with this call.</p>
2119    pub page_size: Option<i64>,
2120}
2121
2122/// Serialize `DescribeLoadBalancersInput` contents to a `SignedRequest`.
2123struct DescribeLoadBalancersInputSerializer;
2124impl DescribeLoadBalancersInputSerializer {
2125    fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancersInput) {
2126        let mut prefix = name.to_string();
2127        if prefix != "" {
2128            prefix.push_str(".");
2129        }
2130
2131        if let Some(ref field_value) = obj.load_balancer_arns {
2132            LoadBalancerArnsSerializer::serialize(
2133                params,
2134                &format!("{}{}", prefix, "LoadBalancerArns"),
2135                field_value,
2136            );
2137        }
2138        if let Some(ref field_value) = obj.marker {
2139            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
2140        }
2141        if let Some(ref field_value) = obj.names {
2142            LoadBalancerNamesSerializer::serialize(
2143                params,
2144                &format!("{}{}", prefix, "Names"),
2145                field_value,
2146            );
2147        }
2148        if let Some(ref field_value) = obj.page_size {
2149            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
2150        }
2151    }
2152}
2153
2154#[derive(Clone, Debug, Default, PartialEq)]
2155#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2156pub struct DescribeLoadBalancersOutput {
2157    /// <p>Information about the load balancers.</p>
2158    pub load_balancers: Option<Vec<LoadBalancer>>,
2159    /// <p>If there are additional results, this is the marker for the next set of results. Otherwise, this is null.</p>
2160    pub next_marker: Option<String>,
2161}
2162
2163#[allow(dead_code)]
2164struct DescribeLoadBalancersOutputDeserializer;
2165impl DescribeLoadBalancersOutputDeserializer {
2166    #[allow(dead_code, unused_variables)]
2167    fn deserialize<T: Peek + Next>(
2168        tag_name: &str,
2169        stack: &mut T,
2170    ) -> Result<DescribeLoadBalancersOutput, XmlParseError> {
2171        deserialize_elements::<_, DescribeLoadBalancersOutput, _>(
2172            tag_name,
2173            stack,
2174            |name, stack, obj| {
2175                match name {
2176                    "LoadBalancers" => {
2177                        obj.load_balancers.get_or_insert(vec![]).extend(
2178                            LoadBalancersDeserializer::deserialize("LoadBalancers", stack)?,
2179                        );
2180                    }
2181                    "NextMarker" => {
2182                        obj.next_marker =
2183                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
2184                    }
2185                    _ => skip_tree(stack),
2186                }
2187                Ok(())
2188            },
2189        )
2190    }
2191}
2192#[derive(Clone, Debug, Default, PartialEq)]
2193#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2194pub struct DescribeRulesInput {
2195    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
2196    pub listener_arn: Option<String>,
2197    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
2198    pub marker: Option<String>,
2199    /// <p>The maximum number of results to return with this call.</p>
2200    pub page_size: Option<i64>,
2201    /// <p>The Amazon Resource Names (ARN) of the rules.</p>
2202    pub rule_arns: Option<Vec<String>>,
2203}
2204
2205/// Serialize `DescribeRulesInput` contents to a `SignedRequest`.
2206struct DescribeRulesInputSerializer;
2207impl DescribeRulesInputSerializer {
2208    fn serialize(params: &mut Params, name: &str, obj: &DescribeRulesInput) {
2209        let mut prefix = name.to_string();
2210        if prefix != "" {
2211            prefix.push_str(".");
2212        }
2213
2214        if let Some(ref field_value) = obj.listener_arn {
2215            params.put(&format!("{}{}", prefix, "ListenerArn"), &field_value);
2216        }
2217        if let Some(ref field_value) = obj.marker {
2218            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
2219        }
2220        if let Some(ref field_value) = obj.page_size {
2221            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
2222        }
2223        if let Some(ref field_value) = obj.rule_arns {
2224            RuleArnsSerializer::serialize(
2225                params,
2226                &format!("{}{}", prefix, "RuleArns"),
2227                field_value,
2228            );
2229        }
2230    }
2231}
2232
2233#[derive(Clone, Debug, Default, PartialEq)]
2234#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2235pub struct DescribeRulesOutput {
2236    /// <p>If there are additional results, this is the marker for the next set of results. Otherwise, this is null.</p>
2237    pub next_marker: Option<String>,
2238    /// <p>Information about the rules.</p>
2239    pub rules: Option<Vec<Rule>>,
2240}
2241
2242#[allow(dead_code)]
2243struct DescribeRulesOutputDeserializer;
2244impl DescribeRulesOutputDeserializer {
2245    #[allow(dead_code, unused_variables)]
2246    fn deserialize<T: Peek + Next>(
2247        tag_name: &str,
2248        stack: &mut T,
2249    ) -> Result<DescribeRulesOutput, XmlParseError> {
2250        deserialize_elements::<_, DescribeRulesOutput, _>(tag_name, stack, |name, stack, obj| {
2251            match name {
2252                "NextMarker" => {
2253                    obj.next_marker = Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
2254                }
2255                "Rules" => {
2256                    obj.rules
2257                        .get_or_insert(vec![])
2258                        .extend(RulesDeserializer::deserialize("Rules", stack)?);
2259                }
2260                _ => skip_tree(stack),
2261            }
2262            Ok(())
2263        })
2264    }
2265}
2266#[derive(Clone, Debug, Default, PartialEq)]
2267#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2268pub struct DescribeSSLPoliciesInput {
2269    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
2270    pub marker: Option<String>,
2271    /// <p>The names of the policies.</p>
2272    pub names: Option<Vec<String>>,
2273    /// <p>The maximum number of results to return with this call.</p>
2274    pub page_size: Option<i64>,
2275}
2276
2277/// Serialize `DescribeSSLPoliciesInput` contents to a `SignedRequest`.
2278struct DescribeSSLPoliciesInputSerializer;
2279impl DescribeSSLPoliciesInputSerializer {
2280    fn serialize(params: &mut Params, name: &str, obj: &DescribeSSLPoliciesInput) {
2281        let mut prefix = name.to_string();
2282        if prefix != "" {
2283            prefix.push_str(".");
2284        }
2285
2286        if let Some(ref field_value) = obj.marker {
2287            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
2288        }
2289        if let Some(ref field_value) = obj.names {
2290            SslPolicyNamesSerializer::serialize(
2291                params,
2292                &format!("{}{}", prefix, "Names"),
2293                field_value,
2294            );
2295        }
2296        if let Some(ref field_value) = obj.page_size {
2297            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
2298        }
2299    }
2300}
2301
2302#[derive(Clone, Debug, Default, PartialEq)]
2303#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2304pub struct DescribeSSLPoliciesOutput {
2305    /// <p>If there are additional results, this is the marker for the next set of results. Otherwise, this is null.</p>
2306    pub next_marker: Option<String>,
2307    /// <p>Information about the security policies.</p>
2308    pub ssl_policies: Option<Vec<SslPolicy>>,
2309}
2310
2311#[allow(dead_code)]
2312struct DescribeSSLPoliciesOutputDeserializer;
2313impl DescribeSSLPoliciesOutputDeserializer {
2314    #[allow(dead_code, unused_variables)]
2315    fn deserialize<T: Peek + Next>(
2316        tag_name: &str,
2317        stack: &mut T,
2318    ) -> Result<DescribeSSLPoliciesOutput, XmlParseError> {
2319        deserialize_elements::<_, DescribeSSLPoliciesOutput, _>(
2320            tag_name,
2321            stack,
2322            |name, stack, obj| {
2323                match name {
2324                    "NextMarker" => {
2325                        obj.next_marker =
2326                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
2327                    }
2328                    "SslPolicies" => {
2329                        obj.ssl_policies
2330                            .get_or_insert(vec![])
2331                            .extend(SslPoliciesDeserializer::deserialize("SslPolicies", stack)?);
2332                    }
2333                    _ => skip_tree(stack),
2334                }
2335                Ok(())
2336            },
2337        )
2338    }
2339}
2340#[derive(Clone, Debug, Default, PartialEq)]
2341#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2342pub struct DescribeTagsInput {
2343    /// <p>The Amazon Resource Names (ARN) of the resources. You can specify up to 20 resources in a single call.</p>
2344    pub resource_arns: Vec<String>,
2345}
2346
2347/// Serialize `DescribeTagsInput` contents to a `SignedRequest`.
2348struct DescribeTagsInputSerializer;
2349impl DescribeTagsInputSerializer {
2350    fn serialize(params: &mut Params, name: &str, obj: &DescribeTagsInput) {
2351        let mut prefix = name.to_string();
2352        if prefix != "" {
2353            prefix.push_str(".");
2354        }
2355
2356        ResourceArnsSerializer::serialize(
2357            params,
2358            &format!("{}{}", prefix, "ResourceArns"),
2359            &obj.resource_arns,
2360        );
2361    }
2362}
2363
2364#[derive(Clone, Debug, Default, PartialEq)]
2365#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2366pub struct DescribeTagsOutput {
2367    /// <p>Information about the tags.</p>
2368    pub tag_descriptions: Option<Vec<TagDescription>>,
2369}
2370
2371#[allow(dead_code)]
2372struct DescribeTagsOutputDeserializer;
2373impl DescribeTagsOutputDeserializer {
2374    #[allow(dead_code, unused_variables)]
2375    fn deserialize<T: Peek + Next>(
2376        tag_name: &str,
2377        stack: &mut T,
2378    ) -> Result<DescribeTagsOutput, XmlParseError> {
2379        deserialize_elements::<_, DescribeTagsOutput, _>(tag_name, stack, |name, stack, obj| {
2380            match name {
2381                "TagDescriptions" => {
2382                    obj.tag_descriptions.get_or_insert(vec![]).extend(
2383                        TagDescriptionsDeserializer::deserialize("TagDescriptions", stack)?,
2384                    );
2385                }
2386                _ => skip_tree(stack),
2387            }
2388            Ok(())
2389        })
2390    }
2391}
2392#[derive(Clone, Debug, Default, PartialEq)]
2393#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2394pub struct DescribeTargetGroupAttributesInput {
2395    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
2396    pub target_group_arn: String,
2397}
2398
2399/// Serialize `DescribeTargetGroupAttributesInput` contents to a `SignedRequest`.
2400struct DescribeTargetGroupAttributesInputSerializer;
2401impl DescribeTargetGroupAttributesInputSerializer {
2402    fn serialize(params: &mut Params, name: &str, obj: &DescribeTargetGroupAttributesInput) {
2403        let mut prefix = name.to_string();
2404        if prefix != "" {
2405            prefix.push_str(".");
2406        }
2407
2408        params.put(
2409            &format!("{}{}", prefix, "TargetGroupArn"),
2410            &obj.target_group_arn,
2411        );
2412    }
2413}
2414
2415#[derive(Clone, Debug, Default, PartialEq)]
2416#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2417pub struct DescribeTargetGroupAttributesOutput {
2418    /// <p>Information about the target group attributes</p>
2419    pub attributes: Option<Vec<TargetGroupAttribute>>,
2420}
2421
2422#[allow(dead_code)]
2423struct DescribeTargetGroupAttributesOutputDeserializer;
2424impl DescribeTargetGroupAttributesOutputDeserializer {
2425    #[allow(dead_code, unused_variables)]
2426    fn deserialize<T: Peek + Next>(
2427        tag_name: &str,
2428        stack: &mut T,
2429    ) -> Result<DescribeTargetGroupAttributesOutput, XmlParseError> {
2430        deserialize_elements::<_, DescribeTargetGroupAttributesOutput, _>(
2431            tag_name,
2432            stack,
2433            |name, stack, obj| {
2434                match name {
2435                    "Attributes" => {
2436                        obj.attributes.get_or_insert(vec![]).extend(
2437                            TargetGroupAttributesDeserializer::deserialize("Attributes", stack)?,
2438                        );
2439                    }
2440                    _ => skip_tree(stack),
2441                }
2442                Ok(())
2443            },
2444        )
2445    }
2446}
2447#[derive(Clone, Debug, Default, PartialEq)]
2448#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2449pub struct DescribeTargetGroupsInput {
2450    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
2451    pub load_balancer_arn: Option<String>,
2452    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
2453    pub marker: Option<String>,
2454    /// <p>The names of the target groups.</p>
2455    pub names: Option<Vec<String>>,
2456    /// <p>The maximum number of results to return with this call.</p>
2457    pub page_size: Option<i64>,
2458    /// <p>The Amazon Resource Names (ARN) of the target groups.</p>
2459    pub target_group_arns: Option<Vec<String>>,
2460}
2461
2462/// Serialize `DescribeTargetGroupsInput` contents to a `SignedRequest`.
2463struct DescribeTargetGroupsInputSerializer;
2464impl DescribeTargetGroupsInputSerializer {
2465    fn serialize(params: &mut Params, name: &str, obj: &DescribeTargetGroupsInput) {
2466        let mut prefix = name.to_string();
2467        if prefix != "" {
2468            prefix.push_str(".");
2469        }
2470
2471        if let Some(ref field_value) = obj.load_balancer_arn {
2472            params.put(&format!("{}{}", prefix, "LoadBalancerArn"), &field_value);
2473        }
2474        if let Some(ref field_value) = obj.marker {
2475            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
2476        }
2477        if let Some(ref field_value) = obj.names {
2478            TargetGroupNamesSerializer::serialize(
2479                params,
2480                &format!("{}{}", prefix, "Names"),
2481                field_value,
2482            );
2483        }
2484        if let Some(ref field_value) = obj.page_size {
2485            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
2486        }
2487        if let Some(ref field_value) = obj.target_group_arns {
2488            TargetGroupArnsSerializer::serialize(
2489                params,
2490                &format!("{}{}", prefix, "TargetGroupArns"),
2491                field_value,
2492            );
2493        }
2494    }
2495}
2496
2497#[derive(Clone, Debug, Default, PartialEq)]
2498#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2499pub struct DescribeTargetGroupsOutput {
2500    /// <p>If there are additional results, this is the marker for the next set of results. Otherwise, this is null.</p>
2501    pub next_marker: Option<String>,
2502    /// <p>Information about the target groups.</p>
2503    pub target_groups: Option<Vec<TargetGroup>>,
2504}
2505
2506#[allow(dead_code)]
2507struct DescribeTargetGroupsOutputDeserializer;
2508impl DescribeTargetGroupsOutputDeserializer {
2509    #[allow(dead_code, unused_variables)]
2510    fn deserialize<T: Peek + Next>(
2511        tag_name: &str,
2512        stack: &mut T,
2513    ) -> Result<DescribeTargetGroupsOutput, XmlParseError> {
2514        deserialize_elements::<_, DescribeTargetGroupsOutput, _>(
2515            tag_name,
2516            stack,
2517            |name, stack, obj| {
2518                match name {
2519                    "NextMarker" => {
2520                        obj.next_marker =
2521                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
2522                    }
2523                    "TargetGroups" => {
2524                        obj.target_groups.get_or_insert(vec![]).extend(
2525                            TargetGroupsDeserializer::deserialize("TargetGroups", stack)?,
2526                        );
2527                    }
2528                    _ => skip_tree(stack),
2529                }
2530                Ok(())
2531            },
2532        )
2533    }
2534}
2535#[derive(Clone, Debug, Default, PartialEq)]
2536#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2537pub struct DescribeTargetHealthInput {
2538    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
2539    pub target_group_arn: String,
2540    /// <p>The targets.</p>
2541    pub targets: Option<Vec<TargetDescription>>,
2542}
2543
2544/// Serialize `DescribeTargetHealthInput` contents to a `SignedRequest`.
2545struct DescribeTargetHealthInputSerializer;
2546impl DescribeTargetHealthInputSerializer {
2547    fn serialize(params: &mut Params, name: &str, obj: &DescribeTargetHealthInput) {
2548        let mut prefix = name.to_string();
2549        if prefix != "" {
2550            prefix.push_str(".");
2551        }
2552
2553        params.put(
2554            &format!("{}{}", prefix, "TargetGroupArn"),
2555            &obj.target_group_arn,
2556        );
2557        if let Some(ref field_value) = obj.targets {
2558            TargetDescriptionsSerializer::serialize(
2559                params,
2560                &format!("{}{}", prefix, "Targets"),
2561                field_value,
2562            );
2563        }
2564    }
2565}
2566
2567#[derive(Clone, Debug, Default, PartialEq)]
2568#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2569pub struct DescribeTargetHealthOutput {
2570    /// <p>Information about the health of the targets.</p>
2571    pub target_health_descriptions: Option<Vec<TargetHealthDescription>>,
2572}
2573
2574#[allow(dead_code)]
2575struct DescribeTargetHealthOutputDeserializer;
2576impl DescribeTargetHealthOutputDeserializer {
2577    #[allow(dead_code, unused_variables)]
2578    fn deserialize<T: Peek + Next>(
2579        tag_name: &str,
2580        stack: &mut T,
2581    ) -> Result<DescribeTargetHealthOutput, XmlParseError> {
2582        deserialize_elements::<_, DescribeTargetHealthOutput, _>(
2583            tag_name,
2584            stack,
2585            |name, stack, obj| {
2586                match name {
2587                    "TargetHealthDescriptions" => {
2588                        obj.target_health_descriptions.get_or_insert(vec![]).extend(
2589                            TargetHealthDescriptionsDeserializer::deserialize(
2590                                "TargetHealthDescriptions",
2591                                stack,
2592                            )?,
2593                        );
2594                    }
2595                    _ => skip_tree(stack),
2596                }
2597                Ok(())
2598            },
2599        )
2600    }
2601}
2602#[allow(dead_code)]
2603struct DescriptionDeserializer;
2604impl DescriptionDeserializer {
2605    #[allow(dead_code, unused_variables)]
2606    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2607        xml_util::deserialize_primitive(tag_name, stack, Ok)
2608    }
2609}
2610/// <p>Information about an action that returns a custom HTTP response.</p>
2611#[derive(Clone, Debug, Default, PartialEq)]
2612#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2613#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2614pub struct FixedResponseActionConfig {
2615    /// <p>The content type.</p> <p>Valid Values: text/plain | text/css | text/html | application/javascript | application/json</p>
2616    pub content_type: Option<String>,
2617    /// <p>The message.</p>
2618    pub message_body: Option<String>,
2619    /// <p>The HTTP response code (2XX, 4XX, or 5XX).</p>
2620    pub status_code: String,
2621}
2622
2623#[allow(dead_code)]
2624struct FixedResponseActionConfigDeserializer;
2625impl FixedResponseActionConfigDeserializer {
2626    #[allow(dead_code, unused_variables)]
2627    fn deserialize<T: Peek + Next>(
2628        tag_name: &str,
2629        stack: &mut T,
2630    ) -> Result<FixedResponseActionConfig, XmlParseError> {
2631        deserialize_elements::<_, FixedResponseActionConfig, _>(
2632            tag_name,
2633            stack,
2634            |name, stack, obj| {
2635                match name {
2636                    "ContentType" => {
2637                        obj.content_type =
2638                            Some(FixedResponseActionContentTypeDeserializer::deserialize(
2639                                "ContentType",
2640                                stack,
2641                            )?);
2642                    }
2643                    "MessageBody" => {
2644                        obj.message_body =
2645                            Some(FixedResponseActionMessageDeserializer::deserialize(
2646                                "MessageBody",
2647                                stack,
2648                            )?);
2649                    }
2650                    "StatusCode" => {
2651                        obj.status_code = FixedResponseActionStatusCodeDeserializer::deserialize(
2652                            "StatusCode",
2653                            stack,
2654                        )?;
2655                    }
2656                    _ => skip_tree(stack),
2657                }
2658                Ok(())
2659            },
2660        )
2661    }
2662}
2663
2664/// Serialize `FixedResponseActionConfig` contents to a `SignedRequest`.
2665struct FixedResponseActionConfigSerializer;
2666impl FixedResponseActionConfigSerializer {
2667    fn serialize(params: &mut Params, name: &str, obj: &FixedResponseActionConfig) {
2668        let mut prefix = name.to_string();
2669        if prefix != "" {
2670            prefix.push_str(".");
2671        }
2672
2673        if let Some(ref field_value) = obj.content_type {
2674            params.put(&format!("{}{}", prefix, "ContentType"), &field_value);
2675        }
2676        if let Some(ref field_value) = obj.message_body {
2677            params.put(&format!("{}{}", prefix, "MessageBody"), &field_value);
2678        }
2679        params.put(&format!("{}{}", prefix, "StatusCode"), &obj.status_code);
2680    }
2681}
2682
2683#[allow(dead_code)]
2684struct FixedResponseActionContentTypeDeserializer;
2685impl FixedResponseActionContentTypeDeserializer {
2686    #[allow(dead_code, unused_variables)]
2687    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2688        xml_util::deserialize_primitive(tag_name, stack, Ok)
2689    }
2690}
2691#[allow(dead_code)]
2692struct FixedResponseActionMessageDeserializer;
2693impl FixedResponseActionMessageDeserializer {
2694    #[allow(dead_code, unused_variables)]
2695    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2696        xml_util::deserialize_primitive(tag_name, stack, Ok)
2697    }
2698}
2699#[allow(dead_code)]
2700struct FixedResponseActionStatusCodeDeserializer;
2701impl FixedResponseActionStatusCodeDeserializer {
2702    #[allow(dead_code, unused_variables)]
2703    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2704        xml_util::deserialize_primitive(tag_name, stack, Ok)
2705    }
2706}
2707/// <p>Information about a forward action.</p>
2708#[derive(Clone, Debug, Default, PartialEq)]
2709#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2710#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2711pub struct ForwardActionConfig {
2712    /// <p>The target group stickiness for the rule.</p>
2713    pub target_group_stickiness_config: Option<TargetGroupStickinessConfig>,
2714    /// <p>One or more target groups. For Network Load Balancers, you can specify a single target group.</p>
2715    pub target_groups: Option<Vec<TargetGroupTuple>>,
2716}
2717
2718#[allow(dead_code)]
2719struct ForwardActionConfigDeserializer;
2720impl ForwardActionConfigDeserializer {
2721    #[allow(dead_code, unused_variables)]
2722    fn deserialize<T: Peek + Next>(
2723        tag_name: &str,
2724        stack: &mut T,
2725    ) -> Result<ForwardActionConfig, XmlParseError> {
2726        deserialize_elements::<_, ForwardActionConfig, _>(tag_name, stack, |name, stack, obj| {
2727            match name {
2728                "TargetGroupStickinessConfig" => {
2729                    obj.target_group_stickiness_config =
2730                        Some(TargetGroupStickinessConfigDeserializer::deserialize(
2731                            "TargetGroupStickinessConfig",
2732                            stack,
2733                        )?);
2734                }
2735                "TargetGroups" => {
2736                    obj.target_groups.get_or_insert(vec![]).extend(
2737                        TargetGroupListDeserializer::deserialize("TargetGroups", stack)?,
2738                    );
2739                }
2740                _ => skip_tree(stack),
2741            }
2742            Ok(())
2743        })
2744    }
2745}
2746
2747/// Serialize `ForwardActionConfig` contents to a `SignedRequest`.
2748struct ForwardActionConfigSerializer;
2749impl ForwardActionConfigSerializer {
2750    fn serialize(params: &mut Params, name: &str, obj: &ForwardActionConfig) {
2751        let mut prefix = name.to_string();
2752        if prefix != "" {
2753            prefix.push_str(".");
2754        }
2755
2756        if let Some(ref field_value) = obj.target_group_stickiness_config {
2757            TargetGroupStickinessConfigSerializer::serialize(
2758                params,
2759                &format!("{}{}", prefix, "TargetGroupStickinessConfig"),
2760                field_value,
2761            );
2762        }
2763        if let Some(ref field_value) = obj.target_groups {
2764            TargetGroupListSerializer::serialize(
2765                params,
2766                &format!("{}{}", prefix, "TargetGroups"),
2767                field_value,
2768            );
2769        }
2770    }
2771}
2772
2773#[allow(dead_code)]
2774struct HealthCheckEnabledDeserializer;
2775impl HealthCheckEnabledDeserializer {
2776    #[allow(dead_code, unused_variables)]
2777    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
2778        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
2779    }
2780}
2781#[allow(dead_code)]
2782struct HealthCheckIntervalSecondsDeserializer;
2783impl HealthCheckIntervalSecondsDeserializer {
2784    #[allow(dead_code, unused_variables)]
2785    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2786        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2787    }
2788}
2789#[allow(dead_code)]
2790struct HealthCheckPortDeserializer;
2791impl HealthCheckPortDeserializer {
2792    #[allow(dead_code, unused_variables)]
2793    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2794        xml_util::deserialize_primitive(tag_name, stack, Ok)
2795    }
2796}
2797#[allow(dead_code)]
2798struct HealthCheckThresholdCountDeserializer;
2799impl HealthCheckThresholdCountDeserializer {
2800    #[allow(dead_code, unused_variables)]
2801    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2802        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2803    }
2804}
2805#[allow(dead_code)]
2806struct HealthCheckTimeoutSecondsDeserializer;
2807impl HealthCheckTimeoutSecondsDeserializer {
2808    #[allow(dead_code, unused_variables)]
2809    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2810        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2811    }
2812}
2813/// <p>Information about a host header condition.</p>
2814#[derive(Clone, Debug, Default, PartialEq)]
2815#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2816#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2817pub struct HostHeaderConditionConfig {
2818    /// <p>One or more host names. The maximum size of each name is 128 characters. The comparison is case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).</p> <p>If you specify multiple strings, the condition is satisfied if one of the strings matches the host name.</p>
2819    pub values: Option<Vec<String>>,
2820}
2821
2822#[allow(dead_code)]
2823struct HostHeaderConditionConfigDeserializer;
2824impl HostHeaderConditionConfigDeserializer {
2825    #[allow(dead_code, unused_variables)]
2826    fn deserialize<T: Peek + Next>(
2827        tag_name: &str,
2828        stack: &mut T,
2829    ) -> Result<HostHeaderConditionConfig, XmlParseError> {
2830        deserialize_elements::<_, HostHeaderConditionConfig, _>(
2831            tag_name,
2832            stack,
2833            |name, stack, obj| {
2834                match name {
2835                    "Values" => {
2836                        obj.values
2837                            .get_or_insert(vec![])
2838                            .extend(ListOfStringDeserializer::deserialize("Values", stack)?);
2839                    }
2840                    _ => skip_tree(stack),
2841                }
2842                Ok(())
2843            },
2844        )
2845    }
2846}
2847
2848/// Serialize `HostHeaderConditionConfig` contents to a `SignedRequest`.
2849struct HostHeaderConditionConfigSerializer;
2850impl HostHeaderConditionConfigSerializer {
2851    fn serialize(params: &mut Params, name: &str, obj: &HostHeaderConditionConfig) {
2852        let mut prefix = name.to_string();
2853        if prefix != "" {
2854            prefix.push_str(".");
2855        }
2856
2857        if let Some(ref field_value) = obj.values {
2858            ListOfStringSerializer::serialize(
2859                params,
2860                &format!("{}{}", prefix, "Values"),
2861                field_value,
2862            );
2863        }
2864    }
2865}
2866
2867#[allow(dead_code)]
2868struct HttpCodeDeserializer;
2869impl HttpCodeDeserializer {
2870    #[allow(dead_code, unused_variables)]
2871    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2872        xml_util::deserialize_primitive(tag_name, stack, Ok)
2873    }
2874}
2875/// <p>Information about an HTTP header condition.</p> <p>There is a set of standard HTTP header fields. You can also define custom HTTP header fields.</p>
2876#[derive(Clone, Debug, Default, PartialEq)]
2877#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2878#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2879pub struct HttpHeaderConditionConfig {
2880    /// <p>The name of the HTTP header field. The maximum size is 40 characters. The header name is case insensitive. The allowed characters are specified by RFC 7230. Wildcards are not supported.</p> <p>You can't use an HTTP header condition to specify the host header. Use <a>HostHeaderConditionConfig</a> to specify a host header condition.</p>
2881    pub http_header_name: Option<String>,
2882    /// <p>One or more strings to compare against the value of the HTTP header. The maximum size of each string is 128 characters. The comparison strings are case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).</p> <p>If the same header appears multiple times in the request, we search them in order until a match is found.</p> <p>If you specify multiple strings, the condition is satisfied if one of the strings matches the value of the HTTP header. To require that all of the strings are a match, create one condition per string.</p>
2883    pub values: Option<Vec<String>>,
2884}
2885
2886#[allow(dead_code)]
2887struct HttpHeaderConditionConfigDeserializer;
2888impl HttpHeaderConditionConfigDeserializer {
2889    #[allow(dead_code, unused_variables)]
2890    fn deserialize<T: Peek + Next>(
2891        tag_name: &str,
2892        stack: &mut T,
2893    ) -> Result<HttpHeaderConditionConfig, XmlParseError> {
2894        deserialize_elements::<_, HttpHeaderConditionConfig, _>(
2895            tag_name,
2896            stack,
2897            |name, stack, obj| {
2898                match name {
2899                    "HttpHeaderName" => {
2900                        obj.http_header_name =
2901                            Some(HttpHeaderConditionNameDeserializer::deserialize(
2902                                "HttpHeaderName",
2903                                stack,
2904                            )?);
2905                    }
2906                    "Values" => {
2907                        obj.values
2908                            .get_or_insert(vec![])
2909                            .extend(ListOfStringDeserializer::deserialize("Values", stack)?);
2910                    }
2911                    _ => skip_tree(stack),
2912                }
2913                Ok(())
2914            },
2915        )
2916    }
2917}
2918
2919/// Serialize `HttpHeaderConditionConfig` contents to a `SignedRequest`.
2920struct HttpHeaderConditionConfigSerializer;
2921impl HttpHeaderConditionConfigSerializer {
2922    fn serialize(params: &mut Params, name: &str, obj: &HttpHeaderConditionConfig) {
2923        let mut prefix = name.to_string();
2924        if prefix != "" {
2925            prefix.push_str(".");
2926        }
2927
2928        if let Some(ref field_value) = obj.http_header_name {
2929            params.put(&format!("{}{}", prefix, "HttpHeaderName"), &field_value);
2930        }
2931        if let Some(ref field_value) = obj.values {
2932            ListOfStringSerializer::serialize(
2933                params,
2934                &format!("{}{}", prefix, "Values"),
2935                field_value,
2936            );
2937        }
2938    }
2939}
2940
2941#[allow(dead_code)]
2942struct HttpHeaderConditionNameDeserializer;
2943impl HttpHeaderConditionNameDeserializer {
2944    #[allow(dead_code, unused_variables)]
2945    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2946        xml_util::deserialize_primitive(tag_name, stack, Ok)
2947    }
2948}
2949/// <p>Information about an HTTP method condition.</p> <p>HTTP defines a set of request methods, also referred to as HTTP verbs. For more information, see the <a href="https://www.iana.org/assignments/http-methods/http-methods.xhtml">HTTP Method Registry</a>. You can also define custom HTTP methods.</p>
2950#[derive(Clone, Debug, Default, PartialEq)]
2951#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2952#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2953pub struct HttpRequestMethodConditionConfig {
2954    /// <p>The name of the request method. The maximum size is 40 characters. The allowed characters are A-Z, hyphen (-), and underscore (_). The comparison is case sensitive. Wildcards are not supported; therefore, the method name must be an exact match.</p> <p>If you specify multiple strings, the condition is satisfied if one of the strings matches the HTTP request method. We recommend that you route GET and HEAD requests in the same way, because the response to a HEAD request may be cached.</p>
2955    pub values: Option<Vec<String>>,
2956}
2957
2958#[allow(dead_code)]
2959struct HttpRequestMethodConditionConfigDeserializer;
2960impl HttpRequestMethodConditionConfigDeserializer {
2961    #[allow(dead_code, unused_variables)]
2962    fn deserialize<T: Peek + Next>(
2963        tag_name: &str,
2964        stack: &mut T,
2965    ) -> Result<HttpRequestMethodConditionConfig, XmlParseError> {
2966        deserialize_elements::<_, HttpRequestMethodConditionConfig, _>(
2967            tag_name,
2968            stack,
2969            |name, stack, obj| {
2970                match name {
2971                    "Values" => {
2972                        obj.values
2973                            .get_or_insert(vec![])
2974                            .extend(ListOfStringDeserializer::deserialize("Values", stack)?);
2975                    }
2976                    _ => skip_tree(stack),
2977                }
2978                Ok(())
2979            },
2980        )
2981    }
2982}
2983
2984/// Serialize `HttpRequestMethodConditionConfig` contents to a `SignedRequest`.
2985struct HttpRequestMethodConditionConfigSerializer;
2986impl HttpRequestMethodConditionConfigSerializer {
2987    fn serialize(params: &mut Params, name: &str, obj: &HttpRequestMethodConditionConfig) {
2988        let mut prefix = name.to_string();
2989        if prefix != "" {
2990            prefix.push_str(".");
2991        }
2992
2993        if let Some(ref field_value) = obj.values {
2994            ListOfStringSerializer::serialize(
2995                params,
2996                &format!("{}{}", prefix, "Values"),
2997                field_value,
2998            );
2999        }
3000    }
3001}
3002
3003#[allow(dead_code)]
3004struct IpAddressDeserializer;
3005impl IpAddressDeserializer {
3006    #[allow(dead_code, unused_variables)]
3007    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3008        xml_util::deserialize_primitive(tag_name, stack, Ok)
3009    }
3010}
3011#[allow(dead_code)]
3012struct IpAddressTypeDeserializer;
3013impl IpAddressTypeDeserializer {
3014    #[allow(dead_code, unused_variables)]
3015    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3016        xml_util::deserialize_primitive(tag_name, stack, Ok)
3017    }
3018}
3019#[allow(dead_code)]
3020struct IsDefaultDeserializer;
3021impl IsDefaultDeserializer {
3022    #[allow(dead_code, unused_variables)]
3023    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
3024        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
3025    }
3026}
3027/// <p>Information about an Elastic Load Balancing resource limit for your AWS account.</p>
3028#[derive(Clone, Debug, Default, PartialEq)]
3029#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3030pub struct Limit {
3031    /// <p>The maximum value of the limit.</p>
3032    pub max: Option<String>,
3033    /// <p><p>The name of the limit. The possible values are:</p> <ul> <li> <p>application-load-balancers</p> </li> <li> <p>listeners-per-application-load-balancer</p> </li> <li> <p>listeners-per-network-load-balancer</p> </li> <li> <p>network-load-balancers</p> </li> <li> <p>rules-per-application-load-balancer</p> </li> <li> <p>target-groups</p> </li> <li> <p>target-groups-per-action-on-application-load-balancer</p> </li> <li> <p>target-groups-per-action-on-network-load-balancer</p> </li> <li> <p>target-groups-per-application-load-balancer</p> </li> <li> <p>targets-per-application-load-balancer</p> </li> <li> <p>targets-per-availability-zone-per-network-load-balancer</p> </li> <li> <p>targets-per-network-load-balancer</p> </li> </ul></p>
3034    pub name: Option<String>,
3035}
3036
3037#[allow(dead_code)]
3038struct LimitDeserializer;
3039impl LimitDeserializer {
3040    #[allow(dead_code, unused_variables)]
3041    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Limit, XmlParseError> {
3042        deserialize_elements::<_, Limit, _>(tag_name, stack, |name, stack, obj| {
3043            match name {
3044                "Max" => {
3045                    obj.max = Some(MaxDeserializer::deserialize("Max", stack)?);
3046                }
3047                "Name" => {
3048                    obj.name = Some(NameDeserializer::deserialize("Name", stack)?);
3049                }
3050                _ => skip_tree(stack),
3051            }
3052            Ok(())
3053        })
3054    }
3055}
3056#[allow(dead_code)]
3057struct LimitsDeserializer;
3058impl LimitsDeserializer {
3059    #[allow(dead_code, unused_variables)]
3060    fn deserialize<T: Peek + Next>(
3061        tag_name: &str,
3062        stack: &mut T,
3063    ) -> Result<Vec<Limit>, XmlParseError> {
3064        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3065            if name == "member" {
3066                obj.push(LimitDeserializer::deserialize("member", stack)?);
3067            } else {
3068                skip_tree(stack);
3069            }
3070            Ok(())
3071        })
3072    }
3073}
3074#[allow(dead_code)]
3075struct ListOfStringDeserializer;
3076impl ListOfStringDeserializer {
3077    #[allow(dead_code, unused_variables)]
3078    fn deserialize<T: Peek + Next>(
3079        tag_name: &str,
3080        stack: &mut T,
3081    ) -> Result<Vec<String>, XmlParseError> {
3082        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3083            if name == "member" {
3084                obj.push(StringValueDeserializer::deserialize("member", stack)?);
3085            } else {
3086                skip_tree(stack);
3087            }
3088            Ok(())
3089        })
3090    }
3091}
3092
3093/// Serialize `ListOfString` contents to a `SignedRequest`.
3094struct ListOfStringSerializer;
3095impl ListOfStringSerializer {
3096    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3097        for (index, obj) in obj.iter().enumerate() {
3098            let key = format!("{}.member.{}", name, index + 1);
3099            params.put(&key, &obj);
3100        }
3101    }
3102}
3103
3104/// <p>Information about a listener.</p>
3105#[derive(Clone, Debug, Default, PartialEq)]
3106#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3107pub struct Listener {
3108    /// <p>[TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.</p>
3109    pub alpn_policy: Option<Vec<String>>,
3110    /// <p>[HTTPS or TLS listener] The default certificate for the listener.</p>
3111    pub certificates: Option<Vec<Certificate>>,
3112    /// <p>The default actions for the listener.</p>
3113    pub default_actions: Option<Vec<Action>>,
3114    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
3115    pub listener_arn: Option<String>,
3116    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
3117    pub load_balancer_arn: Option<String>,
3118    /// <p>The port on which the load balancer is listening.</p>
3119    pub port: Option<i64>,
3120    /// <p>The protocol for connections from clients to the load balancer.</p>
3121    pub protocol: Option<String>,
3122    /// <p>[HTTPS or TLS listener] The security policy that defines which protocols and ciphers are supported.</p>
3123    pub ssl_policy: Option<String>,
3124}
3125
3126#[allow(dead_code)]
3127struct ListenerDeserializer;
3128impl ListenerDeserializer {
3129    #[allow(dead_code, unused_variables)]
3130    fn deserialize<T: Peek + Next>(
3131        tag_name: &str,
3132        stack: &mut T,
3133    ) -> Result<Listener, XmlParseError> {
3134        deserialize_elements::<_, Listener, _>(tag_name, stack, |name, stack, obj| {
3135            match name {
3136                "AlpnPolicy" => {
3137                    obj.alpn_policy.get_or_insert(vec![]).extend(
3138                        AlpnPolicyNameDeserializer::deserialize("AlpnPolicy", stack)?,
3139                    );
3140                }
3141                "Certificates" => {
3142                    obj.certificates.get_or_insert(vec![]).extend(
3143                        CertificateListDeserializer::deserialize("Certificates", stack)?,
3144                    );
3145                }
3146                "DefaultActions" => {
3147                    obj.default_actions
3148                        .get_or_insert(vec![])
3149                        .extend(ActionsDeserializer::deserialize("DefaultActions", stack)?);
3150                }
3151                "ListenerArn" => {
3152                    obj.listener_arn =
3153                        Some(ListenerArnDeserializer::deserialize("ListenerArn", stack)?);
3154                }
3155                "LoadBalancerArn" => {
3156                    obj.load_balancer_arn = Some(LoadBalancerArnDeserializer::deserialize(
3157                        "LoadBalancerArn",
3158                        stack,
3159                    )?);
3160                }
3161                "Port" => {
3162                    obj.port = Some(PortDeserializer::deserialize("Port", stack)?);
3163                }
3164                "Protocol" => {
3165                    obj.protocol = Some(ProtocolEnumDeserializer::deserialize("Protocol", stack)?);
3166                }
3167                "SslPolicy" => {
3168                    obj.ssl_policy =
3169                        Some(SslPolicyNameDeserializer::deserialize("SslPolicy", stack)?);
3170                }
3171                _ => skip_tree(stack),
3172            }
3173            Ok(())
3174        })
3175    }
3176}
3177#[allow(dead_code)]
3178struct ListenerArnDeserializer;
3179impl ListenerArnDeserializer {
3180    #[allow(dead_code, unused_variables)]
3181    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3182        xml_util::deserialize_primitive(tag_name, stack, Ok)
3183    }
3184}
3185
3186/// Serialize `ListenerArns` contents to a `SignedRequest`.
3187struct ListenerArnsSerializer;
3188impl ListenerArnsSerializer {
3189    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3190        for (index, obj) in obj.iter().enumerate() {
3191            let key = format!("{}.member.{}", name, index + 1);
3192            params.put(&key, &obj);
3193        }
3194    }
3195}
3196
3197#[allow(dead_code)]
3198struct ListenersDeserializer;
3199impl ListenersDeserializer {
3200    #[allow(dead_code, unused_variables)]
3201    fn deserialize<T: Peek + Next>(
3202        tag_name: &str,
3203        stack: &mut T,
3204    ) -> Result<Vec<Listener>, XmlParseError> {
3205        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3206            if name == "member" {
3207                obj.push(ListenerDeserializer::deserialize("member", stack)?);
3208            } else {
3209                skip_tree(stack);
3210            }
3211            Ok(())
3212        })
3213    }
3214}
3215/// <p>Information about a load balancer.</p>
3216#[derive(Clone, Debug, Default, PartialEq)]
3217#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3218pub struct LoadBalancer {
3219    /// <p>The Availability Zones for the load balancer.</p>
3220    pub availability_zones: Option<Vec<AvailabilityZone>>,
3221    /// <p>The ID of the Amazon Route 53 hosted zone associated with the load balancer.</p>
3222    pub canonical_hosted_zone_id: Option<String>,
3223    /// <p>The date and time the load balancer was created.</p>
3224    pub created_time: Option<String>,
3225    /// <p>The public DNS name of the load balancer.</p>
3226    pub dns_name: Option<String>,
3227    /// <p>The type of IP addresses used by the subnets for your load balancer. The possible values are <code>ipv4</code> (for IPv4 addresses) and <code>dualstack</code> (for IPv4 and IPv6 addresses).</p>
3228    pub ip_address_type: Option<String>,
3229    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
3230    pub load_balancer_arn: Option<String>,
3231    /// <p>The name of the load balancer.</p>
3232    pub load_balancer_name: Option<String>,
3233    /// <p>The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.</p> <p>The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route requests only from clients with access to the VPC for the load balancer.</p>
3234    pub scheme: Option<String>,
3235    /// <p>The IDs of the security groups for the load balancer.</p>
3236    pub security_groups: Option<Vec<String>>,
3237    /// <p>The state of the load balancer.</p>
3238    pub state: Option<LoadBalancerState>,
3239    /// <p>The type of load balancer.</p>
3240    pub type_: Option<String>,
3241    /// <p>The ID of the VPC for the load balancer.</p>
3242    pub vpc_id: Option<String>,
3243}
3244
3245#[allow(dead_code)]
3246struct LoadBalancerDeserializer;
3247impl LoadBalancerDeserializer {
3248    #[allow(dead_code, unused_variables)]
3249    fn deserialize<T: Peek + Next>(
3250        tag_name: &str,
3251        stack: &mut T,
3252    ) -> Result<LoadBalancer, XmlParseError> {
3253        deserialize_elements::<_, LoadBalancer, _>(tag_name, stack, |name, stack, obj| {
3254            match name {
3255                "AvailabilityZones" => {
3256                    obj.availability_zones.get_or_insert(vec![]).extend(
3257                        AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
3258                    );
3259                }
3260                "CanonicalHostedZoneId" => {
3261                    obj.canonical_hosted_zone_id =
3262                        Some(CanonicalHostedZoneIdDeserializer::deserialize(
3263                            "CanonicalHostedZoneId",
3264                            stack,
3265                        )?);
3266                }
3267                "CreatedTime" => {
3268                    obj.created_time =
3269                        Some(CreatedTimeDeserializer::deserialize("CreatedTime", stack)?);
3270                }
3271                "DNSName" => {
3272                    obj.dns_name = Some(DNSNameDeserializer::deserialize("DNSName", stack)?);
3273                }
3274                "IpAddressType" => {
3275                    obj.ip_address_type = Some(IpAddressTypeDeserializer::deserialize(
3276                        "IpAddressType",
3277                        stack,
3278                    )?);
3279                }
3280                "LoadBalancerArn" => {
3281                    obj.load_balancer_arn = Some(LoadBalancerArnDeserializer::deserialize(
3282                        "LoadBalancerArn",
3283                        stack,
3284                    )?);
3285                }
3286                "LoadBalancerName" => {
3287                    obj.load_balancer_name = Some(LoadBalancerNameDeserializer::deserialize(
3288                        "LoadBalancerName",
3289                        stack,
3290                    )?);
3291                }
3292                "Scheme" => {
3293                    obj.scheme = Some(LoadBalancerSchemeEnumDeserializer::deserialize(
3294                        "Scheme", stack,
3295                    )?);
3296                }
3297                "SecurityGroups" => {
3298                    obj.security_groups.get_or_insert(vec![]).extend(
3299                        SecurityGroupsDeserializer::deserialize("SecurityGroups", stack)?,
3300                    );
3301                }
3302                "State" => {
3303                    obj.state = Some(LoadBalancerStateDeserializer::deserialize("State", stack)?);
3304                }
3305                "Type" => {
3306                    obj.type_ = Some(LoadBalancerTypeEnumDeserializer::deserialize(
3307                        "Type", stack,
3308                    )?);
3309                }
3310                "VpcId" => {
3311                    obj.vpc_id = Some(VpcIdDeserializer::deserialize("VpcId", stack)?);
3312                }
3313                _ => skip_tree(stack),
3314            }
3315            Ok(())
3316        })
3317    }
3318}
3319/// <p>Information about a static IP address for a load balancer.</p>
3320#[derive(Clone, Debug, Default, PartialEq)]
3321#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3322pub struct LoadBalancerAddress {
3323    /// <p>[Network Load Balancers] The allocation ID of the Elastic IP address for an internal-facing load balancer.</p>
3324    pub allocation_id: Option<String>,
3325    /// <p>The static IP address.</p>
3326    pub ip_address: Option<String>,
3327    /// <p>[Network Load Balancers] The private IPv4 address for an internal load balancer.</p>
3328    pub private_i_pv_4_address: Option<String>,
3329}
3330
3331#[allow(dead_code)]
3332struct LoadBalancerAddressDeserializer;
3333impl LoadBalancerAddressDeserializer {
3334    #[allow(dead_code, unused_variables)]
3335    fn deserialize<T: Peek + Next>(
3336        tag_name: &str,
3337        stack: &mut T,
3338    ) -> Result<LoadBalancerAddress, XmlParseError> {
3339        deserialize_elements::<_, LoadBalancerAddress, _>(tag_name, stack, |name, stack, obj| {
3340            match name {
3341                "AllocationId" => {
3342                    obj.allocation_id = Some(AllocationIdDeserializer::deserialize(
3343                        "AllocationId",
3344                        stack,
3345                    )?);
3346                }
3347                "IpAddress" => {
3348                    obj.ip_address = Some(IpAddressDeserializer::deserialize("IpAddress", stack)?);
3349                }
3350                "PrivateIPv4Address" => {
3351                    obj.private_i_pv_4_address = Some(PrivateIPv4AddressDeserializer::deserialize(
3352                        "PrivateIPv4Address",
3353                        stack,
3354                    )?);
3355                }
3356                _ => skip_tree(stack),
3357            }
3358            Ok(())
3359        })
3360    }
3361}
3362#[allow(dead_code)]
3363struct LoadBalancerAddressesDeserializer;
3364impl LoadBalancerAddressesDeserializer {
3365    #[allow(dead_code, unused_variables)]
3366    fn deserialize<T: Peek + Next>(
3367        tag_name: &str,
3368        stack: &mut T,
3369    ) -> Result<Vec<LoadBalancerAddress>, XmlParseError> {
3370        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3371            if name == "member" {
3372                obj.push(LoadBalancerAddressDeserializer::deserialize(
3373                    "member", stack,
3374                )?);
3375            } else {
3376                skip_tree(stack);
3377            }
3378            Ok(())
3379        })
3380    }
3381}
3382#[allow(dead_code)]
3383struct LoadBalancerArnDeserializer;
3384impl LoadBalancerArnDeserializer {
3385    #[allow(dead_code, unused_variables)]
3386    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3387        xml_util::deserialize_primitive(tag_name, stack, Ok)
3388    }
3389}
3390#[allow(dead_code)]
3391struct LoadBalancerArnsDeserializer;
3392impl LoadBalancerArnsDeserializer {
3393    #[allow(dead_code, unused_variables)]
3394    fn deserialize<T: Peek + Next>(
3395        tag_name: &str,
3396        stack: &mut T,
3397    ) -> Result<Vec<String>, XmlParseError> {
3398        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3399            if name == "member" {
3400                obj.push(LoadBalancerArnDeserializer::deserialize("member", stack)?);
3401            } else {
3402                skip_tree(stack);
3403            }
3404            Ok(())
3405        })
3406    }
3407}
3408
3409/// Serialize `LoadBalancerArns` contents to a `SignedRequest`.
3410struct LoadBalancerArnsSerializer;
3411impl LoadBalancerArnsSerializer {
3412    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3413        for (index, obj) in obj.iter().enumerate() {
3414            let key = format!("{}.member.{}", name, index + 1);
3415            params.put(&key, &obj);
3416        }
3417    }
3418}
3419
3420/// <p>Information about a load balancer attribute.</p>
3421#[derive(Clone, Debug, Default, PartialEq)]
3422#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3423#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3424pub struct LoadBalancerAttribute {
3425    /// <p><p>The name of the attribute.</p> <p>The following attributes are supported by both Application Load Balancers and Network Load Balancers:</p> <ul> <li> <p> <code>access<em>logs.s3.enabled</code> - Indicates whether access logs are enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> <li> <p> <code>access</em>logs.s3.bucket</code> - The name of the S3 bucket for the access logs. This attribute is required if access logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket.</p> </li> <li> <p> <code>access<em>logs.s3.prefix</code> - The prefix for the location in the S3 bucket for the access logs.</p> </li> <li> <p> <code>deletion</em>protection.enabled</code> - Indicates whether deletion protection is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> </ul> <p>The following attributes are supported by only Application Load Balancers:</p> <ul> <li> <p> <code>idle<em>timeout.timeout</em>seconds</code> - The idle timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 seconds.</p> </li> <li> <p> <code>routing.http.drop<em>invalid</em>header<em>fields.enabled</code> - Indicates whether HTTP headers with invalid header fields are removed by the load balancer (<code>true</code>) or routed to targets (<code>false</code>). The default is <code>false</code>.</p> </li> <li> <p> <code>routing.http2.enabled</code> - Indicates whether HTTP/2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>true</code>. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens.</p> </li> </ul> <p>The following attributes are supported by only Network Load Balancers:</p> <ul> <li> <p> <code>load</em>balancing.cross_zone.enabled</code> - Indicates whether cross-zone load balancing is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> </ul></p>
3426    pub key: Option<String>,
3427    /// <p>The value of the attribute.</p>
3428    pub value: Option<String>,
3429}
3430
3431#[allow(dead_code)]
3432struct LoadBalancerAttributeDeserializer;
3433impl LoadBalancerAttributeDeserializer {
3434    #[allow(dead_code, unused_variables)]
3435    fn deserialize<T: Peek + Next>(
3436        tag_name: &str,
3437        stack: &mut T,
3438    ) -> Result<LoadBalancerAttribute, XmlParseError> {
3439        deserialize_elements::<_, LoadBalancerAttribute, _>(tag_name, stack, |name, stack, obj| {
3440            match name {
3441                "Key" => {
3442                    obj.key = Some(LoadBalancerAttributeKeyDeserializer::deserialize(
3443                        "Key", stack,
3444                    )?);
3445                }
3446                "Value" => {
3447                    obj.value = Some(LoadBalancerAttributeValueDeserializer::deserialize(
3448                        "Value", stack,
3449                    )?);
3450                }
3451                _ => skip_tree(stack),
3452            }
3453            Ok(())
3454        })
3455    }
3456}
3457
3458/// Serialize `LoadBalancerAttribute` contents to a `SignedRequest`.
3459struct LoadBalancerAttributeSerializer;
3460impl LoadBalancerAttributeSerializer {
3461    fn serialize(params: &mut Params, name: &str, obj: &LoadBalancerAttribute) {
3462        let mut prefix = name.to_string();
3463        if prefix != "" {
3464            prefix.push_str(".");
3465        }
3466
3467        if let Some(ref field_value) = obj.key {
3468            params.put(&format!("{}{}", prefix, "Key"), &field_value);
3469        }
3470        if let Some(ref field_value) = obj.value {
3471            params.put(&format!("{}{}", prefix, "Value"), &field_value);
3472        }
3473    }
3474}
3475
3476#[allow(dead_code)]
3477struct LoadBalancerAttributeKeyDeserializer;
3478impl LoadBalancerAttributeKeyDeserializer {
3479    #[allow(dead_code, unused_variables)]
3480    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3481        xml_util::deserialize_primitive(tag_name, stack, Ok)
3482    }
3483}
3484#[allow(dead_code)]
3485struct LoadBalancerAttributeValueDeserializer;
3486impl LoadBalancerAttributeValueDeserializer {
3487    #[allow(dead_code, unused_variables)]
3488    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3489        xml_util::deserialize_primitive(tag_name, stack, Ok)
3490    }
3491}
3492#[allow(dead_code)]
3493struct LoadBalancerAttributesDeserializer;
3494impl LoadBalancerAttributesDeserializer {
3495    #[allow(dead_code, unused_variables)]
3496    fn deserialize<T: Peek + Next>(
3497        tag_name: &str,
3498        stack: &mut T,
3499    ) -> Result<Vec<LoadBalancerAttribute>, XmlParseError> {
3500        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3501            if name == "member" {
3502                obj.push(LoadBalancerAttributeDeserializer::deserialize(
3503                    "member", stack,
3504                )?);
3505            } else {
3506                skip_tree(stack);
3507            }
3508            Ok(())
3509        })
3510    }
3511}
3512
3513/// Serialize `LoadBalancerAttributes` contents to a `SignedRequest`.
3514struct LoadBalancerAttributesSerializer;
3515impl LoadBalancerAttributesSerializer {
3516    fn serialize(params: &mut Params, name: &str, obj: &Vec<LoadBalancerAttribute>) {
3517        for (index, obj) in obj.iter().enumerate() {
3518            let key = format!("{}.member.{}", name, index + 1);
3519            LoadBalancerAttributeSerializer::serialize(params, &key, obj);
3520        }
3521    }
3522}
3523
3524#[allow(dead_code)]
3525struct LoadBalancerNameDeserializer;
3526impl LoadBalancerNameDeserializer {
3527    #[allow(dead_code, unused_variables)]
3528    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3529        xml_util::deserialize_primitive(tag_name, stack, Ok)
3530    }
3531}
3532
3533/// Serialize `LoadBalancerNames` contents to a `SignedRequest`.
3534struct LoadBalancerNamesSerializer;
3535impl LoadBalancerNamesSerializer {
3536    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3537        for (index, obj) in obj.iter().enumerate() {
3538            let key = format!("{}.member.{}", name, index + 1);
3539            params.put(&key, &obj);
3540        }
3541    }
3542}
3543
3544#[allow(dead_code)]
3545struct LoadBalancerSchemeEnumDeserializer;
3546impl LoadBalancerSchemeEnumDeserializer {
3547    #[allow(dead_code, unused_variables)]
3548    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3549        xml_util::deserialize_primitive(tag_name, stack, Ok)
3550    }
3551}
3552/// <p>Information about the state of the load balancer.</p>
3553#[derive(Clone, Debug, Default, PartialEq)]
3554#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3555pub struct LoadBalancerState {
3556    /// <p>The state code. The initial state of the load balancer is <code>provisioning</code>. After the load balancer is fully set up and ready to route traffic, its state is <code>active</code>. If the load balancer could not be set up, its state is <code>failed</code>.</p>
3557    pub code: Option<String>,
3558    /// <p>A description of the state.</p>
3559    pub reason: Option<String>,
3560}
3561
3562#[allow(dead_code)]
3563struct LoadBalancerStateDeserializer;
3564impl LoadBalancerStateDeserializer {
3565    #[allow(dead_code, unused_variables)]
3566    fn deserialize<T: Peek + Next>(
3567        tag_name: &str,
3568        stack: &mut T,
3569    ) -> Result<LoadBalancerState, XmlParseError> {
3570        deserialize_elements::<_, LoadBalancerState, _>(tag_name, stack, |name, stack, obj| {
3571            match name {
3572                "Code" => {
3573                    obj.code = Some(LoadBalancerStateEnumDeserializer::deserialize(
3574                        "Code", stack,
3575                    )?);
3576                }
3577                "Reason" => {
3578                    obj.reason = Some(StateReasonDeserializer::deserialize("Reason", stack)?);
3579                }
3580                _ => skip_tree(stack),
3581            }
3582            Ok(())
3583        })
3584    }
3585}
3586#[allow(dead_code)]
3587struct LoadBalancerStateEnumDeserializer;
3588impl LoadBalancerStateEnumDeserializer {
3589    #[allow(dead_code, unused_variables)]
3590    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3591        xml_util::deserialize_primitive(tag_name, stack, Ok)
3592    }
3593}
3594#[allow(dead_code)]
3595struct LoadBalancerTypeEnumDeserializer;
3596impl LoadBalancerTypeEnumDeserializer {
3597    #[allow(dead_code, unused_variables)]
3598    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3599        xml_util::deserialize_primitive(tag_name, stack, Ok)
3600    }
3601}
3602#[allow(dead_code)]
3603struct LoadBalancersDeserializer;
3604impl LoadBalancersDeserializer {
3605    #[allow(dead_code, unused_variables)]
3606    fn deserialize<T: Peek + Next>(
3607        tag_name: &str,
3608        stack: &mut T,
3609    ) -> Result<Vec<LoadBalancer>, XmlParseError> {
3610        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3611            if name == "member" {
3612                obj.push(LoadBalancerDeserializer::deserialize("member", stack)?);
3613            } else {
3614                skip_tree(stack);
3615            }
3616            Ok(())
3617        })
3618    }
3619}
3620#[allow(dead_code)]
3621struct MarkerDeserializer;
3622impl MarkerDeserializer {
3623    #[allow(dead_code, unused_variables)]
3624    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3625        xml_util::deserialize_primitive(tag_name, stack, Ok)
3626    }
3627}
3628/// <p>Information to use when checking for a successful response from a target.</p>
3629#[derive(Clone, Debug, Default, PartialEq)]
3630#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3631#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3632pub struct Matcher {
3633    /// <p>The HTTP codes.</p> <p>For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").</p> <p>For Network Load Balancers, this is 200–399.</p>
3634    pub http_code: String,
3635}
3636
3637#[allow(dead_code)]
3638struct MatcherDeserializer;
3639impl MatcherDeserializer {
3640    #[allow(dead_code, unused_variables)]
3641    fn deserialize<T: Peek + Next>(
3642        tag_name: &str,
3643        stack: &mut T,
3644    ) -> Result<Matcher, XmlParseError> {
3645        deserialize_elements::<_, Matcher, _>(tag_name, stack, |name, stack, obj| {
3646            match name {
3647                "HttpCode" => {
3648                    obj.http_code = HttpCodeDeserializer::deserialize("HttpCode", stack)?;
3649                }
3650                _ => skip_tree(stack),
3651            }
3652            Ok(())
3653        })
3654    }
3655}
3656
3657/// Serialize `Matcher` contents to a `SignedRequest`.
3658struct MatcherSerializer;
3659impl MatcherSerializer {
3660    fn serialize(params: &mut Params, name: &str, obj: &Matcher) {
3661        let mut prefix = name.to_string();
3662        if prefix != "" {
3663            prefix.push_str(".");
3664        }
3665
3666        params.put(&format!("{}{}", prefix, "HttpCode"), &obj.http_code);
3667    }
3668}
3669
3670#[allow(dead_code)]
3671struct MaxDeserializer;
3672impl MaxDeserializer {
3673    #[allow(dead_code, unused_variables)]
3674    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3675        xml_util::deserialize_primitive(tag_name, stack, Ok)
3676    }
3677}
3678#[derive(Clone, Debug, Default, PartialEq)]
3679#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3680pub struct ModifyListenerInput {
3681    /// <p>[TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:</p> <ul> <li> <p> <code>HTTP1Only</code> </p> </li> <li> <p> <code>HTTP2Only</code> </p> </li> <li> <p> <code>HTTP2Optional</code> </p> </li> <li> <p> <code>HTTP2Preferred</code> </p> </li> <li> <p> <code>None</code> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#alpn-policies">ALPN Policies</a> in the <i>Network Load Balancers Guide</i>.</p>
3682    pub alpn_policy: Option<Vec<String>>,
3683    /// <p>[HTTPS and TLS listeners] The default certificate for the listener. You must provide exactly one certificate. Set <code>CertificateArn</code> to the certificate ARN but do not set <code>IsDefault</code>.</p> <p>To create a certificate list, use <a>AddListenerCertificates</a>.</p>
3684    pub certificates: Option<Vec<Certificate>>,
3685    /// <p>The actions for the default rule. The rule must include one forward action or one or more fixed-response actions.</p> <p>If the action type is <code>forward</code>, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-oidc</code>, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-cognito</code>, you authenticate users through the user pools supported by Amazon Cognito.</p> <p>[Application Load Balancer] If the action type is <code>redirect</code>, you redirect specified client requests from one URL to another.</p> <p>[Application Load Balancer] If the action type is <code>fixed-response</code>, you drop specified client requests and return a custom HTTP response.</p>
3686    pub default_actions: Option<Vec<Action>>,
3687    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
3688    pub listener_arn: String,
3689    /// <p>The port for connections from clients to the load balancer.</p>
3690    pub port: Option<i64>,
3691    /// <p>The protocol for connections from clients to the load balancer. Application Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers support the TCP, TLS, UDP, and TCP_UDP protocols.</p>
3692    pub protocol: Option<String>,
3693    /// <p>[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. The following are the possible values:</p> <ul> <li> <p> <code>ELBSecurityPolicy-2016-08</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-0-2015-04</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-1-2017-01</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-2-2017-01</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-TLS-1-2-Ext-2018-06</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-2018-06</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-1-1-2019-08</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-1-2-2019-08</code> </p> </li> <li> <p> <code>ELBSecurityPolicy-FS-1-2-Res-2019-08</code> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies">Security Policies</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies">Security Policies</a> in the <i>Network Load Balancers Guide</i>.</p>
3694    pub ssl_policy: Option<String>,
3695}
3696
3697/// Serialize `ModifyListenerInput` contents to a `SignedRequest`.
3698struct ModifyListenerInputSerializer;
3699impl ModifyListenerInputSerializer {
3700    fn serialize(params: &mut Params, name: &str, obj: &ModifyListenerInput) {
3701        let mut prefix = name.to_string();
3702        if prefix != "" {
3703            prefix.push_str(".");
3704        }
3705
3706        if let Some(ref field_value) = obj.alpn_policy {
3707            AlpnPolicyNameSerializer::serialize(
3708                params,
3709                &format!("{}{}", prefix, "AlpnPolicy"),
3710                field_value,
3711            );
3712        }
3713        if let Some(ref field_value) = obj.certificates {
3714            CertificateListSerializer::serialize(
3715                params,
3716                &format!("{}{}", prefix, "Certificates"),
3717                field_value,
3718            );
3719        }
3720        if let Some(ref field_value) = obj.default_actions {
3721            ActionsSerializer::serialize(
3722                params,
3723                &format!("{}{}", prefix, "DefaultActions"),
3724                field_value,
3725            );
3726        }
3727        params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
3728        if let Some(ref field_value) = obj.port {
3729            params.put(&format!("{}{}", prefix, "Port"), &field_value);
3730        }
3731        if let Some(ref field_value) = obj.protocol {
3732            params.put(&format!("{}{}", prefix, "Protocol"), &field_value);
3733        }
3734        if let Some(ref field_value) = obj.ssl_policy {
3735            params.put(&format!("{}{}", prefix, "SslPolicy"), &field_value);
3736        }
3737    }
3738}
3739
3740#[derive(Clone, Debug, Default, PartialEq)]
3741#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3742pub struct ModifyListenerOutput {
3743    /// <p>Information about the modified listener.</p>
3744    pub listeners: Option<Vec<Listener>>,
3745}
3746
3747#[allow(dead_code)]
3748struct ModifyListenerOutputDeserializer;
3749impl ModifyListenerOutputDeserializer {
3750    #[allow(dead_code, unused_variables)]
3751    fn deserialize<T: Peek + Next>(
3752        tag_name: &str,
3753        stack: &mut T,
3754    ) -> Result<ModifyListenerOutput, XmlParseError> {
3755        deserialize_elements::<_, ModifyListenerOutput, _>(tag_name, stack, |name, stack, obj| {
3756            match name {
3757                "Listeners" => {
3758                    obj.listeners
3759                        .get_or_insert(vec![])
3760                        .extend(ListenersDeserializer::deserialize("Listeners", stack)?);
3761                }
3762                _ => skip_tree(stack),
3763            }
3764            Ok(())
3765        })
3766    }
3767}
3768#[derive(Clone, Debug, Default, PartialEq)]
3769#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3770pub struct ModifyLoadBalancerAttributesInput {
3771    /// <p>The load balancer attributes.</p>
3772    pub attributes: Vec<LoadBalancerAttribute>,
3773    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
3774    pub load_balancer_arn: String,
3775}
3776
3777/// Serialize `ModifyLoadBalancerAttributesInput` contents to a `SignedRequest`.
3778struct ModifyLoadBalancerAttributesInputSerializer;
3779impl ModifyLoadBalancerAttributesInputSerializer {
3780    fn serialize(params: &mut Params, name: &str, obj: &ModifyLoadBalancerAttributesInput) {
3781        let mut prefix = name.to_string();
3782        if prefix != "" {
3783            prefix.push_str(".");
3784        }
3785
3786        LoadBalancerAttributesSerializer::serialize(
3787            params,
3788            &format!("{}{}", prefix, "Attributes"),
3789            &obj.attributes,
3790        );
3791        params.put(
3792            &format!("{}{}", prefix, "LoadBalancerArn"),
3793            &obj.load_balancer_arn,
3794        );
3795    }
3796}
3797
3798#[derive(Clone, Debug, Default, PartialEq)]
3799#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3800pub struct ModifyLoadBalancerAttributesOutput {
3801    /// <p>Information about the load balancer attributes.</p>
3802    pub attributes: Option<Vec<LoadBalancerAttribute>>,
3803}
3804
3805#[allow(dead_code)]
3806struct ModifyLoadBalancerAttributesOutputDeserializer;
3807impl ModifyLoadBalancerAttributesOutputDeserializer {
3808    #[allow(dead_code, unused_variables)]
3809    fn deserialize<T: Peek + Next>(
3810        tag_name: &str,
3811        stack: &mut T,
3812    ) -> Result<ModifyLoadBalancerAttributesOutput, XmlParseError> {
3813        deserialize_elements::<_, ModifyLoadBalancerAttributesOutput, _>(
3814            tag_name,
3815            stack,
3816            |name, stack, obj| {
3817                match name {
3818                    "Attributes" => {
3819                        obj.attributes.get_or_insert(vec![]).extend(
3820                            LoadBalancerAttributesDeserializer::deserialize("Attributes", stack)?,
3821                        );
3822                    }
3823                    _ => skip_tree(stack),
3824                }
3825                Ok(())
3826            },
3827        )
3828    }
3829}
3830#[derive(Clone, Debug, Default, PartialEq)]
3831#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3832pub struct ModifyRuleInput {
3833    /// <p>The actions. Each rule must include exactly one of the following types of actions: <code>forward</code>, <code>fixed-response</code>, or <code>redirect</code>, and it must be the last action to be performed.</p> <p>If the action type is <code>forward</code>, you specify one or more target groups. The protocol of the target group must be HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP, TLS, UDP, or TCP_UDP for a Network Load Balancer.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-oidc</code>, you authenticate users through an identity provider that is OpenID Connect (OIDC) compliant.</p> <p>[HTTPS listeners] If the action type is <code>authenticate-cognito</code>, you authenticate users through the user pools supported by Amazon Cognito.</p> <p>[Application Load Balancer] If the action type is <code>redirect</code>, you redirect specified client requests from one URL to another.</p> <p>[Application Load Balancer] If the action type is <code>fixed-response</code>, you drop specified client requests and return a custom HTTP response.</p>
3834    pub actions: Option<Vec<Action>>,
3835    /// <p>The conditions. Each rule can include zero or one of the following conditions: <code>http-request-method</code>, <code>host-header</code>, <code>path-pattern</code>, and <code>source-ip</code>, and zero or more of the following conditions: <code>http-header</code> and <code>query-string</code>.</p>
3836    pub conditions: Option<Vec<RuleCondition>>,
3837    /// <p>The Amazon Resource Name (ARN) of the rule.</p>
3838    pub rule_arn: String,
3839}
3840
3841/// Serialize `ModifyRuleInput` contents to a `SignedRequest`.
3842struct ModifyRuleInputSerializer;
3843impl ModifyRuleInputSerializer {
3844    fn serialize(params: &mut Params, name: &str, obj: &ModifyRuleInput) {
3845        let mut prefix = name.to_string();
3846        if prefix != "" {
3847            prefix.push_str(".");
3848        }
3849
3850        if let Some(ref field_value) = obj.actions {
3851            ActionsSerializer::serialize(params, &format!("{}{}", prefix, "Actions"), field_value);
3852        }
3853        if let Some(ref field_value) = obj.conditions {
3854            RuleConditionListSerializer::serialize(
3855                params,
3856                &format!("{}{}", prefix, "Conditions"),
3857                field_value,
3858            );
3859        }
3860        params.put(&format!("{}{}", prefix, "RuleArn"), &obj.rule_arn);
3861    }
3862}
3863
3864#[derive(Clone, Debug, Default, PartialEq)]
3865#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3866pub struct ModifyRuleOutput {
3867    /// <p>Information about the modified rule.</p>
3868    pub rules: Option<Vec<Rule>>,
3869}
3870
3871#[allow(dead_code)]
3872struct ModifyRuleOutputDeserializer;
3873impl ModifyRuleOutputDeserializer {
3874    #[allow(dead_code, unused_variables)]
3875    fn deserialize<T: Peek + Next>(
3876        tag_name: &str,
3877        stack: &mut T,
3878    ) -> Result<ModifyRuleOutput, XmlParseError> {
3879        deserialize_elements::<_, ModifyRuleOutput, _>(tag_name, stack, |name, stack, obj| {
3880            match name {
3881                "Rules" => {
3882                    obj.rules
3883                        .get_or_insert(vec![])
3884                        .extend(RulesDeserializer::deserialize("Rules", stack)?);
3885                }
3886                _ => skip_tree(stack),
3887            }
3888            Ok(())
3889        })
3890    }
3891}
3892#[derive(Clone, Debug, Default, PartialEq)]
3893#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3894pub struct ModifyTargetGroupAttributesInput {
3895    /// <p>The attributes.</p>
3896    pub attributes: Vec<TargetGroupAttribute>,
3897    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
3898    pub target_group_arn: String,
3899}
3900
3901/// Serialize `ModifyTargetGroupAttributesInput` contents to a `SignedRequest`.
3902struct ModifyTargetGroupAttributesInputSerializer;
3903impl ModifyTargetGroupAttributesInputSerializer {
3904    fn serialize(params: &mut Params, name: &str, obj: &ModifyTargetGroupAttributesInput) {
3905        let mut prefix = name.to_string();
3906        if prefix != "" {
3907            prefix.push_str(".");
3908        }
3909
3910        TargetGroupAttributesSerializer::serialize(
3911            params,
3912            &format!("{}{}", prefix, "Attributes"),
3913            &obj.attributes,
3914        );
3915        params.put(
3916            &format!("{}{}", prefix, "TargetGroupArn"),
3917            &obj.target_group_arn,
3918        );
3919    }
3920}
3921
3922#[derive(Clone, Debug, Default, PartialEq)]
3923#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3924pub struct ModifyTargetGroupAttributesOutput {
3925    /// <p>Information about the attributes.</p>
3926    pub attributes: Option<Vec<TargetGroupAttribute>>,
3927}
3928
3929#[allow(dead_code)]
3930struct ModifyTargetGroupAttributesOutputDeserializer;
3931impl ModifyTargetGroupAttributesOutputDeserializer {
3932    #[allow(dead_code, unused_variables)]
3933    fn deserialize<T: Peek + Next>(
3934        tag_name: &str,
3935        stack: &mut T,
3936    ) -> Result<ModifyTargetGroupAttributesOutput, XmlParseError> {
3937        deserialize_elements::<_, ModifyTargetGroupAttributesOutput, _>(
3938            tag_name,
3939            stack,
3940            |name, stack, obj| {
3941                match name {
3942                    "Attributes" => {
3943                        obj.attributes.get_or_insert(vec![]).extend(
3944                            TargetGroupAttributesDeserializer::deserialize("Attributes", stack)?,
3945                        );
3946                    }
3947                    _ => skip_tree(stack),
3948                }
3949                Ok(())
3950            },
3951        )
3952    }
3953}
3954#[derive(Clone, Debug, Default, PartialEq)]
3955#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3956pub struct ModifyTargetGroupInput {
3957    /// <p>Indicates whether health checks are enabled.</p>
3958    pub health_check_enabled: Option<bool>,
3959    /// <p>The approximate amount of time, in seconds, between health checks of an individual target. For Application Load Balancers, the range is 5 to 300 seconds. For Network Load Balancers, the supported values are 10 or 30 seconds.</p> <p>With Network Load Balancers, you can't modify this setting.</p>
3960    pub health_check_interval_seconds: Option<i64>,
3961    /// <p>[HTTP/HTTPS health checks] The ping path that is the destination for the health check request.</p>
3962    pub health_check_path: Option<String>,
3963    /// <p>The port the load balancer uses when performing health checks on targets.</p>
3964    pub health_check_port: Option<String>,
3965    /// <p>The protocol the load balancer uses when performing health checks on targets. The TCP protocol is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The TLS, UDP, and TCP_UDP protocols are not supported for health checks.</p> <p>With Network Load Balancers, you can't modify this setting.</p>
3966    pub health_check_protocol: Option<String>,
3967    /// <p>[HTTP/HTTPS health checks] The amount of time, in seconds, during which no response means a failed health check.</p> <p>With Network Load Balancers, you can't modify this setting.</p>
3968    pub health_check_timeout_seconds: Option<i64>,
3969    /// <p>The number of consecutive health checks successes required before considering an unhealthy target healthy.</p>
3970    pub healthy_threshold_count: Option<i64>,
3971    /// <p>[HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target.</p> <p>With Network Load Balancers, you can't modify this setting.</p>
3972    pub matcher: Option<Matcher>,
3973    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
3974    pub target_group_arn: String,
3975    /// <p>The number of consecutive health check failures required before considering the target unhealthy. For Network Load Balancers, this value must be the same as the healthy threshold count.</p>
3976    pub unhealthy_threshold_count: Option<i64>,
3977}
3978
3979/// Serialize `ModifyTargetGroupInput` contents to a `SignedRequest`.
3980struct ModifyTargetGroupInputSerializer;
3981impl ModifyTargetGroupInputSerializer {
3982    fn serialize(params: &mut Params, name: &str, obj: &ModifyTargetGroupInput) {
3983        let mut prefix = name.to_string();
3984        if prefix != "" {
3985            prefix.push_str(".");
3986        }
3987
3988        if let Some(ref field_value) = obj.health_check_enabled {
3989            params.put(&format!("{}{}", prefix, "HealthCheckEnabled"), &field_value);
3990        }
3991        if let Some(ref field_value) = obj.health_check_interval_seconds {
3992            params.put(
3993                &format!("{}{}", prefix, "HealthCheckIntervalSeconds"),
3994                &field_value,
3995            );
3996        }
3997        if let Some(ref field_value) = obj.health_check_path {
3998            params.put(&format!("{}{}", prefix, "HealthCheckPath"), &field_value);
3999        }
4000        if let Some(ref field_value) = obj.health_check_port {
4001            params.put(&format!("{}{}", prefix, "HealthCheckPort"), &field_value);
4002        }
4003        if let Some(ref field_value) = obj.health_check_protocol {
4004            params.put(
4005                &format!("{}{}", prefix, "HealthCheckProtocol"),
4006                &field_value,
4007            );
4008        }
4009        if let Some(ref field_value) = obj.health_check_timeout_seconds {
4010            params.put(
4011                &format!("{}{}", prefix, "HealthCheckTimeoutSeconds"),
4012                &field_value,
4013            );
4014        }
4015        if let Some(ref field_value) = obj.healthy_threshold_count {
4016            params.put(
4017                &format!("{}{}", prefix, "HealthyThresholdCount"),
4018                &field_value,
4019            );
4020        }
4021        if let Some(ref field_value) = obj.matcher {
4022            MatcherSerializer::serialize(params, &format!("{}{}", prefix, "Matcher"), field_value);
4023        }
4024        params.put(
4025            &format!("{}{}", prefix, "TargetGroupArn"),
4026            &obj.target_group_arn,
4027        );
4028        if let Some(ref field_value) = obj.unhealthy_threshold_count {
4029            params.put(
4030                &format!("{}{}", prefix, "UnhealthyThresholdCount"),
4031                &field_value,
4032            );
4033        }
4034    }
4035}
4036
4037#[derive(Clone, Debug, Default, PartialEq)]
4038#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4039pub struct ModifyTargetGroupOutput {
4040    /// <p>Information about the modified target group.</p>
4041    pub target_groups: Option<Vec<TargetGroup>>,
4042}
4043
4044#[allow(dead_code)]
4045struct ModifyTargetGroupOutputDeserializer;
4046impl ModifyTargetGroupOutputDeserializer {
4047    #[allow(dead_code, unused_variables)]
4048    fn deserialize<T: Peek + Next>(
4049        tag_name: &str,
4050        stack: &mut T,
4051    ) -> Result<ModifyTargetGroupOutput, XmlParseError> {
4052        deserialize_elements::<_, ModifyTargetGroupOutput, _>(
4053            tag_name,
4054            stack,
4055            |name, stack, obj| {
4056                match name {
4057                    "TargetGroups" => {
4058                        obj.target_groups.get_or_insert(vec![]).extend(
4059                            TargetGroupsDeserializer::deserialize("TargetGroups", stack)?,
4060                        );
4061                    }
4062                    _ => skip_tree(stack),
4063                }
4064                Ok(())
4065            },
4066        )
4067    }
4068}
4069#[allow(dead_code)]
4070struct NameDeserializer;
4071impl NameDeserializer {
4072    #[allow(dead_code, unused_variables)]
4073    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4074        xml_util::deserialize_primitive(tag_name, stack, Ok)
4075    }
4076}
4077#[allow(dead_code)]
4078struct PathDeserializer;
4079impl PathDeserializer {
4080    #[allow(dead_code, unused_variables)]
4081    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4082        xml_util::deserialize_primitive(tag_name, stack, Ok)
4083    }
4084}
4085/// <p>Information about a path pattern condition.</p>
4086#[derive(Clone, Debug, Default, PartialEq)]
4087#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4088#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4089pub struct PathPatternConditionConfig {
4090    /// <p>One or more path patterns to compare against the request URL. The maximum size of each string is 128 characters. The comparison is case sensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).</p> <p>If you specify multiple strings, the condition is satisfied if one of them matches the request URL. The path pattern is compared only to the path of the URL, not to its query string. To compare against the query string, use <a>QueryStringConditionConfig</a>.</p>
4091    pub values: Option<Vec<String>>,
4092}
4093
4094#[allow(dead_code)]
4095struct PathPatternConditionConfigDeserializer;
4096impl PathPatternConditionConfigDeserializer {
4097    #[allow(dead_code, unused_variables)]
4098    fn deserialize<T: Peek + Next>(
4099        tag_name: &str,
4100        stack: &mut T,
4101    ) -> Result<PathPatternConditionConfig, XmlParseError> {
4102        deserialize_elements::<_, PathPatternConditionConfig, _>(
4103            tag_name,
4104            stack,
4105            |name, stack, obj| {
4106                match name {
4107                    "Values" => {
4108                        obj.values
4109                            .get_or_insert(vec![])
4110                            .extend(ListOfStringDeserializer::deserialize("Values", stack)?);
4111                    }
4112                    _ => skip_tree(stack),
4113                }
4114                Ok(())
4115            },
4116        )
4117    }
4118}
4119
4120/// Serialize `PathPatternConditionConfig` contents to a `SignedRequest`.
4121struct PathPatternConditionConfigSerializer;
4122impl PathPatternConditionConfigSerializer {
4123    fn serialize(params: &mut Params, name: &str, obj: &PathPatternConditionConfig) {
4124        let mut prefix = name.to_string();
4125        if prefix != "" {
4126            prefix.push_str(".");
4127        }
4128
4129        if let Some(ref field_value) = obj.values {
4130            ListOfStringSerializer::serialize(
4131                params,
4132                &format!("{}{}", prefix, "Values"),
4133                field_value,
4134            );
4135        }
4136    }
4137}
4138
4139#[allow(dead_code)]
4140struct PortDeserializer;
4141impl PortDeserializer {
4142    #[allow(dead_code, unused_variables)]
4143    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
4144        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
4145    }
4146}
4147#[allow(dead_code)]
4148struct PrivateIPv4AddressDeserializer;
4149impl PrivateIPv4AddressDeserializer {
4150    #[allow(dead_code, unused_variables)]
4151    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4152        xml_util::deserialize_primitive(tag_name, stack, Ok)
4153    }
4154}
4155#[allow(dead_code)]
4156struct ProtocolEnumDeserializer;
4157impl ProtocolEnumDeserializer {
4158    #[allow(dead_code, unused_variables)]
4159    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4160        xml_util::deserialize_primitive(tag_name, stack, Ok)
4161    }
4162}
4163/// <p>Information about a query string condition.</p> <p>The query string component of a URI starts after the first '?' character and is terminated by either a '#' character or the end of the URI. A typical query string contains key/value pairs separated by '&amp;' characters. The allowed characters are specified by RFC 3986. Any character can be percentage encoded.</p>
4164#[derive(Clone, Debug, Default, PartialEq)]
4165#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4166#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4167pub struct QueryStringConditionConfig {
4168    /// <p>One or more key/value pairs or values to find in the query string. The maximum size of each string is 128 characters. The comparison is case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character). To search for a literal '*' or '?' character in a query string, you must escape these characters in <code>Values</code> using a '\' character.</p> <p>If you specify multiple key/value pairs or values, the condition is satisfied if one of them is found in the query string.</p>
4169    pub values: Option<Vec<QueryStringKeyValuePair>>,
4170}
4171
4172#[allow(dead_code)]
4173struct QueryStringConditionConfigDeserializer;
4174impl QueryStringConditionConfigDeserializer {
4175    #[allow(dead_code, unused_variables)]
4176    fn deserialize<T: Peek + Next>(
4177        tag_name: &str,
4178        stack: &mut T,
4179    ) -> Result<QueryStringConditionConfig, XmlParseError> {
4180        deserialize_elements::<_, QueryStringConditionConfig, _>(
4181            tag_name,
4182            stack,
4183            |name, stack, obj| {
4184                match name {
4185                    "Values" => {
4186                        obj.values.get_or_insert(vec![]).extend(
4187                            QueryStringKeyValuePairListDeserializer::deserialize("Values", stack)?,
4188                        );
4189                    }
4190                    _ => skip_tree(stack),
4191                }
4192                Ok(())
4193            },
4194        )
4195    }
4196}
4197
4198/// Serialize `QueryStringConditionConfig` contents to a `SignedRequest`.
4199struct QueryStringConditionConfigSerializer;
4200impl QueryStringConditionConfigSerializer {
4201    fn serialize(params: &mut Params, name: &str, obj: &QueryStringConditionConfig) {
4202        let mut prefix = name.to_string();
4203        if prefix != "" {
4204            prefix.push_str(".");
4205        }
4206
4207        if let Some(ref field_value) = obj.values {
4208            QueryStringKeyValuePairListSerializer::serialize(
4209                params,
4210                &format!("{}{}", prefix, "Values"),
4211                field_value,
4212            );
4213        }
4214    }
4215}
4216
4217/// <p>Information about a key/value pair.</p>
4218#[derive(Clone, Debug, Default, PartialEq)]
4219#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4220#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4221pub struct QueryStringKeyValuePair {
4222    /// <p>The key. You can omit the key.</p>
4223    pub key: Option<String>,
4224    /// <p>The value.</p>
4225    pub value: Option<String>,
4226}
4227
4228#[allow(dead_code)]
4229struct QueryStringKeyValuePairDeserializer;
4230impl QueryStringKeyValuePairDeserializer {
4231    #[allow(dead_code, unused_variables)]
4232    fn deserialize<T: Peek + Next>(
4233        tag_name: &str,
4234        stack: &mut T,
4235    ) -> Result<QueryStringKeyValuePair, XmlParseError> {
4236        deserialize_elements::<_, QueryStringKeyValuePair, _>(
4237            tag_name,
4238            stack,
4239            |name, stack, obj| {
4240                match name {
4241                    "Key" => {
4242                        obj.key = Some(StringValueDeserializer::deserialize("Key", stack)?);
4243                    }
4244                    "Value" => {
4245                        obj.value = Some(StringValueDeserializer::deserialize("Value", stack)?);
4246                    }
4247                    _ => skip_tree(stack),
4248                }
4249                Ok(())
4250            },
4251        )
4252    }
4253}
4254
4255/// Serialize `QueryStringKeyValuePair` contents to a `SignedRequest`.
4256struct QueryStringKeyValuePairSerializer;
4257impl QueryStringKeyValuePairSerializer {
4258    fn serialize(params: &mut Params, name: &str, obj: &QueryStringKeyValuePair) {
4259        let mut prefix = name.to_string();
4260        if prefix != "" {
4261            prefix.push_str(".");
4262        }
4263
4264        if let Some(ref field_value) = obj.key {
4265            params.put(&format!("{}{}", prefix, "Key"), &field_value);
4266        }
4267        if let Some(ref field_value) = obj.value {
4268            params.put(&format!("{}{}", prefix, "Value"), &field_value);
4269        }
4270    }
4271}
4272
4273#[allow(dead_code)]
4274struct QueryStringKeyValuePairListDeserializer;
4275impl QueryStringKeyValuePairListDeserializer {
4276    #[allow(dead_code, unused_variables)]
4277    fn deserialize<T: Peek + Next>(
4278        tag_name: &str,
4279        stack: &mut T,
4280    ) -> Result<Vec<QueryStringKeyValuePair>, XmlParseError> {
4281        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4282            if name == "member" {
4283                obj.push(QueryStringKeyValuePairDeserializer::deserialize(
4284                    "member", stack,
4285                )?);
4286            } else {
4287                skip_tree(stack);
4288            }
4289            Ok(())
4290        })
4291    }
4292}
4293
4294/// Serialize `QueryStringKeyValuePairList` contents to a `SignedRequest`.
4295struct QueryStringKeyValuePairListSerializer;
4296impl QueryStringKeyValuePairListSerializer {
4297    fn serialize(params: &mut Params, name: &str, obj: &Vec<QueryStringKeyValuePair>) {
4298        for (index, obj) in obj.iter().enumerate() {
4299            let key = format!("{}.member.{}", name, index + 1);
4300            QueryStringKeyValuePairSerializer::serialize(params, &key, obj);
4301        }
4302    }
4303}
4304
4305/// <p>Information about a redirect action.</p> <p>A URI consists of the following components: protocol://hostname:port/path?query. You must modify at least one of the following components to avoid a redirect loop: protocol, hostname, port, or path. Any components that you do not modify retain their original values.</p> <p>You can reuse URI components using the following reserved keywords:</p> <ul> <li> <p>#{protocol}</p> </li> <li> <p>#{host}</p> </li> <li> <p>#{port}</p> </li> <li> <p>#{path} (the leading "/" is removed)</p> </li> <li> <p>#{query}</p> </li> </ul> <p>For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}", or the query to "#{query}&amp;value=xyz".</p>
4306#[derive(Clone, Debug, Default, PartialEq)]
4307#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4308#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4309pub struct RedirectActionConfig {
4310    /// <p>The hostname. This component is not percent-encoded. The hostname can contain #{host}.</p>
4311    pub host: Option<String>,
4312    /// <p>The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.</p>
4313    pub path: Option<String>,
4314    /// <p>The port. You can specify a value from 1 to 65535 or #{port}.</p>
4315    pub port: Option<String>,
4316    /// <p>The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP.</p>
4317    pub protocol: Option<String>,
4318    /// <p>The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading "?", as it is automatically added. You can specify any of the reserved keywords.</p>
4319    pub query: Option<String>,
4320    /// <p>The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302).</p>
4321    pub status_code: String,
4322}
4323
4324#[allow(dead_code)]
4325struct RedirectActionConfigDeserializer;
4326impl RedirectActionConfigDeserializer {
4327    #[allow(dead_code, unused_variables)]
4328    fn deserialize<T: Peek + Next>(
4329        tag_name: &str,
4330        stack: &mut T,
4331    ) -> Result<RedirectActionConfig, XmlParseError> {
4332        deserialize_elements::<_, RedirectActionConfig, _>(tag_name, stack, |name, stack, obj| {
4333            match name {
4334                "Host" => {
4335                    obj.host = Some(RedirectActionHostDeserializer::deserialize("Host", stack)?);
4336                }
4337                "Path" => {
4338                    obj.path = Some(RedirectActionPathDeserializer::deserialize("Path", stack)?);
4339                }
4340                "Port" => {
4341                    obj.port = Some(RedirectActionPortDeserializer::deserialize("Port", stack)?);
4342                }
4343                "Protocol" => {
4344                    obj.protocol = Some(RedirectActionProtocolDeserializer::deserialize(
4345                        "Protocol", stack,
4346                    )?);
4347                }
4348                "Query" => {
4349                    obj.query = Some(RedirectActionQueryDeserializer::deserialize(
4350                        "Query", stack,
4351                    )?);
4352                }
4353                "StatusCode" => {
4354                    obj.status_code =
4355                        RedirectActionStatusCodeEnumDeserializer::deserialize("StatusCode", stack)?;
4356                }
4357                _ => skip_tree(stack),
4358            }
4359            Ok(())
4360        })
4361    }
4362}
4363
4364/// Serialize `RedirectActionConfig` contents to a `SignedRequest`.
4365struct RedirectActionConfigSerializer;
4366impl RedirectActionConfigSerializer {
4367    fn serialize(params: &mut Params, name: &str, obj: &RedirectActionConfig) {
4368        let mut prefix = name.to_string();
4369        if prefix != "" {
4370            prefix.push_str(".");
4371        }
4372
4373        if let Some(ref field_value) = obj.host {
4374            params.put(&format!("{}{}", prefix, "Host"), &field_value);
4375        }
4376        if let Some(ref field_value) = obj.path {
4377            params.put(&format!("{}{}", prefix, "Path"), &field_value);
4378        }
4379        if let Some(ref field_value) = obj.port {
4380            params.put(&format!("{}{}", prefix, "Port"), &field_value);
4381        }
4382        if let Some(ref field_value) = obj.protocol {
4383            params.put(&format!("{}{}", prefix, "Protocol"), &field_value);
4384        }
4385        if let Some(ref field_value) = obj.query {
4386            params.put(&format!("{}{}", prefix, "Query"), &field_value);
4387        }
4388        params.put(&format!("{}{}", prefix, "StatusCode"), &obj.status_code);
4389    }
4390}
4391
4392#[allow(dead_code)]
4393struct RedirectActionHostDeserializer;
4394impl RedirectActionHostDeserializer {
4395    #[allow(dead_code, unused_variables)]
4396    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4397        xml_util::deserialize_primitive(tag_name, stack, Ok)
4398    }
4399}
4400#[allow(dead_code)]
4401struct RedirectActionPathDeserializer;
4402impl RedirectActionPathDeserializer {
4403    #[allow(dead_code, unused_variables)]
4404    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4405        xml_util::deserialize_primitive(tag_name, stack, Ok)
4406    }
4407}
4408#[allow(dead_code)]
4409struct RedirectActionPortDeserializer;
4410impl RedirectActionPortDeserializer {
4411    #[allow(dead_code, unused_variables)]
4412    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4413        xml_util::deserialize_primitive(tag_name, stack, Ok)
4414    }
4415}
4416#[allow(dead_code)]
4417struct RedirectActionProtocolDeserializer;
4418impl RedirectActionProtocolDeserializer {
4419    #[allow(dead_code, unused_variables)]
4420    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4421        xml_util::deserialize_primitive(tag_name, stack, Ok)
4422    }
4423}
4424#[allow(dead_code)]
4425struct RedirectActionQueryDeserializer;
4426impl RedirectActionQueryDeserializer {
4427    #[allow(dead_code, unused_variables)]
4428    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4429        xml_util::deserialize_primitive(tag_name, stack, Ok)
4430    }
4431}
4432#[allow(dead_code)]
4433struct RedirectActionStatusCodeEnumDeserializer;
4434impl RedirectActionStatusCodeEnumDeserializer {
4435    #[allow(dead_code, unused_variables)]
4436    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4437        xml_util::deserialize_primitive(tag_name, stack, Ok)
4438    }
4439}
4440#[derive(Clone, Debug, Default, PartialEq)]
4441#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4442pub struct RegisterTargetsInput {
4443    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
4444    pub target_group_arn: String,
4445    /// <p>The targets.</p> <p>To register a target by instance ID, specify the instance ID. To register a target by IP address, specify the IP address. To register a Lambda function, specify the ARN of the Lambda function.</p>
4446    pub targets: Vec<TargetDescription>,
4447}
4448
4449/// Serialize `RegisterTargetsInput` contents to a `SignedRequest`.
4450struct RegisterTargetsInputSerializer;
4451impl RegisterTargetsInputSerializer {
4452    fn serialize(params: &mut Params, name: &str, obj: &RegisterTargetsInput) {
4453        let mut prefix = name.to_string();
4454        if prefix != "" {
4455            prefix.push_str(".");
4456        }
4457
4458        params.put(
4459            &format!("{}{}", prefix, "TargetGroupArn"),
4460            &obj.target_group_arn,
4461        );
4462        TargetDescriptionsSerializer::serialize(
4463            params,
4464            &format!("{}{}", prefix, "Targets"),
4465            &obj.targets,
4466        );
4467    }
4468}
4469
4470#[derive(Clone, Debug, Default, PartialEq)]
4471#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4472pub struct RegisterTargetsOutput {}
4473
4474#[allow(dead_code)]
4475struct RegisterTargetsOutputDeserializer;
4476impl RegisterTargetsOutputDeserializer {
4477    #[allow(dead_code, unused_variables)]
4478    fn deserialize<T: Peek + Next>(
4479        tag_name: &str,
4480        stack: &mut T,
4481    ) -> Result<RegisterTargetsOutput, XmlParseError> {
4482        xml_util::start_element(tag_name, stack)?;
4483
4484        let obj = RegisterTargetsOutput::default();
4485
4486        xml_util::end_element(tag_name, stack)?;
4487
4488        Ok(obj)
4489    }
4490}
4491#[derive(Clone, Debug, Default, PartialEq)]
4492#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4493pub struct RemoveListenerCertificatesInput {
4494    /// <p>The certificate to remove. You can specify one certificate per call. Set <code>CertificateArn</code> to the certificate ARN but do not set <code>IsDefault</code>.</p>
4495    pub certificates: Vec<Certificate>,
4496    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
4497    pub listener_arn: String,
4498}
4499
4500/// Serialize `RemoveListenerCertificatesInput` contents to a `SignedRequest`.
4501struct RemoveListenerCertificatesInputSerializer;
4502impl RemoveListenerCertificatesInputSerializer {
4503    fn serialize(params: &mut Params, name: &str, obj: &RemoveListenerCertificatesInput) {
4504        let mut prefix = name.to_string();
4505        if prefix != "" {
4506            prefix.push_str(".");
4507        }
4508
4509        CertificateListSerializer::serialize(
4510            params,
4511            &format!("{}{}", prefix, "Certificates"),
4512            &obj.certificates,
4513        );
4514        params.put(&format!("{}{}", prefix, "ListenerArn"), &obj.listener_arn);
4515    }
4516}
4517
4518#[derive(Clone, Debug, Default, PartialEq)]
4519#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4520pub struct RemoveListenerCertificatesOutput {}
4521
4522#[allow(dead_code)]
4523struct RemoveListenerCertificatesOutputDeserializer;
4524impl RemoveListenerCertificatesOutputDeserializer {
4525    #[allow(dead_code, unused_variables)]
4526    fn deserialize<T: Peek + Next>(
4527        tag_name: &str,
4528        stack: &mut T,
4529    ) -> Result<RemoveListenerCertificatesOutput, XmlParseError> {
4530        xml_util::start_element(tag_name, stack)?;
4531
4532        let obj = RemoveListenerCertificatesOutput::default();
4533
4534        xml_util::end_element(tag_name, stack)?;
4535
4536        Ok(obj)
4537    }
4538}
4539#[derive(Clone, Debug, Default, PartialEq)]
4540#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4541pub struct RemoveTagsInput {
4542    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
4543    pub resource_arns: Vec<String>,
4544    /// <p>The tag keys for the tags to remove.</p>
4545    pub tag_keys: Vec<String>,
4546}
4547
4548/// Serialize `RemoveTagsInput` contents to a `SignedRequest`.
4549struct RemoveTagsInputSerializer;
4550impl RemoveTagsInputSerializer {
4551    fn serialize(params: &mut Params, name: &str, obj: &RemoveTagsInput) {
4552        let mut prefix = name.to_string();
4553        if prefix != "" {
4554            prefix.push_str(".");
4555        }
4556
4557        ResourceArnsSerializer::serialize(
4558            params,
4559            &format!("{}{}", prefix, "ResourceArns"),
4560            &obj.resource_arns,
4561        );
4562        TagKeysSerializer::serialize(params, &format!("{}{}", prefix, "TagKeys"), &obj.tag_keys);
4563    }
4564}
4565
4566#[derive(Clone, Debug, Default, PartialEq)]
4567#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4568pub struct RemoveTagsOutput {}
4569
4570#[allow(dead_code)]
4571struct RemoveTagsOutputDeserializer;
4572impl RemoveTagsOutputDeserializer {
4573    #[allow(dead_code, unused_variables)]
4574    fn deserialize<T: Peek + Next>(
4575        tag_name: &str,
4576        stack: &mut T,
4577    ) -> Result<RemoveTagsOutput, XmlParseError> {
4578        xml_util::start_element(tag_name, stack)?;
4579
4580        let obj = RemoveTagsOutput::default();
4581
4582        xml_util::end_element(tag_name, stack)?;
4583
4584        Ok(obj)
4585    }
4586}
4587#[allow(dead_code)]
4588struct ResourceArnDeserializer;
4589impl ResourceArnDeserializer {
4590    #[allow(dead_code, unused_variables)]
4591    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4592        xml_util::deserialize_primitive(tag_name, stack, Ok)
4593    }
4594}
4595
4596/// Serialize `ResourceArns` contents to a `SignedRequest`.
4597struct ResourceArnsSerializer;
4598impl ResourceArnsSerializer {
4599    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
4600        for (index, obj) in obj.iter().enumerate() {
4601            let key = format!("{}.member.{}", name, index + 1);
4602            params.put(&key, &obj);
4603        }
4604    }
4605}
4606
4607/// <p>Information about a rule.</p>
4608#[derive(Clone, Debug, Default, PartialEq)]
4609#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4610pub struct Rule {
4611    /// <p>The actions. Each rule must include exactly one of the following types of actions: <code>forward</code>, <code>redirect</code>, or <code>fixed-response</code>, and it must be the last action to be performed.</p>
4612    pub actions: Option<Vec<Action>>,
4613    /// <p>The conditions. Each rule can include zero or one of the following conditions: <code>http-request-method</code>, <code>host-header</code>, <code>path-pattern</code>, and <code>source-ip</code>, and zero or more of the following conditions: <code>http-header</code> and <code>query-string</code>.</p>
4614    pub conditions: Option<Vec<RuleCondition>>,
4615    /// <p>Indicates whether this is the default rule.</p>
4616    pub is_default: Option<bool>,
4617    /// <p>The priority.</p>
4618    pub priority: Option<String>,
4619    /// <p>The Amazon Resource Name (ARN) of the rule.</p>
4620    pub rule_arn: Option<String>,
4621}
4622
4623#[allow(dead_code)]
4624struct RuleDeserializer;
4625impl RuleDeserializer {
4626    #[allow(dead_code, unused_variables)]
4627    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Rule, XmlParseError> {
4628        deserialize_elements::<_, Rule, _>(tag_name, stack, |name, stack, obj| {
4629            match name {
4630                "Actions" => {
4631                    obj.actions
4632                        .get_or_insert(vec![])
4633                        .extend(ActionsDeserializer::deserialize("Actions", stack)?);
4634                }
4635                "Conditions" => {
4636                    obj.conditions.get_or_insert(vec![]).extend(
4637                        RuleConditionListDeserializer::deserialize("Conditions", stack)?,
4638                    );
4639                }
4640                "IsDefault" => {
4641                    obj.is_default = Some(IsDefaultDeserializer::deserialize("IsDefault", stack)?);
4642                }
4643                "Priority" => {
4644                    obj.priority = Some(StringDeserializer::deserialize("Priority", stack)?);
4645                }
4646                "RuleArn" => {
4647                    obj.rule_arn = Some(RuleArnDeserializer::deserialize("RuleArn", stack)?);
4648                }
4649                _ => skip_tree(stack),
4650            }
4651            Ok(())
4652        })
4653    }
4654}
4655#[allow(dead_code)]
4656struct RuleArnDeserializer;
4657impl RuleArnDeserializer {
4658    #[allow(dead_code, unused_variables)]
4659    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4660        xml_util::deserialize_primitive(tag_name, stack, Ok)
4661    }
4662}
4663
4664/// Serialize `RuleArns` contents to a `SignedRequest`.
4665struct RuleArnsSerializer;
4666impl RuleArnsSerializer {
4667    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
4668        for (index, obj) in obj.iter().enumerate() {
4669            let key = format!("{}.member.{}", name, index + 1);
4670            params.put(&key, &obj);
4671        }
4672    }
4673}
4674
4675/// <p>Information about a condition for a rule.</p>
4676#[derive(Clone, Debug, Default, PartialEq)]
4677#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4678#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4679pub struct RuleCondition {
4680    /// <p><p>The field in the HTTP request. The following are the possible values:</p> <ul> <li> <p> <code>http-header</code> </p> </li> <li> <p> <code>http-request-method</code> </p> </li> <li> <p> <code>host-header</code> </p> </li> <li> <p> <code>path-pattern</code> </p> </li> <li> <p> <code>query-string</code> </p> </li> <li> <p> <code>source-ip</code> </p> </li> </ul></p>
4681    pub field: Option<String>,
4682    /// <p>Information for a host header condition. Specify only when <code>Field</code> is <code>host-header</code>.</p>
4683    pub host_header_config: Option<HostHeaderConditionConfig>,
4684    /// <p>Information for an HTTP header condition. Specify only when <code>Field</code> is <code>http-header</code>.</p>
4685    pub http_header_config: Option<HttpHeaderConditionConfig>,
4686    /// <p>Information for an HTTP method condition. Specify only when <code>Field</code> is <code>http-request-method</code>.</p>
4687    pub http_request_method_config: Option<HttpRequestMethodConditionConfig>,
4688    /// <p>Information for a path pattern condition. Specify only when <code>Field</code> is <code>path-pattern</code>.</p>
4689    pub path_pattern_config: Option<PathPatternConditionConfig>,
4690    /// <p>Information for a query string condition. Specify only when <code>Field</code> is <code>query-string</code>.</p>
4691    pub query_string_config: Option<QueryStringConditionConfig>,
4692    /// <p>Information for a source IP condition. Specify only when <code>Field</code> is <code>source-ip</code>.</p>
4693    pub source_ip_config: Option<SourceIpConditionConfig>,
4694    /// <p><p>The condition value. You can use <code>Values</code> if the rule contains only <code>host-header</code> and <code>path-pattern</code> conditions. Otherwise, you can use <code>HostHeaderConfig</code> for <code>host-header</code> conditions and <code>PathPatternConfig</code> for <code>path-pattern</code> conditions.</p> <p>If <code>Field</code> is <code>host-header</code>, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>- .</p> </li> <li> <p>* (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul> <p>If <code>Field</code> is <code>path-pattern</code>, you can specify a single path pattern (for example, /img/<em>). A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.</p> <ul> <li> <p>A-Z, a-z, 0-9</p> </li> <li> <p>_ - . $ / ~ &quot; &#39; @ : +</p> </li> <li> <p>&amp; (using &amp;amp;)</p> </li> <li> <p></em> (matches 0 or more characters)</p> </li> <li> <p>? (matches exactly 1 character)</p> </li> </ul></p>
4695    pub values: Option<Vec<String>>,
4696}
4697
4698#[allow(dead_code)]
4699struct RuleConditionDeserializer;
4700impl RuleConditionDeserializer {
4701    #[allow(dead_code, unused_variables)]
4702    fn deserialize<T: Peek + Next>(
4703        tag_name: &str,
4704        stack: &mut T,
4705    ) -> Result<RuleCondition, XmlParseError> {
4706        deserialize_elements::<_, RuleCondition, _>(tag_name, stack, |name, stack, obj| {
4707            match name {
4708                "Field" => {
4709                    obj.field = Some(ConditionFieldNameDeserializer::deserialize("Field", stack)?);
4710                }
4711                "HostHeaderConfig" => {
4712                    obj.host_header_config =
4713                        Some(HostHeaderConditionConfigDeserializer::deserialize(
4714                            "HostHeaderConfig",
4715                            stack,
4716                        )?);
4717                }
4718                "HttpHeaderConfig" => {
4719                    obj.http_header_config =
4720                        Some(HttpHeaderConditionConfigDeserializer::deserialize(
4721                            "HttpHeaderConfig",
4722                            stack,
4723                        )?);
4724                }
4725                "HttpRequestMethodConfig" => {
4726                    obj.http_request_method_config =
4727                        Some(HttpRequestMethodConditionConfigDeserializer::deserialize(
4728                            "HttpRequestMethodConfig",
4729                            stack,
4730                        )?);
4731                }
4732                "PathPatternConfig" => {
4733                    obj.path_pattern_config =
4734                        Some(PathPatternConditionConfigDeserializer::deserialize(
4735                            "PathPatternConfig",
4736                            stack,
4737                        )?);
4738                }
4739                "QueryStringConfig" => {
4740                    obj.query_string_config =
4741                        Some(QueryStringConditionConfigDeserializer::deserialize(
4742                            "QueryStringConfig",
4743                            stack,
4744                        )?);
4745                }
4746                "SourceIpConfig" => {
4747                    obj.source_ip_config = Some(SourceIpConditionConfigDeserializer::deserialize(
4748                        "SourceIpConfig",
4749                        stack,
4750                    )?);
4751                }
4752                "Values" => {
4753                    obj.values
4754                        .get_or_insert(vec![])
4755                        .extend(ListOfStringDeserializer::deserialize("Values", stack)?);
4756                }
4757                _ => skip_tree(stack),
4758            }
4759            Ok(())
4760        })
4761    }
4762}
4763
4764/// Serialize `RuleCondition` contents to a `SignedRequest`.
4765struct RuleConditionSerializer;
4766impl RuleConditionSerializer {
4767    fn serialize(params: &mut Params, name: &str, obj: &RuleCondition) {
4768        let mut prefix = name.to_string();
4769        if prefix != "" {
4770            prefix.push_str(".");
4771        }
4772
4773        if let Some(ref field_value) = obj.field {
4774            params.put(&format!("{}{}", prefix, "Field"), &field_value);
4775        }
4776        if let Some(ref field_value) = obj.host_header_config {
4777            HostHeaderConditionConfigSerializer::serialize(
4778                params,
4779                &format!("{}{}", prefix, "HostHeaderConfig"),
4780                field_value,
4781            );
4782        }
4783        if let Some(ref field_value) = obj.http_header_config {
4784            HttpHeaderConditionConfigSerializer::serialize(
4785                params,
4786                &format!("{}{}", prefix, "HttpHeaderConfig"),
4787                field_value,
4788            );
4789        }
4790        if let Some(ref field_value) = obj.http_request_method_config {
4791            HttpRequestMethodConditionConfigSerializer::serialize(
4792                params,
4793                &format!("{}{}", prefix, "HttpRequestMethodConfig"),
4794                field_value,
4795            );
4796        }
4797        if let Some(ref field_value) = obj.path_pattern_config {
4798            PathPatternConditionConfigSerializer::serialize(
4799                params,
4800                &format!("{}{}", prefix, "PathPatternConfig"),
4801                field_value,
4802            );
4803        }
4804        if let Some(ref field_value) = obj.query_string_config {
4805            QueryStringConditionConfigSerializer::serialize(
4806                params,
4807                &format!("{}{}", prefix, "QueryStringConfig"),
4808                field_value,
4809            );
4810        }
4811        if let Some(ref field_value) = obj.source_ip_config {
4812            SourceIpConditionConfigSerializer::serialize(
4813                params,
4814                &format!("{}{}", prefix, "SourceIpConfig"),
4815                field_value,
4816            );
4817        }
4818        if let Some(ref field_value) = obj.values {
4819            ListOfStringSerializer::serialize(
4820                params,
4821                &format!("{}{}", prefix, "Values"),
4822                field_value,
4823            );
4824        }
4825    }
4826}
4827
4828#[allow(dead_code)]
4829struct RuleConditionListDeserializer;
4830impl RuleConditionListDeserializer {
4831    #[allow(dead_code, unused_variables)]
4832    fn deserialize<T: Peek + Next>(
4833        tag_name: &str,
4834        stack: &mut T,
4835    ) -> Result<Vec<RuleCondition>, XmlParseError> {
4836        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4837            if name == "member" {
4838                obj.push(RuleConditionDeserializer::deserialize("member", stack)?);
4839            } else {
4840                skip_tree(stack);
4841            }
4842            Ok(())
4843        })
4844    }
4845}
4846
4847/// Serialize `RuleConditionList` contents to a `SignedRequest`.
4848struct RuleConditionListSerializer;
4849impl RuleConditionListSerializer {
4850    fn serialize(params: &mut Params, name: &str, obj: &Vec<RuleCondition>) {
4851        for (index, obj) in obj.iter().enumerate() {
4852            let key = format!("{}.member.{}", name, index + 1);
4853            RuleConditionSerializer::serialize(params, &key, obj);
4854        }
4855    }
4856}
4857
4858/// Serialize `RulePriorityList` contents to a `SignedRequest`.
4859struct RulePriorityListSerializer;
4860impl RulePriorityListSerializer {
4861    fn serialize(params: &mut Params, name: &str, obj: &Vec<RulePriorityPair>) {
4862        for (index, obj) in obj.iter().enumerate() {
4863            let key = format!("{}.member.{}", name, index + 1);
4864            RulePriorityPairSerializer::serialize(params, &key, obj);
4865        }
4866    }
4867}
4868
4869/// <p>Information about the priorities for the rules for a listener.</p>
4870#[derive(Clone, Debug, Default, PartialEq)]
4871#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4872pub struct RulePriorityPair {
4873    /// <p>The rule priority.</p>
4874    pub priority: Option<i64>,
4875    /// <p>The Amazon Resource Name (ARN) of the rule.</p>
4876    pub rule_arn: Option<String>,
4877}
4878
4879/// Serialize `RulePriorityPair` contents to a `SignedRequest`.
4880struct RulePriorityPairSerializer;
4881impl RulePriorityPairSerializer {
4882    fn serialize(params: &mut Params, name: &str, obj: &RulePriorityPair) {
4883        let mut prefix = name.to_string();
4884        if prefix != "" {
4885            prefix.push_str(".");
4886        }
4887
4888        if let Some(ref field_value) = obj.priority {
4889            params.put(&format!("{}{}", prefix, "Priority"), &field_value);
4890        }
4891        if let Some(ref field_value) = obj.rule_arn {
4892            params.put(&format!("{}{}", prefix, "RuleArn"), &field_value);
4893        }
4894    }
4895}
4896
4897#[allow(dead_code)]
4898struct RulesDeserializer;
4899impl RulesDeserializer {
4900    #[allow(dead_code, unused_variables)]
4901    fn deserialize<T: Peek + Next>(
4902        tag_name: &str,
4903        stack: &mut T,
4904    ) -> Result<Vec<Rule>, XmlParseError> {
4905        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4906            if name == "member" {
4907                obj.push(RuleDeserializer::deserialize("member", stack)?);
4908            } else {
4909                skip_tree(stack);
4910            }
4911            Ok(())
4912        })
4913    }
4914}
4915#[allow(dead_code)]
4916struct SecurityGroupIdDeserializer;
4917impl SecurityGroupIdDeserializer {
4918    #[allow(dead_code, unused_variables)]
4919    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4920        xml_util::deserialize_primitive(tag_name, stack, Ok)
4921    }
4922}
4923#[allow(dead_code)]
4924struct SecurityGroupsDeserializer;
4925impl SecurityGroupsDeserializer {
4926    #[allow(dead_code, unused_variables)]
4927    fn deserialize<T: Peek + Next>(
4928        tag_name: &str,
4929        stack: &mut T,
4930    ) -> Result<Vec<String>, XmlParseError> {
4931        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4932            if name == "member" {
4933                obj.push(SecurityGroupIdDeserializer::deserialize("member", stack)?);
4934            } else {
4935                skip_tree(stack);
4936            }
4937            Ok(())
4938        })
4939    }
4940}
4941
4942/// Serialize `SecurityGroups` contents to a `SignedRequest`.
4943struct SecurityGroupsSerializer;
4944impl SecurityGroupsSerializer {
4945    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
4946        for (index, obj) in obj.iter().enumerate() {
4947            let key = format!("{}.member.{}", name, index + 1);
4948            params.put(&key, &obj);
4949        }
4950    }
4951}
4952
4953#[derive(Clone, Debug, Default, PartialEq)]
4954#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4955pub struct SetIpAddressTypeInput {
4956    /// <p>The IP address type. The possible values are <code>ipv4</code> (for IPv4 addresses) and <code>dualstack</code> (for IPv4 and IPv6 addresses). Internal load balancers must use <code>ipv4</code>. Network Load Balancers must use <code>ipv4</code>.</p>
4957    pub ip_address_type: String,
4958    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
4959    pub load_balancer_arn: String,
4960}
4961
4962/// Serialize `SetIpAddressTypeInput` contents to a `SignedRequest`.
4963struct SetIpAddressTypeInputSerializer;
4964impl SetIpAddressTypeInputSerializer {
4965    fn serialize(params: &mut Params, name: &str, obj: &SetIpAddressTypeInput) {
4966        let mut prefix = name.to_string();
4967        if prefix != "" {
4968            prefix.push_str(".");
4969        }
4970
4971        params.put(
4972            &format!("{}{}", prefix, "IpAddressType"),
4973            &obj.ip_address_type,
4974        );
4975        params.put(
4976            &format!("{}{}", prefix, "LoadBalancerArn"),
4977            &obj.load_balancer_arn,
4978        );
4979    }
4980}
4981
4982#[derive(Clone, Debug, Default, PartialEq)]
4983#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4984pub struct SetIpAddressTypeOutput {
4985    /// <p>The IP address type.</p>
4986    pub ip_address_type: Option<String>,
4987}
4988
4989#[allow(dead_code)]
4990struct SetIpAddressTypeOutputDeserializer;
4991impl SetIpAddressTypeOutputDeserializer {
4992    #[allow(dead_code, unused_variables)]
4993    fn deserialize<T: Peek + Next>(
4994        tag_name: &str,
4995        stack: &mut T,
4996    ) -> Result<SetIpAddressTypeOutput, XmlParseError> {
4997        deserialize_elements::<_, SetIpAddressTypeOutput, _>(tag_name, stack, |name, stack, obj| {
4998            match name {
4999                "IpAddressType" => {
5000                    obj.ip_address_type = Some(IpAddressTypeDeserializer::deserialize(
5001                        "IpAddressType",
5002                        stack,
5003                    )?);
5004                }
5005                _ => skip_tree(stack),
5006            }
5007            Ok(())
5008        })
5009    }
5010}
5011#[derive(Clone, Debug, Default, PartialEq)]
5012#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5013pub struct SetRulePrioritiesInput {
5014    /// <p>The rule priorities.</p>
5015    pub rule_priorities: Vec<RulePriorityPair>,
5016}
5017
5018/// Serialize `SetRulePrioritiesInput` contents to a `SignedRequest`.
5019struct SetRulePrioritiesInputSerializer;
5020impl SetRulePrioritiesInputSerializer {
5021    fn serialize(params: &mut Params, name: &str, obj: &SetRulePrioritiesInput) {
5022        let mut prefix = name.to_string();
5023        if prefix != "" {
5024            prefix.push_str(".");
5025        }
5026
5027        RulePriorityListSerializer::serialize(
5028            params,
5029            &format!("{}{}", prefix, "RulePriorities"),
5030            &obj.rule_priorities,
5031        );
5032    }
5033}
5034
5035#[derive(Clone, Debug, Default, PartialEq)]
5036#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5037pub struct SetRulePrioritiesOutput {
5038    /// <p>Information about the rules.</p>
5039    pub rules: Option<Vec<Rule>>,
5040}
5041
5042#[allow(dead_code)]
5043struct SetRulePrioritiesOutputDeserializer;
5044impl SetRulePrioritiesOutputDeserializer {
5045    #[allow(dead_code, unused_variables)]
5046    fn deserialize<T: Peek + Next>(
5047        tag_name: &str,
5048        stack: &mut T,
5049    ) -> Result<SetRulePrioritiesOutput, XmlParseError> {
5050        deserialize_elements::<_, SetRulePrioritiesOutput, _>(
5051            tag_name,
5052            stack,
5053            |name, stack, obj| {
5054                match name {
5055                    "Rules" => {
5056                        obj.rules
5057                            .get_or_insert(vec![])
5058                            .extend(RulesDeserializer::deserialize("Rules", stack)?);
5059                    }
5060                    _ => skip_tree(stack),
5061                }
5062                Ok(())
5063            },
5064        )
5065    }
5066}
5067#[derive(Clone, Debug, Default, PartialEq)]
5068#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5069pub struct SetSecurityGroupsInput {
5070    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
5071    pub load_balancer_arn: String,
5072    /// <p>The IDs of the security groups.</p>
5073    pub security_groups: Vec<String>,
5074}
5075
5076/// Serialize `SetSecurityGroupsInput` contents to a `SignedRequest`.
5077struct SetSecurityGroupsInputSerializer;
5078impl SetSecurityGroupsInputSerializer {
5079    fn serialize(params: &mut Params, name: &str, obj: &SetSecurityGroupsInput) {
5080        let mut prefix = name.to_string();
5081        if prefix != "" {
5082            prefix.push_str(".");
5083        }
5084
5085        params.put(
5086            &format!("{}{}", prefix, "LoadBalancerArn"),
5087            &obj.load_balancer_arn,
5088        );
5089        SecurityGroupsSerializer::serialize(
5090            params,
5091            &format!("{}{}", prefix, "SecurityGroups"),
5092            &obj.security_groups,
5093        );
5094    }
5095}
5096
5097#[derive(Clone, Debug, Default, PartialEq)]
5098#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5099pub struct SetSecurityGroupsOutput {
5100    /// <p>The IDs of the security groups associated with the load balancer.</p>
5101    pub security_group_ids: Option<Vec<String>>,
5102}
5103
5104#[allow(dead_code)]
5105struct SetSecurityGroupsOutputDeserializer;
5106impl SetSecurityGroupsOutputDeserializer {
5107    #[allow(dead_code, unused_variables)]
5108    fn deserialize<T: Peek + Next>(
5109        tag_name: &str,
5110        stack: &mut T,
5111    ) -> Result<SetSecurityGroupsOutput, XmlParseError> {
5112        deserialize_elements::<_, SetSecurityGroupsOutput, _>(
5113            tag_name,
5114            stack,
5115            |name, stack, obj| {
5116                match name {
5117                    "SecurityGroupIds" => {
5118                        obj.security_group_ids.get_or_insert(vec![]).extend(
5119                            SecurityGroupsDeserializer::deserialize("SecurityGroupIds", stack)?,
5120                        );
5121                    }
5122                    _ => skip_tree(stack),
5123                }
5124                Ok(())
5125            },
5126        )
5127    }
5128}
5129#[derive(Clone, Debug, Default, PartialEq)]
5130#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5131pub struct SetSubnetsInput {
5132    /// <p>The Amazon Resource Name (ARN) of the load balancer.</p>
5133    pub load_balancer_arn: String,
5134    /// <p>The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p> <p>[Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.</p> <p>[Network Load Balancers] You can specify subnets from one or more Availability Zones. If you need static IP addresses for your internet-facing load balancer, you can specify one Elastic IP address per subnet. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet.</p>
5135    pub subnet_mappings: Option<Vec<SubnetMapping>>,
5136    /// <p>The IDs of the public subnets. You must specify subnets from at least two Availability Zones. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.</p>
5137    pub subnets: Option<Vec<String>>,
5138}
5139
5140/// Serialize `SetSubnetsInput` contents to a `SignedRequest`.
5141struct SetSubnetsInputSerializer;
5142impl SetSubnetsInputSerializer {
5143    fn serialize(params: &mut Params, name: &str, obj: &SetSubnetsInput) {
5144        let mut prefix = name.to_string();
5145        if prefix != "" {
5146            prefix.push_str(".");
5147        }
5148
5149        params.put(
5150            &format!("{}{}", prefix, "LoadBalancerArn"),
5151            &obj.load_balancer_arn,
5152        );
5153        if let Some(ref field_value) = obj.subnet_mappings {
5154            SubnetMappingsSerializer::serialize(
5155                params,
5156                &format!("{}{}", prefix, "SubnetMappings"),
5157                field_value,
5158            );
5159        }
5160        if let Some(ref field_value) = obj.subnets {
5161            SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), field_value);
5162        }
5163    }
5164}
5165
5166#[derive(Clone, Debug, Default, PartialEq)]
5167#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5168pub struct SetSubnetsOutput {
5169    /// <p>Information about the subnet and Availability Zone.</p>
5170    pub availability_zones: Option<Vec<AvailabilityZone>>,
5171}
5172
5173#[allow(dead_code)]
5174struct SetSubnetsOutputDeserializer;
5175impl SetSubnetsOutputDeserializer {
5176    #[allow(dead_code, unused_variables)]
5177    fn deserialize<T: Peek + Next>(
5178        tag_name: &str,
5179        stack: &mut T,
5180    ) -> Result<SetSubnetsOutput, XmlParseError> {
5181        deserialize_elements::<_, SetSubnetsOutput, _>(tag_name, stack, |name, stack, obj| {
5182            match name {
5183                "AvailabilityZones" => {
5184                    obj.availability_zones.get_or_insert(vec![]).extend(
5185                        AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
5186                    );
5187                }
5188                _ => skip_tree(stack),
5189            }
5190            Ok(())
5191        })
5192    }
5193}
5194/// <p>Information about a source IP condition.</p> <p>You can use this condition to route based on the IP address of the source that connects to the load balancer. If a client is behind a proxy, this is the IP address of the proxy not the IP address of the client.</p>
5195#[derive(Clone, Debug, Default, PartialEq)]
5196#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5197#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5198pub struct SourceIpConditionConfig {
5199    /// <p>One or more source IP addresses, in CIDR format. You can use both IPv4 and IPv6 addresses. Wildcards are not supported.</p> <p>If you specify multiple addresses, the condition is satisfied if the source IP address of the request matches one of the CIDR blocks. This condition is not satisfied by the addresses in the X-Forwarded-For header. To search for addresses in the X-Forwarded-For header, use <a>HttpHeaderConditionConfig</a>.</p>
5200    pub values: Option<Vec<String>>,
5201}
5202
5203#[allow(dead_code)]
5204struct SourceIpConditionConfigDeserializer;
5205impl SourceIpConditionConfigDeserializer {
5206    #[allow(dead_code, unused_variables)]
5207    fn deserialize<T: Peek + Next>(
5208        tag_name: &str,
5209        stack: &mut T,
5210    ) -> Result<SourceIpConditionConfig, XmlParseError> {
5211        deserialize_elements::<_, SourceIpConditionConfig, _>(
5212            tag_name,
5213            stack,
5214            |name, stack, obj| {
5215                match name {
5216                    "Values" => {
5217                        obj.values
5218                            .get_or_insert(vec![])
5219                            .extend(ListOfStringDeserializer::deserialize("Values", stack)?);
5220                    }
5221                    _ => skip_tree(stack),
5222                }
5223                Ok(())
5224            },
5225        )
5226    }
5227}
5228
5229/// Serialize `SourceIpConditionConfig` contents to a `SignedRequest`.
5230struct SourceIpConditionConfigSerializer;
5231impl SourceIpConditionConfigSerializer {
5232    fn serialize(params: &mut Params, name: &str, obj: &SourceIpConditionConfig) {
5233        let mut prefix = name.to_string();
5234        if prefix != "" {
5235            prefix.push_str(".");
5236        }
5237
5238        if let Some(ref field_value) = obj.values {
5239            ListOfStringSerializer::serialize(
5240                params,
5241                &format!("{}{}", prefix, "Values"),
5242                field_value,
5243            );
5244        }
5245    }
5246}
5247
5248#[allow(dead_code)]
5249struct SslPoliciesDeserializer;
5250impl SslPoliciesDeserializer {
5251    #[allow(dead_code, unused_variables)]
5252    fn deserialize<T: Peek + Next>(
5253        tag_name: &str,
5254        stack: &mut T,
5255    ) -> Result<Vec<SslPolicy>, XmlParseError> {
5256        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5257            if name == "member" {
5258                obj.push(SslPolicyDeserializer::deserialize("member", stack)?);
5259            } else {
5260                skip_tree(stack);
5261            }
5262            Ok(())
5263        })
5264    }
5265}
5266/// <p>Information about a policy used for SSL negotiation.</p>
5267#[derive(Clone, Debug, Default, PartialEq)]
5268#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5269pub struct SslPolicy {
5270    /// <p>The ciphers.</p>
5271    pub ciphers: Option<Vec<Cipher>>,
5272    /// <p>The name of the policy.</p>
5273    pub name: Option<String>,
5274    /// <p>The protocols.</p>
5275    pub ssl_protocols: Option<Vec<String>>,
5276}
5277
5278#[allow(dead_code)]
5279struct SslPolicyDeserializer;
5280impl SslPolicyDeserializer {
5281    #[allow(dead_code, unused_variables)]
5282    fn deserialize<T: Peek + Next>(
5283        tag_name: &str,
5284        stack: &mut T,
5285    ) -> Result<SslPolicy, XmlParseError> {
5286        deserialize_elements::<_, SslPolicy, _>(tag_name, stack, |name, stack, obj| {
5287            match name {
5288                "Ciphers" => {
5289                    obj.ciphers
5290                        .get_or_insert(vec![])
5291                        .extend(CiphersDeserializer::deserialize("Ciphers", stack)?);
5292                }
5293                "Name" => {
5294                    obj.name = Some(SslPolicyNameDeserializer::deserialize("Name", stack)?);
5295                }
5296                "SslProtocols" => {
5297                    obj.ssl_protocols.get_or_insert(vec![]).extend(
5298                        SslProtocolsDeserializer::deserialize("SslProtocols", stack)?,
5299                    );
5300                }
5301                _ => skip_tree(stack),
5302            }
5303            Ok(())
5304        })
5305    }
5306}
5307#[allow(dead_code)]
5308struct SslPolicyNameDeserializer;
5309impl SslPolicyNameDeserializer {
5310    #[allow(dead_code, unused_variables)]
5311    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5312        xml_util::deserialize_primitive(tag_name, stack, Ok)
5313    }
5314}
5315
5316/// Serialize `SslPolicyNames` contents to a `SignedRequest`.
5317struct SslPolicyNamesSerializer;
5318impl SslPolicyNamesSerializer {
5319    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
5320        for (index, obj) in obj.iter().enumerate() {
5321            let key = format!("{}.member.{}", name, index + 1);
5322            params.put(&key, &obj);
5323        }
5324    }
5325}
5326
5327#[allow(dead_code)]
5328struct SslProtocolDeserializer;
5329impl SslProtocolDeserializer {
5330    #[allow(dead_code, unused_variables)]
5331    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5332        xml_util::deserialize_primitive(tag_name, stack, Ok)
5333    }
5334}
5335#[allow(dead_code)]
5336struct SslProtocolsDeserializer;
5337impl SslProtocolsDeserializer {
5338    #[allow(dead_code, unused_variables)]
5339    fn deserialize<T: Peek + Next>(
5340        tag_name: &str,
5341        stack: &mut T,
5342    ) -> Result<Vec<String>, XmlParseError> {
5343        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5344            if name == "member" {
5345                obj.push(SslProtocolDeserializer::deserialize("member", stack)?);
5346            } else {
5347                skip_tree(stack);
5348            }
5349            Ok(())
5350        })
5351    }
5352}
5353#[allow(dead_code)]
5354struct StateReasonDeserializer;
5355impl StateReasonDeserializer {
5356    #[allow(dead_code, unused_variables)]
5357    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5358        xml_util::deserialize_primitive(tag_name, stack, Ok)
5359    }
5360}
5361#[allow(dead_code)]
5362struct StringDeserializer;
5363impl StringDeserializer {
5364    #[allow(dead_code, unused_variables)]
5365    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5366        xml_util::deserialize_primitive(tag_name, stack, Ok)
5367    }
5368}
5369#[allow(dead_code)]
5370struct StringValueDeserializer;
5371impl StringValueDeserializer {
5372    #[allow(dead_code, unused_variables)]
5373    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5374        xml_util::deserialize_primitive(tag_name, stack, Ok)
5375    }
5376}
5377#[allow(dead_code)]
5378struct SubnetIdDeserializer;
5379impl SubnetIdDeserializer {
5380    #[allow(dead_code, unused_variables)]
5381    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5382        xml_util::deserialize_primitive(tag_name, stack, Ok)
5383    }
5384}
5385/// <p>Information about a subnet mapping.</p>
5386#[derive(Clone, Debug, Default, PartialEq)]
5387#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5388pub struct SubnetMapping {
5389    /// <p>[Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer.</p>
5390    pub allocation_id: Option<String>,
5391    /// <p>[Network Load Balancers] The private IPv4 address for an internal load balancer.</p>
5392    pub private_i_pv_4_address: Option<String>,
5393    /// <p>The ID of the subnet.</p>
5394    pub subnet_id: Option<String>,
5395}
5396
5397/// Serialize `SubnetMapping` contents to a `SignedRequest`.
5398struct SubnetMappingSerializer;
5399impl SubnetMappingSerializer {
5400    fn serialize(params: &mut Params, name: &str, obj: &SubnetMapping) {
5401        let mut prefix = name.to_string();
5402        if prefix != "" {
5403            prefix.push_str(".");
5404        }
5405
5406        if let Some(ref field_value) = obj.allocation_id {
5407            params.put(&format!("{}{}", prefix, "AllocationId"), &field_value);
5408        }
5409        if let Some(ref field_value) = obj.private_i_pv_4_address {
5410            params.put(&format!("{}{}", prefix, "PrivateIPv4Address"), &field_value);
5411        }
5412        if let Some(ref field_value) = obj.subnet_id {
5413            params.put(&format!("{}{}", prefix, "SubnetId"), &field_value);
5414        }
5415    }
5416}
5417
5418/// Serialize `SubnetMappings` contents to a `SignedRequest`.
5419struct SubnetMappingsSerializer;
5420impl SubnetMappingsSerializer {
5421    fn serialize(params: &mut Params, name: &str, obj: &Vec<SubnetMapping>) {
5422        for (index, obj) in obj.iter().enumerate() {
5423            let key = format!("{}.member.{}", name, index + 1);
5424            SubnetMappingSerializer::serialize(params, &key, obj);
5425        }
5426    }
5427}
5428
5429/// Serialize `Subnets` contents to a `SignedRequest`.
5430struct SubnetsSerializer;
5431impl SubnetsSerializer {
5432    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
5433        for (index, obj) in obj.iter().enumerate() {
5434            let key = format!("{}.member.{}", name, index + 1);
5435            params.put(&key, &obj);
5436        }
5437    }
5438}
5439
5440/// <p>Information about a tag.</p>
5441#[derive(Clone, Debug, Default, PartialEq)]
5442#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5443#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5444pub struct Tag {
5445    /// <p>The key of the tag.</p>
5446    pub key: String,
5447    /// <p>The value of the tag.</p>
5448    pub value: Option<String>,
5449}
5450
5451#[allow(dead_code)]
5452struct TagDeserializer;
5453impl TagDeserializer {
5454    #[allow(dead_code, unused_variables)]
5455    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
5456        deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
5457            match name {
5458                "Key" => {
5459                    obj.key = TagKeyDeserializer::deserialize("Key", stack)?;
5460                }
5461                "Value" => {
5462                    obj.value = Some(TagValueDeserializer::deserialize("Value", stack)?);
5463                }
5464                _ => skip_tree(stack),
5465            }
5466            Ok(())
5467        })
5468    }
5469}
5470
5471/// Serialize `Tag` contents to a `SignedRequest`.
5472struct TagSerializer;
5473impl TagSerializer {
5474    fn serialize(params: &mut Params, name: &str, obj: &Tag) {
5475        let mut prefix = name.to_string();
5476        if prefix != "" {
5477            prefix.push_str(".");
5478        }
5479
5480        params.put(&format!("{}{}", prefix, "Key"), &obj.key);
5481        if let Some(ref field_value) = obj.value {
5482            params.put(&format!("{}{}", prefix, "Value"), &field_value);
5483        }
5484    }
5485}
5486
5487/// <p>The tags associated with a resource.</p>
5488#[derive(Clone, Debug, Default, PartialEq)]
5489#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5490pub struct TagDescription {
5491    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
5492    pub resource_arn: Option<String>,
5493    /// <p>Information about the tags.</p>
5494    pub tags: Option<Vec<Tag>>,
5495}
5496
5497#[allow(dead_code)]
5498struct TagDescriptionDeserializer;
5499impl TagDescriptionDeserializer {
5500    #[allow(dead_code, unused_variables)]
5501    fn deserialize<T: Peek + Next>(
5502        tag_name: &str,
5503        stack: &mut T,
5504    ) -> Result<TagDescription, XmlParseError> {
5505        deserialize_elements::<_, TagDescription, _>(tag_name, stack, |name, stack, obj| {
5506            match name {
5507                "ResourceArn" => {
5508                    obj.resource_arn =
5509                        Some(ResourceArnDeserializer::deserialize("ResourceArn", stack)?);
5510                }
5511                "Tags" => {
5512                    obj.tags
5513                        .get_or_insert(vec![])
5514                        .extend(TagListDeserializer::deserialize("Tags", stack)?);
5515                }
5516                _ => skip_tree(stack),
5517            }
5518            Ok(())
5519        })
5520    }
5521}
5522#[allow(dead_code)]
5523struct TagDescriptionsDeserializer;
5524impl TagDescriptionsDeserializer {
5525    #[allow(dead_code, unused_variables)]
5526    fn deserialize<T: Peek + Next>(
5527        tag_name: &str,
5528        stack: &mut T,
5529    ) -> Result<Vec<TagDescription>, XmlParseError> {
5530        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5531            if name == "member" {
5532                obj.push(TagDescriptionDeserializer::deserialize("member", stack)?);
5533            } else {
5534                skip_tree(stack);
5535            }
5536            Ok(())
5537        })
5538    }
5539}
5540#[allow(dead_code)]
5541struct TagKeyDeserializer;
5542impl TagKeyDeserializer {
5543    #[allow(dead_code, unused_variables)]
5544    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5545        xml_util::deserialize_primitive(tag_name, stack, Ok)
5546    }
5547}
5548
5549/// Serialize `TagKeys` contents to a `SignedRequest`.
5550struct TagKeysSerializer;
5551impl TagKeysSerializer {
5552    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
5553        for (index, obj) in obj.iter().enumerate() {
5554            let key = format!("{}.member.{}", name, index + 1);
5555            params.put(&key, &obj);
5556        }
5557    }
5558}
5559
5560#[allow(dead_code)]
5561struct TagListDeserializer;
5562impl TagListDeserializer {
5563    #[allow(dead_code, unused_variables)]
5564    fn deserialize<T: Peek + Next>(
5565        tag_name: &str,
5566        stack: &mut T,
5567    ) -> Result<Vec<Tag>, XmlParseError> {
5568        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5569            if name == "member" {
5570                obj.push(TagDeserializer::deserialize("member", stack)?);
5571            } else {
5572                skip_tree(stack);
5573            }
5574            Ok(())
5575        })
5576    }
5577}
5578
5579/// Serialize `TagList` contents to a `SignedRequest`.
5580struct TagListSerializer;
5581impl TagListSerializer {
5582    fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
5583        for (index, obj) in obj.iter().enumerate() {
5584            let key = format!("{}.member.{}", name, index + 1);
5585            TagSerializer::serialize(params, &key, obj);
5586        }
5587    }
5588}
5589
5590#[allow(dead_code)]
5591struct TagValueDeserializer;
5592impl TagValueDeserializer {
5593    #[allow(dead_code, unused_variables)]
5594    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5595        xml_util::deserialize_primitive(tag_name, stack, Ok)
5596    }
5597}
5598/// <p>Information about a target.</p>
5599#[derive(Clone, Debug, Default, PartialEq)]
5600#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5601#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5602pub struct TargetDescription {
5603    /// <p>An Availability Zone or <code>all</code>. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.</p> <p>This parameter is not supported if the target type of the target group is <code>instance</code>.</p> <p>If the target type is <code>ip</code> and the IP address is in a subnet of the VPC for the target group, the Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC, this parameter is required.</p> <p>With an Application Load Balancer, if the target type is <code>ip</code> and the IP address is outside the VPC for the target group, the only supported value is <code>all</code>.</p> <p>If the target type is <code>lambda</code>, this parameter is optional and the only supported value is <code>all</code>.</p>
5604    pub availability_zone: Option<String>,
5605    /// <p>The ID of the target. If the target type of the target group is <code>instance</code>, specify an instance ID. If the target type is <code>ip</code>, specify an IP address. If the target type is <code>lambda</code>, specify the ARN of the Lambda function.</p>
5606    pub id: String,
5607    /// <p>The port on which the target is listening. Not used if the target is a Lambda function.</p>
5608    pub port: Option<i64>,
5609}
5610
5611#[allow(dead_code)]
5612struct TargetDescriptionDeserializer;
5613impl TargetDescriptionDeserializer {
5614    #[allow(dead_code, unused_variables)]
5615    fn deserialize<T: Peek + Next>(
5616        tag_name: &str,
5617        stack: &mut T,
5618    ) -> Result<TargetDescription, XmlParseError> {
5619        deserialize_elements::<_, TargetDescription, _>(tag_name, stack, |name, stack, obj| {
5620            match name {
5621                "AvailabilityZone" => {
5622                    obj.availability_zone = Some(ZoneNameDeserializer::deserialize(
5623                        "AvailabilityZone",
5624                        stack,
5625                    )?);
5626                }
5627                "Id" => {
5628                    obj.id = TargetIdDeserializer::deserialize("Id", stack)?;
5629                }
5630                "Port" => {
5631                    obj.port = Some(PortDeserializer::deserialize("Port", stack)?);
5632                }
5633                _ => skip_tree(stack),
5634            }
5635            Ok(())
5636        })
5637    }
5638}
5639
5640/// Serialize `TargetDescription` contents to a `SignedRequest`.
5641struct TargetDescriptionSerializer;
5642impl TargetDescriptionSerializer {
5643    fn serialize(params: &mut Params, name: &str, obj: &TargetDescription) {
5644        let mut prefix = name.to_string();
5645        if prefix != "" {
5646            prefix.push_str(".");
5647        }
5648
5649        if let Some(ref field_value) = obj.availability_zone {
5650            params.put(&format!("{}{}", prefix, "AvailabilityZone"), &field_value);
5651        }
5652        params.put(&format!("{}{}", prefix, "Id"), &obj.id);
5653        if let Some(ref field_value) = obj.port {
5654            params.put(&format!("{}{}", prefix, "Port"), &field_value);
5655        }
5656    }
5657}
5658
5659/// Serialize `TargetDescriptions` contents to a `SignedRequest`.
5660struct TargetDescriptionsSerializer;
5661impl TargetDescriptionsSerializer {
5662    fn serialize(params: &mut Params, name: &str, obj: &Vec<TargetDescription>) {
5663        for (index, obj) in obj.iter().enumerate() {
5664            let key = format!("{}.member.{}", name, index + 1);
5665            TargetDescriptionSerializer::serialize(params, &key, obj);
5666        }
5667    }
5668}
5669
5670/// <p>Information about a target group.</p>
5671#[derive(Clone, Debug, Default, PartialEq)]
5672#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5673pub struct TargetGroup {
5674    /// <p>Indicates whether health checks are enabled.</p>
5675    pub health_check_enabled: Option<bool>,
5676    /// <p>The approximate amount of time, in seconds, between health checks of an individual target.</p>
5677    pub health_check_interval_seconds: Option<i64>,
5678    /// <p>The destination for the health check request.</p>
5679    pub health_check_path: Option<String>,
5680    /// <p>The port to use to connect with the target.</p>
5681    pub health_check_port: Option<String>,
5682    /// <p>The protocol to use to connect with the target.</p>
5683    pub health_check_protocol: Option<String>,
5684    /// <p>The amount of time, in seconds, during which no response means a failed health check.</p>
5685    pub health_check_timeout_seconds: Option<i64>,
5686    /// <p>The number of consecutive health checks successes required before considering an unhealthy target healthy.</p>
5687    pub healthy_threshold_count: Option<i64>,
5688    /// <p>The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group.</p>
5689    pub load_balancer_arns: Option<Vec<String>>,
5690    /// <p>The HTTP codes to use when checking for a successful response from a target.</p>
5691    pub matcher: Option<Matcher>,
5692    /// <p>The port on which the targets are listening. Not used if the target is a Lambda function.</p>
5693    pub port: Option<i64>,
5694    /// <p>The protocol to use for routing traffic to the targets.</p>
5695    pub protocol: Option<String>,
5696    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
5697    pub target_group_arn: Option<String>,
5698    /// <p>The name of the target group.</p>
5699    pub target_group_name: Option<String>,
5700    /// <p>The type of target that you must specify when registering targets with this target group. The possible values are <code>instance</code> (targets are specified by instance ID) or <code>ip</code> (targets are specified by IP address).</p>
5701    pub target_type: Option<String>,
5702    /// <p>The number of consecutive health check failures required before considering the target unhealthy.</p>
5703    pub unhealthy_threshold_count: Option<i64>,
5704    /// <p>The ID of the VPC for the targets.</p>
5705    pub vpc_id: Option<String>,
5706}
5707
5708#[allow(dead_code)]
5709struct TargetGroupDeserializer;
5710impl TargetGroupDeserializer {
5711    #[allow(dead_code, unused_variables)]
5712    fn deserialize<T: Peek + Next>(
5713        tag_name: &str,
5714        stack: &mut T,
5715    ) -> Result<TargetGroup, XmlParseError> {
5716        deserialize_elements::<_, TargetGroup, _>(tag_name, stack, |name, stack, obj| {
5717            match name {
5718                "HealthCheckEnabled" => {
5719                    obj.health_check_enabled = Some(HealthCheckEnabledDeserializer::deserialize(
5720                        "HealthCheckEnabled",
5721                        stack,
5722                    )?);
5723                }
5724                "HealthCheckIntervalSeconds" => {
5725                    obj.health_check_interval_seconds =
5726                        Some(HealthCheckIntervalSecondsDeserializer::deserialize(
5727                            "HealthCheckIntervalSeconds",
5728                            stack,
5729                        )?);
5730                }
5731                "HealthCheckPath" => {
5732                    obj.health_check_path =
5733                        Some(PathDeserializer::deserialize("HealthCheckPath", stack)?);
5734                }
5735                "HealthCheckPort" => {
5736                    obj.health_check_port = Some(HealthCheckPortDeserializer::deserialize(
5737                        "HealthCheckPort",
5738                        stack,
5739                    )?);
5740                }
5741                "HealthCheckProtocol" => {
5742                    obj.health_check_protocol = Some(ProtocolEnumDeserializer::deserialize(
5743                        "HealthCheckProtocol",
5744                        stack,
5745                    )?);
5746                }
5747                "HealthCheckTimeoutSeconds" => {
5748                    obj.health_check_timeout_seconds =
5749                        Some(HealthCheckTimeoutSecondsDeserializer::deserialize(
5750                            "HealthCheckTimeoutSeconds",
5751                            stack,
5752                        )?);
5753                }
5754                "HealthyThresholdCount" => {
5755                    obj.healthy_threshold_count =
5756                        Some(HealthCheckThresholdCountDeserializer::deserialize(
5757                            "HealthyThresholdCount",
5758                            stack,
5759                        )?);
5760                }
5761                "LoadBalancerArns" => {
5762                    obj.load_balancer_arns.get_or_insert(vec![]).extend(
5763                        LoadBalancerArnsDeserializer::deserialize("LoadBalancerArns", stack)?,
5764                    );
5765                }
5766                "Matcher" => {
5767                    obj.matcher = Some(MatcherDeserializer::deserialize("Matcher", stack)?);
5768                }
5769                "Port" => {
5770                    obj.port = Some(PortDeserializer::deserialize("Port", stack)?);
5771                }
5772                "Protocol" => {
5773                    obj.protocol = Some(ProtocolEnumDeserializer::deserialize("Protocol", stack)?);
5774                }
5775                "TargetGroupArn" => {
5776                    obj.target_group_arn = Some(TargetGroupArnDeserializer::deserialize(
5777                        "TargetGroupArn",
5778                        stack,
5779                    )?);
5780                }
5781                "TargetGroupName" => {
5782                    obj.target_group_name = Some(TargetGroupNameDeserializer::deserialize(
5783                        "TargetGroupName",
5784                        stack,
5785                    )?);
5786                }
5787                "TargetType" => {
5788                    obj.target_type = Some(TargetTypeEnumDeserializer::deserialize(
5789                        "TargetType",
5790                        stack,
5791                    )?);
5792                }
5793                "UnhealthyThresholdCount" => {
5794                    obj.unhealthy_threshold_count =
5795                        Some(HealthCheckThresholdCountDeserializer::deserialize(
5796                            "UnhealthyThresholdCount",
5797                            stack,
5798                        )?);
5799                }
5800                "VpcId" => {
5801                    obj.vpc_id = Some(VpcIdDeserializer::deserialize("VpcId", stack)?);
5802                }
5803                _ => skip_tree(stack),
5804            }
5805            Ok(())
5806        })
5807    }
5808}
5809#[allow(dead_code)]
5810struct TargetGroupArnDeserializer;
5811impl TargetGroupArnDeserializer {
5812    #[allow(dead_code, unused_variables)]
5813    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5814        xml_util::deserialize_primitive(tag_name, stack, Ok)
5815    }
5816}
5817
5818/// Serialize `TargetGroupArns` contents to a `SignedRequest`.
5819struct TargetGroupArnsSerializer;
5820impl TargetGroupArnsSerializer {
5821    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
5822        for (index, obj) in obj.iter().enumerate() {
5823            let key = format!("{}.member.{}", name, index + 1);
5824            params.put(&key, &obj);
5825        }
5826    }
5827}
5828
5829/// <p>Information about a target group attribute.</p>
5830#[derive(Clone, Debug, Default, PartialEq)]
5831#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5832#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5833pub struct TargetGroupAttribute {
5834    /// <p><p>The name of the attribute.</p> <p>The following attributes are supported by both Application Load Balancers and Network Load Balancers:</p> <ul> <li> <p> <code>deregistration<em>delay.timeout</em>seconds</code> - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from <code>draining</code> to <code>unused</code>. The range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is not supported.</p> </li> <li> <p> <code>stickiness.enabled</code> - Indicates whether sticky sessions are enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> <li> <p> <code>stickiness.type</code> - The type of sticky sessions. The possible values are <code>lb<em>cookie</code> for Application Load Balancers or <code>source</em>ip</code> for Network Load Balancers.</p> </li> </ul> <p>The following attributes are supported only if the load balancer is an Application Load Balancer and the target is an instance or an IP address:</p> <ul> <li> <p> <code>load<em>balancing.algorithm.type</code> - The load balancing algorithm determines how the load balancer selects targets when routing requests. The value is <code>round</em>robin</code> or <code>least<em>outstanding</em>requests</code>. The default is <code>round<em>robin</code>.</p> </li> <li> <p> <code>slow</em>start.duration<em>seconds</code> - The time period, in seconds, during which a newly registered target receives an increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). Slow start mode is disabled by default.</p> </li> <li> <p> <code>stickiness.lb</em>cookie.duration<em>seconds</code> - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).</p> </li> </ul> <p>The following attribute is supported only if the load balancer is an Application Load Balancer and the target is a Lambda function:</p> <ul> <li> <p> <code>lambda.multi</em>value<em>headers.enabled</code> - Indicates whether the request and response headers that are exchanged between the load balancer and the Lambda function include arrays of values or strings. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>. If the value is <code>false</code> and the request contains a duplicate header field name or query parameter key, the load balancer uses the last value sent by the client.</p> </li> </ul> <p>The following attribute is supported only by Network Load Balancers:</p> <ul> <li> <p> <code>proxy</em>protocol_v2.enabled</code> - Indicates whether Proxy Protocol version 2 is enabled. The value is <code>true</code> or <code>false</code>. The default is <code>false</code>.</p> </li> </ul></p>
5835    pub key: Option<String>,
5836    /// <p>The value of the attribute.</p>
5837    pub value: Option<String>,
5838}
5839
5840#[allow(dead_code)]
5841struct TargetGroupAttributeDeserializer;
5842impl TargetGroupAttributeDeserializer {
5843    #[allow(dead_code, unused_variables)]
5844    fn deserialize<T: Peek + Next>(
5845        tag_name: &str,
5846        stack: &mut T,
5847    ) -> Result<TargetGroupAttribute, XmlParseError> {
5848        deserialize_elements::<_, TargetGroupAttribute, _>(tag_name, stack, |name, stack, obj| {
5849            match name {
5850                "Key" => {
5851                    obj.key = Some(TargetGroupAttributeKeyDeserializer::deserialize(
5852                        "Key", stack,
5853                    )?);
5854                }
5855                "Value" => {
5856                    obj.value = Some(TargetGroupAttributeValueDeserializer::deserialize(
5857                        "Value", stack,
5858                    )?);
5859                }
5860                _ => skip_tree(stack),
5861            }
5862            Ok(())
5863        })
5864    }
5865}
5866
5867/// Serialize `TargetGroupAttribute` contents to a `SignedRequest`.
5868struct TargetGroupAttributeSerializer;
5869impl TargetGroupAttributeSerializer {
5870    fn serialize(params: &mut Params, name: &str, obj: &TargetGroupAttribute) {
5871        let mut prefix = name.to_string();
5872        if prefix != "" {
5873            prefix.push_str(".");
5874        }
5875
5876        if let Some(ref field_value) = obj.key {
5877            params.put(&format!("{}{}", prefix, "Key"), &field_value);
5878        }
5879        if let Some(ref field_value) = obj.value {
5880            params.put(&format!("{}{}", prefix, "Value"), &field_value);
5881        }
5882    }
5883}
5884
5885#[allow(dead_code)]
5886struct TargetGroupAttributeKeyDeserializer;
5887impl TargetGroupAttributeKeyDeserializer {
5888    #[allow(dead_code, unused_variables)]
5889    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5890        xml_util::deserialize_primitive(tag_name, stack, Ok)
5891    }
5892}
5893#[allow(dead_code)]
5894struct TargetGroupAttributeValueDeserializer;
5895impl TargetGroupAttributeValueDeserializer {
5896    #[allow(dead_code, unused_variables)]
5897    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5898        xml_util::deserialize_primitive(tag_name, stack, Ok)
5899    }
5900}
5901#[allow(dead_code)]
5902struct TargetGroupAttributesDeserializer;
5903impl TargetGroupAttributesDeserializer {
5904    #[allow(dead_code, unused_variables)]
5905    fn deserialize<T: Peek + Next>(
5906        tag_name: &str,
5907        stack: &mut T,
5908    ) -> Result<Vec<TargetGroupAttribute>, XmlParseError> {
5909        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5910            if name == "member" {
5911                obj.push(TargetGroupAttributeDeserializer::deserialize(
5912                    "member", stack,
5913                )?);
5914            } else {
5915                skip_tree(stack);
5916            }
5917            Ok(())
5918        })
5919    }
5920}
5921
5922/// Serialize `TargetGroupAttributes` contents to a `SignedRequest`.
5923struct TargetGroupAttributesSerializer;
5924impl TargetGroupAttributesSerializer {
5925    fn serialize(params: &mut Params, name: &str, obj: &Vec<TargetGroupAttribute>) {
5926        for (index, obj) in obj.iter().enumerate() {
5927            let key = format!("{}.member.{}", name, index + 1);
5928            TargetGroupAttributeSerializer::serialize(params, &key, obj);
5929        }
5930    }
5931}
5932
5933#[allow(dead_code)]
5934struct TargetGroupListDeserializer;
5935impl TargetGroupListDeserializer {
5936    #[allow(dead_code, unused_variables)]
5937    fn deserialize<T: Peek + Next>(
5938        tag_name: &str,
5939        stack: &mut T,
5940    ) -> Result<Vec<TargetGroupTuple>, XmlParseError> {
5941        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5942            if name == "member" {
5943                obj.push(TargetGroupTupleDeserializer::deserialize("member", stack)?);
5944            } else {
5945                skip_tree(stack);
5946            }
5947            Ok(())
5948        })
5949    }
5950}
5951
5952/// Serialize `TargetGroupList` contents to a `SignedRequest`.
5953struct TargetGroupListSerializer;
5954impl TargetGroupListSerializer {
5955    fn serialize(params: &mut Params, name: &str, obj: &Vec<TargetGroupTuple>) {
5956        for (index, obj) in obj.iter().enumerate() {
5957            let key = format!("{}.member.{}", name, index + 1);
5958            TargetGroupTupleSerializer::serialize(params, &key, obj);
5959        }
5960    }
5961}
5962
5963#[allow(dead_code)]
5964struct TargetGroupNameDeserializer;
5965impl TargetGroupNameDeserializer {
5966    #[allow(dead_code, unused_variables)]
5967    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5968        xml_util::deserialize_primitive(tag_name, stack, Ok)
5969    }
5970}
5971
5972/// Serialize `TargetGroupNames` contents to a `SignedRequest`.
5973struct TargetGroupNamesSerializer;
5974impl TargetGroupNamesSerializer {
5975    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
5976        for (index, obj) in obj.iter().enumerate() {
5977            let key = format!("{}.member.{}", name, index + 1);
5978            params.put(&key, &obj);
5979        }
5980    }
5981}
5982
5983/// <p>Information about the target group stickiness for a rule.</p>
5984#[derive(Clone, Debug, Default, PartialEq)]
5985#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5986#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5987pub struct TargetGroupStickinessConfig {
5988    /// <p>The time period, in seconds, during which requests from a client should be routed to the same target group. The range is 1-604800 seconds (7 days).</p>
5989    pub duration_seconds: Option<i64>,
5990    /// <p>Indicates whether target group stickiness is enabled.</p>
5991    pub enabled: Option<bool>,
5992}
5993
5994#[allow(dead_code)]
5995struct TargetGroupStickinessConfigDeserializer;
5996impl TargetGroupStickinessConfigDeserializer {
5997    #[allow(dead_code, unused_variables)]
5998    fn deserialize<T: Peek + Next>(
5999        tag_name: &str,
6000        stack: &mut T,
6001    ) -> Result<TargetGroupStickinessConfig, XmlParseError> {
6002        deserialize_elements::<_, TargetGroupStickinessConfig, _>(
6003            tag_name,
6004            stack,
6005            |name, stack, obj| {
6006                match name {
6007                    "DurationSeconds" => {
6008                        obj.duration_seconds = Some(
6009                            TargetGroupStickinessDurationSecondsDeserializer::deserialize(
6010                                "DurationSeconds",
6011                                stack,
6012                            )?,
6013                        );
6014                    }
6015                    "Enabled" => {
6016                        obj.enabled = Some(TargetGroupStickinessEnabledDeserializer::deserialize(
6017                            "Enabled", stack,
6018                        )?);
6019                    }
6020                    _ => skip_tree(stack),
6021                }
6022                Ok(())
6023            },
6024        )
6025    }
6026}
6027
6028/// Serialize `TargetGroupStickinessConfig` contents to a `SignedRequest`.
6029struct TargetGroupStickinessConfigSerializer;
6030impl TargetGroupStickinessConfigSerializer {
6031    fn serialize(params: &mut Params, name: &str, obj: &TargetGroupStickinessConfig) {
6032        let mut prefix = name.to_string();
6033        if prefix != "" {
6034            prefix.push_str(".");
6035        }
6036
6037        if let Some(ref field_value) = obj.duration_seconds {
6038            params.put(&format!("{}{}", prefix, "DurationSeconds"), &field_value);
6039        }
6040        if let Some(ref field_value) = obj.enabled {
6041            params.put(&format!("{}{}", prefix, "Enabled"), &field_value);
6042        }
6043    }
6044}
6045
6046#[allow(dead_code)]
6047struct TargetGroupStickinessDurationSecondsDeserializer;
6048impl TargetGroupStickinessDurationSecondsDeserializer {
6049    #[allow(dead_code, unused_variables)]
6050    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
6051        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
6052    }
6053}
6054#[allow(dead_code)]
6055struct TargetGroupStickinessEnabledDeserializer;
6056impl TargetGroupStickinessEnabledDeserializer {
6057    #[allow(dead_code, unused_variables)]
6058    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
6059        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
6060    }
6061}
6062/// <p>Information about how traffic will be distributed between multiple target groups in a forward rule.</p>
6063#[derive(Clone, Debug, Default, PartialEq)]
6064#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6065#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6066pub struct TargetGroupTuple {
6067    /// <p>The Amazon Resource Name (ARN) of the target group.</p>
6068    pub target_group_arn: Option<String>,
6069    /// <p>The weight. The range is 0 to 999.</p>
6070    pub weight: Option<i64>,
6071}
6072
6073#[allow(dead_code)]
6074struct TargetGroupTupleDeserializer;
6075impl TargetGroupTupleDeserializer {
6076    #[allow(dead_code, unused_variables)]
6077    fn deserialize<T: Peek + Next>(
6078        tag_name: &str,
6079        stack: &mut T,
6080    ) -> Result<TargetGroupTuple, XmlParseError> {
6081        deserialize_elements::<_, TargetGroupTuple, _>(tag_name, stack, |name, stack, obj| {
6082            match name {
6083                "TargetGroupArn" => {
6084                    obj.target_group_arn = Some(TargetGroupArnDeserializer::deserialize(
6085                        "TargetGroupArn",
6086                        stack,
6087                    )?);
6088                }
6089                "Weight" => {
6090                    obj.weight = Some(TargetGroupWeightDeserializer::deserialize("Weight", stack)?);
6091                }
6092                _ => skip_tree(stack),
6093            }
6094            Ok(())
6095        })
6096    }
6097}
6098
6099/// Serialize `TargetGroupTuple` contents to a `SignedRequest`.
6100struct TargetGroupTupleSerializer;
6101impl TargetGroupTupleSerializer {
6102    fn serialize(params: &mut Params, name: &str, obj: &TargetGroupTuple) {
6103        let mut prefix = name.to_string();
6104        if prefix != "" {
6105            prefix.push_str(".");
6106        }
6107
6108        if let Some(ref field_value) = obj.target_group_arn {
6109            params.put(&format!("{}{}", prefix, "TargetGroupArn"), &field_value);
6110        }
6111        if let Some(ref field_value) = obj.weight {
6112            params.put(&format!("{}{}", prefix, "Weight"), &field_value);
6113        }
6114    }
6115}
6116
6117#[allow(dead_code)]
6118struct TargetGroupWeightDeserializer;
6119impl TargetGroupWeightDeserializer {
6120    #[allow(dead_code, unused_variables)]
6121    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
6122        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
6123    }
6124}
6125#[allow(dead_code)]
6126struct TargetGroupsDeserializer;
6127impl TargetGroupsDeserializer {
6128    #[allow(dead_code, unused_variables)]
6129    fn deserialize<T: Peek + Next>(
6130        tag_name: &str,
6131        stack: &mut T,
6132    ) -> Result<Vec<TargetGroup>, XmlParseError> {
6133        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6134            if name == "member" {
6135                obj.push(TargetGroupDeserializer::deserialize("member", stack)?);
6136            } else {
6137                skip_tree(stack);
6138            }
6139            Ok(())
6140        })
6141    }
6142}
6143/// <p>Information about the current health of a target.</p>
6144#[derive(Clone, Debug, Default, PartialEq)]
6145#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6146pub struct TargetHealth {
6147    /// <p>A description of the target health that provides additional details. If the state is <code>healthy</code>, a description is not provided.</p>
6148    pub description: Option<String>,
6149    /// <p><p>The reason code.</p> <p>If the target state is <code>healthy</code>, a reason code is not provided.</p> <p>If the target state is <code>initial</code>, the reason code can be one of the following values:</p> <ul> <li> <p> <code>Elb.RegistrationInProgress</code> - The target is in the process of being registered with the load balancer.</p> </li> <li> <p> <code>Elb.InitialHealthChecking</code> - The load balancer is still sending the target the minimum number of health checks required to determine its health status.</p> </li> </ul> <p>If the target state is <code>unhealthy</code>, the reason code can be one of the following values:</p> <ul> <li> <p> <code>Target.ResponseCodeMismatch</code> - The health checks did not return an expected HTTP code. Applies only to Application Load Balancers.</p> </li> <li> <p> <code>Target.Timeout</code> - The health check requests timed out. Applies only to Application Load Balancers.</p> </li> <li> <p> <code>Target.FailedHealthChecks</code> - The load balancer received an error while establishing a connection to the target or the target response was malformed.</p> </li> <li> <p> <code>Elb.InternalError</code> - The health checks failed due to an internal error. Applies only to Application Load Balancers.</p> </li> </ul> <p>If the target state is <code>unused</code>, the reason code can be one of the following values:</p> <ul> <li> <p> <code>Target.NotRegistered</code> - The target is not registered with the target group.</p> </li> <li> <p> <code>Target.NotInUse</code> - The target group is not used by any load balancer or the target is in an Availability Zone that is not enabled for its load balancer.</p> </li> <li> <p> <code>Target.InvalidState</code> - The target is in the stopped or terminated state.</p> </li> <li> <p> <code>Target.IpUnusable</code> - The target IP address is reserved for use by a load balancer.</p> </li> </ul> <p>If the target state is <code>draining</code>, the reason code can be the following value:</p> <ul> <li> <p> <code>Target.DeregistrationInProgress</code> - The target is in the process of being deregistered and the deregistration delay period has not expired.</p> </li> </ul> <p>If the target state is <code>unavailable</code>, the reason code can be the following value:</p> <ul> <li> <p> <code>Target.HealthCheckDisabled</code> - Health checks are disabled for the target group. Applies only to Application Load Balancers.</p> </li> <li> <p> <code>Elb.InternalError</code> - Target health is unavailable due to an internal error. Applies only to Network Load Balancers.</p> </li> </ul></p>
6150    pub reason: Option<String>,
6151    /// <p>The state of the target.</p>
6152    pub state: Option<String>,
6153}
6154
6155#[allow(dead_code)]
6156struct TargetHealthDeserializer;
6157impl TargetHealthDeserializer {
6158    #[allow(dead_code, unused_variables)]
6159    fn deserialize<T: Peek + Next>(
6160        tag_name: &str,
6161        stack: &mut T,
6162    ) -> Result<TargetHealth, XmlParseError> {
6163        deserialize_elements::<_, TargetHealth, _>(tag_name, stack, |name, stack, obj| {
6164            match name {
6165                "Description" => {
6166                    obj.description =
6167                        Some(DescriptionDeserializer::deserialize("Description", stack)?);
6168                }
6169                "Reason" => {
6170                    obj.reason = Some(TargetHealthReasonEnumDeserializer::deserialize(
6171                        "Reason", stack,
6172                    )?);
6173                }
6174                "State" => {
6175                    obj.state = Some(TargetHealthStateEnumDeserializer::deserialize(
6176                        "State", stack,
6177                    )?);
6178                }
6179                _ => skip_tree(stack),
6180            }
6181            Ok(())
6182        })
6183    }
6184}
6185/// <p>Information about the health of a target.</p>
6186#[derive(Clone, Debug, Default, PartialEq)]
6187#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6188pub struct TargetHealthDescription {
6189    /// <p>The port to use to connect with the target.</p>
6190    pub health_check_port: Option<String>,
6191    /// <p>The description of the target.</p>
6192    pub target: Option<TargetDescription>,
6193    /// <p>The health information for the target.</p>
6194    pub target_health: Option<TargetHealth>,
6195}
6196
6197#[allow(dead_code)]
6198struct TargetHealthDescriptionDeserializer;
6199impl TargetHealthDescriptionDeserializer {
6200    #[allow(dead_code, unused_variables)]
6201    fn deserialize<T: Peek + Next>(
6202        tag_name: &str,
6203        stack: &mut T,
6204    ) -> Result<TargetHealthDescription, XmlParseError> {
6205        deserialize_elements::<_, TargetHealthDescription, _>(
6206            tag_name,
6207            stack,
6208            |name, stack, obj| {
6209                match name {
6210                    "HealthCheckPort" => {
6211                        obj.health_check_port = Some(HealthCheckPortDeserializer::deserialize(
6212                            "HealthCheckPort",
6213                            stack,
6214                        )?);
6215                    }
6216                    "Target" => {
6217                        obj.target =
6218                            Some(TargetDescriptionDeserializer::deserialize("Target", stack)?);
6219                    }
6220                    "TargetHealth" => {
6221                        obj.target_health = Some(TargetHealthDeserializer::deserialize(
6222                            "TargetHealth",
6223                            stack,
6224                        )?);
6225                    }
6226                    _ => skip_tree(stack),
6227                }
6228                Ok(())
6229            },
6230        )
6231    }
6232}
6233#[allow(dead_code)]
6234struct TargetHealthDescriptionsDeserializer;
6235impl TargetHealthDescriptionsDeserializer {
6236    #[allow(dead_code, unused_variables)]
6237    fn deserialize<T: Peek + Next>(
6238        tag_name: &str,
6239        stack: &mut T,
6240    ) -> Result<Vec<TargetHealthDescription>, XmlParseError> {
6241        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6242            if name == "member" {
6243                obj.push(TargetHealthDescriptionDeserializer::deserialize(
6244                    "member", stack,
6245                )?);
6246            } else {
6247                skip_tree(stack);
6248            }
6249            Ok(())
6250        })
6251    }
6252}
6253#[allow(dead_code)]
6254struct TargetHealthReasonEnumDeserializer;
6255impl TargetHealthReasonEnumDeserializer {
6256    #[allow(dead_code, unused_variables)]
6257    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6258        xml_util::deserialize_primitive(tag_name, stack, Ok)
6259    }
6260}
6261#[allow(dead_code)]
6262struct TargetHealthStateEnumDeserializer;
6263impl TargetHealthStateEnumDeserializer {
6264    #[allow(dead_code, unused_variables)]
6265    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6266        xml_util::deserialize_primitive(tag_name, stack, Ok)
6267    }
6268}
6269#[allow(dead_code)]
6270struct TargetIdDeserializer;
6271impl TargetIdDeserializer {
6272    #[allow(dead_code, unused_variables)]
6273    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6274        xml_util::deserialize_primitive(tag_name, stack, Ok)
6275    }
6276}
6277#[allow(dead_code)]
6278struct TargetTypeEnumDeserializer;
6279impl TargetTypeEnumDeserializer {
6280    #[allow(dead_code, unused_variables)]
6281    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6282        xml_util::deserialize_primitive(tag_name, stack, Ok)
6283    }
6284}
6285#[allow(dead_code)]
6286struct VpcIdDeserializer;
6287impl VpcIdDeserializer {
6288    #[allow(dead_code, unused_variables)]
6289    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6290        xml_util::deserialize_primitive(tag_name, stack, Ok)
6291    }
6292}
6293#[allow(dead_code)]
6294struct ZoneNameDeserializer;
6295impl ZoneNameDeserializer {
6296    #[allow(dead_code, unused_variables)]
6297    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6298        xml_util::deserialize_primitive(tag_name, stack, Ok)
6299    }
6300}
6301/// Errors returned by AddListenerCertificates
6302#[derive(Debug, PartialEq)]
6303pub enum AddListenerCertificatesError {
6304    /// <p>The specified certificate does not exist.</p>
6305    CertificateNotFound(String),
6306    /// <p>The specified listener does not exist.</p>
6307    ListenerNotFound(String),
6308    /// <p>You've reached the limit on the number of certificates per load balancer.</p>
6309    TooManyCertificates(String),
6310}
6311
6312impl AddListenerCertificatesError {
6313    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddListenerCertificatesError> {
6314        {
6315            let reader = EventReader::new(res.body.as_ref());
6316            let mut stack = XmlResponse::new(reader.into_iter().peekable());
6317            find_start_element(&mut stack);
6318            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
6319                match &parsed_error.code[..] {
6320                    "CertificateNotFound" => {
6321                        return RusotoError::Service(
6322                            AddListenerCertificatesError::CertificateNotFound(parsed_error.message),
6323                        )
6324                    }
6325                    "ListenerNotFound" => {
6326                        return RusotoError::Service(
6327                            AddListenerCertificatesError::ListenerNotFound(parsed_error.message),
6328                        )
6329                    }
6330                    "TooManyCertificates" => {
6331                        return RusotoError::Service(
6332                            AddListenerCertificatesError::TooManyCertificates(parsed_error.message),
6333                        )
6334                    }
6335                    _ => {}
6336                }
6337            }
6338        }
6339        RusotoError::Unknown(res)
6340    }
6341
6342    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
6343    where
6344        T: Peek + Next,
6345    {
6346        xml_util::start_element("ErrorResponse", stack)?;
6347        XmlErrorDeserializer::deserialize("Error", stack)
6348    }
6349}
6350impl fmt::Display for AddListenerCertificatesError {
6351    #[allow(unused_variables)]
6352    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6353        match *self {
6354            AddListenerCertificatesError::CertificateNotFound(ref cause) => write!(f, "{}", cause),
6355            AddListenerCertificatesError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
6356            AddListenerCertificatesError::TooManyCertificates(ref cause) => write!(f, "{}", cause),
6357        }
6358    }
6359}
6360impl Error for AddListenerCertificatesError {}
6361/// Errors returned by AddTags
6362#[derive(Debug, PartialEq)]
6363pub enum AddTagsError {
6364    /// <p>A tag key was specified more than once.</p>
6365    DuplicateTagKeys(String),
6366    /// <p>The specified load balancer does not exist.</p>
6367    LoadBalancerNotFound(String),
6368    /// <p>The specified target group does not exist.</p>
6369    TargetGroupNotFound(String),
6370    /// <p>You've reached the limit on the number of tags per load balancer.</p>
6371    TooManyTags(String),
6372}
6373
6374impl AddTagsError {
6375    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsError> {
6376        {
6377            let reader = EventReader::new(res.body.as_ref());
6378            let mut stack = XmlResponse::new(reader.into_iter().peekable());
6379            find_start_element(&mut stack);
6380            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
6381                match &parsed_error.code[..] {
6382                    "DuplicateTagKeys" => {
6383                        return RusotoError::Service(AddTagsError::DuplicateTagKeys(
6384                            parsed_error.message,
6385                        ))
6386                    }
6387                    "LoadBalancerNotFound" => {
6388                        return RusotoError::Service(AddTagsError::LoadBalancerNotFound(
6389                            parsed_error.message,
6390                        ))
6391                    }
6392                    "TargetGroupNotFound" => {
6393                        return RusotoError::Service(AddTagsError::TargetGroupNotFound(
6394                            parsed_error.message,
6395                        ))
6396                    }
6397                    "TooManyTags" => {
6398                        return RusotoError::Service(AddTagsError::TooManyTags(
6399                            parsed_error.message,
6400                        ))
6401                    }
6402                    _ => {}
6403                }
6404            }
6405        }
6406        RusotoError::Unknown(res)
6407    }
6408
6409    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
6410    where
6411        T: Peek + Next,
6412    {
6413        xml_util::start_element("ErrorResponse", stack)?;
6414        XmlErrorDeserializer::deserialize("Error", stack)
6415    }
6416}
6417impl fmt::Display for AddTagsError {
6418    #[allow(unused_variables)]
6419    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6420        match *self {
6421            AddTagsError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
6422            AddTagsError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
6423            AddTagsError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
6424            AddTagsError::TooManyTags(ref cause) => write!(f, "{}", cause),
6425        }
6426    }
6427}
6428impl Error for AddTagsError {}
6429/// Errors returned by CreateListener
6430#[derive(Debug, PartialEq)]
6431pub enum CreateListenerError {
6432    /// <p>The specified ALPN policy is not supported.</p>
6433    ALPNPolicyNotSupported(String),
6434    /// <p>The specified certificate does not exist.</p>
6435    CertificateNotFound(String),
6436    /// <p>A listener with the specified port already exists.</p>
6437    DuplicateListener(String),
6438    /// <p>The specified configuration is not valid with this protocol.</p>
6439    IncompatibleProtocols(String),
6440    /// <p>The requested configuration is not valid.</p>
6441    InvalidConfigurationRequest(String),
6442    /// <p>The requested action is not valid.</p>
6443    InvalidLoadBalancerAction(String),
6444    /// <p>The specified load balancer does not exist.</p>
6445    LoadBalancerNotFound(String),
6446    /// <p>The specified SSL policy does not exist.</p>
6447    SSLPolicyNotFound(String),
6448    /// <p>You've reached the limit on the number of load balancers per target group.</p>
6449    TargetGroupAssociationLimit(String),
6450    /// <p>The specified target group does not exist.</p>
6451    TargetGroupNotFound(String),
6452    /// <p>You've reached the limit on the number of actions per rule.</p>
6453    TooManyActions(String),
6454    /// <p>You've reached the limit on the number of certificates per load balancer.</p>
6455    TooManyCertificates(String),
6456    /// <p>You've reached the limit on the number of listeners per load balancer.</p>
6457    TooManyListeners(String),
6458    /// <p>You've reached the limit on the number of times a target can be registered with a load balancer.</p>
6459    TooManyRegistrationsForTargetId(String),
6460    /// <p>You've reached the limit on the number of targets.</p>
6461    TooManyTargets(String),
6462    /// <p>You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.</p>
6463    TooManyUniqueTargetGroupsPerLoadBalancer(String),
6464    /// <p>The specified protocol is not supported.</p>
6465    UnsupportedProtocol(String),
6466}
6467
6468impl CreateListenerError {
6469    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateListenerError> {
6470        {
6471            let reader = EventReader::new(res.body.as_ref());
6472            let mut stack = XmlResponse::new(reader.into_iter().peekable());
6473            find_start_element(&mut stack);
6474            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
6475                match &parsed_error.code[..] {
6476                    "ALPNPolicyNotFound" => {
6477                        return RusotoError::Service(CreateListenerError::ALPNPolicyNotSupported(
6478                            parsed_error.message,
6479                        ))
6480                    }
6481                    "CertificateNotFound" => {
6482                        return RusotoError::Service(CreateListenerError::CertificateNotFound(
6483                            parsed_error.message,
6484                        ))
6485                    }
6486                    "DuplicateListener" => {
6487                        return RusotoError::Service(CreateListenerError::DuplicateListener(
6488                            parsed_error.message,
6489                        ))
6490                    }
6491                    "IncompatibleProtocols" => {
6492                        return RusotoError::Service(CreateListenerError::IncompatibleProtocols(
6493                            parsed_error.message,
6494                        ))
6495                    }
6496                    "InvalidConfigurationRequest" => {
6497                        return RusotoError::Service(
6498                            CreateListenerError::InvalidConfigurationRequest(parsed_error.message),
6499                        )
6500                    }
6501                    "InvalidLoadBalancerAction" => {
6502                        return RusotoError::Service(
6503                            CreateListenerError::InvalidLoadBalancerAction(parsed_error.message),
6504                        )
6505                    }
6506                    "LoadBalancerNotFound" => {
6507                        return RusotoError::Service(CreateListenerError::LoadBalancerNotFound(
6508                            parsed_error.message,
6509                        ))
6510                    }
6511                    "SSLPolicyNotFound" => {
6512                        return RusotoError::Service(CreateListenerError::SSLPolicyNotFound(
6513                            parsed_error.message,
6514                        ))
6515                    }
6516                    "TargetGroupAssociationLimit" => {
6517                        return RusotoError::Service(
6518                            CreateListenerError::TargetGroupAssociationLimit(parsed_error.message),
6519                        )
6520                    }
6521                    "TargetGroupNotFound" => {
6522                        return RusotoError::Service(CreateListenerError::TargetGroupNotFound(
6523                            parsed_error.message,
6524                        ))
6525                    }
6526                    "TooManyActions" => {
6527                        return RusotoError::Service(CreateListenerError::TooManyActions(
6528                            parsed_error.message,
6529                        ))
6530                    }
6531                    "TooManyCertificates" => {
6532                        return RusotoError::Service(CreateListenerError::TooManyCertificates(
6533                            parsed_error.message,
6534                        ))
6535                    }
6536                    "TooManyListeners" => {
6537                        return RusotoError::Service(CreateListenerError::TooManyListeners(
6538                            parsed_error.message,
6539                        ))
6540                    }
6541                    "TooManyRegistrationsForTargetId" => {
6542                        return RusotoError::Service(
6543                            CreateListenerError::TooManyRegistrationsForTargetId(
6544                                parsed_error.message,
6545                            ),
6546                        )
6547                    }
6548                    "TooManyTargets" => {
6549                        return RusotoError::Service(CreateListenerError::TooManyTargets(
6550                            parsed_error.message,
6551                        ))
6552                    }
6553                    "TooManyUniqueTargetGroupsPerLoadBalancer" => {
6554                        return RusotoError::Service(
6555                            CreateListenerError::TooManyUniqueTargetGroupsPerLoadBalancer(
6556                                parsed_error.message,
6557                            ),
6558                        )
6559                    }
6560                    "UnsupportedProtocol" => {
6561                        return RusotoError::Service(CreateListenerError::UnsupportedProtocol(
6562                            parsed_error.message,
6563                        ))
6564                    }
6565                    _ => {}
6566                }
6567            }
6568        }
6569        RusotoError::Unknown(res)
6570    }
6571
6572    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
6573    where
6574        T: Peek + Next,
6575    {
6576        xml_util::start_element("ErrorResponse", stack)?;
6577        XmlErrorDeserializer::deserialize("Error", stack)
6578    }
6579}
6580impl fmt::Display for CreateListenerError {
6581    #[allow(unused_variables)]
6582    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6583        match *self {
6584            CreateListenerError::ALPNPolicyNotSupported(ref cause) => write!(f, "{}", cause),
6585            CreateListenerError::CertificateNotFound(ref cause) => write!(f, "{}", cause),
6586            CreateListenerError::DuplicateListener(ref cause) => write!(f, "{}", cause),
6587            CreateListenerError::IncompatibleProtocols(ref cause) => write!(f, "{}", cause),
6588            CreateListenerError::InvalidConfigurationRequest(ref cause) => write!(f, "{}", cause),
6589            CreateListenerError::InvalidLoadBalancerAction(ref cause) => write!(f, "{}", cause),
6590            CreateListenerError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
6591            CreateListenerError::SSLPolicyNotFound(ref cause) => write!(f, "{}", cause),
6592            CreateListenerError::TargetGroupAssociationLimit(ref cause) => write!(f, "{}", cause),
6593            CreateListenerError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
6594            CreateListenerError::TooManyActions(ref cause) => write!(f, "{}", cause),
6595            CreateListenerError::TooManyCertificates(ref cause) => write!(f, "{}", cause),
6596            CreateListenerError::TooManyListeners(ref cause) => write!(f, "{}", cause),
6597            CreateListenerError::TooManyRegistrationsForTargetId(ref cause) => {
6598                write!(f, "{}", cause)
6599            }
6600            CreateListenerError::TooManyTargets(ref cause) => write!(f, "{}", cause),
6601            CreateListenerError::TooManyUniqueTargetGroupsPerLoadBalancer(ref cause) => {
6602                write!(f, "{}", cause)
6603            }
6604            CreateListenerError::UnsupportedProtocol(ref cause) => write!(f, "{}", cause),
6605        }
6606    }
6607}
6608impl Error for CreateListenerError {}
6609/// Errors returned by CreateLoadBalancer
6610#[derive(Debug, PartialEq)]
6611pub enum CreateLoadBalancerError {
6612    /// <p>The specified allocation ID does not exist.</p>
6613    AllocationIdNotFound(String),
6614    /// <p>The specified Availability Zone is not supported.</p>
6615    AvailabilityZoneNotSupported(String),
6616    /// <p>A load balancer with the specified name already exists.</p>
6617    DuplicateLoadBalancerName(String),
6618    /// <p>A tag key was specified more than once.</p>
6619    DuplicateTagKeys(String),
6620    /// <p>The requested configuration is not valid.</p>
6621    InvalidConfigurationRequest(String),
6622    /// <p>The requested scheme is not valid.</p>
6623    InvalidScheme(String),
6624    /// <p>The specified security group does not exist.</p>
6625    InvalidSecurityGroup(String),
6626    /// <p>The specified subnet is out of available addresses.</p>
6627    InvalidSubnet(String),
6628    /// <p>This operation is not allowed.</p>
6629    OperationNotPermitted(String),
6630    /// <p>A specified resource is in use.</p>
6631    ResourceInUse(String),
6632    /// <p>The specified subnet does not exist.</p>
6633    SubnetNotFound(String),
6634    /// <p>You've reached the limit on the number of load balancers for your AWS account.</p>
6635    TooManyLoadBalancers(String),
6636    /// <p>You've reached the limit on the number of tags per load balancer.</p>
6637    TooManyTags(String),
6638}
6639
6640impl CreateLoadBalancerError {
6641    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLoadBalancerError> {
6642        {
6643            let reader = EventReader::new(res.body.as_ref());
6644            let mut stack = XmlResponse::new(reader.into_iter().peekable());
6645            find_start_element(&mut stack);
6646            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
6647                match &parsed_error.code[..] {
6648                    "AllocationIdNotFound" => {
6649                        return RusotoError::Service(CreateLoadBalancerError::AllocationIdNotFound(
6650                            parsed_error.message,
6651                        ))
6652                    }
6653                    "AvailabilityZoneNotSupported" => {
6654                        return RusotoError::Service(
6655                            CreateLoadBalancerError::AvailabilityZoneNotSupported(
6656                                parsed_error.message,
6657                            ),
6658                        )
6659                    }
6660                    "DuplicateLoadBalancerName" => {
6661                        return RusotoError::Service(
6662                            CreateLoadBalancerError::DuplicateLoadBalancerName(
6663                                parsed_error.message,
6664                            ),
6665                        )
6666                    }
6667                    "DuplicateTagKeys" => {
6668                        return RusotoError::Service(CreateLoadBalancerError::DuplicateTagKeys(
6669                            parsed_error.message,
6670                        ))
6671                    }
6672                    "InvalidConfigurationRequest" => {
6673                        return RusotoError::Service(
6674                            CreateLoadBalancerError::InvalidConfigurationRequest(
6675                                parsed_error.message,
6676                            ),
6677                        )
6678                    }
6679                    "InvalidScheme" => {
6680                        return RusotoError::Service(CreateLoadBalancerError::InvalidScheme(
6681                            parsed_error.message,
6682                        ))
6683                    }
6684                    "InvalidSecurityGroup" => {
6685                        return RusotoError::Service(CreateLoadBalancerError::InvalidSecurityGroup(
6686                            parsed_error.message,
6687                        ))
6688                    }
6689                    "InvalidSubnet" => {
6690                        return RusotoError::Service(CreateLoadBalancerError::InvalidSubnet(
6691                            parsed_error.message,
6692                        ))
6693                    }
6694                    "OperationNotPermitted" => {
6695                        return RusotoError::Service(
6696                            CreateLoadBalancerError::OperationNotPermitted(parsed_error.message),
6697                        )
6698                    }
6699                    "ResourceInUse" => {
6700                        return RusotoError::Service(CreateLoadBalancerError::ResourceInUse(
6701                            parsed_error.message,
6702                        ))
6703                    }
6704                    "SubnetNotFound" => {
6705                        return RusotoError::Service(CreateLoadBalancerError::SubnetNotFound(
6706                            parsed_error.message,
6707                        ))
6708                    }
6709                    "TooManyLoadBalancers" => {
6710                        return RusotoError::Service(CreateLoadBalancerError::TooManyLoadBalancers(
6711                            parsed_error.message,
6712                        ))
6713                    }
6714                    "TooManyTags" => {
6715                        return RusotoError::Service(CreateLoadBalancerError::TooManyTags(
6716                            parsed_error.message,
6717                        ))
6718                    }
6719                    _ => {}
6720                }
6721            }
6722        }
6723        RusotoError::Unknown(res)
6724    }
6725
6726    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
6727    where
6728        T: Peek + Next,
6729    {
6730        xml_util::start_element("ErrorResponse", stack)?;
6731        XmlErrorDeserializer::deserialize("Error", stack)
6732    }
6733}
6734impl fmt::Display for CreateLoadBalancerError {
6735    #[allow(unused_variables)]
6736    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6737        match *self {
6738            CreateLoadBalancerError::AllocationIdNotFound(ref cause) => write!(f, "{}", cause),
6739            CreateLoadBalancerError::AvailabilityZoneNotSupported(ref cause) => {
6740                write!(f, "{}", cause)
6741            }
6742            CreateLoadBalancerError::DuplicateLoadBalancerName(ref cause) => write!(f, "{}", cause),
6743            CreateLoadBalancerError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
6744            CreateLoadBalancerError::InvalidConfigurationRequest(ref cause) => {
6745                write!(f, "{}", cause)
6746            }
6747            CreateLoadBalancerError::InvalidScheme(ref cause) => write!(f, "{}", cause),
6748            CreateLoadBalancerError::InvalidSecurityGroup(ref cause) => write!(f, "{}", cause),
6749            CreateLoadBalancerError::InvalidSubnet(ref cause) => write!(f, "{}", cause),
6750            CreateLoadBalancerError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
6751            CreateLoadBalancerError::ResourceInUse(ref cause) => write!(f, "{}", cause),
6752            CreateLoadBalancerError::SubnetNotFound(ref cause) => write!(f, "{}", cause),
6753            CreateLoadBalancerError::TooManyLoadBalancers(ref cause) => write!(f, "{}", cause),
6754            CreateLoadBalancerError::TooManyTags(ref cause) => write!(f, "{}", cause),
6755        }
6756    }
6757}
6758impl Error for CreateLoadBalancerError {}
6759/// Errors returned by CreateRule
6760#[derive(Debug, PartialEq)]
6761pub enum CreateRuleError {
6762    /// <p>The specified configuration is not valid with this protocol.</p>
6763    IncompatibleProtocols(String),
6764    /// <p>The requested configuration is not valid.</p>
6765    InvalidConfigurationRequest(String),
6766    /// <p>The requested action is not valid.</p>
6767    InvalidLoadBalancerAction(String),
6768    /// <p>The specified listener does not exist.</p>
6769    ListenerNotFound(String),
6770    /// <p>The specified priority is in use.</p>
6771    PriorityInUse(String),
6772    /// <p>You've reached the limit on the number of load balancers per target group.</p>
6773    TargetGroupAssociationLimit(String),
6774    /// <p>The specified target group does not exist.</p>
6775    TargetGroupNotFound(String),
6776    /// <p>You've reached the limit on the number of actions per rule.</p>
6777    TooManyActions(String),
6778    /// <p>You've reached the limit on the number of times a target can be registered with a load balancer.</p>
6779    TooManyRegistrationsForTargetId(String),
6780    /// <p>You've reached the limit on the number of rules per load balancer.</p>
6781    TooManyRules(String),
6782    /// <p>You've reached the limit on the number of target groups for your AWS account.</p>
6783    TooManyTargetGroups(String),
6784    /// <p>You've reached the limit on the number of targets.</p>
6785    TooManyTargets(String),
6786    /// <p>You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.</p>
6787    TooManyUniqueTargetGroupsPerLoadBalancer(String),
6788    /// <p>The specified protocol is not supported.</p>
6789    UnsupportedProtocol(String),
6790}
6791
6792impl CreateRuleError {
6793    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRuleError> {
6794        {
6795            let reader = EventReader::new(res.body.as_ref());
6796            let mut stack = XmlResponse::new(reader.into_iter().peekable());
6797            find_start_element(&mut stack);
6798            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
6799                match &parsed_error.code[..] {
6800                    "IncompatibleProtocols" => {
6801                        return RusotoError::Service(CreateRuleError::IncompatibleProtocols(
6802                            parsed_error.message,
6803                        ))
6804                    }
6805                    "InvalidConfigurationRequest" => {
6806                        return RusotoError::Service(CreateRuleError::InvalidConfigurationRequest(
6807                            parsed_error.message,
6808                        ))
6809                    }
6810                    "InvalidLoadBalancerAction" => {
6811                        return RusotoError::Service(CreateRuleError::InvalidLoadBalancerAction(
6812                            parsed_error.message,
6813                        ))
6814                    }
6815                    "ListenerNotFound" => {
6816                        return RusotoError::Service(CreateRuleError::ListenerNotFound(
6817                            parsed_error.message,
6818                        ))
6819                    }
6820                    "PriorityInUse" => {
6821                        return RusotoError::Service(CreateRuleError::PriorityInUse(
6822                            parsed_error.message,
6823                        ))
6824                    }
6825                    "TargetGroupAssociationLimit" => {
6826                        return RusotoError::Service(CreateRuleError::TargetGroupAssociationLimit(
6827                            parsed_error.message,
6828                        ))
6829                    }
6830                    "TargetGroupNotFound" => {
6831                        return RusotoError::Service(CreateRuleError::TargetGroupNotFound(
6832                            parsed_error.message,
6833                        ))
6834                    }
6835                    "TooManyActions" => {
6836                        return RusotoError::Service(CreateRuleError::TooManyActions(
6837                            parsed_error.message,
6838                        ))
6839                    }
6840                    "TooManyRegistrationsForTargetId" => {
6841                        return RusotoError::Service(
6842                            CreateRuleError::TooManyRegistrationsForTargetId(parsed_error.message),
6843                        )
6844                    }
6845                    "TooManyRules" => {
6846                        return RusotoError::Service(CreateRuleError::TooManyRules(
6847                            parsed_error.message,
6848                        ))
6849                    }
6850                    "TooManyTargetGroups" => {
6851                        return RusotoError::Service(CreateRuleError::TooManyTargetGroups(
6852                            parsed_error.message,
6853                        ))
6854                    }
6855                    "TooManyTargets" => {
6856                        return RusotoError::Service(CreateRuleError::TooManyTargets(
6857                            parsed_error.message,
6858                        ))
6859                    }
6860                    "TooManyUniqueTargetGroupsPerLoadBalancer" => {
6861                        return RusotoError::Service(
6862                            CreateRuleError::TooManyUniqueTargetGroupsPerLoadBalancer(
6863                                parsed_error.message,
6864                            ),
6865                        )
6866                    }
6867                    "UnsupportedProtocol" => {
6868                        return RusotoError::Service(CreateRuleError::UnsupportedProtocol(
6869                            parsed_error.message,
6870                        ))
6871                    }
6872                    _ => {}
6873                }
6874            }
6875        }
6876        RusotoError::Unknown(res)
6877    }
6878
6879    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
6880    where
6881        T: Peek + Next,
6882    {
6883        xml_util::start_element("ErrorResponse", stack)?;
6884        XmlErrorDeserializer::deserialize("Error", stack)
6885    }
6886}
6887impl fmt::Display for CreateRuleError {
6888    #[allow(unused_variables)]
6889    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6890        match *self {
6891            CreateRuleError::IncompatibleProtocols(ref cause) => write!(f, "{}", cause),
6892            CreateRuleError::InvalidConfigurationRequest(ref cause) => write!(f, "{}", cause),
6893            CreateRuleError::InvalidLoadBalancerAction(ref cause) => write!(f, "{}", cause),
6894            CreateRuleError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
6895            CreateRuleError::PriorityInUse(ref cause) => write!(f, "{}", cause),
6896            CreateRuleError::TargetGroupAssociationLimit(ref cause) => write!(f, "{}", cause),
6897            CreateRuleError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
6898            CreateRuleError::TooManyActions(ref cause) => write!(f, "{}", cause),
6899            CreateRuleError::TooManyRegistrationsForTargetId(ref cause) => write!(f, "{}", cause),
6900            CreateRuleError::TooManyRules(ref cause) => write!(f, "{}", cause),
6901            CreateRuleError::TooManyTargetGroups(ref cause) => write!(f, "{}", cause),
6902            CreateRuleError::TooManyTargets(ref cause) => write!(f, "{}", cause),
6903            CreateRuleError::TooManyUniqueTargetGroupsPerLoadBalancer(ref cause) => {
6904                write!(f, "{}", cause)
6905            }
6906            CreateRuleError::UnsupportedProtocol(ref cause) => write!(f, "{}", cause),
6907        }
6908    }
6909}
6910impl Error for CreateRuleError {}
6911/// Errors returned by CreateTargetGroup
6912#[derive(Debug, PartialEq)]
6913pub enum CreateTargetGroupError {
6914    /// <p>A target group with the specified name already exists.</p>
6915    DuplicateTargetGroupName(String),
6916    /// <p>The requested configuration is not valid.</p>
6917    InvalidConfigurationRequest(String),
6918    /// <p>You've reached the limit on the number of target groups for your AWS account.</p>
6919    TooManyTargetGroups(String),
6920}
6921
6922impl CreateTargetGroupError {
6923    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTargetGroupError> {
6924        {
6925            let reader = EventReader::new(res.body.as_ref());
6926            let mut stack = XmlResponse::new(reader.into_iter().peekable());
6927            find_start_element(&mut stack);
6928            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
6929                match &parsed_error.code[..] {
6930                    "DuplicateTargetGroupName" => {
6931                        return RusotoError::Service(
6932                            CreateTargetGroupError::DuplicateTargetGroupName(parsed_error.message),
6933                        )
6934                    }
6935                    "InvalidConfigurationRequest" => {
6936                        return RusotoError::Service(
6937                            CreateTargetGroupError::InvalidConfigurationRequest(
6938                                parsed_error.message,
6939                            ),
6940                        )
6941                    }
6942                    "TooManyTargetGroups" => {
6943                        return RusotoError::Service(CreateTargetGroupError::TooManyTargetGroups(
6944                            parsed_error.message,
6945                        ))
6946                    }
6947                    _ => {}
6948                }
6949            }
6950        }
6951        RusotoError::Unknown(res)
6952    }
6953
6954    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
6955    where
6956        T: Peek + Next,
6957    {
6958        xml_util::start_element("ErrorResponse", stack)?;
6959        XmlErrorDeserializer::deserialize("Error", stack)
6960    }
6961}
6962impl fmt::Display for CreateTargetGroupError {
6963    #[allow(unused_variables)]
6964    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6965        match *self {
6966            CreateTargetGroupError::DuplicateTargetGroupName(ref cause) => write!(f, "{}", cause),
6967            CreateTargetGroupError::InvalidConfigurationRequest(ref cause) => {
6968                write!(f, "{}", cause)
6969            }
6970            CreateTargetGroupError::TooManyTargetGroups(ref cause) => write!(f, "{}", cause),
6971        }
6972    }
6973}
6974impl Error for CreateTargetGroupError {}
6975/// Errors returned by DeleteListener
6976#[derive(Debug, PartialEq)]
6977pub enum DeleteListenerError {
6978    /// <p>The specified listener does not exist.</p>
6979    ListenerNotFound(String),
6980}
6981
6982impl DeleteListenerError {
6983    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteListenerError> {
6984        {
6985            let reader = EventReader::new(res.body.as_ref());
6986            let mut stack = XmlResponse::new(reader.into_iter().peekable());
6987            find_start_element(&mut stack);
6988            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
6989                match &parsed_error.code[..] {
6990                    "ListenerNotFound" => {
6991                        return RusotoError::Service(DeleteListenerError::ListenerNotFound(
6992                            parsed_error.message,
6993                        ))
6994                    }
6995                    _ => {}
6996                }
6997            }
6998        }
6999        RusotoError::Unknown(res)
7000    }
7001
7002    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7003    where
7004        T: Peek + Next,
7005    {
7006        xml_util::start_element("ErrorResponse", stack)?;
7007        XmlErrorDeserializer::deserialize("Error", stack)
7008    }
7009}
7010impl fmt::Display for DeleteListenerError {
7011    #[allow(unused_variables)]
7012    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7013        match *self {
7014            DeleteListenerError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
7015        }
7016    }
7017}
7018impl Error for DeleteListenerError {}
7019/// Errors returned by DeleteLoadBalancer
7020#[derive(Debug, PartialEq)]
7021pub enum DeleteLoadBalancerError {
7022    /// <p>The specified load balancer does not exist.</p>
7023    LoadBalancerNotFound(String),
7024    /// <p>This operation is not allowed.</p>
7025    OperationNotPermitted(String),
7026    /// <p>A specified resource is in use.</p>
7027    ResourceInUse(String),
7028}
7029
7030impl DeleteLoadBalancerError {
7031    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLoadBalancerError> {
7032        {
7033            let reader = EventReader::new(res.body.as_ref());
7034            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7035            find_start_element(&mut stack);
7036            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7037                match &parsed_error.code[..] {
7038                    "LoadBalancerNotFound" => {
7039                        return RusotoError::Service(DeleteLoadBalancerError::LoadBalancerNotFound(
7040                            parsed_error.message,
7041                        ))
7042                    }
7043                    "OperationNotPermitted" => {
7044                        return RusotoError::Service(
7045                            DeleteLoadBalancerError::OperationNotPermitted(parsed_error.message),
7046                        )
7047                    }
7048                    "ResourceInUse" => {
7049                        return RusotoError::Service(DeleteLoadBalancerError::ResourceInUse(
7050                            parsed_error.message,
7051                        ))
7052                    }
7053                    _ => {}
7054                }
7055            }
7056        }
7057        RusotoError::Unknown(res)
7058    }
7059
7060    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7061    where
7062        T: Peek + Next,
7063    {
7064        xml_util::start_element("ErrorResponse", stack)?;
7065        XmlErrorDeserializer::deserialize("Error", stack)
7066    }
7067}
7068impl fmt::Display for DeleteLoadBalancerError {
7069    #[allow(unused_variables)]
7070    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7071        match *self {
7072            DeleteLoadBalancerError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
7073            DeleteLoadBalancerError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
7074            DeleteLoadBalancerError::ResourceInUse(ref cause) => write!(f, "{}", cause),
7075        }
7076    }
7077}
7078impl Error for DeleteLoadBalancerError {}
7079/// Errors returned by DeleteRule
7080#[derive(Debug, PartialEq)]
7081pub enum DeleteRuleError {
7082    /// <p>This operation is not allowed.</p>
7083    OperationNotPermitted(String),
7084    /// <p>The specified rule does not exist.</p>
7085    RuleNotFound(String),
7086}
7087
7088impl DeleteRuleError {
7089    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRuleError> {
7090        {
7091            let reader = EventReader::new(res.body.as_ref());
7092            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7093            find_start_element(&mut stack);
7094            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7095                match &parsed_error.code[..] {
7096                    "OperationNotPermitted" => {
7097                        return RusotoError::Service(DeleteRuleError::OperationNotPermitted(
7098                            parsed_error.message,
7099                        ))
7100                    }
7101                    "RuleNotFound" => {
7102                        return RusotoError::Service(DeleteRuleError::RuleNotFound(
7103                            parsed_error.message,
7104                        ))
7105                    }
7106                    _ => {}
7107                }
7108            }
7109        }
7110        RusotoError::Unknown(res)
7111    }
7112
7113    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7114    where
7115        T: Peek + Next,
7116    {
7117        xml_util::start_element("ErrorResponse", stack)?;
7118        XmlErrorDeserializer::deserialize("Error", stack)
7119    }
7120}
7121impl fmt::Display for DeleteRuleError {
7122    #[allow(unused_variables)]
7123    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7124        match *self {
7125            DeleteRuleError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
7126            DeleteRuleError::RuleNotFound(ref cause) => write!(f, "{}", cause),
7127        }
7128    }
7129}
7130impl Error for DeleteRuleError {}
7131/// Errors returned by DeleteTargetGroup
7132#[derive(Debug, PartialEq)]
7133pub enum DeleteTargetGroupError {
7134    /// <p>A specified resource is in use.</p>
7135    ResourceInUse(String),
7136}
7137
7138impl DeleteTargetGroupError {
7139    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTargetGroupError> {
7140        {
7141            let reader = EventReader::new(res.body.as_ref());
7142            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7143            find_start_element(&mut stack);
7144            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7145                match &parsed_error.code[..] {
7146                    "ResourceInUse" => {
7147                        return RusotoError::Service(DeleteTargetGroupError::ResourceInUse(
7148                            parsed_error.message,
7149                        ))
7150                    }
7151                    _ => {}
7152                }
7153            }
7154        }
7155        RusotoError::Unknown(res)
7156    }
7157
7158    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7159    where
7160        T: Peek + Next,
7161    {
7162        xml_util::start_element("ErrorResponse", stack)?;
7163        XmlErrorDeserializer::deserialize("Error", stack)
7164    }
7165}
7166impl fmt::Display for DeleteTargetGroupError {
7167    #[allow(unused_variables)]
7168    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7169        match *self {
7170            DeleteTargetGroupError::ResourceInUse(ref cause) => write!(f, "{}", cause),
7171        }
7172    }
7173}
7174impl Error for DeleteTargetGroupError {}
7175/// Errors returned by DeregisterTargets
7176#[derive(Debug, PartialEq)]
7177pub enum DeregisterTargetsError {
7178    /// <p>The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.</p>
7179    InvalidTarget(String),
7180    /// <p>The specified target group does not exist.</p>
7181    TargetGroupNotFound(String),
7182}
7183
7184impl DeregisterTargetsError {
7185    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeregisterTargetsError> {
7186        {
7187            let reader = EventReader::new(res.body.as_ref());
7188            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7189            find_start_element(&mut stack);
7190            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7191                match &parsed_error.code[..] {
7192                    "InvalidTarget" => {
7193                        return RusotoError::Service(DeregisterTargetsError::InvalidTarget(
7194                            parsed_error.message,
7195                        ))
7196                    }
7197                    "TargetGroupNotFound" => {
7198                        return RusotoError::Service(DeregisterTargetsError::TargetGroupNotFound(
7199                            parsed_error.message,
7200                        ))
7201                    }
7202                    _ => {}
7203                }
7204            }
7205        }
7206        RusotoError::Unknown(res)
7207    }
7208
7209    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7210    where
7211        T: Peek + Next,
7212    {
7213        xml_util::start_element("ErrorResponse", stack)?;
7214        XmlErrorDeserializer::deserialize("Error", stack)
7215    }
7216}
7217impl fmt::Display for DeregisterTargetsError {
7218    #[allow(unused_variables)]
7219    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7220        match *self {
7221            DeregisterTargetsError::InvalidTarget(ref cause) => write!(f, "{}", cause),
7222            DeregisterTargetsError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
7223        }
7224    }
7225}
7226impl Error for DeregisterTargetsError {}
7227/// Errors returned by DescribeAccountLimits
7228#[derive(Debug, PartialEq)]
7229pub enum DescribeAccountLimitsError {}
7230
7231impl DescribeAccountLimitsError {
7232    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountLimitsError> {
7233        {
7234            let reader = EventReader::new(res.body.as_ref());
7235            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7236            find_start_element(&mut stack);
7237            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7238                match &parsed_error.code[..] {
7239                    _ => {}
7240                }
7241            }
7242        }
7243        RusotoError::Unknown(res)
7244    }
7245
7246    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7247    where
7248        T: Peek + Next,
7249    {
7250        xml_util::start_element("ErrorResponse", stack)?;
7251        XmlErrorDeserializer::deserialize("Error", stack)
7252    }
7253}
7254impl fmt::Display for DescribeAccountLimitsError {
7255    #[allow(unused_variables)]
7256    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7257        match *self {}
7258    }
7259}
7260impl Error for DescribeAccountLimitsError {}
7261/// Errors returned by DescribeListenerCertificates
7262#[derive(Debug, PartialEq)]
7263pub enum DescribeListenerCertificatesError {
7264    /// <p>The specified listener does not exist.</p>
7265    ListenerNotFound(String),
7266}
7267
7268impl DescribeListenerCertificatesError {
7269    pub fn from_response(
7270        res: BufferedHttpResponse,
7271    ) -> RusotoError<DescribeListenerCertificatesError> {
7272        {
7273            let reader = EventReader::new(res.body.as_ref());
7274            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7275            find_start_element(&mut stack);
7276            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7277                match &parsed_error.code[..] {
7278                    "ListenerNotFound" => {
7279                        return RusotoError::Service(
7280                            DescribeListenerCertificatesError::ListenerNotFound(
7281                                parsed_error.message,
7282                            ),
7283                        )
7284                    }
7285                    _ => {}
7286                }
7287            }
7288        }
7289        RusotoError::Unknown(res)
7290    }
7291
7292    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7293    where
7294        T: Peek + Next,
7295    {
7296        xml_util::start_element("ErrorResponse", stack)?;
7297        XmlErrorDeserializer::deserialize("Error", stack)
7298    }
7299}
7300impl fmt::Display for DescribeListenerCertificatesError {
7301    #[allow(unused_variables)]
7302    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7303        match *self {
7304            DescribeListenerCertificatesError::ListenerNotFound(ref cause) => {
7305                write!(f, "{}", cause)
7306            }
7307        }
7308    }
7309}
7310impl Error for DescribeListenerCertificatesError {}
7311/// Errors returned by DescribeListeners
7312#[derive(Debug, PartialEq)]
7313pub enum DescribeListenersError {
7314    /// <p>The specified listener does not exist.</p>
7315    ListenerNotFound(String),
7316    /// <p>The specified load balancer does not exist.</p>
7317    LoadBalancerNotFound(String),
7318    /// <p>The specified protocol is not supported.</p>
7319    UnsupportedProtocol(String),
7320}
7321
7322impl DescribeListenersError {
7323    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeListenersError> {
7324        {
7325            let reader = EventReader::new(res.body.as_ref());
7326            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7327            find_start_element(&mut stack);
7328            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7329                match &parsed_error.code[..] {
7330                    "ListenerNotFound" => {
7331                        return RusotoError::Service(DescribeListenersError::ListenerNotFound(
7332                            parsed_error.message,
7333                        ))
7334                    }
7335                    "LoadBalancerNotFound" => {
7336                        return RusotoError::Service(DescribeListenersError::LoadBalancerNotFound(
7337                            parsed_error.message,
7338                        ))
7339                    }
7340                    "UnsupportedProtocol" => {
7341                        return RusotoError::Service(DescribeListenersError::UnsupportedProtocol(
7342                            parsed_error.message,
7343                        ))
7344                    }
7345                    _ => {}
7346                }
7347            }
7348        }
7349        RusotoError::Unknown(res)
7350    }
7351
7352    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7353    where
7354        T: Peek + Next,
7355    {
7356        xml_util::start_element("ErrorResponse", stack)?;
7357        XmlErrorDeserializer::deserialize("Error", stack)
7358    }
7359}
7360impl fmt::Display for DescribeListenersError {
7361    #[allow(unused_variables)]
7362    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7363        match *self {
7364            DescribeListenersError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
7365            DescribeListenersError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
7366            DescribeListenersError::UnsupportedProtocol(ref cause) => write!(f, "{}", cause),
7367        }
7368    }
7369}
7370impl Error for DescribeListenersError {}
7371/// Errors returned by DescribeLoadBalancerAttributes
7372#[derive(Debug, PartialEq)]
7373pub enum DescribeLoadBalancerAttributesError {
7374    /// <p>The specified load balancer does not exist.</p>
7375    LoadBalancerNotFound(String),
7376}
7377
7378impl DescribeLoadBalancerAttributesError {
7379    pub fn from_response(
7380        res: BufferedHttpResponse,
7381    ) -> RusotoError<DescribeLoadBalancerAttributesError> {
7382        {
7383            let reader = EventReader::new(res.body.as_ref());
7384            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7385            find_start_element(&mut stack);
7386            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7387                match &parsed_error.code[..] {
7388                    "LoadBalancerNotFound" => {
7389                        return RusotoError::Service(
7390                            DescribeLoadBalancerAttributesError::LoadBalancerNotFound(
7391                                parsed_error.message,
7392                            ),
7393                        )
7394                    }
7395                    _ => {}
7396                }
7397            }
7398        }
7399        RusotoError::Unknown(res)
7400    }
7401
7402    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7403    where
7404        T: Peek + Next,
7405    {
7406        xml_util::start_element("ErrorResponse", stack)?;
7407        XmlErrorDeserializer::deserialize("Error", stack)
7408    }
7409}
7410impl fmt::Display for DescribeLoadBalancerAttributesError {
7411    #[allow(unused_variables)]
7412    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7413        match *self {
7414            DescribeLoadBalancerAttributesError::LoadBalancerNotFound(ref cause) => {
7415                write!(f, "{}", cause)
7416            }
7417        }
7418    }
7419}
7420impl Error for DescribeLoadBalancerAttributesError {}
7421/// Errors returned by DescribeLoadBalancers
7422#[derive(Debug, PartialEq)]
7423pub enum DescribeLoadBalancersError {
7424    /// <p>The specified load balancer does not exist.</p>
7425    LoadBalancerNotFound(String),
7426}
7427
7428impl DescribeLoadBalancersError {
7429    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoadBalancersError> {
7430        {
7431            let reader = EventReader::new(res.body.as_ref());
7432            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7433            find_start_element(&mut stack);
7434            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7435                match &parsed_error.code[..] {
7436                    "LoadBalancerNotFound" => {
7437                        return RusotoError::Service(
7438                            DescribeLoadBalancersError::LoadBalancerNotFound(parsed_error.message),
7439                        )
7440                    }
7441                    _ => {}
7442                }
7443            }
7444        }
7445        RusotoError::Unknown(res)
7446    }
7447
7448    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7449    where
7450        T: Peek + Next,
7451    {
7452        xml_util::start_element("ErrorResponse", stack)?;
7453        XmlErrorDeserializer::deserialize("Error", stack)
7454    }
7455}
7456impl fmt::Display for DescribeLoadBalancersError {
7457    #[allow(unused_variables)]
7458    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7459        match *self {
7460            DescribeLoadBalancersError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
7461        }
7462    }
7463}
7464impl Error for DescribeLoadBalancersError {}
7465/// Errors returned by DescribeRules
7466#[derive(Debug, PartialEq)]
7467pub enum DescribeRulesError {
7468    /// <p>The specified listener does not exist.</p>
7469    ListenerNotFound(String),
7470    /// <p>The specified rule does not exist.</p>
7471    RuleNotFound(String),
7472    /// <p>The specified protocol is not supported.</p>
7473    UnsupportedProtocol(String),
7474}
7475
7476impl DescribeRulesError {
7477    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRulesError> {
7478        {
7479            let reader = EventReader::new(res.body.as_ref());
7480            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7481            find_start_element(&mut stack);
7482            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7483                match &parsed_error.code[..] {
7484                    "ListenerNotFound" => {
7485                        return RusotoError::Service(DescribeRulesError::ListenerNotFound(
7486                            parsed_error.message,
7487                        ))
7488                    }
7489                    "RuleNotFound" => {
7490                        return RusotoError::Service(DescribeRulesError::RuleNotFound(
7491                            parsed_error.message,
7492                        ))
7493                    }
7494                    "UnsupportedProtocol" => {
7495                        return RusotoError::Service(DescribeRulesError::UnsupportedProtocol(
7496                            parsed_error.message,
7497                        ))
7498                    }
7499                    _ => {}
7500                }
7501            }
7502        }
7503        RusotoError::Unknown(res)
7504    }
7505
7506    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7507    where
7508        T: Peek + Next,
7509    {
7510        xml_util::start_element("ErrorResponse", stack)?;
7511        XmlErrorDeserializer::deserialize("Error", stack)
7512    }
7513}
7514impl fmt::Display for DescribeRulesError {
7515    #[allow(unused_variables)]
7516    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7517        match *self {
7518            DescribeRulesError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
7519            DescribeRulesError::RuleNotFound(ref cause) => write!(f, "{}", cause),
7520            DescribeRulesError::UnsupportedProtocol(ref cause) => write!(f, "{}", cause),
7521        }
7522    }
7523}
7524impl Error for DescribeRulesError {}
7525/// Errors returned by DescribeSSLPolicies
7526#[derive(Debug, PartialEq)]
7527pub enum DescribeSSLPoliciesError {
7528    /// <p>The specified SSL policy does not exist.</p>
7529    SSLPolicyNotFound(String),
7530}
7531
7532impl DescribeSSLPoliciesError {
7533    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSSLPoliciesError> {
7534        {
7535            let reader = EventReader::new(res.body.as_ref());
7536            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7537            find_start_element(&mut stack);
7538            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7539                match &parsed_error.code[..] {
7540                    "SSLPolicyNotFound" => {
7541                        return RusotoError::Service(DescribeSSLPoliciesError::SSLPolicyNotFound(
7542                            parsed_error.message,
7543                        ))
7544                    }
7545                    _ => {}
7546                }
7547            }
7548        }
7549        RusotoError::Unknown(res)
7550    }
7551
7552    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7553    where
7554        T: Peek + Next,
7555    {
7556        xml_util::start_element("ErrorResponse", stack)?;
7557        XmlErrorDeserializer::deserialize("Error", stack)
7558    }
7559}
7560impl fmt::Display for DescribeSSLPoliciesError {
7561    #[allow(unused_variables)]
7562    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7563        match *self {
7564            DescribeSSLPoliciesError::SSLPolicyNotFound(ref cause) => write!(f, "{}", cause),
7565        }
7566    }
7567}
7568impl Error for DescribeSSLPoliciesError {}
7569/// Errors returned by DescribeTags
7570#[derive(Debug, PartialEq)]
7571pub enum DescribeTagsError {
7572    /// <p>The specified listener does not exist.</p>
7573    ListenerNotFound(String),
7574    /// <p>The specified load balancer does not exist.</p>
7575    LoadBalancerNotFound(String),
7576    /// <p>The specified rule does not exist.</p>
7577    RuleNotFound(String),
7578    /// <p>The specified target group does not exist.</p>
7579    TargetGroupNotFound(String),
7580}
7581
7582impl DescribeTagsError {
7583    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
7584        {
7585            let reader = EventReader::new(res.body.as_ref());
7586            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7587            find_start_element(&mut stack);
7588            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7589                match &parsed_error.code[..] {
7590                    "ListenerNotFound" => {
7591                        return RusotoError::Service(DescribeTagsError::ListenerNotFound(
7592                            parsed_error.message,
7593                        ))
7594                    }
7595                    "LoadBalancerNotFound" => {
7596                        return RusotoError::Service(DescribeTagsError::LoadBalancerNotFound(
7597                            parsed_error.message,
7598                        ))
7599                    }
7600                    "RuleNotFound" => {
7601                        return RusotoError::Service(DescribeTagsError::RuleNotFound(
7602                            parsed_error.message,
7603                        ))
7604                    }
7605                    "TargetGroupNotFound" => {
7606                        return RusotoError::Service(DescribeTagsError::TargetGroupNotFound(
7607                            parsed_error.message,
7608                        ))
7609                    }
7610                    _ => {}
7611                }
7612            }
7613        }
7614        RusotoError::Unknown(res)
7615    }
7616
7617    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7618    where
7619        T: Peek + Next,
7620    {
7621        xml_util::start_element("ErrorResponse", stack)?;
7622        XmlErrorDeserializer::deserialize("Error", stack)
7623    }
7624}
7625impl fmt::Display for DescribeTagsError {
7626    #[allow(unused_variables)]
7627    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7628        match *self {
7629            DescribeTagsError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
7630            DescribeTagsError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
7631            DescribeTagsError::RuleNotFound(ref cause) => write!(f, "{}", cause),
7632            DescribeTagsError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
7633        }
7634    }
7635}
7636impl Error for DescribeTagsError {}
7637/// Errors returned by DescribeTargetGroupAttributes
7638#[derive(Debug, PartialEq)]
7639pub enum DescribeTargetGroupAttributesError {
7640    /// <p>The specified target group does not exist.</p>
7641    TargetGroupNotFound(String),
7642}
7643
7644impl DescribeTargetGroupAttributesError {
7645    pub fn from_response(
7646        res: BufferedHttpResponse,
7647    ) -> RusotoError<DescribeTargetGroupAttributesError> {
7648        {
7649            let reader = EventReader::new(res.body.as_ref());
7650            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7651            find_start_element(&mut stack);
7652            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7653                match &parsed_error.code[..] {
7654                    "TargetGroupNotFound" => {
7655                        return RusotoError::Service(
7656                            DescribeTargetGroupAttributesError::TargetGroupNotFound(
7657                                parsed_error.message,
7658                            ),
7659                        )
7660                    }
7661                    _ => {}
7662                }
7663            }
7664        }
7665        RusotoError::Unknown(res)
7666    }
7667
7668    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7669    where
7670        T: Peek + Next,
7671    {
7672        xml_util::start_element("ErrorResponse", stack)?;
7673        XmlErrorDeserializer::deserialize("Error", stack)
7674    }
7675}
7676impl fmt::Display for DescribeTargetGroupAttributesError {
7677    #[allow(unused_variables)]
7678    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7679        match *self {
7680            DescribeTargetGroupAttributesError::TargetGroupNotFound(ref cause) => {
7681                write!(f, "{}", cause)
7682            }
7683        }
7684    }
7685}
7686impl Error for DescribeTargetGroupAttributesError {}
7687/// Errors returned by DescribeTargetGroups
7688#[derive(Debug, PartialEq)]
7689pub enum DescribeTargetGroupsError {
7690    /// <p>The specified load balancer does not exist.</p>
7691    LoadBalancerNotFound(String),
7692    /// <p>The specified target group does not exist.</p>
7693    TargetGroupNotFound(String),
7694}
7695
7696impl DescribeTargetGroupsError {
7697    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTargetGroupsError> {
7698        {
7699            let reader = EventReader::new(res.body.as_ref());
7700            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7701            find_start_element(&mut stack);
7702            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7703                match &parsed_error.code[..] {
7704                    "LoadBalancerNotFound" => {
7705                        return RusotoError::Service(
7706                            DescribeTargetGroupsError::LoadBalancerNotFound(parsed_error.message),
7707                        )
7708                    }
7709                    "TargetGroupNotFound" => {
7710                        return RusotoError::Service(
7711                            DescribeTargetGroupsError::TargetGroupNotFound(parsed_error.message),
7712                        )
7713                    }
7714                    _ => {}
7715                }
7716            }
7717        }
7718        RusotoError::Unknown(res)
7719    }
7720
7721    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7722    where
7723        T: Peek + Next,
7724    {
7725        xml_util::start_element("ErrorResponse", stack)?;
7726        XmlErrorDeserializer::deserialize("Error", stack)
7727    }
7728}
7729impl fmt::Display for DescribeTargetGroupsError {
7730    #[allow(unused_variables)]
7731    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7732        match *self {
7733            DescribeTargetGroupsError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
7734            DescribeTargetGroupsError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
7735        }
7736    }
7737}
7738impl Error for DescribeTargetGroupsError {}
7739/// Errors returned by DescribeTargetHealth
7740#[derive(Debug, PartialEq)]
7741pub enum DescribeTargetHealthError {
7742    /// <p>The health of the specified targets could not be retrieved due to an internal error.</p>
7743    HealthUnavailable(String),
7744    /// <p>The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.</p>
7745    InvalidTarget(String),
7746    /// <p>The specified target group does not exist.</p>
7747    TargetGroupNotFound(String),
7748}
7749
7750impl DescribeTargetHealthError {
7751    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTargetHealthError> {
7752        {
7753            let reader = EventReader::new(res.body.as_ref());
7754            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7755            find_start_element(&mut stack);
7756            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7757                match &parsed_error.code[..] {
7758                    "HealthUnavailable" => {
7759                        return RusotoError::Service(DescribeTargetHealthError::HealthUnavailable(
7760                            parsed_error.message,
7761                        ))
7762                    }
7763                    "InvalidTarget" => {
7764                        return RusotoError::Service(DescribeTargetHealthError::InvalidTarget(
7765                            parsed_error.message,
7766                        ))
7767                    }
7768                    "TargetGroupNotFound" => {
7769                        return RusotoError::Service(
7770                            DescribeTargetHealthError::TargetGroupNotFound(parsed_error.message),
7771                        )
7772                    }
7773                    _ => {}
7774                }
7775            }
7776        }
7777        RusotoError::Unknown(res)
7778    }
7779
7780    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7781    where
7782        T: Peek + Next,
7783    {
7784        xml_util::start_element("ErrorResponse", stack)?;
7785        XmlErrorDeserializer::deserialize("Error", stack)
7786    }
7787}
7788impl fmt::Display for DescribeTargetHealthError {
7789    #[allow(unused_variables)]
7790    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7791        match *self {
7792            DescribeTargetHealthError::HealthUnavailable(ref cause) => write!(f, "{}", cause),
7793            DescribeTargetHealthError::InvalidTarget(ref cause) => write!(f, "{}", cause),
7794            DescribeTargetHealthError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
7795        }
7796    }
7797}
7798impl Error for DescribeTargetHealthError {}
7799/// Errors returned by ModifyListener
7800#[derive(Debug, PartialEq)]
7801pub enum ModifyListenerError {
7802    /// <p>The specified ALPN policy is not supported.</p>
7803    ALPNPolicyNotSupported(String),
7804    /// <p>The specified certificate does not exist.</p>
7805    CertificateNotFound(String),
7806    /// <p>A listener with the specified port already exists.</p>
7807    DuplicateListener(String),
7808    /// <p>The specified configuration is not valid with this protocol.</p>
7809    IncompatibleProtocols(String),
7810    /// <p>The requested configuration is not valid.</p>
7811    InvalidConfigurationRequest(String),
7812    /// <p>The requested action is not valid.</p>
7813    InvalidLoadBalancerAction(String),
7814    /// <p>The specified listener does not exist.</p>
7815    ListenerNotFound(String),
7816    /// <p>The specified SSL policy does not exist.</p>
7817    SSLPolicyNotFound(String),
7818    /// <p>You've reached the limit on the number of load balancers per target group.</p>
7819    TargetGroupAssociationLimit(String),
7820    /// <p>The specified target group does not exist.</p>
7821    TargetGroupNotFound(String),
7822    /// <p>You've reached the limit on the number of actions per rule.</p>
7823    TooManyActions(String),
7824    /// <p>You've reached the limit on the number of certificates per load balancer.</p>
7825    TooManyCertificates(String),
7826    /// <p>You've reached the limit on the number of listeners per load balancer.</p>
7827    TooManyListeners(String),
7828    /// <p>You've reached the limit on the number of times a target can be registered with a load balancer.</p>
7829    TooManyRegistrationsForTargetId(String),
7830    /// <p>You've reached the limit on the number of targets.</p>
7831    TooManyTargets(String),
7832    /// <p>You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.</p>
7833    TooManyUniqueTargetGroupsPerLoadBalancer(String),
7834    /// <p>The specified protocol is not supported.</p>
7835    UnsupportedProtocol(String),
7836}
7837
7838impl ModifyListenerError {
7839    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyListenerError> {
7840        {
7841            let reader = EventReader::new(res.body.as_ref());
7842            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7843            find_start_element(&mut stack);
7844            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7845                match &parsed_error.code[..] {
7846                    "ALPNPolicyNotFound" => {
7847                        return RusotoError::Service(ModifyListenerError::ALPNPolicyNotSupported(
7848                            parsed_error.message,
7849                        ))
7850                    }
7851                    "CertificateNotFound" => {
7852                        return RusotoError::Service(ModifyListenerError::CertificateNotFound(
7853                            parsed_error.message,
7854                        ))
7855                    }
7856                    "DuplicateListener" => {
7857                        return RusotoError::Service(ModifyListenerError::DuplicateListener(
7858                            parsed_error.message,
7859                        ))
7860                    }
7861                    "IncompatibleProtocols" => {
7862                        return RusotoError::Service(ModifyListenerError::IncompatibleProtocols(
7863                            parsed_error.message,
7864                        ))
7865                    }
7866                    "InvalidConfigurationRequest" => {
7867                        return RusotoError::Service(
7868                            ModifyListenerError::InvalidConfigurationRequest(parsed_error.message),
7869                        )
7870                    }
7871                    "InvalidLoadBalancerAction" => {
7872                        return RusotoError::Service(
7873                            ModifyListenerError::InvalidLoadBalancerAction(parsed_error.message),
7874                        )
7875                    }
7876                    "ListenerNotFound" => {
7877                        return RusotoError::Service(ModifyListenerError::ListenerNotFound(
7878                            parsed_error.message,
7879                        ))
7880                    }
7881                    "SSLPolicyNotFound" => {
7882                        return RusotoError::Service(ModifyListenerError::SSLPolicyNotFound(
7883                            parsed_error.message,
7884                        ))
7885                    }
7886                    "TargetGroupAssociationLimit" => {
7887                        return RusotoError::Service(
7888                            ModifyListenerError::TargetGroupAssociationLimit(parsed_error.message),
7889                        )
7890                    }
7891                    "TargetGroupNotFound" => {
7892                        return RusotoError::Service(ModifyListenerError::TargetGroupNotFound(
7893                            parsed_error.message,
7894                        ))
7895                    }
7896                    "TooManyActions" => {
7897                        return RusotoError::Service(ModifyListenerError::TooManyActions(
7898                            parsed_error.message,
7899                        ))
7900                    }
7901                    "TooManyCertificates" => {
7902                        return RusotoError::Service(ModifyListenerError::TooManyCertificates(
7903                            parsed_error.message,
7904                        ))
7905                    }
7906                    "TooManyListeners" => {
7907                        return RusotoError::Service(ModifyListenerError::TooManyListeners(
7908                            parsed_error.message,
7909                        ))
7910                    }
7911                    "TooManyRegistrationsForTargetId" => {
7912                        return RusotoError::Service(
7913                            ModifyListenerError::TooManyRegistrationsForTargetId(
7914                                parsed_error.message,
7915                            ),
7916                        )
7917                    }
7918                    "TooManyTargets" => {
7919                        return RusotoError::Service(ModifyListenerError::TooManyTargets(
7920                            parsed_error.message,
7921                        ))
7922                    }
7923                    "TooManyUniqueTargetGroupsPerLoadBalancer" => {
7924                        return RusotoError::Service(
7925                            ModifyListenerError::TooManyUniqueTargetGroupsPerLoadBalancer(
7926                                parsed_error.message,
7927                            ),
7928                        )
7929                    }
7930                    "UnsupportedProtocol" => {
7931                        return RusotoError::Service(ModifyListenerError::UnsupportedProtocol(
7932                            parsed_error.message,
7933                        ))
7934                    }
7935                    _ => {}
7936                }
7937            }
7938        }
7939        RusotoError::Unknown(res)
7940    }
7941
7942    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
7943    where
7944        T: Peek + Next,
7945    {
7946        xml_util::start_element("ErrorResponse", stack)?;
7947        XmlErrorDeserializer::deserialize("Error", stack)
7948    }
7949}
7950impl fmt::Display for ModifyListenerError {
7951    #[allow(unused_variables)]
7952    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7953        match *self {
7954            ModifyListenerError::ALPNPolicyNotSupported(ref cause) => write!(f, "{}", cause),
7955            ModifyListenerError::CertificateNotFound(ref cause) => write!(f, "{}", cause),
7956            ModifyListenerError::DuplicateListener(ref cause) => write!(f, "{}", cause),
7957            ModifyListenerError::IncompatibleProtocols(ref cause) => write!(f, "{}", cause),
7958            ModifyListenerError::InvalidConfigurationRequest(ref cause) => write!(f, "{}", cause),
7959            ModifyListenerError::InvalidLoadBalancerAction(ref cause) => write!(f, "{}", cause),
7960            ModifyListenerError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
7961            ModifyListenerError::SSLPolicyNotFound(ref cause) => write!(f, "{}", cause),
7962            ModifyListenerError::TargetGroupAssociationLimit(ref cause) => write!(f, "{}", cause),
7963            ModifyListenerError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
7964            ModifyListenerError::TooManyActions(ref cause) => write!(f, "{}", cause),
7965            ModifyListenerError::TooManyCertificates(ref cause) => write!(f, "{}", cause),
7966            ModifyListenerError::TooManyListeners(ref cause) => write!(f, "{}", cause),
7967            ModifyListenerError::TooManyRegistrationsForTargetId(ref cause) => {
7968                write!(f, "{}", cause)
7969            }
7970            ModifyListenerError::TooManyTargets(ref cause) => write!(f, "{}", cause),
7971            ModifyListenerError::TooManyUniqueTargetGroupsPerLoadBalancer(ref cause) => {
7972                write!(f, "{}", cause)
7973            }
7974            ModifyListenerError::UnsupportedProtocol(ref cause) => write!(f, "{}", cause),
7975        }
7976    }
7977}
7978impl Error for ModifyListenerError {}
7979/// Errors returned by ModifyLoadBalancerAttributes
7980#[derive(Debug, PartialEq)]
7981pub enum ModifyLoadBalancerAttributesError {
7982    /// <p>The requested configuration is not valid.</p>
7983    InvalidConfigurationRequest(String),
7984    /// <p>The specified load balancer does not exist.</p>
7985    LoadBalancerNotFound(String),
7986}
7987
7988impl ModifyLoadBalancerAttributesError {
7989    pub fn from_response(
7990        res: BufferedHttpResponse,
7991    ) -> RusotoError<ModifyLoadBalancerAttributesError> {
7992        {
7993            let reader = EventReader::new(res.body.as_ref());
7994            let mut stack = XmlResponse::new(reader.into_iter().peekable());
7995            find_start_element(&mut stack);
7996            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
7997                match &parsed_error.code[..] {
7998                    "InvalidConfigurationRequest" => {
7999                        return RusotoError::Service(
8000                            ModifyLoadBalancerAttributesError::InvalidConfigurationRequest(
8001                                parsed_error.message,
8002                            ),
8003                        )
8004                    }
8005                    "LoadBalancerNotFound" => {
8006                        return RusotoError::Service(
8007                            ModifyLoadBalancerAttributesError::LoadBalancerNotFound(
8008                                parsed_error.message,
8009                            ),
8010                        )
8011                    }
8012                    _ => {}
8013                }
8014            }
8015        }
8016        RusotoError::Unknown(res)
8017    }
8018
8019    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8020    where
8021        T: Peek + Next,
8022    {
8023        xml_util::start_element("ErrorResponse", stack)?;
8024        XmlErrorDeserializer::deserialize("Error", stack)
8025    }
8026}
8027impl fmt::Display for ModifyLoadBalancerAttributesError {
8028    #[allow(unused_variables)]
8029    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8030        match *self {
8031            ModifyLoadBalancerAttributesError::InvalidConfigurationRequest(ref cause) => {
8032                write!(f, "{}", cause)
8033            }
8034            ModifyLoadBalancerAttributesError::LoadBalancerNotFound(ref cause) => {
8035                write!(f, "{}", cause)
8036            }
8037        }
8038    }
8039}
8040impl Error for ModifyLoadBalancerAttributesError {}
8041/// Errors returned by ModifyRule
8042#[derive(Debug, PartialEq)]
8043pub enum ModifyRuleError {
8044    /// <p>The specified configuration is not valid with this protocol.</p>
8045    IncompatibleProtocols(String),
8046    /// <p>The requested action is not valid.</p>
8047    InvalidLoadBalancerAction(String),
8048    /// <p>This operation is not allowed.</p>
8049    OperationNotPermitted(String),
8050    /// <p>The specified rule does not exist.</p>
8051    RuleNotFound(String),
8052    /// <p>You've reached the limit on the number of load balancers per target group.</p>
8053    TargetGroupAssociationLimit(String),
8054    /// <p>The specified target group does not exist.</p>
8055    TargetGroupNotFound(String),
8056    /// <p>You've reached the limit on the number of actions per rule.</p>
8057    TooManyActions(String),
8058    /// <p>You've reached the limit on the number of times a target can be registered with a load balancer.</p>
8059    TooManyRegistrationsForTargetId(String),
8060    /// <p>You've reached the limit on the number of targets.</p>
8061    TooManyTargets(String),
8062    /// <p>You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.</p>
8063    TooManyUniqueTargetGroupsPerLoadBalancer(String),
8064    /// <p>The specified protocol is not supported.</p>
8065    UnsupportedProtocol(String),
8066}
8067
8068impl ModifyRuleError {
8069    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyRuleError> {
8070        {
8071            let reader = EventReader::new(res.body.as_ref());
8072            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8073            find_start_element(&mut stack);
8074            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8075                match &parsed_error.code[..] {
8076                    "IncompatibleProtocols" => {
8077                        return RusotoError::Service(ModifyRuleError::IncompatibleProtocols(
8078                            parsed_error.message,
8079                        ))
8080                    }
8081                    "InvalidLoadBalancerAction" => {
8082                        return RusotoError::Service(ModifyRuleError::InvalidLoadBalancerAction(
8083                            parsed_error.message,
8084                        ))
8085                    }
8086                    "OperationNotPermitted" => {
8087                        return RusotoError::Service(ModifyRuleError::OperationNotPermitted(
8088                            parsed_error.message,
8089                        ))
8090                    }
8091                    "RuleNotFound" => {
8092                        return RusotoError::Service(ModifyRuleError::RuleNotFound(
8093                            parsed_error.message,
8094                        ))
8095                    }
8096                    "TargetGroupAssociationLimit" => {
8097                        return RusotoError::Service(ModifyRuleError::TargetGroupAssociationLimit(
8098                            parsed_error.message,
8099                        ))
8100                    }
8101                    "TargetGroupNotFound" => {
8102                        return RusotoError::Service(ModifyRuleError::TargetGroupNotFound(
8103                            parsed_error.message,
8104                        ))
8105                    }
8106                    "TooManyActions" => {
8107                        return RusotoError::Service(ModifyRuleError::TooManyActions(
8108                            parsed_error.message,
8109                        ))
8110                    }
8111                    "TooManyRegistrationsForTargetId" => {
8112                        return RusotoError::Service(
8113                            ModifyRuleError::TooManyRegistrationsForTargetId(parsed_error.message),
8114                        )
8115                    }
8116                    "TooManyTargets" => {
8117                        return RusotoError::Service(ModifyRuleError::TooManyTargets(
8118                            parsed_error.message,
8119                        ))
8120                    }
8121                    "TooManyUniqueTargetGroupsPerLoadBalancer" => {
8122                        return RusotoError::Service(
8123                            ModifyRuleError::TooManyUniqueTargetGroupsPerLoadBalancer(
8124                                parsed_error.message,
8125                            ),
8126                        )
8127                    }
8128                    "UnsupportedProtocol" => {
8129                        return RusotoError::Service(ModifyRuleError::UnsupportedProtocol(
8130                            parsed_error.message,
8131                        ))
8132                    }
8133                    _ => {}
8134                }
8135            }
8136        }
8137        RusotoError::Unknown(res)
8138    }
8139
8140    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8141    where
8142        T: Peek + Next,
8143    {
8144        xml_util::start_element("ErrorResponse", stack)?;
8145        XmlErrorDeserializer::deserialize("Error", stack)
8146    }
8147}
8148impl fmt::Display for ModifyRuleError {
8149    #[allow(unused_variables)]
8150    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8151        match *self {
8152            ModifyRuleError::IncompatibleProtocols(ref cause) => write!(f, "{}", cause),
8153            ModifyRuleError::InvalidLoadBalancerAction(ref cause) => write!(f, "{}", cause),
8154            ModifyRuleError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
8155            ModifyRuleError::RuleNotFound(ref cause) => write!(f, "{}", cause),
8156            ModifyRuleError::TargetGroupAssociationLimit(ref cause) => write!(f, "{}", cause),
8157            ModifyRuleError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
8158            ModifyRuleError::TooManyActions(ref cause) => write!(f, "{}", cause),
8159            ModifyRuleError::TooManyRegistrationsForTargetId(ref cause) => write!(f, "{}", cause),
8160            ModifyRuleError::TooManyTargets(ref cause) => write!(f, "{}", cause),
8161            ModifyRuleError::TooManyUniqueTargetGroupsPerLoadBalancer(ref cause) => {
8162                write!(f, "{}", cause)
8163            }
8164            ModifyRuleError::UnsupportedProtocol(ref cause) => write!(f, "{}", cause),
8165        }
8166    }
8167}
8168impl Error for ModifyRuleError {}
8169/// Errors returned by ModifyTargetGroup
8170#[derive(Debug, PartialEq)]
8171pub enum ModifyTargetGroupError {
8172    /// <p>The requested configuration is not valid.</p>
8173    InvalidConfigurationRequest(String),
8174    /// <p>The specified target group does not exist.</p>
8175    TargetGroupNotFound(String),
8176}
8177
8178impl ModifyTargetGroupError {
8179    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyTargetGroupError> {
8180        {
8181            let reader = EventReader::new(res.body.as_ref());
8182            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8183            find_start_element(&mut stack);
8184            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8185                match &parsed_error.code[..] {
8186                    "InvalidConfigurationRequest" => {
8187                        return RusotoError::Service(
8188                            ModifyTargetGroupError::InvalidConfigurationRequest(
8189                                parsed_error.message,
8190                            ),
8191                        )
8192                    }
8193                    "TargetGroupNotFound" => {
8194                        return RusotoError::Service(ModifyTargetGroupError::TargetGroupNotFound(
8195                            parsed_error.message,
8196                        ))
8197                    }
8198                    _ => {}
8199                }
8200            }
8201        }
8202        RusotoError::Unknown(res)
8203    }
8204
8205    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8206    where
8207        T: Peek + Next,
8208    {
8209        xml_util::start_element("ErrorResponse", stack)?;
8210        XmlErrorDeserializer::deserialize("Error", stack)
8211    }
8212}
8213impl fmt::Display for ModifyTargetGroupError {
8214    #[allow(unused_variables)]
8215    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8216        match *self {
8217            ModifyTargetGroupError::InvalidConfigurationRequest(ref cause) => {
8218                write!(f, "{}", cause)
8219            }
8220            ModifyTargetGroupError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
8221        }
8222    }
8223}
8224impl Error for ModifyTargetGroupError {}
8225/// Errors returned by ModifyTargetGroupAttributes
8226#[derive(Debug, PartialEq)]
8227pub enum ModifyTargetGroupAttributesError {
8228    /// <p>The requested configuration is not valid.</p>
8229    InvalidConfigurationRequest(String),
8230    /// <p>The specified target group does not exist.</p>
8231    TargetGroupNotFound(String),
8232}
8233
8234impl ModifyTargetGroupAttributesError {
8235    pub fn from_response(
8236        res: BufferedHttpResponse,
8237    ) -> RusotoError<ModifyTargetGroupAttributesError> {
8238        {
8239            let reader = EventReader::new(res.body.as_ref());
8240            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8241            find_start_element(&mut stack);
8242            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8243                match &parsed_error.code[..] {
8244                    "InvalidConfigurationRequest" => {
8245                        return RusotoError::Service(
8246                            ModifyTargetGroupAttributesError::InvalidConfigurationRequest(
8247                                parsed_error.message,
8248                            ),
8249                        )
8250                    }
8251                    "TargetGroupNotFound" => {
8252                        return RusotoError::Service(
8253                            ModifyTargetGroupAttributesError::TargetGroupNotFound(
8254                                parsed_error.message,
8255                            ),
8256                        )
8257                    }
8258                    _ => {}
8259                }
8260            }
8261        }
8262        RusotoError::Unknown(res)
8263    }
8264
8265    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8266    where
8267        T: Peek + Next,
8268    {
8269        xml_util::start_element("ErrorResponse", stack)?;
8270        XmlErrorDeserializer::deserialize("Error", stack)
8271    }
8272}
8273impl fmt::Display for ModifyTargetGroupAttributesError {
8274    #[allow(unused_variables)]
8275    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8276        match *self {
8277            ModifyTargetGroupAttributesError::InvalidConfigurationRequest(ref cause) => {
8278                write!(f, "{}", cause)
8279            }
8280            ModifyTargetGroupAttributesError::TargetGroupNotFound(ref cause) => {
8281                write!(f, "{}", cause)
8282            }
8283        }
8284    }
8285}
8286impl Error for ModifyTargetGroupAttributesError {}
8287/// Errors returned by RegisterTargets
8288#[derive(Debug, PartialEq)]
8289pub enum RegisterTargetsError {
8290    /// <p>The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.</p>
8291    InvalidTarget(String),
8292    /// <p>The specified target group does not exist.</p>
8293    TargetGroupNotFound(String),
8294    /// <p>You've reached the limit on the number of times a target can be registered with a load balancer.</p>
8295    TooManyRegistrationsForTargetId(String),
8296    /// <p>You've reached the limit on the number of targets.</p>
8297    TooManyTargets(String),
8298}
8299
8300impl RegisterTargetsError {
8301    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterTargetsError> {
8302        {
8303            let reader = EventReader::new(res.body.as_ref());
8304            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8305            find_start_element(&mut stack);
8306            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8307                match &parsed_error.code[..] {
8308                    "InvalidTarget" => {
8309                        return RusotoError::Service(RegisterTargetsError::InvalidTarget(
8310                            parsed_error.message,
8311                        ))
8312                    }
8313                    "TargetGroupNotFound" => {
8314                        return RusotoError::Service(RegisterTargetsError::TargetGroupNotFound(
8315                            parsed_error.message,
8316                        ))
8317                    }
8318                    "TooManyRegistrationsForTargetId" => {
8319                        return RusotoError::Service(
8320                            RegisterTargetsError::TooManyRegistrationsForTargetId(
8321                                parsed_error.message,
8322                            ),
8323                        )
8324                    }
8325                    "TooManyTargets" => {
8326                        return RusotoError::Service(RegisterTargetsError::TooManyTargets(
8327                            parsed_error.message,
8328                        ))
8329                    }
8330                    _ => {}
8331                }
8332            }
8333        }
8334        RusotoError::Unknown(res)
8335    }
8336
8337    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8338    where
8339        T: Peek + Next,
8340    {
8341        xml_util::start_element("ErrorResponse", stack)?;
8342        XmlErrorDeserializer::deserialize("Error", stack)
8343    }
8344}
8345impl fmt::Display for RegisterTargetsError {
8346    #[allow(unused_variables)]
8347    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8348        match *self {
8349            RegisterTargetsError::InvalidTarget(ref cause) => write!(f, "{}", cause),
8350            RegisterTargetsError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
8351            RegisterTargetsError::TooManyRegistrationsForTargetId(ref cause) => {
8352                write!(f, "{}", cause)
8353            }
8354            RegisterTargetsError::TooManyTargets(ref cause) => write!(f, "{}", cause),
8355        }
8356    }
8357}
8358impl Error for RegisterTargetsError {}
8359/// Errors returned by RemoveListenerCertificates
8360#[derive(Debug, PartialEq)]
8361pub enum RemoveListenerCertificatesError {
8362    /// <p>The specified listener does not exist.</p>
8363    ListenerNotFound(String),
8364    /// <p>This operation is not allowed.</p>
8365    OperationNotPermitted(String),
8366}
8367
8368impl RemoveListenerCertificatesError {
8369    pub fn from_response(
8370        res: BufferedHttpResponse,
8371    ) -> RusotoError<RemoveListenerCertificatesError> {
8372        {
8373            let reader = EventReader::new(res.body.as_ref());
8374            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8375            find_start_element(&mut stack);
8376            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8377                match &parsed_error.code[..] {
8378                    "ListenerNotFound" => {
8379                        return RusotoError::Service(
8380                            RemoveListenerCertificatesError::ListenerNotFound(parsed_error.message),
8381                        )
8382                    }
8383                    "OperationNotPermitted" => {
8384                        return RusotoError::Service(
8385                            RemoveListenerCertificatesError::OperationNotPermitted(
8386                                parsed_error.message,
8387                            ),
8388                        )
8389                    }
8390                    _ => {}
8391                }
8392            }
8393        }
8394        RusotoError::Unknown(res)
8395    }
8396
8397    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8398    where
8399        T: Peek + Next,
8400    {
8401        xml_util::start_element("ErrorResponse", stack)?;
8402        XmlErrorDeserializer::deserialize("Error", stack)
8403    }
8404}
8405impl fmt::Display for RemoveListenerCertificatesError {
8406    #[allow(unused_variables)]
8407    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8408        match *self {
8409            RemoveListenerCertificatesError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
8410            RemoveListenerCertificatesError::OperationNotPermitted(ref cause) => {
8411                write!(f, "{}", cause)
8412            }
8413        }
8414    }
8415}
8416impl Error for RemoveListenerCertificatesError {}
8417/// Errors returned by RemoveTags
8418#[derive(Debug, PartialEq)]
8419pub enum RemoveTagsError {
8420    /// <p>The specified listener does not exist.</p>
8421    ListenerNotFound(String),
8422    /// <p>The specified load balancer does not exist.</p>
8423    LoadBalancerNotFound(String),
8424    /// <p>The specified rule does not exist.</p>
8425    RuleNotFound(String),
8426    /// <p>The specified target group does not exist.</p>
8427    TargetGroupNotFound(String),
8428    /// <p>You've reached the limit on the number of tags per load balancer.</p>
8429    TooManyTags(String),
8430}
8431
8432impl RemoveTagsError {
8433    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsError> {
8434        {
8435            let reader = EventReader::new(res.body.as_ref());
8436            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8437            find_start_element(&mut stack);
8438            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8439                match &parsed_error.code[..] {
8440                    "ListenerNotFound" => {
8441                        return RusotoError::Service(RemoveTagsError::ListenerNotFound(
8442                            parsed_error.message,
8443                        ))
8444                    }
8445                    "LoadBalancerNotFound" => {
8446                        return RusotoError::Service(RemoveTagsError::LoadBalancerNotFound(
8447                            parsed_error.message,
8448                        ))
8449                    }
8450                    "RuleNotFound" => {
8451                        return RusotoError::Service(RemoveTagsError::RuleNotFound(
8452                            parsed_error.message,
8453                        ))
8454                    }
8455                    "TargetGroupNotFound" => {
8456                        return RusotoError::Service(RemoveTagsError::TargetGroupNotFound(
8457                            parsed_error.message,
8458                        ))
8459                    }
8460                    "TooManyTags" => {
8461                        return RusotoError::Service(RemoveTagsError::TooManyTags(
8462                            parsed_error.message,
8463                        ))
8464                    }
8465                    _ => {}
8466                }
8467            }
8468        }
8469        RusotoError::Unknown(res)
8470    }
8471
8472    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8473    where
8474        T: Peek + Next,
8475    {
8476        xml_util::start_element("ErrorResponse", stack)?;
8477        XmlErrorDeserializer::deserialize("Error", stack)
8478    }
8479}
8480impl fmt::Display for RemoveTagsError {
8481    #[allow(unused_variables)]
8482    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8483        match *self {
8484            RemoveTagsError::ListenerNotFound(ref cause) => write!(f, "{}", cause),
8485            RemoveTagsError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
8486            RemoveTagsError::RuleNotFound(ref cause) => write!(f, "{}", cause),
8487            RemoveTagsError::TargetGroupNotFound(ref cause) => write!(f, "{}", cause),
8488            RemoveTagsError::TooManyTags(ref cause) => write!(f, "{}", cause),
8489        }
8490    }
8491}
8492impl Error for RemoveTagsError {}
8493/// Errors returned by SetIpAddressType
8494#[derive(Debug, PartialEq)]
8495pub enum SetIpAddressTypeError {
8496    /// <p>The requested configuration is not valid.</p>
8497    InvalidConfigurationRequest(String),
8498    /// <p>The specified subnet is out of available addresses.</p>
8499    InvalidSubnet(String),
8500    /// <p>The specified load balancer does not exist.</p>
8501    LoadBalancerNotFound(String),
8502}
8503
8504impl SetIpAddressTypeError {
8505    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetIpAddressTypeError> {
8506        {
8507            let reader = EventReader::new(res.body.as_ref());
8508            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8509            find_start_element(&mut stack);
8510            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8511                match &parsed_error.code[..] {
8512                    "InvalidConfigurationRequest" => {
8513                        return RusotoError::Service(
8514                            SetIpAddressTypeError::InvalidConfigurationRequest(
8515                                parsed_error.message,
8516                            ),
8517                        )
8518                    }
8519                    "InvalidSubnet" => {
8520                        return RusotoError::Service(SetIpAddressTypeError::InvalidSubnet(
8521                            parsed_error.message,
8522                        ))
8523                    }
8524                    "LoadBalancerNotFound" => {
8525                        return RusotoError::Service(SetIpAddressTypeError::LoadBalancerNotFound(
8526                            parsed_error.message,
8527                        ))
8528                    }
8529                    _ => {}
8530                }
8531            }
8532        }
8533        RusotoError::Unknown(res)
8534    }
8535
8536    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8537    where
8538        T: Peek + Next,
8539    {
8540        xml_util::start_element("ErrorResponse", stack)?;
8541        XmlErrorDeserializer::deserialize("Error", stack)
8542    }
8543}
8544impl fmt::Display for SetIpAddressTypeError {
8545    #[allow(unused_variables)]
8546    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8547        match *self {
8548            SetIpAddressTypeError::InvalidConfigurationRequest(ref cause) => write!(f, "{}", cause),
8549            SetIpAddressTypeError::InvalidSubnet(ref cause) => write!(f, "{}", cause),
8550            SetIpAddressTypeError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
8551        }
8552    }
8553}
8554impl Error for SetIpAddressTypeError {}
8555/// Errors returned by SetRulePriorities
8556#[derive(Debug, PartialEq)]
8557pub enum SetRulePrioritiesError {
8558    /// <p>This operation is not allowed.</p>
8559    OperationNotPermitted(String),
8560    /// <p>The specified priority is in use.</p>
8561    PriorityInUse(String),
8562    /// <p>The specified rule does not exist.</p>
8563    RuleNotFound(String),
8564}
8565
8566impl SetRulePrioritiesError {
8567    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetRulePrioritiesError> {
8568        {
8569            let reader = EventReader::new(res.body.as_ref());
8570            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8571            find_start_element(&mut stack);
8572            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8573                match &parsed_error.code[..] {
8574                    "OperationNotPermitted" => {
8575                        return RusotoError::Service(SetRulePrioritiesError::OperationNotPermitted(
8576                            parsed_error.message,
8577                        ))
8578                    }
8579                    "PriorityInUse" => {
8580                        return RusotoError::Service(SetRulePrioritiesError::PriorityInUse(
8581                            parsed_error.message,
8582                        ))
8583                    }
8584                    "RuleNotFound" => {
8585                        return RusotoError::Service(SetRulePrioritiesError::RuleNotFound(
8586                            parsed_error.message,
8587                        ))
8588                    }
8589                    _ => {}
8590                }
8591            }
8592        }
8593        RusotoError::Unknown(res)
8594    }
8595
8596    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8597    where
8598        T: Peek + Next,
8599    {
8600        xml_util::start_element("ErrorResponse", stack)?;
8601        XmlErrorDeserializer::deserialize("Error", stack)
8602    }
8603}
8604impl fmt::Display for SetRulePrioritiesError {
8605    #[allow(unused_variables)]
8606    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8607        match *self {
8608            SetRulePrioritiesError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
8609            SetRulePrioritiesError::PriorityInUse(ref cause) => write!(f, "{}", cause),
8610            SetRulePrioritiesError::RuleNotFound(ref cause) => write!(f, "{}", cause),
8611        }
8612    }
8613}
8614impl Error for SetRulePrioritiesError {}
8615/// Errors returned by SetSecurityGroups
8616#[derive(Debug, PartialEq)]
8617pub enum SetSecurityGroupsError {
8618    /// <p>The requested configuration is not valid.</p>
8619    InvalidConfigurationRequest(String),
8620    /// <p>The specified security group does not exist.</p>
8621    InvalidSecurityGroup(String),
8622    /// <p>The specified load balancer does not exist.</p>
8623    LoadBalancerNotFound(String),
8624}
8625
8626impl SetSecurityGroupsError {
8627    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetSecurityGroupsError> {
8628        {
8629            let reader = EventReader::new(res.body.as_ref());
8630            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8631            find_start_element(&mut stack);
8632            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8633                match &parsed_error.code[..] {
8634                    "InvalidConfigurationRequest" => {
8635                        return RusotoError::Service(
8636                            SetSecurityGroupsError::InvalidConfigurationRequest(
8637                                parsed_error.message,
8638                            ),
8639                        )
8640                    }
8641                    "InvalidSecurityGroup" => {
8642                        return RusotoError::Service(SetSecurityGroupsError::InvalidSecurityGroup(
8643                            parsed_error.message,
8644                        ))
8645                    }
8646                    "LoadBalancerNotFound" => {
8647                        return RusotoError::Service(SetSecurityGroupsError::LoadBalancerNotFound(
8648                            parsed_error.message,
8649                        ))
8650                    }
8651                    _ => {}
8652                }
8653            }
8654        }
8655        RusotoError::Unknown(res)
8656    }
8657
8658    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8659    where
8660        T: Peek + Next,
8661    {
8662        xml_util::start_element("ErrorResponse", stack)?;
8663        XmlErrorDeserializer::deserialize("Error", stack)
8664    }
8665}
8666impl fmt::Display for SetSecurityGroupsError {
8667    #[allow(unused_variables)]
8668    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8669        match *self {
8670            SetSecurityGroupsError::InvalidConfigurationRequest(ref cause) => {
8671                write!(f, "{}", cause)
8672            }
8673            SetSecurityGroupsError::InvalidSecurityGroup(ref cause) => write!(f, "{}", cause),
8674            SetSecurityGroupsError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
8675        }
8676    }
8677}
8678impl Error for SetSecurityGroupsError {}
8679/// Errors returned by SetSubnets
8680#[derive(Debug, PartialEq)]
8681pub enum SetSubnetsError {
8682    /// <p>The specified allocation ID does not exist.</p>
8683    AllocationIdNotFound(String),
8684    /// <p>The specified Availability Zone is not supported.</p>
8685    AvailabilityZoneNotSupported(String),
8686    /// <p>The requested configuration is not valid.</p>
8687    InvalidConfigurationRequest(String),
8688    /// <p>The specified subnet is out of available addresses.</p>
8689    InvalidSubnet(String),
8690    /// <p>The specified load balancer does not exist.</p>
8691    LoadBalancerNotFound(String),
8692    /// <p>The specified subnet does not exist.</p>
8693    SubnetNotFound(String),
8694}
8695
8696impl SetSubnetsError {
8697    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetSubnetsError> {
8698        {
8699            let reader = EventReader::new(res.body.as_ref());
8700            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8701            find_start_element(&mut stack);
8702            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8703                match &parsed_error.code[..] {
8704                    "AllocationIdNotFound" => {
8705                        return RusotoError::Service(SetSubnetsError::AllocationIdNotFound(
8706                            parsed_error.message,
8707                        ))
8708                    }
8709                    "AvailabilityZoneNotSupported" => {
8710                        return RusotoError::Service(SetSubnetsError::AvailabilityZoneNotSupported(
8711                            parsed_error.message,
8712                        ))
8713                    }
8714                    "InvalidConfigurationRequest" => {
8715                        return RusotoError::Service(SetSubnetsError::InvalidConfigurationRequest(
8716                            parsed_error.message,
8717                        ))
8718                    }
8719                    "InvalidSubnet" => {
8720                        return RusotoError::Service(SetSubnetsError::InvalidSubnet(
8721                            parsed_error.message,
8722                        ))
8723                    }
8724                    "LoadBalancerNotFound" => {
8725                        return RusotoError::Service(SetSubnetsError::LoadBalancerNotFound(
8726                            parsed_error.message,
8727                        ))
8728                    }
8729                    "SubnetNotFound" => {
8730                        return RusotoError::Service(SetSubnetsError::SubnetNotFound(
8731                            parsed_error.message,
8732                        ))
8733                    }
8734                    _ => {}
8735                }
8736            }
8737        }
8738        RusotoError::Unknown(res)
8739    }
8740
8741    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8742    where
8743        T: Peek + Next,
8744    {
8745        xml_util::start_element("ErrorResponse", stack)?;
8746        XmlErrorDeserializer::deserialize("Error", stack)
8747    }
8748}
8749impl fmt::Display for SetSubnetsError {
8750    #[allow(unused_variables)]
8751    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8752        match *self {
8753            SetSubnetsError::AllocationIdNotFound(ref cause) => write!(f, "{}", cause),
8754            SetSubnetsError::AvailabilityZoneNotSupported(ref cause) => write!(f, "{}", cause),
8755            SetSubnetsError::InvalidConfigurationRequest(ref cause) => write!(f, "{}", cause),
8756            SetSubnetsError::InvalidSubnet(ref cause) => write!(f, "{}", cause),
8757            SetSubnetsError::LoadBalancerNotFound(ref cause) => write!(f, "{}", cause),
8758            SetSubnetsError::SubnetNotFound(ref cause) => write!(f, "{}", cause),
8759        }
8760    }
8761}
8762impl Error for SetSubnetsError {}
8763/// Trait representing the capabilities of the Elastic Load Balancing v2 API. Elastic Load Balancing v2 clients implement this trait.
8764#[async_trait]
8765pub trait Elb {
8766    /// <p>Adds the specified SSL server certificate to the certificate list for the specified HTTPS or TLS listener.</p> <p>If the certificate in already in the certificate list, the call is successful but the certificate is not added again.</p> <p>To get the certificate list for a listener, use <a>DescribeListenerCertificates</a>. To remove certificates from the certificate list for a listener, use <a>RemoveListenerCertificates</a>. To replace the default certificate for a listener, use <a>ModifyListener</a>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates">SSL Certificates</a> in the <i>Application Load Balancers Guide</i>.</p>
8767    async fn add_listener_certificates(
8768        &self,
8769        input: AddListenerCertificatesInput,
8770    ) -> Result<AddListenerCertificatesOutput, RusotoError<AddListenerCertificatesError>>;
8771
8772    /// <p>Adds the specified tags to the specified Elastic Load Balancing resource. You can tag your Application Load Balancers, Network Load Balancers, and your target groups.</p> <p>Each tag consists of a key and an optional value. If a resource already has a tag with the same key, <code>AddTags</code> updates its value.</p> <p>To list the current tags for your resources, use <a>DescribeTags</a>. To remove tags from your resources, use <a>RemoveTags</a>.</p>
8773    async fn add_tags(
8774        &self,
8775        input: AddTagsInput,
8776    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>>;
8777
8778    /// <p>Creates a listener for the specified Application Load Balancer or Network Load Balancer.</p> <p>To update a listener, use <a>ModifyListener</a>. When you are finished with a listener, you can delete it using <a>DeleteListener</a>. If you are finished with both the listener and the load balancer, you can delete them both using <a>DeleteLoadBalancer</a>.</p> <p>This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple listeners with the same settings, each call succeeds.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html">Listeners for Your Application Load Balancers</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html">Listeners for Your Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
8779    async fn create_listener(
8780        &self,
8781        input: CreateListenerInput,
8782    ) -> Result<CreateListenerOutput, RusotoError<CreateListenerError>>;
8783
8784    /// <p>Creates an Application Load Balancer or a Network Load Balancer.</p> <p>When you create a load balancer, you can specify security groups, public subnets, IP address type, and tags. Otherwise, you could do so later using <a>SetSecurityGroups</a>, <a>SetSubnets</a>, <a>SetIpAddressType</a>, and <a>AddTags</a>.</p> <p>To create listeners for your load balancer, use <a>CreateListener</a>. To describe your current load balancers, see <a>DescribeLoadBalancers</a>. When you are finished with a load balancer, you can delete it using <a>DeleteLoadBalancer</a>.</p> <p>For limit information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html">Limits for Your Application Load Balancer</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html">Limits for Your Network Load Balancer</a> in the <i>Network Load Balancers Guide</i>.</p> <p>This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple load balancers with the same settings, each call succeeds.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html">Application Load Balancers</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html">Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
8785    async fn create_load_balancer(
8786        &self,
8787        input: CreateLoadBalancerInput,
8788    ) -> Result<CreateLoadBalancerOutput, RusotoError<CreateLoadBalancerError>>;
8789
8790    /// <p>Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer.</p> <p>Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules">Listener Rules</a> in the <i>Application Load Balancers Guide</i>.</p> <p>To view your current rules, use <a>DescribeRules</a>. To update a rule, use <a>ModifyRule</a>. To set the priorities of your rules, use <a>SetRulePriorities</a>. To delete a rule, use <a>DeleteRule</a>.</p>
8791    async fn create_rule(
8792        &self,
8793        input: CreateRuleInput,
8794    ) -> Result<CreateRuleOutput, RusotoError<CreateRuleError>>;
8795
8796    /// <p>Creates a target group.</p> <p>To register targets with the target group, use <a>RegisterTargets</a>. To update the health check settings for the target group, use <a>ModifyTargetGroup</a>. To monitor the health of targets in the target group, use <a>DescribeTargetHealth</a>.</p> <p>To route traffic to the targets in a target group, specify the target group in an action using <a>CreateListener</a> or <a>CreateRule</a>.</p> <p>To delete a target group, use <a>DeleteTargetGroup</a>.</p> <p>This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple target groups with the same settings, each call succeeds.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html">Target Groups for Your Application Load Balancers</a> in the <i>Application Load Balancers Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html">Target Groups for Your Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
8797    async fn create_target_group(
8798        &self,
8799        input: CreateTargetGroupInput,
8800    ) -> Result<CreateTargetGroupOutput, RusotoError<CreateTargetGroupError>>;
8801
8802    /// <p>Deletes the specified listener.</p> <p>Alternatively, your listener is deleted when you delete the load balancer to which it is attached, using <a>DeleteLoadBalancer</a>.</p>
8803    async fn delete_listener(
8804        &self,
8805        input: DeleteListenerInput,
8806    ) -> Result<DeleteListenerOutput, RusotoError<DeleteListenerError>>;
8807
8808    /// <p>Deletes the specified Application Load Balancer or Network Load Balancer and its attached listeners.</p> <p>You can't delete a load balancer if deletion protection is enabled. If the load balancer does not exist or has already been deleted, the call succeeds.</p> <p>Deleting a load balancer does not affect its registered targets. For example, your EC2 instances continue to run and are still registered to their target groups. If you no longer need these EC2 instances, you can stop or terminate them.</p>
8809    async fn delete_load_balancer(
8810        &self,
8811        input: DeleteLoadBalancerInput,
8812    ) -> Result<DeleteLoadBalancerOutput, RusotoError<DeleteLoadBalancerError>>;
8813
8814    /// <p>Deletes the specified rule.</p>
8815    async fn delete_rule(
8816        &self,
8817        input: DeleteRuleInput,
8818    ) -> Result<DeleteRuleOutput, RusotoError<DeleteRuleError>>;
8819
8820    /// <p>Deletes the specified target group.</p> <p>You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks.</p>
8821    async fn delete_target_group(
8822        &self,
8823        input: DeleteTargetGroupInput,
8824    ) -> Result<DeleteTargetGroupOutput, RusotoError<DeleteTargetGroupError>>;
8825
8826    /// <p>Deregisters the specified targets from the specified target group. After the targets are deregistered, they no longer receive traffic from the load balancer.</p>
8827    async fn deregister_targets(
8828        &self,
8829        input: DeregisterTargetsInput,
8830    ) -> Result<DeregisterTargetsOutput, RusotoError<DeregisterTargetsError>>;
8831
8832    /// <p>Describes the current Elastic Load Balancing resource limits for your AWS account.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html">Limits for Your Application Load Balancers</a> in the <i>Application Load Balancer Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html">Limits for Your Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
8833    async fn describe_account_limits(
8834        &self,
8835        input: DescribeAccountLimitsInput,
8836    ) -> Result<DescribeAccountLimitsOutput, RusotoError<DescribeAccountLimitsError>>;
8837
8838    /// <p>Describes the default certificate and the certificate list for the specified HTTPS or TLS listener.</p> <p>If the default certificate is also in the certificate list, it appears twice in the results (once with <code>IsDefault</code> set to true and once with <code>IsDefault</code> set to false).</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates">SSL Certificates</a> in the <i>Application Load Balancers Guide</i>.</p>
8839    async fn describe_listener_certificates(
8840        &self,
8841        input: DescribeListenerCertificatesInput,
8842    ) -> Result<DescribeListenerCertificatesOutput, RusotoError<DescribeListenerCertificatesError>>;
8843
8844    /// <p>Describes the specified listeners or the listeners for the specified Application Load Balancer or Network Load Balancer. You must specify either a load balancer or one or more listeners.</p> <p>For an HTTPS or TLS listener, the output includes the default certificate for the listener. To describe the certificate list for the listener, use <a>DescribeListenerCertificates</a>.</p>
8845    async fn describe_listeners(
8846        &self,
8847        input: DescribeListenersInput,
8848    ) -> Result<DescribeListenersOutput, RusotoError<DescribeListenersError>>;
8849
8850    /// <p>Describes the attributes for the specified Application Load Balancer or Network Load Balancer.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes">Load Balancer Attributes</a> in the <i>Application Load Balancers Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#load-balancer-attributes">Load Balancer Attributes</a> in the <i>Network Load Balancers Guide</i>.</p>
8851    async fn describe_load_balancer_attributes(
8852        &self,
8853        input: DescribeLoadBalancerAttributesInput,
8854    ) -> Result<
8855        DescribeLoadBalancerAttributesOutput,
8856        RusotoError<DescribeLoadBalancerAttributesError>,
8857    >;
8858
8859    /// <p>Describes the specified load balancers or all of your load balancers.</p> <p>To describe the listeners for a load balancer, use <a>DescribeListeners</a>. To describe the attributes for a load balancer, use <a>DescribeLoadBalancerAttributes</a>.</p>
8860    async fn describe_load_balancers(
8861        &self,
8862        input: DescribeLoadBalancersInput,
8863    ) -> Result<DescribeLoadBalancersOutput, RusotoError<DescribeLoadBalancersError>>;
8864
8865    /// <p>Describes the specified rules or the rules for the specified listener. You must specify either a listener or one or more rules.</p>
8866    async fn describe_rules(
8867        &self,
8868        input: DescribeRulesInput,
8869    ) -> Result<DescribeRulesOutput, RusotoError<DescribeRulesError>>;
8870
8871    /// <p>Describes the specified policies or all policies used for SSL negotiation.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies">Security Policies</a> in the <i>Application Load Balancers Guide</i>.</p>
8872    async fn describe_ssl_policies(
8873        &self,
8874        input: DescribeSSLPoliciesInput,
8875    ) -> Result<DescribeSSLPoliciesOutput, RusotoError<DescribeSSLPoliciesError>>;
8876
8877    /// <p>Describes the tags for the specified resources. You can describe the tags for one or more Application Load Balancers, Network Load Balancers, and target groups.</p>
8878    async fn describe_tags(
8879        &self,
8880        input: DescribeTagsInput,
8881    ) -> Result<DescribeTagsOutput, RusotoError<DescribeTagsError>>;
8882
8883    /// <p>Describes the attributes for the specified target group.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes">Target Group Attributes</a> in the <i>Application Load Balancers Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#target-group-attributes">Target Group Attributes</a> in the <i>Network Load Balancers Guide</i>.</p>
8884    async fn describe_target_group_attributes(
8885        &self,
8886        input: DescribeTargetGroupAttributesInput,
8887    ) -> Result<DescribeTargetGroupAttributesOutput, RusotoError<DescribeTargetGroupAttributesError>>;
8888
8889    /// <p>Describes the specified target groups or all of your target groups. By default, all target groups are described. Alternatively, you can specify one of the following to filter the results: the ARN of the load balancer, the names of one or more target groups, or the ARNs of one or more target groups.</p> <p>To describe the targets for a target group, use <a>DescribeTargetHealth</a>. To describe the attributes of a target group, use <a>DescribeTargetGroupAttributes</a>.</p>
8890    async fn describe_target_groups(
8891        &self,
8892        input: DescribeTargetGroupsInput,
8893    ) -> Result<DescribeTargetGroupsOutput, RusotoError<DescribeTargetGroupsError>>;
8894
8895    /// <p>Describes the health of the specified targets or all of your targets.</p>
8896    async fn describe_target_health(
8897        &self,
8898        input: DescribeTargetHealthInput,
8899    ) -> Result<DescribeTargetHealthOutput, RusotoError<DescribeTargetHealthError>>;
8900
8901    /// <p>Replaces the specified properties of the specified listener. Any properties that you do not specify remain unchanged.</p> <p>Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the security policy and default certificate properties. If you change the protocol from HTTP to HTTPS, or from TCP to TLS, you must add the security policy and default certificate properties.</p> <p>To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.</p>
8902    async fn modify_listener(
8903        &self,
8904        input: ModifyListenerInput,
8905    ) -> Result<ModifyListenerOutput, RusotoError<ModifyListenerError>>;
8906
8907    /// <p>Modifies the specified attributes of the specified Application Load Balancer or Network Load Balancer.</p> <p>If any of the specified attributes can't be modified as requested, the call fails. Any existing attributes that you do not modify retain their current values.</p>
8908    async fn modify_load_balancer_attributes(
8909        &self,
8910        input: ModifyLoadBalancerAttributesInput,
8911    ) -> Result<ModifyLoadBalancerAttributesOutput, RusotoError<ModifyLoadBalancerAttributesError>>;
8912
8913    /// <p>Replaces the specified properties of the specified rule. Any properties that you do not specify are unchanged.</p> <p>To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.</p> <p>To modify the actions for the default rule, use <a>ModifyListener</a>.</p>
8914    async fn modify_rule(
8915        &self,
8916        input: ModifyRuleInput,
8917    ) -> Result<ModifyRuleOutput, RusotoError<ModifyRuleError>>;
8918
8919    /// <p>Modifies the health checks used when evaluating the health state of the targets in the specified target group.</p> <p>To monitor the health of the targets, use <a>DescribeTargetHealth</a>.</p>
8920    async fn modify_target_group(
8921        &self,
8922        input: ModifyTargetGroupInput,
8923    ) -> Result<ModifyTargetGroupOutput, RusotoError<ModifyTargetGroupError>>;
8924
8925    /// <p>Modifies the specified attributes of the specified target group.</p>
8926    async fn modify_target_group_attributes(
8927        &self,
8928        input: ModifyTargetGroupAttributesInput,
8929    ) -> Result<ModifyTargetGroupAttributesOutput, RusotoError<ModifyTargetGroupAttributesError>>;
8930
8931    /// <p>Registers the specified targets with the specified target group.</p> <p>If the target is an EC2 instance, it must be in the <code>running</code> state when you register it.</p> <p>By default, the load balancer routes requests to registered targets using the protocol and port for the target group. Alternatively, you can override the port for a target when you register it. You can register each EC2 instance or IP address with the same target group multiple times using different ports.</p> <p>With a Network Load Balancer, you cannot register instances by instance ID if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these types by IP address.</p> <p>To remove a target from a target group, use <a>DeregisterTargets</a>.</p>
8932    async fn register_targets(
8933        &self,
8934        input: RegisterTargetsInput,
8935    ) -> Result<RegisterTargetsOutput, RusotoError<RegisterTargetsError>>;
8936
8937    /// <p>Removes the specified certificate from the certificate list for the specified HTTPS or TLS listener.</p> <p>You can't remove the default certificate for a listener. To replace the default certificate, call <a>ModifyListener</a>.</p> <p>To list the certificates for your listener, use <a>DescribeListenerCertificates</a>.</p>
8938    async fn remove_listener_certificates(
8939        &self,
8940        input: RemoveListenerCertificatesInput,
8941    ) -> Result<RemoveListenerCertificatesOutput, RusotoError<RemoveListenerCertificatesError>>;
8942
8943    /// <p>Removes the specified tags from the specified Elastic Load Balancing resource.</p> <p>To list the current tags for your resources, use <a>DescribeTags</a>.</p>
8944    async fn remove_tags(
8945        &self,
8946        input: RemoveTagsInput,
8947    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>>;
8948
8949    /// <p>Sets the type of IP addresses used by the subnets of the specified Application Load Balancer or Network Load Balancer.</p>
8950    async fn set_ip_address_type(
8951        &self,
8952        input: SetIpAddressTypeInput,
8953    ) -> Result<SetIpAddressTypeOutput, RusotoError<SetIpAddressTypeError>>;
8954
8955    /// <p>Sets the priorities of the specified rules.</p> <p>You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.</p>
8956    async fn set_rule_priorities(
8957        &self,
8958        input: SetRulePrioritiesInput,
8959    ) -> Result<SetRulePrioritiesOutput, RusotoError<SetRulePrioritiesError>>;
8960
8961    /// <p>Associates the specified security groups with the specified Application Load Balancer. The specified security groups override the previously associated security groups.</p> <p>You can't specify a security group for a Network Load Balancer.</p>
8962    async fn set_security_groups(
8963        &self,
8964        input: SetSecurityGroupsInput,
8965    ) -> Result<SetSecurityGroupsOutput, RusotoError<SetSecurityGroupsError>>;
8966
8967    /// <p>Enables the Availability Zones for the specified public subnets for the specified load balancer. The specified subnets replace the previously enabled subnets.</p> <p>When you specify subnets for a Network Load Balancer, you must include all subnets that were enabled previously, with their existing configurations, plus any additional subnets.</p>
8968    async fn set_subnets(
8969        &self,
8970        input: SetSubnetsInput,
8971    ) -> Result<SetSubnetsOutput, RusotoError<SetSubnetsError>>;
8972}
8973/// A client for the Elastic Load Balancing v2 API.
8974#[derive(Clone)]
8975pub struct ElbClient {
8976    client: Client,
8977    region: region::Region,
8978}
8979
8980impl ElbClient {
8981    /// Creates a client backed by the default tokio event loop.
8982    ///
8983    /// The client will use the default credentials provider and tls client.
8984    pub fn new(region: region::Region) -> ElbClient {
8985        ElbClient {
8986            client: Client::shared(),
8987            region,
8988        }
8989    }
8990
8991    pub fn new_with<P, D>(
8992        request_dispatcher: D,
8993        credentials_provider: P,
8994        region: region::Region,
8995    ) -> ElbClient
8996    where
8997        P: ProvideAwsCredentials + Send + Sync + 'static,
8998        D: DispatchSignedRequest + Send + Sync + 'static,
8999    {
9000        ElbClient {
9001            client: Client::new_with(credentials_provider, request_dispatcher),
9002            region,
9003        }
9004    }
9005
9006    pub fn new_with_client(client: Client, region: region::Region) -> ElbClient {
9007        ElbClient { client, region }
9008    }
9009}
9010
9011#[async_trait]
9012impl Elb for ElbClient {
9013    /// <p>Adds the specified SSL server certificate to the certificate list for the specified HTTPS or TLS listener.</p> <p>If the certificate in already in the certificate list, the call is successful but the certificate is not added again.</p> <p>To get the certificate list for a listener, use <a>DescribeListenerCertificates</a>. To remove certificates from the certificate list for a listener, use <a>RemoveListenerCertificates</a>. To replace the default certificate for a listener, use <a>ModifyListener</a>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates">SSL Certificates</a> in the <i>Application Load Balancers Guide</i>.</p>
9014    async fn add_listener_certificates(
9015        &self,
9016        input: AddListenerCertificatesInput,
9017    ) -> Result<AddListenerCertificatesOutput, RusotoError<AddListenerCertificatesError>> {
9018        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9019        let params = self.new_params("AddListenerCertificates");
9020        let mut params = params;
9021        AddListenerCertificatesInputSerializer::serialize(&mut params, "", &input);
9022        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9023        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9024
9025        let response = self
9026            .sign_and_dispatch(request, AddListenerCertificatesError::from_response)
9027            .await?;
9028
9029        let mut response = response;
9030        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9031            xml_util::start_element(actual_tag_name, stack)?;
9032            let result = AddListenerCertificatesOutputDeserializer::deserialize(
9033                "AddListenerCertificatesResult",
9034                stack,
9035            )?;
9036            skip_tree(stack);
9037            xml_util::end_element(actual_tag_name, stack)?;
9038            Ok(result)
9039        })
9040        .await?;
9041
9042        drop(response); // parse non-payload
9043        Ok(result)
9044    }
9045
9046    /// <p>Adds the specified tags to the specified Elastic Load Balancing resource. You can tag your Application Load Balancers, Network Load Balancers, and your target groups.</p> <p>Each tag consists of a key and an optional value. If a resource already has a tag with the same key, <code>AddTags</code> updates its value.</p> <p>To list the current tags for your resources, use <a>DescribeTags</a>. To remove tags from your resources, use <a>RemoveTags</a>.</p>
9047    async fn add_tags(
9048        &self,
9049        input: AddTagsInput,
9050    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>> {
9051        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9052        let params = self.new_params("AddTags");
9053        let mut params = params;
9054        AddTagsInputSerializer::serialize(&mut params, "", &input);
9055        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9056        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9057
9058        let response = self
9059            .sign_and_dispatch(request, AddTagsError::from_response)
9060            .await?;
9061
9062        let result = AddTagsOutput::default();
9063
9064        drop(response); // parse non-payload
9065        Ok(result)
9066    }
9067
9068    /// <p>Creates a listener for the specified Application Load Balancer or Network Load Balancer.</p> <p>To update a listener, use <a>ModifyListener</a>. When you are finished with a listener, you can delete it using <a>DeleteListener</a>. If you are finished with both the listener and the load balancer, you can delete them both using <a>DeleteLoadBalancer</a>.</p> <p>This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple listeners with the same settings, each call succeeds.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html">Listeners for Your Application Load Balancers</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html">Listeners for Your Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
9069    async fn create_listener(
9070        &self,
9071        input: CreateListenerInput,
9072    ) -> Result<CreateListenerOutput, RusotoError<CreateListenerError>> {
9073        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9074        let params = self.new_params("CreateListener");
9075        let mut params = params;
9076        CreateListenerInputSerializer::serialize(&mut params, "", &input);
9077        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9078        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9079
9080        let response = self
9081            .sign_and_dispatch(request, CreateListenerError::from_response)
9082            .await?;
9083
9084        let mut response = response;
9085        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9086            xml_util::start_element(actual_tag_name, stack)?;
9087            let result =
9088                CreateListenerOutputDeserializer::deserialize("CreateListenerResult", stack)?;
9089            skip_tree(stack);
9090            xml_util::end_element(actual_tag_name, stack)?;
9091            Ok(result)
9092        })
9093        .await?;
9094
9095        drop(response); // parse non-payload
9096        Ok(result)
9097    }
9098
9099    /// <p>Creates an Application Load Balancer or a Network Load Balancer.</p> <p>When you create a load balancer, you can specify security groups, public subnets, IP address type, and tags. Otherwise, you could do so later using <a>SetSecurityGroups</a>, <a>SetSubnets</a>, <a>SetIpAddressType</a>, and <a>AddTags</a>.</p> <p>To create listeners for your load balancer, use <a>CreateListener</a>. To describe your current load balancers, see <a>DescribeLoadBalancers</a>. When you are finished with a load balancer, you can delete it using <a>DeleteLoadBalancer</a>.</p> <p>For limit information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html">Limits for Your Application Load Balancer</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html">Limits for Your Network Load Balancer</a> in the <i>Network Load Balancers Guide</i>.</p> <p>This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple load balancers with the same settings, each call succeeds.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html">Application Load Balancers</a> in the <i>Application Load Balancers Guide</i> and <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html">Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
9100    async fn create_load_balancer(
9101        &self,
9102        input: CreateLoadBalancerInput,
9103    ) -> Result<CreateLoadBalancerOutput, RusotoError<CreateLoadBalancerError>> {
9104        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9105        let params = self.new_params("CreateLoadBalancer");
9106        let mut params = params;
9107        CreateLoadBalancerInputSerializer::serialize(&mut params, "", &input);
9108        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9109        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9110
9111        let response = self
9112            .sign_and_dispatch(request, CreateLoadBalancerError::from_response)
9113            .await?;
9114
9115        let mut response = response;
9116        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9117            xml_util::start_element(actual_tag_name, stack)?;
9118            let result = CreateLoadBalancerOutputDeserializer::deserialize(
9119                "CreateLoadBalancerResult",
9120                stack,
9121            )?;
9122            skip_tree(stack);
9123            xml_util::end_element(actual_tag_name, stack)?;
9124            Ok(result)
9125        })
9126        .await?;
9127
9128        drop(response); // parse non-payload
9129        Ok(result)
9130    }
9131
9132    /// <p>Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer.</p> <p>Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules">Listener Rules</a> in the <i>Application Load Balancers Guide</i>.</p> <p>To view your current rules, use <a>DescribeRules</a>. To update a rule, use <a>ModifyRule</a>. To set the priorities of your rules, use <a>SetRulePriorities</a>. To delete a rule, use <a>DeleteRule</a>.</p>
9133    async fn create_rule(
9134        &self,
9135        input: CreateRuleInput,
9136    ) -> Result<CreateRuleOutput, RusotoError<CreateRuleError>> {
9137        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9138        let params = self.new_params("CreateRule");
9139        let mut params = params;
9140        CreateRuleInputSerializer::serialize(&mut params, "", &input);
9141        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9142        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9143
9144        let response = self
9145            .sign_and_dispatch(request, CreateRuleError::from_response)
9146            .await?;
9147
9148        let mut response = response;
9149        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9150            xml_util::start_element(actual_tag_name, stack)?;
9151            let result = CreateRuleOutputDeserializer::deserialize("CreateRuleResult", stack)?;
9152            skip_tree(stack);
9153            xml_util::end_element(actual_tag_name, stack)?;
9154            Ok(result)
9155        })
9156        .await?;
9157
9158        drop(response); // parse non-payload
9159        Ok(result)
9160    }
9161
9162    /// <p>Creates a target group.</p> <p>To register targets with the target group, use <a>RegisterTargets</a>. To update the health check settings for the target group, use <a>ModifyTargetGroup</a>. To monitor the health of targets in the target group, use <a>DescribeTargetHealth</a>.</p> <p>To route traffic to the targets in a target group, specify the target group in an action using <a>CreateListener</a> or <a>CreateRule</a>.</p> <p>To delete a target group, use <a>DeleteTargetGroup</a>.</p> <p>This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple target groups with the same settings, each call succeeds.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html">Target Groups for Your Application Load Balancers</a> in the <i>Application Load Balancers Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html">Target Groups for Your Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
9163    async fn create_target_group(
9164        &self,
9165        input: CreateTargetGroupInput,
9166    ) -> Result<CreateTargetGroupOutput, RusotoError<CreateTargetGroupError>> {
9167        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9168        let params = self.new_params("CreateTargetGroup");
9169        let mut params = params;
9170        CreateTargetGroupInputSerializer::serialize(&mut params, "", &input);
9171        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9172        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9173
9174        let response = self
9175            .sign_and_dispatch(request, CreateTargetGroupError::from_response)
9176            .await?;
9177
9178        let mut response = response;
9179        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9180            xml_util::start_element(actual_tag_name, stack)?;
9181            let result =
9182                CreateTargetGroupOutputDeserializer::deserialize("CreateTargetGroupResult", stack)?;
9183            skip_tree(stack);
9184            xml_util::end_element(actual_tag_name, stack)?;
9185            Ok(result)
9186        })
9187        .await?;
9188
9189        drop(response); // parse non-payload
9190        Ok(result)
9191    }
9192
9193    /// <p>Deletes the specified listener.</p> <p>Alternatively, your listener is deleted when you delete the load balancer to which it is attached, using <a>DeleteLoadBalancer</a>.</p>
9194    async fn delete_listener(
9195        &self,
9196        input: DeleteListenerInput,
9197    ) -> Result<DeleteListenerOutput, RusotoError<DeleteListenerError>> {
9198        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9199        let params = self.new_params("DeleteListener");
9200        let mut params = params;
9201        DeleteListenerInputSerializer::serialize(&mut params, "", &input);
9202        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9203        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9204
9205        let response = self
9206            .sign_and_dispatch(request, DeleteListenerError::from_response)
9207            .await?;
9208
9209        let result = DeleteListenerOutput::default();
9210
9211        drop(response); // parse non-payload
9212        Ok(result)
9213    }
9214
9215    /// <p>Deletes the specified Application Load Balancer or Network Load Balancer and its attached listeners.</p> <p>You can't delete a load balancer if deletion protection is enabled. If the load balancer does not exist or has already been deleted, the call succeeds.</p> <p>Deleting a load balancer does not affect its registered targets. For example, your EC2 instances continue to run and are still registered to their target groups. If you no longer need these EC2 instances, you can stop or terminate them.</p>
9216    async fn delete_load_balancer(
9217        &self,
9218        input: DeleteLoadBalancerInput,
9219    ) -> Result<DeleteLoadBalancerOutput, RusotoError<DeleteLoadBalancerError>> {
9220        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9221        let params = self.new_params("DeleteLoadBalancer");
9222        let mut params = params;
9223        DeleteLoadBalancerInputSerializer::serialize(&mut params, "", &input);
9224        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9225        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9226
9227        let response = self
9228            .sign_and_dispatch(request, DeleteLoadBalancerError::from_response)
9229            .await?;
9230
9231        let result = DeleteLoadBalancerOutput::default();
9232
9233        drop(response); // parse non-payload
9234        Ok(result)
9235    }
9236
9237    /// <p>Deletes the specified rule.</p>
9238    async fn delete_rule(
9239        &self,
9240        input: DeleteRuleInput,
9241    ) -> Result<DeleteRuleOutput, RusotoError<DeleteRuleError>> {
9242        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9243        let params = self.new_params("DeleteRule");
9244        let mut params = params;
9245        DeleteRuleInputSerializer::serialize(&mut params, "", &input);
9246        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9247        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9248
9249        let response = self
9250            .sign_and_dispatch(request, DeleteRuleError::from_response)
9251            .await?;
9252
9253        let result = DeleteRuleOutput::default();
9254
9255        drop(response); // parse non-payload
9256        Ok(result)
9257    }
9258
9259    /// <p>Deletes the specified target group.</p> <p>You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks.</p>
9260    async fn delete_target_group(
9261        &self,
9262        input: DeleteTargetGroupInput,
9263    ) -> Result<DeleteTargetGroupOutput, RusotoError<DeleteTargetGroupError>> {
9264        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9265        let params = self.new_params("DeleteTargetGroup");
9266        let mut params = params;
9267        DeleteTargetGroupInputSerializer::serialize(&mut params, "", &input);
9268        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9269        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9270
9271        let response = self
9272            .sign_and_dispatch(request, DeleteTargetGroupError::from_response)
9273            .await?;
9274
9275        let result = DeleteTargetGroupOutput::default();
9276
9277        drop(response); // parse non-payload
9278        Ok(result)
9279    }
9280
9281    /// <p>Deregisters the specified targets from the specified target group. After the targets are deregistered, they no longer receive traffic from the load balancer.</p>
9282    async fn deregister_targets(
9283        &self,
9284        input: DeregisterTargetsInput,
9285    ) -> Result<DeregisterTargetsOutput, RusotoError<DeregisterTargetsError>> {
9286        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9287        let params = self.new_params("DeregisterTargets");
9288        let mut params = params;
9289        DeregisterTargetsInputSerializer::serialize(&mut params, "", &input);
9290        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9291        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9292
9293        let response = self
9294            .sign_and_dispatch(request, DeregisterTargetsError::from_response)
9295            .await?;
9296
9297        let result = DeregisterTargetsOutput::default();
9298
9299        drop(response); // parse non-payload
9300        Ok(result)
9301    }
9302
9303    /// <p>Describes the current Elastic Load Balancing resource limits for your AWS account.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html">Limits for Your Application Load Balancers</a> in the <i>Application Load Balancer Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html">Limits for Your Network Load Balancers</a> in the <i>Network Load Balancers Guide</i>.</p>
9304    async fn describe_account_limits(
9305        &self,
9306        input: DescribeAccountLimitsInput,
9307    ) -> Result<DescribeAccountLimitsOutput, RusotoError<DescribeAccountLimitsError>> {
9308        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9309        let params = self.new_params("DescribeAccountLimits");
9310        let mut params = params;
9311        DescribeAccountLimitsInputSerializer::serialize(&mut params, "", &input);
9312        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9313        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9314
9315        let response = self
9316            .sign_and_dispatch(request, DescribeAccountLimitsError::from_response)
9317            .await?;
9318
9319        let mut response = response;
9320        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9321            xml_util::start_element(actual_tag_name, stack)?;
9322            let result = DescribeAccountLimitsOutputDeserializer::deserialize(
9323                "DescribeAccountLimitsResult",
9324                stack,
9325            )?;
9326            skip_tree(stack);
9327            xml_util::end_element(actual_tag_name, stack)?;
9328            Ok(result)
9329        })
9330        .await?;
9331
9332        drop(response); // parse non-payload
9333        Ok(result)
9334    }
9335
9336    /// <p>Describes the default certificate and the certificate list for the specified HTTPS or TLS listener.</p> <p>If the default certificate is also in the certificate list, it appears twice in the results (once with <code>IsDefault</code> set to true and once with <code>IsDefault</code> set to false).</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates">SSL Certificates</a> in the <i>Application Load Balancers Guide</i>.</p>
9337    async fn describe_listener_certificates(
9338        &self,
9339        input: DescribeListenerCertificatesInput,
9340    ) -> Result<DescribeListenerCertificatesOutput, RusotoError<DescribeListenerCertificatesError>>
9341    {
9342        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9343        let params = self.new_params("DescribeListenerCertificates");
9344        let mut params = params;
9345        DescribeListenerCertificatesInputSerializer::serialize(&mut params, "", &input);
9346        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9347        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9348
9349        let response = self
9350            .sign_and_dispatch(request, DescribeListenerCertificatesError::from_response)
9351            .await?;
9352
9353        let mut response = response;
9354        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9355            xml_util::start_element(actual_tag_name, stack)?;
9356            let result = DescribeListenerCertificatesOutputDeserializer::deserialize(
9357                "DescribeListenerCertificatesResult",
9358                stack,
9359            )?;
9360            skip_tree(stack);
9361            xml_util::end_element(actual_tag_name, stack)?;
9362            Ok(result)
9363        })
9364        .await?;
9365
9366        drop(response); // parse non-payload
9367        Ok(result)
9368    }
9369
9370    /// <p>Describes the specified listeners or the listeners for the specified Application Load Balancer or Network Load Balancer. You must specify either a load balancer or one or more listeners.</p> <p>For an HTTPS or TLS listener, the output includes the default certificate for the listener. To describe the certificate list for the listener, use <a>DescribeListenerCertificates</a>.</p>
9371    async fn describe_listeners(
9372        &self,
9373        input: DescribeListenersInput,
9374    ) -> Result<DescribeListenersOutput, RusotoError<DescribeListenersError>> {
9375        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9376        let params = self.new_params("DescribeListeners");
9377        let mut params = params;
9378        DescribeListenersInputSerializer::serialize(&mut params, "", &input);
9379        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9380        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9381
9382        let response = self
9383            .sign_and_dispatch(request, DescribeListenersError::from_response)
9384            .await?;
9385
9386        let mut response = response;
9387        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9388            xml_util::start_element(actual_tag_name, stack)?;
9389            let result =
9390                DescribeListenersOutputDeserializer::deserialize("DescribeListenersResult", stack)?;
9391            skip_tree(stack);
9392            xml_util::end_element(actual_tag_name, stack)?;
9393            Ok(result)
9394        })
9395        .await?;
9396
9397        drop(response); // parse non-payload
9398        Ok(result)
9399    }
9400
9401    /// <p>Describes the attributes for the specified Application Load Balancer or Network Load Balancer.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes">Load Balancer Attributes</a> in the <i>Application Load Balancers Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#load-balancer-attributes">Load Balancer Attributes</a> in the <i>Network Load Balancers Guide</i>.</p>
9402    async fn describe_load_balancer_attributes(
9403        &self,
9404        input: DescribeLoadBalancerAttributesInput,
9405    ) -> Result<
9406        DescribeLoadBalancerAttributesOutput,
9407        RusotoError<DescribeLoadBalancerAttributesError>,
9408    > {
9409        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9410        let params = self.new_params("DescribeLoadBalancerAttributes");
9411        let mut params = params;
9412        DescribeLoadBalancerAttributesInputSerializer::serialize(&mut params, "", &input);
9413        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9414        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9415
9416        let response = self
9417            .sign_and_dispatch(request, DescribeLoadBalancerAttributesError::from_response)
9418            .await?;
9419
9420        let mut response = response;
9421        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9422            xml_util::start_element(actual_tag_name, stack)?;
9423            let result = DescribeLoadBalancerAttributesOutputDeserializer::deserialize(
9424                "DescribeLoadBalancerAttributesResult",
9425                stack,
9426            )?;
9427            skip_tree(stack);
9428            xml_util::end_element(actual_tag_name, stack)?;
9429            Ok(result)
9430        })
9431        .await?;
9432
9433        drop(response); // parse non-payload
9434        Ok(result)
9435    }
9436
9437    /// <p>Describes the specified load balancers or all of your load balancers.</p> <p>To describe the listeners for a load balancer, use <a>DescribeListeners</a>. To describe the attributes for a load balancer, use <a>DescribeLoadBalancerAttributes</a>.</p>
9438    async fn describe_load_balancers(
9439        &self,
9440        input: DescribeLoadBalancersInput,
9441    ) -> Result<DescribeLoadBalancersOutput, RusotoError<DescribeLoadBalancersError>> {
9442        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9443        let params = self.new_params("DescribeLoadBalancers");
9444        let mut params = params;
9445        DescribeLoadBalancersInputSerializer::serialize(&mut params, "", &input);
9446        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9447        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9448
9449        let response = self
9450            .sign_and_dispatch(request, DescribeLoadBalancersError::from_response)
9451            .await?;
9452
9453        let mut response = response;
9454        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9455            xml_util::start_element(actual_tag_name, stack)?;
9456            let result = DescribeLoadBalancersOutputDeserializer::deserialize(
9457                "DescribeLoadBalancersResult",
9458                stack,
9459            )?;
9460            skip_tree(stack);
9461            xml_util::end_element(actual_tag_name, stack)?;
9462            Ok(result)
9463        })
9464        .await?;
9465
9466        drop(response); // parse non-payload
9467        Ok(result)
9468    }
9469
9470    /// <p>Describes the specified rules or the rules for the specified listener. You must specify either a listener or one or more rules.</p>
9471    async fn describe_rules(
9472        &self,
9473        input: DescribeRulesInput,
9474    ) -> Result<DescribeRulesOutput, RusotoError<DescribeRulesError>> {
9475        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9476        let params = self.new_params("DescribeRules");
9477        let mut params = params;
9478        DescribeRulesInputSerializer::serialize(&mut params, "", &input);
9479        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9480        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9481
9482        let response = self
9483            .sign_and_dispatch(request, DescribeRulesError::from_response)
9484            .await?;
9485
9486        let mut response = response;
9487        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9488            xml_util::start_element(actual_tag_name, stack)?;
9489            let result =
9490                DescribeRulesOutputDeserializer::deserialize("DescribeRulesResult", stack)?;
9491            skip_tree(stack);
9492            xml_util::end_element(actual_tag_name, stack)?;
9493            Ok(result)
9494        })
9495        .await?;
9496
9497        drop(response); // parse non-payload
9498        Ok(result)
9499    }
9500
9501    /// <p>Describes the specified policies or all policies used for SSL negotiation.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies">Security Policies</a> in the <i>Application Load Balancers Guide</i>.</p>
9502    async fn describe_ssl_policies(
9503        &self,
9504        input: DescribeSSLPoliciesInput,
9505    ) -> Result<DescribeSSLPoliciesOutput, RusotoError<DescribeSSLPoliciesError>> {
9506        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9507        let params = self.new_params("DescribeSSLPolicies");
9508        let mut params = params;
9509        DescribeSSLPoliciesInputSerializer::serialize(&mut params, "", &input);
9510        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9511        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9512
9513        let response = self
9514            .sign_and_dispatch(request, DescribeSSLPoliciesError::from_response)
9515            .await?;
9516
9517        let mut response = response;
9518        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9519            xml_util::start_element(actual_tag_name, stack)?;
9520            let result = DescribeSSLPoliciesOutputDeserializer::deserialize(
9521                "DescribeSSLPoliciesResult",
9522                stack,
9523            )?;
9524            skip_tree(stack);
9525            xml_util::end_element(actual_tag_name, stack)?;
9526            Ok(result)
9527        })
9528        .await?;
9529
9530        drop(response); // parse non-payload
9531        Ok(result)
9532    }
9533
9534    /// <p>Describes the tags for the specified resources. You can describe the tags for one or more Application Load Balancers, Network Load Balancers, and target groups.</p>
9535    async fn describe_tags(
9536        &self,
9537        input: DescribeTagsInput,
9538    ) -> Result<DescribeTagsOutput, RusotoError<DescribeTagsError>> {
9539        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9540        let params = self.new_params("DescribeTags");
9541        let mut params = params;
9542        DescribeTagsInputSerializer::serialize(&mut params, "", &input);
9543        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9544        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9545
9546        let response = self
9547            .sign_and_dispatch(request, DescribeTagsError::from_response)
9548            .await?;
9549
9550        let mut response = response;
9551        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9552            xml_util::start_element(actual_tag_name, stack)?;
9553            let result = DescribeTagsOutputDeserializer::deserialize("DescribeTagsResult", stack)?;
9554            skip_tree(stack);
9555            xml_util::end_element(actual_tag_name, stack)?;
9556            Ok(result)
9557        })
9558        .await?;
9559
9560        drop(response); // parse non-payload
9561        Ok(result)
9562    }
9563
9564    /// <p>Describes the attributes for the specified target group.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes">Target Group Attributes</a> in the <i>Application Load Balancers Guide</i> or <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#target-group-attributes">Target Group Attributes</a> in the <i>Network Load Balancers Guide</i>.</p>
9565    async fn describe_target_group_attributes(
9566        &self,
9567        input: DescribeTargetGroupAttributesInput,
9568    ) -> Result<DescribeTargetGroupAttributesOutput, RusotoError<DescribeTargetGroupAttributesError>>
9569    {
9570        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9571        let params = self.new_params("DescribeTargetGroupAttributes");
9572        let mut params = params;
9573        DescribeTargetGroupAttributesInputSerializer::serialize(&mut params, "", &input);
9574        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9575        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9576
9577        let response = self
9578            .sign_and_dispatch(request, DescribeTargetGroupAttributesError::from_response)
9579            .await?;
9580
9581        let mut response = response;
9582        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9583            xml_util::start_element(actual_tag_name, stack)?;
9584            let result = DescribeTargetGroupAttributesOutputDeserializer::deserialize(
9585                "DescribeTargetGroupAttributesResult",
9586                stack,
9587            )?;
9588            skip_tree(stack);
9589            xml_util::end_element(actual_tag_name, stack)?;
9590            Ok(result)
9591        })
9592        .await?;
9593
9594        drop(response); // parse non-payload
9595        Ok(result)
9596    }
9597
9598    /// <p>Describes the specified target groups or all of your target groups. By default, all target groups are described. Alternatively, you can specify one of the following to filter the results: the ARN of the load balancer, the names of one or more target groups, or the ARNs of one or more target groups.</p> <p>To describe the targets for a target group, use <a>DescribeTargetHealth</a>. To describe the attributes of a target group, use <a>DescribeTargetGroupAttributes</a>.</p>
9599    async fn describe_target_groups(
9600        &self,
9601        input: DescribeTargetGroupsInput,
9602    ) -> Result<DescribeTargetGroupsOutput, RusotoError<DescribeTargetGroupsError>> {
9603        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9604        let params = self.new_params("DescribeTargetGroups");
9605        let mut params = params;
9606        DescribeTargetGroupsInputSerializer::serialize(&mut params, "", &input);
9607        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9608        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9609
9610        let response = self
9611            .sign_and_dispatch(request, DescribeTargetGroupsError::from_response)
9612            .await?;
9613
9614        let mut response = response;
9615        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9616            xml_util::start_element(actual_tag_name, stack)?;
9617            let result = DescribeTargetGroupsOutputDeserializer::deserialize(
9618                "DescribeTargetGroupsResult",
9619                stack,
9620            )?;
9621            skip_tree(stack);
9622            xml_util::end_element(actual_tag_name, stack)?;
9623            Ok(result)
9624        })
9625        .await?;
9626
9627        drop(response); // parse non-payload
9628        Ok(result)
9629    }
9630
9631    /// <p>Describes the health of the specified targets or all of your targets.</p>
9632    async fn describe_target_health(
9633        &self,
9634        input: DescribeTargetHealthInput,
9635    ) -> Result<DescribeTargetHealthOutput, RusotoError<DescribeTargetHealthError>> {
9636        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9637        let params = self.new_params("DescribeTargetHealth");
9638        let mut params = params;
9639        DescribeTargetHealthInputSerializer::serialize(&mut params, "", &input);
9640        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9641        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9642
9643        let response = self
9644            .sign_and_dispatch(request, DescribeTargetHealthError::from_response)
9645            .await?;
9646
9647        let mut response = response;
9648        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9649            xml_util::start_element(actual_tag_name, stack)?;
9650            let result = DescribeTargetHealthOutputDeserializer::deserialize(
9651                "DescribeTargetHealthResult",
9652                stack,
9653            )?;
9654            skip_tree(stack);
9655            xml_util::end_element(actual_tag_name, stack)?;
9656            Ok(result)
9657        })
9658        .await?;
9659
9660        drop(response); // parse non-payload
9661        Ok(result)
9662    }
9663
9664    /// <p>Replaces the specified properties of the specified listener. Any properties that you do not specify remain unchanged.</p> <p>Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the security policy and default certificate properties. If you change the protocol from HTTP to HTTPS, or from TCP to TLS, you must add the security policy and default certificate properties.</p> <p>To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.</p>
9665    async fn modify_listener(
9666        &self,
9667        input: ModifyListenerInput,
9668    ) -> Result<ModifyListenerOutput, RusotoError<ModifyListenerError>> {
9669        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9670        let params = self.new_params("ModifyListener");
9671        let mut params = params;
9672        ModifyListenerInputSerializer::serialize(&mut params, "", &input);
9673        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9674        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9675
9676        let response = self
9677            .sign_and_dispatch(request, ModifyListenerError::from_response)
9678            .await?;
9679
9680        let mut response = response;
9681        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9682            xml_util::start_element(actual_tag_name, stack)?;
9683            let result =
9684                ModifyListenerOutputDeserializer::deserialize("ModifyListenerResult", stack)?;
9685            skip_tree(stack);
9686            xml_util::end_element(actual_tag_name, stack)?;
9687            Ok(result)
9688        })
9689        .await?;
9690
9691        drop(response); // parse non-payload
9692        Ok(result)
9693    }
9694
9695    /// <p>Modifies the specified attributes of the specified Application Load Balancer or Network Load Balancer.</p> <p>If any of the specified attributes can't be modified as requested, the call fails. Any existing attributes that you do not modify retain their current values.</p>
9696    async fn modify_load_balancer_attributes(
9697        &self,
9698        input: ModifyLoadBalancerAttributesInput,
9699    ) -> Result<ModifyLoadBalancerAttributesOutput, RusotoError<ModifyLoadBalancerAttributesError>>
9700    {
9701        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9702        let params = self.new_params("ModifyLoadBalancerAttributes");
9703        let mut params = params;
9704        ModifyLoadBalancerAttributesInputSerializer::serialize(&mut params, "", &input);
9705        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9706        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9707
9708        let response = self
9709            .sign_and_dispatch(request, ModifyLoadBalancerAttributesError::from_response)
9710            .await?;
9711
9712        let mut response = response;
9713        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9714            xml_util::start_element(actual_tag_name, stack)?;
9715            let result = ModifyLoadBalancerAttributesOutputDeserializer::deserialize(
9716                "ModifyLoadBalancerAttributesResult",
9717                stack,
9718            )?;
9719            skip_tree(stack);
9720            xml_util::end_element(actual_tag_name, stack)?;
9721            Ok(result)
9722        })
9723        .await?;
9724
9725        drop(response); // parse non-payload
9726        Ok(result)
9727    }
9728
9729    /// <p>Replaces the specified properties of the specified rule. Any properties that you do not specify are unchanged.</p> <p>To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.</p> <p>To modify the actions for the default rule, use <a>ModifyListener</a>.</p>
9730    async fn modify_rule(
9731        &self,
9732        input: ModifyRuleInput,
9733    ) -> Result<ModifyRuleOutput, RusotoError<ModifyRuleError>> {
9734        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9735        let params = self.new_params("ModifyRule");
9736        let mut params = params;
9737        ModifyRuleInputSerializer::serialize(&mut params, "", &input);
9738        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9739        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9740
9741        let response = self
9742            .sign_and_dispatch(request, ModifyRuleError::from_response)
9743            .await?;
9744
9745        let mut response = response;
9746        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9747            xml_util::start_element(actual_tag_name, stack)?;
9748            let result = ModifyRuleOutputDeserializer::deserialize("ModifyRuleResult", stack)?;
9749            skip_tree(stack);
9750            xml_util::end_element(actual_tag_name, stack)?;
9751            Ok(result)
9752        })
9753        .await?;
9754
9755        drop(response); // parse non-payload
9756        Ok(result)
9757    }
9758
9759    /// <p>Modifies the health checks used when evaluating the health state of the targets in the specified target group.</p> <p>To monitor the health of the targets, use <a>DescribeTargetHealth</a>.</p>
9760    async fn modify_target_group(
9761        &self,
9762        input: ModifyTargetGroupInput,
9763    ) -> Result<ModifyTargetGroupOutput, RusotoError<ModifyTargetGroupError>> {
9764        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9765        let params = self.new_params("ModifyTargetGroup");
9766        let mut params = params;
9767        ModifyTargetGroupInputSerializer::serialize(&mut params, "", &input);
9768        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9769        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9770
9771        let response = self
9772            .sign_and_dispatch(request, ModifyTargetGroupError::from_response)
9773            .await?;
9774
9775        let mut response = response;
9776        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9777            xml_util::start_element(actual_tag_name, stack)?;
9778            let result =
9779                ModifyTargetGroupOutputDeserializer::deserialize("ModifyTargetGroupResult", stack)?;
9780            skip_tree(stack);
9781            xml_util::end_element(actual_tag_name, stack)?;
9782            Ok(result)
9783        })
9784        .await?;
9785
9786        drop(response); // parse non-payload
9787        Ok(result)
9788    }
9789
9790    /// <p>Modifies the specified attributes of the specified target group.</p>
9791    async fn modify_target_group_attributes(
9792        &self,
9793        input: ModifyTargetGroupAttributesInput,
9794    ) -> Result<ModifyTargetGroupAttributesOutput, RusotoError<ModifyTargetGroupAttributesError>>
9795    {
9796        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9797        let params = self.new_params("ModifyTargetGroupAttributes");
9798        let mut params = params;
9799        ModifyTargetGroupAttributesInputSerializer::serialize(&mut params, "", &input);
9800        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9801        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9802
9803        let response = self
9804            .sign_and_dispatch(request, ModifyTargetGroupAttributesError::from_response)
9805            .await?;
9806
9807        let mut response = response;
9808        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9809            xml_util::start_element(actual_tag_name, stack)?;
9810            let result = ModifyTargetGroupAttributesOutputDeserializer::deserialize(
9811                "ModifyTargetGroupAttributesResult",
9812                stack,
9813            )?;
9814            skip_tree(stack);
9815            xml_util::end_element(actual_tag_name, stack)?;
9816            Ok(result)
9817        })
9818        .await?;
9819
9820        drop(response); // parse non-payload
9821        Ok(result)
9822    }
9823
9824    /// <p>Registers the specified targets with the specified target group.</p> <p>If the target is an EC2 instance, it must be in the <code>running</code> state when you register it.</p> <p>By default, the load balancer routes requests to registered targets using the protocol and port for the target group. Alternatively, you can override the port for a target when you register it. You can register each EC2 instance or IP address with the same target group multiple times using different ports.</p> <p>With a Network Load Balancer, you cannot register instances by instance ID if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these types by IP address.</p> <p>To remove a target from a target group, use <a>DeregisterTargets</a>.</p>
9825    async fn register_targets(
9826        &self,
9827        input: RegisterTargetsInput,
9828    ) -> Result<RegisterTargetsOutput, RusotoError<RegisterTargetsError>> {
9829        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9830        let params = self.new_params("RegisterTargets");
9831        let mut params = params;
9832        RegisterTargetsInputSerializer::serialize(&mut params, "", &input);
9833        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9834        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9835
9836        let response = self
9837            .sign_and_dispatch(request, RegisterTargetsError::from_response)
9838            .await?;
9839
9840        let result = RegisterTargetsOutput::default();
9841
9842        drop(response); // parse non-payload
9843        Ok(result)
9844    }
9845
9846    /// <p>Removes the specified certificate from the certificate list for the specified HTTPS or TLS listener.</p> <p>You can't remove the default certificate for a listener. To replace the default certificate, call <a>ModifyListener</a>.</p> <p>To list the certificates for your listener, use <a>DescribeListenerCertificates</a>.</p>
9847    async fn remove_listener_certificates(
9848        &self,
9849        input: RemoveListenerCertificatesInput,
9850    ) -> Result<RemoveListenerCertificatesOutput, RusotoError<RemoveListenerCertificatesError>>
9851    {
9852        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9853        let params = self.new_params("RemoveListenerCertificates");
9854        let mut params = params;
9855        RemoveListenerCertificatesInputSerializer::serialize(&mut params, "", &input);
9856        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9857        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9858
9859        let response = self
9860            .sign_and_dispatch(request, RemoveListenerCertificatesError::from_response)
9861            .await?;
9862
9863        let result = RemoveListenerCertificatesOutput::default();
9864
9865        drop(response); // parse non-payload
9866        Ok(result)
9867    }
9868
9869    /// <p>Removes the specified tags from the specified Elastic Load Balancing resource.</p> <p>To list the current tags for your resources, use <a>DescribeTags</a>.</p>
9870    async fn remove_tags(
9871        &self,
9872        input: RemoveTagsInput,
9873    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>> {
9874        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9875        let params = self.new_params("RemoveTags");
9876        let mut params = params;
9877        RemoveTagsInputSerializer::serialize(&mut params, "", &input);
9878        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9879        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9880
9881        let response = self
9882            .sign_and_dispatch(request, RemoveTagsError::from_response)
9883            .await?;
9884
9885        let result = RemoveTagsOutput::default();
9886
9887        drop(response); // parse non-payload
9888        Ok(result)
9889    }
9890
9891    /// <p>Sets the type of IP addresses used by the subnets of the specified Application Load Balancer or Network Load Balancer.</p>
9892    async fn set_ip_address_type(
9893        &self,
9894        input: SetIpAddressTypeInput,
9895    ) -> Result<SetIpAddressTypeOutput, RusotoError<SetIpAddressTypeError>> {
9896        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9897        let params = self.new_params("SetIpAddressType");
9898        let mut params = params;
9899        SetIpAddressTypeInputSerializer::serialize(&mut params, "", &input);
9900        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9901        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9902
9903        let response = self
9904            .sign_and_dispatch(request, SetIpAddressTypeError::from_response)
9905            .await?;
9906
9907        let mut response = response;
9908        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9909            xml_util::start_element(actual_tag_name, stack)?;
9910            let result =
9911                SetIpAddressTypeOutputDeserializer::deserialize("SetIpAddressTypeResult", stack)?;
9912            skip_tree(stack);
9913            xml_util::end_element(actual_tag_name, stack)?;
9914            Ok(result)
9915        })
9916        .await?;
9917
9918        drop(response); // parse non-payload
9919        Ok(result)
9920    }
9921
9922    /// <p>Sets the priorities of the specified rules.</p> <p>You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.</p>
9923    async fn set_rule_priorities(
9924        &self,
9925        input: SetRulePrioritiesInput,
9926    ) -> Result<SetRulePrioritiesOutput, RusotoError<SetRulePrioritiesError>> {
9927        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9928        let params = self.new_params("SetRulePriorities");
9929        let mut params = params;
9930        SetRulePrioritiesInputSerializer::serialize(&mut params, "", &input);
9931        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9932        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9933
9934        let response = self
9935            .sign_and_dispatch(request, SetRulePrioritiesError::from_response)
9936            .await?;
9937
9938        let mut response = response;
9939        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9940            xml_util::start_element(actual_tag_name, stack)?;
9941            let result =
9942                SetRulePrioritiesOutputDeserializer::deserialize("SetRulePrioritiesResult", stack)?;
9943            skip_tree(stack);
9944            xml_util::end_element(actual_tag_name, stack)?;
9945            Ok(result)
9946        })
9947        .await?;
9948
9949        drop(response); // parse non-payload
9950        Ok(result)
9951    }
9952
9953    /// <p>Associates the specified security groups with the specified Application Load Balancer. The specified security groups override the previously associated security groups.</p> <p>You can't specify a security group for a Network Load Balancer.</p>
9954    async fn set_security_groups(
9955        &self,
9956        input: SetSecurityGroupsInput,
9957    ) -> Result<SetSecurityGroupsOutput, RusotoError<SetSecurityGroupsError>> {
9958        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9959        let params = self.new_params("SetSecurityGroups");
9960        let mut params = params;
9961        SetSecurityGroupsInputSerializer::serialize(&mut params, "", &input);
9962        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9963        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9964
9965        let response = self
9966            .sign_and_dispatch(request, SetSecurityGroupsError::from_response)
9967            .await?;
9968
9969        let mut response = response;
9970        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
9971            xml_util::start_element(actual_tag_name, stack)?;
9972            let result =
9973                SetSecurityGroupsOutputDeserializer::deserialize("SetSecurityGroupsResult", stack)?;
9974            skip_tree(stack);
9975            xml_util::end_element(actual_tag_name, stack)?;
9976            Ok(result)
9977        })
9978        .await?;
9979
9980        drop(response); // parse non-payload
9981        Ok(result)
9982    }
9983
9984    /// <p>Enables the Availability Zones for the specified public subnets for the specified load balancer. The specified subnets replace the previously enabled subnets.</p> <p>When you specify subnets for a Network Load Balancer, you must include all subnets that were enabled previously, with their existing configurations, plus any additional subnets.</p>
9985    async fn set_subnets(
9986        &self,
9987        input: SetSubnetsInput,
9988    ) -> Result<SetSubnetsOutput, RusotoError<SetSubnetsError>> {
9989        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
9990        let params = self.new_params("SetSubnets");
9991        let mut params = params;
9992        SetSubnetsInputSerializer::serialize(&mut params, "", &input);
9993        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
9994        request.set_content_type("application/x-www-form-urlencoded".to_owned());
9995
9996        let response = self
9997            .sign_and_dispatch(request, SetSubnetsError::from_response)
9998            .await?;
9999
10000        let mut response = response;
10001        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
10002            xml_util::start_element(actual_tag_name, stack)?;
10003            let result = SetSubnetsOutputDeserializer::deserialize("SetSubnetsResult", stack)?;
10004            skip_tree(stack);
10005            xml_util::end_element(actual_tag_name, stack)?;
10006            Ok(result)
10007        })
10008        .await?;
10009
10010        drop(response); // parse non-payload
10011        Ok(result)
10012    }
10013}
10014
10015#[cfg(test)]
10016mod protocol_tests {
10017
10018    extern crate rusoto_mock;
10019
10020    use self::rusoto_mock::*;
10021    use super::*;
10022    use rusoto_core::Region as rusoto_region;
10023
10024    #[tokio::test]
10025    async fn test_parse_error_elb_describe_load_balancers() {
10026        let mock_response = MockResponseReader::read_response(
10027            "test_resources/generated/error",
10028            "elb-describe-load-balancers.xml",
10029        );
10030        let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
10031        let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
10032        let request = DescribeLoadBalancersInput::default();
10033        let result = client.describe_load_balancers(request).await;
10034        assert!(!result.is_ok(), "parse error: {:?}", result);
10035    }
10036
10037    #[tokio::test]
10038    async fn test_parse_valid_elb_describe_load_balancers() {
10039        let mock_response = MockResponseReader::read_response(
10040            "test_resources/generated/valid",
10041            "elb-describe-load-balancers.xml",
10042        );
10043        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
10044        let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
10045        let request = DescribeLoadBalancersInput::default();
10046        let result = client.describe_load_balancers(request).await;
10047        assert!(result.is_ok(), "parse error: {:?}", result);
10048    }
10049}