rusoto_elb/
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", "2012-06-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 the <code>AccessLog</code> attribute.</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 AccessLog {
68    /// <p>The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.</p> <p>Default: 60 minutes</p>
69    pub emit_interval: Option<i64>,
70    /// <p>Specifies whether access logs are enabled for the load balancer.</p>
71    pub enabled: bool,
72    /// <p>The name of the Amazon S3 bucket where the access logs are stored.</p>
73    pub s3_bucket_name: Option<String>,
74    /// <p>The logical hierarchy you created for your Amazon S3 bucket, for example <code>my-bucket-prefix/prod</code>. If the prefix is not provided, the log is placed at the root level of the bucket.</p>
75    pub s3_bucket_prefix: Option<String>,
76}
77
78#[allow(dead_code)]
79struct AccessLogDeserializer;
80impl AccessLogDeserializer {
81    #[allow(dead_code, unused_variables)]
82    fn deserialize<T: Peek + Next>(
83        tag_name: &str,
84        stack: &mut T,
85    ) -> Result<AccessLog, XmlParseError> {
86        deserialize_elements::<_, AccessLog, _>(tag_name, stack, |name, stack, obj| {
87            match name {
88                "EmitInterval" => {
89                    obj.emit_interval = Some(AccessLogIntervalDeserializer::deserialize(
90                        "EmitInterval",
91                        stack,
92                    )?);
93                }
94                "Enabled" => {
95                    obj.enabled = AccessLogEnabledDeserializer::deserialize("Enabled", stack)?;
96                }
97                "S3BucketName" => {
98                    obj.s3_bucket_name = Some(S3BucketNameDeserializer::deserialize(
99                        "S3BucketName",
100                        stack,
101                    )?);
102                }
103                "S3BucketPrefix" => {
104                    obj.s3_bucket_prefix = Some(AccessLogPrefixDeserializer::deserialize(
105                        "S3BucketPrefix",
106                        stack,
107                    )?);
108                }
109                _ => skip_tree(stack),
110            }
111            Ok(())
112        })
113    }
114}
115
116/// Serialize `AccessLog` contents to a `SignedRequest`.
117struct AccessLogSerializer;
118impl AccessLogSerializer {
119    fn serialize(params: &mut Params, name: &str, obj: &AccessLog) {
120        let mut prefix = name.to_string();
121        if prefix != "" {
122            prefix.push_str(".");
123        }
124
125        if let Some(ref field_value) = obj.emit_interval {
126            params.put(&format!("{}{}", prefix, "EmitInterval"), &field_value);
127        }
128        params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
129        if let Some(ref field_value) = obj.s3_bucket_name {
130            params.put(&format!("{}{}", prefix, "S3BucketName"), &field_value);
131        }
132        if let Some(ref field_value) = obj.s3_bucket_prefix {
133            params.put(&format!("{}{}", prefix, "S3BucketPrefix"), &field_value);
134        }
135    }
136}
137
138#[allow(dead_code)]
139struct AccessLogEnabledDeserializer;
140impl AccessLogEnabledDeserializer {
141    #[allow(dead_code, unused_variables)]
142    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
143        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
144    }
145}
146#[allow(dead_code)]
147struct AccessLogIntervalDeserializer;
148impl AccessLogIntervalDeserializer {
149    #[allow(dead_code, unused_variables)]
150    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
151        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
152    }
153}
154#[allow(dead_code)]
155struct AccessLogPrefixDeserializer;
156impl AccessLogPrefixDeserializer {
157    #[allow(dead_code, unused_variables)]
158    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
159        xml_util::deserialize_primitive(tag_name, stack, Ok)
160    }
161}
162#[allow(dead_code)]
163struct AccessPointNameDeserializer;
164impl AccessPointNameDeserializer {
165    #[allow(dead_code, unused_variables)]
166    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
167        xml_util::deserialize_primitive(tag_name, stack, Ok)
168    }
169}
170#[allow(dead_code)]
171struct AccessPointPortDeserializer;
172impl AccessPointPortDeserializer {
173    #[allow(dead_code, unused_variables)]
174    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
175        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
176    }
177}
178/// <p>Contains the parameters for EnableAvailabilityZonesForLoadBalancer.</p>
179#[derive(Clone, Debug, Default, PartialEq)]
180#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
181pub struct AddAvailabilityZonesInput {
182    /// <p>The Availability Zones. These must be in the same region as the load balancer.</p>
183    pub availability_zones: Vec<String>,
184    /// <p>The name of the load balancer.</p>
185    pub load_balancer_name: String,
186}
187
188/// Serialize `AddAvailabilityZonesInput` contents to a `SignedRequest`.
189struct AddAvailabilityZonesInputSerializer;
190impl AddAvailabilityZonesInputSerializer {
191    fn serialize(params: &mut Params, name: &str, obj: &AddAvailabilityZonesInput) {
192        let mut prefix = name.to_string();
193        if prefix != "" {
194            prefix.push_str(".");
195        }
196
197        AvailabilityZonesSerializer::serialize(
198            params,
199            &format!("{}{}", prefix, "AvailabilityZones"),
200            &obj.availability_zones,
201        );
202        params.put(
203            &format!("{}{}", prefix, "LoadBalancerName"),
204            &obj.load_balancer_name,
205        );
206    }
207}
208
209/// <p>Contains the output of EnableAvailabilityZonesForLoadBalancer.</p>
210#[derive(Clone, Debug, Default, PartialEq)]
211#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
212pub struct AddAvailabilityZonesOutput {
213    /// <p>The updated list of Availability Zones for the load balancer.</p>
214    pub availability_zones: Option<Vec<String>>,
215}
216
217#[allow(dead_code)]
218struct AddAvailabilityZonesOutputDeserializer;
219impl AddAvailabilityZonesOutputDeserializer {
220    #[allow(dead_code, unused_variables)]
221    fn deserialize<T: Peek + Next>(
222        tag_name: &str,
223        stack: &mut T,
224    ) -> Result<AddAvailabilityZonesOutput, XmlParseError> {
225        deserialize_elements::<_, AddAvailabilityZonesOutput, _>(
226            tag_name,
227            stack,
228            |name, stack, obj| {
229                match name {
230                    "AvailabilityZones" => {
231                        obj.availability_zones.get_or_insert(vec![]).extend(
232                            AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
233                        );
234                    }
235                    _ => skip_tree(stack),
236                }
237                Ok(())
238            },
239        )
240    }
241}
242/// <p>Contains the parameters for AddTags.</p>
243#[derive(Clone, Debug, Default, PartialEq)]
244#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
245pub struct AddTagsInput {
246    /// <p>The name of the load balancer. You can specify one load balancer only.</p>
247    pub load_balancer_names: Vec<String>,
248    /// <p>The tags.</p>
249    pub tags: Vec<Tag>,
250}
251
252/// Serialize `AddTagsInput` contents to a `SignedRequest`.
253struct AddTagsInputSerializer;
254impl AddTagsInputSerializer {
255    fn serialize(params: &mut Params, name: &str, obj: &AddTagsInput) {
256        let mut prefix = name.to_string();
257        if prefix != "" {
258            prefix.push_str(".");
259        }
260
261        LoadBalancerNamesSerializer::serialize(
262            params,
263            &format!("{}{}", prefix, "LoadBalancerNames"),
264            &obj.load_balancer_names,
265        );
266        TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), &obj.tags);
267    }
268}
269
270/// <p>Contains the output of AddTags.</p>
271#[derive(Clone, Debug, Default, PartialEq)]
272#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
273pub struct AddTagsOutput {}
274
275#[allow(dead_code)]
276struct AddTagsOutputDeserializer;
277impl AddTagsOutputDeserializer {
278    #[allow(dead_code, unused_variables)]
279    fn deserialize<T: Peek + Next>(
280        tag_name: &str,
281        stack: &mut T,
282    ) -> Result<AddTagsOutput, XmlParseError> {
283        xml_util::start_element(tag_name, stack)?;
284
285        let obj = AddTagsOutput::default();
286
287        xml_util::end_element(tag_name, stack)?;
288
289        Ok(obj)
290    }
291}
292/// <p>This data type is reserved.</p>
293#[derive(Clone, Debug, Default, PartialEq)]
294#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
295#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
296pub struct AdditionalAttribute {
297    /// <p>This parameter is reserved.</p>
298    pub key: Option<String>,
299    /// <p>This parameter is reserved.</p>
300    pub value: Option<String>,
301}
302
303#[allow(dead_code)]
304struct AdditionalAttributeDeserializer;
305impl AdditionalAttributeDeserializer {
306    #[allow(dead_code, unused_variables)]
307    fn deserialize<T: Peek + Next>(
308        tag_name: &str,
309        stack: &mut T,
310    ) -> Result<AdditionalAttribute, XmlParseError> {
311        deserialize_elements::<_, AdditionalAttribute, _>(tag_name, stack, |name, stack, obj| {
312            match name {
313                "Key" => {
314                    obj.key = Some(AdditionalAttributeKeyDeserializer::deserialize(
315                        "Key", stack,
316                    )?);
317                }
318                "Value" => {
319                    obj.value = Some(AdditionalAttributeValueDeserializer::deserialize(
320                        "Value", stack,
321                    )?);
322                }
323                _ => skip_tree(stack),
324            }
325            Ok(())
326        })
327    }
328}
329
330/// Serialize `AdditionalAttribute` contents to a `SignedRequest`.
331struct AdditionalAttributeSerializer;
332impl AdditionalAttributeSerializer {
333    fn serialize(params: &mut Params, name: &str, obj: &AdditionalAttribute) {
334        let mut prefix = name.to_string();
335        if prefix != "" {
336            prefix.push_str(".");
337        }
338
339        if let Some(ref field_value) = obj.key {
340            params.put(&format!("{}{}", prefix, "Key"), &field_value);
341        }
342        if let Some(ref field_value) = obj.value {
343            params.put(&format!("{}{}", prefix, "Value"), &field_value);
344        }
345    }
346}
347
348#[allow(dead_code)]
349struct AdditionalAttributeKeyDeserializer;
350impl AdditionalAttributeKeyDeserializer {
351    #[allow(dead_code, unused_variables)]
352    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
353        xml_util::deserialize_primitive(tag_name, stack, Ok)
354    }
355}
356#[allow(dead_code)]
357struct AdditionalAttributeValueDeserializer;
358impl AdditionalAttributeValueDeserializer {
359    #[allow(dead_code, unused_variables)]
360    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
361        xml_util::deserialize_primitive(tag_name, stack, Ok)
362    }
363}
364#[allow(dead_code)]
365struct AdditionalAttributesDeserializer;
366impl AdditionalAttributesDeserializer {
367    #[allow(dead_code, unused_variables)]
368    fn deserialize<T: Peek + Next>(
369        tag_name: &str,
370        stack: &mut T,
371    ) -> Result<Vec<AdditionalAttribute>, XmlParseError> {
372        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
373            if name == "member" {
374                obj.push(AdditionalAttributeDeserializer::deserialize(
375                    "member", stack,
376                )?);
377            } else {
378                skip_tree(stack);
379            }
380            Ok(())
381        })
382    }
383}
384
385/// Serialize `AdditionalAttributes` contents to a `SignedRequest`.
386struct AdditionalAttributesSerializer;
387impl AdditionalAttributesSerializer {
388    fn serialize(params: &mut Params, name: &str, obj: &Vec<AdditionalAttribute>) {
389        for (index, obj) in obj.iter().enumerate() {
390            let key = format!("{}.member.{}", name, index + 1);
391            AdditionalAttributeSerializer::serialize(params, &key, obj);
392        }
393    }
394}
395
396#[allow(dead_code)]
397struct AppCookieStickinessPoliciesDeserializer;
398impl AppCookieStickinessPoliciesDeserializer {
399    #[allow(dead_code, unused_variables)]
400    fn deserialize<T: Peek + Next>(
401        tag_name: &str,
402        stack: &mut T,
403    ) -> Result<Vec<AppCookieStickinessPolicy>, XmlParseError> {
404        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
405            if name == "member" {
406                obj.push(AppCookieStickinessPolicyDeserializer::deserialize(
407                    "member", stack,
408                )?);
409            } else {
410                skip_tree(stack);
411            }
412            Ok(())
413        })
414    }
415}
416/// <p>Information about a policy for application-controlled session stickiness.</p>
417#[derive(Clone, Debug, Default, PartialEq)]
418#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
419pub struct AppCookieStickinessPolicy {
420    /// <p>The name of the application cookie used for stickiness.</p>
421    pub cookie_name: Option<String>,
422    /// <p>The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.</p>
423    pub policy_name: Option<String>,
424}
425
426#[allow(dead_code)]
427struct AppCookieStickinessPolicyDeserializer;
428impl AppCookieStickinessPolicyDeserializer {
429    #[allow(dead_code, unused_variables)]
430    fn deserialize<T: Peek + Next>(
431        tag_name: &str,
432        stack: &mut T,
433    ) -> Result<AppCookieStickinessPolicy, XmlParseError> {
434        deserialize_elements::<_, AppCookieStickinessPolicy, _>(
435            tag_name,
436            stack,
437            |name, stack, obj| {
438                match name {
439                    "CookieName" => {
440                        obj.cookie_name =
441                            Some(CookieNameDeserializer::deserialize("CookieName", stack)?);
442                    }
443                    "PolicyName" => {
444                        obj.policy_name =
445                            Some(PolicyNameDeserializer::deserialize("PolicyName", stack)?);
446                    }
447                    _ => skip_tree(stack),
448                }
449                Ok(())
450            },
451        )
452    }
453}
454/// <p>Contains the parameters for ApplySecurityGroupsToLoadBalancer.</p>
455#[derive(Clone, Debug, Default, PartialEq)]
456#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
457pub struct ApplySecurityGroupsToLoadBalancerInput {
458    /// <p>The name of the load balancer.</p>
459    pub load_balancer_name: String,
460    /// <p>The IDs of the security groups to associate with the load balancer. Note that you cannot specify the name of the security group.</p>
461    pub security_groups: Vec<String>,
462}
463
464/// Serialize `ApplySecurityGroupsToLoadBalancerInput` contents to a `SignedRequest`.
465struct ApplySecurityGroupsToLoadBalancerInputSerializer;
466impl ApplySecurityGroupsToLoadBalancerInputSerializer {
467    fn serialize(params: &mut Params, name: &str, obj: &ApplySecurityGroupsToLoadBalancerInput) {
468        let mut prefix = name.to_string();
469        if prefix != "" {
470            prefix.push_str(".");
471        }
472
473        params.put(
474            &format!("{}{}", prefix, "LoadBalancerName"),
475            &obj.load_balancer_name,
476        );
477        SecurityGroupsSerializer::serialize(
478            params,
479            &format!("{}{}", prefix, "SecurityGroups"),
480            &obj.security_groups,
481        );
482    }
483}
484
485/// <p>Contains the output of ApplySecurityGroupsToLoadBalancer.</p>
486#[derive(Clone, Debug, Default, PartialEq)]
487#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
488pub struct ApplySecurityGroupsToLoadBalancerOutput {
489    /// <p>The IDs of the security groups associated with the load balancer.</p>
490    pub security_groups: Option<Vec<String>>,
491}
492
493#[allow(dead_code)]
494struct ApplySecurityGroupsToLoadBalancerOutputDeserializer;
495impl ApplySecurityGroupsToLoadBalancerOutputDeserializer {
496    #[allow(dead_code, unused_variables)]
497    fn deserialize<T: Peek + Next>(
498        tag_name: &str,
499        stack: &mut T,
500    ) -> Result<ApplySecurityGroupsToLoadBalancerOutput, XmlParseError> {
501        deserialize_elements::<_, ApplySecurityGroupsToLoadBalancerOutput, _>(
502            tag_name,
503            stack,
504            |name, stack, obj| {
505                match name {
506                    "SecurityGroups" => {
507                        obj.security_groups.get_or_insert(vec![]).extend(
508                            SecurityGroupsDeserializer::deserialize("SecurityGroups", stack)?,
509                        );
510                    }
511                    _ => skip_tree(stack),
512                }
513                Ok(())
514            },
515        )
516    }
517}
518/// <p>Contains the parameters for AttachLoaBalancerToSubnets.</p>
519#[derive(Clone, Debug, Default, PartialEq)]
520#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
521pub struct AttachLoadBalancerToSubnetsInput {
522    /// <p>The name of the load balancer.</p>
523    pub load_balancer_name: String,
524    /// <p>The IDs of the subnets to add. You can add only one subnet per Availability Zone.</p>
525    pub subnets: Vec<String>,
526}
527
528/// Serialize `AttachLoadBalancerToSubnetsInput` contents to a `SignedRequest`.
529struct AttachLoadBalancerToSubnetsInputSerializer;
530impl AttachLoadBalancerToSubnetsInputSerializer {
531    fn serialize(params: &mut Params, name: &str, obj: &AttachLoadBalancerToSubnetsInput) {
532        let mut prefix = name.to_string();
533        if prefix != "" {
534            prefix.push_str(".");
535        }
536
537        params.put(
538            &format!("{}{}", prefix, "LoadBalancerName"),
539            &obj.load_balancer_name,
540        );
541        SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), &obj.subnets);
542    }
543}
544
545/// <p>Contains the output of AttachLoadBalancerToSubnets.</p>
546#[derive(Clone, Debug, Default, PartialEq)]
547#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
548pub struct AttachLoadBalancerToSubnetsOutput {
549    /// <p>The IDs of the subnets attached to the load balancer.</p>
550    pub subnets: Option<Vec<String>>,
551}
552
553#[allow(dead_code)]
554struct AttachLoadBalancerToSubnetsOutputDeserializer;
555impl AttachLoadBalancerToSubnetsOutputDeserializer {
556    #[allow(dead_code, unused_variables)]
557    fn deserialize<T: Peek + Next>(
558        tag_name: &str,
559        stack: &mut T,
560    ) -> Result<AttachLoadBalancerToSubnetsOutput, XmlParseError> {
561        deserialize_elements::<_, AttachLoadBalancerToSubnetsOutput, _>(
562            tag_name,
563            stack,
564            |name, stack, obj| {
565                match name {
566                    "Subnets" => {
567                        obj.subnets
568                            .get_or_insert(vec![])
569                            .extend(SubnetsDeserializer::deserialize("Subnets", stack)?);
570                    }
571                    _ => skip_tree(stack),
572                }
573                Ok(())
574            },
575        )
576    }
577}
578#[allow(dead_code)]
579struct AttributeNameDeserializer;
580impl AttributeNameDeserializer {
581    #[allow(dead_code, unused_variables)]
582    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
583        xml_util::deserialize_primitive(tag_name, stack, Ok)
584    }
585}
586#[allow(dead_code)]
587struct AttributeTypeDeserializer;
588impl AttributeTypeDeserializer {
589    #[allow(dead_code, unused_variables)]
590    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
591        xml_util::deserialize_primitive(tag_name, stack, Ok)
592    }
593}
594#[allow(dead_code)]
595struct AttributeValueDeserializer;
596impl AttributeValueDeserializer {
597    #[allow(dead_code, unused_variables)]
598    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
599        xml_util::deserialize_primitive(tag_name, stack, Ok)
600    }
601}
602#[allow(dead_code)]
603struct AvailabilityZoneDeserializer;
604impl AvailabilityZoneDeserializer {
605    #[allow(dead_code, unused_variables)]
606    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
607        xml_util::deserialize_primitive(tag_name, stack, Ok)
608    }
609}
610#[allow(dead_code)]
611struct AvailabilityZonesDeserializer;
612impl AvailabilityZonesDeserializer {
613    #[allow(dead_code, unused_variables)]
614    fn deserialize<T: Peek + Next>(
615        tag_name: &str,
616        stack: &mut T,
617    ) -> Result<Vec<String>, XmlParseError> {
618        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
619            if name == "member" {
620                obj.push(AvailabilityZoneDeserializer::deserialize("member", stack)?);
621            } else {
622                skip_tree(stack);
623            }
624            Ok(())
625        })
626    }
627}
628
629/// Serialize `AvailabilityZones` contents to a `SignedRequest`.
630struct AvailabilityZonesSerializer;
631impl AvailabilityZonesSerializer {
632    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
633        for (index, obj) in obj.iter().enumerate() {
634            let key = format!("{}.member.{}", name, index + 1);
635            params.put(&key, &obj);
636        }
637    }
638}
639
640/// <p>Information about the configuration of an EC2 instance.</p>
641#[derive(Clone, Debug, Default, PartialEq)]
642#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
643pub struct BackendServerDescription {
644    /// <p>The port on which the EC2 instance is listening.</p>
645    pub instance_port: Option<i64>,
646    /// <p>The names of the policies enabled for the EC2 instance.</p>
647    pub policy_names: Option<Vec<String>>,
648}
649
650#[allow(dead_code)]
651struct BackendServerDescriptionDeserializer;
652impl BackendServerDescriptionDeserializer {
653    #[allow(dead_code, unused_variables)]
654    fn deserialize<T: Peek + Next>(
655        tag_name: &str,
656        stack: &mut T,
657    ) -> Result<BackendServerDescription, XmlParseError> {
658        deserialize_elements::<_, BackendServerDescription, _>(
659            tag_name,
660            stack,
661            |name, stack, obj| {
662                match name {
663                    "InstancePort" => {
664                        obj.instance_port = Some(InstancePortDeserializer::deserialize(
665                            "InstancePort",
666                            stack,
667                        )?);
668                    }
669                    "PolicyNames" => {
670                        obj.policy_names
671                            .get_or_insert(vec![])
672                            .extend(PolicyNamesDeserializer::deserialize("PolicyNames", stack)?);
673                    }
674                    _ => skip_tree(stack),
675                }
676                Ok(())
677            },
678        )
679    }
680}
681#[allow(dead_code)]
682struct BackendServerDescriptionsDeserializer;
683impl BackendServerDescriptionsDeserializer {
684    #[allow(dead_code, unused_variables)]
685    fn deserialize<T: Peek + Next>(
686        tag_name: &str,
687        stack: &mut T,
688    ) -> Result<Vec<BackendServerDescription>, XmlParseError> {
689        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
690            if name == "member" {
691                obj.push(BackendServerDescriptionDeserializer::deserialize(
692                    "member", stack,
693                )?);
694            } else {
695                skip_tree(stack);
696            }
697            Ok(())
698        })
699    }
700}
701#[allow(dead_code)]
702struct CardinalityDeserializer;
703impl CardinalityDeserializer {
704    #[allow(dead_code, unused_variables)]
705    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
706        xml_util::deserialize_primitive(tag_name, stack, Ok)
707    }
708}
709/// <p>Contains the parameters for ConfigureHealthCheck.</p>
710#[derive(Clone, Debug, Default, PartialEq)]
711#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
712pub struct ConfigureHealthCheckInput {
713    /// <p>The configuration information.</p>
714    pub health_check: HealthCheck,
715    /// <p>The name of the load balancer.</p>
716    pub load_balancer_name: String,
717}
718
719/// Serialize `ConfigureHealthCheckInput` contents to a `SignedRequest`.
720struct ConfigureHealthCheckInputSerializer;
721impl ConfigureHealthCheckInputSerializer {
722    fn serialize(params: &mut Params, name: &str, obj: &ConfigureHealthCheckInput) {
723        let mut prefix = name.to_string();
724        if prefix != "" {
725            prefix.push_str(".");
726        }
727
728        HealthCheckSerializer::serialize(
729            params,
730            &format!("{}{}", prefix, "HealthCheck"),
731            &obj.health_check,
732        );
733        params.put(
734            &format!("{}{}", prefix, "LoadBalancerName"),
735            &obj.load_balancer_name,
736        );
737    }
738}
739
740/// <p>Contains the output of ConfigureHealthCheck.</p>
741#[derive(Clone, Debug, Default, PartialEq)]
742#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
743pub struct ConfigureHealthCheckOutput {
744    /// <p>The updated health check.</p>
745    pub health_check: Option<HealthCheck>,
746}
747
748#[allow(dead_code)]
749struct ConfigureHealthCheckOutputDeserializer;
750impl ConfigureHealthCheckOutputDeserializer {
751    #[allow(dead_code, unused_variables)]
752    fn deserialize<T: Peek + Next>(
753        tag_name: &str,
754        stack: &mut T,
755    ) -> Result<ConfigureHealthCheckOutput, XmlParseError> {
756        deserialize_elements::<_, ConfigureHealthCheckOutput, _>(
757            tag_name,
758            stack,
759            |name, stack, obj| {
760                match name {
761                    "HealthCheck" => {
762                        obj.health_check =
763                            Some(HealthCheckDeserializer::deserialize("HealthCheck", stack)?);
764                    }
765                    _ => skip_tree(stack),
766                }
767                Ok(())
768            },
769        )
770    }
771}
772/// <p>Information about the <code>ConnectionDraining</code> attribute.</p>
773#[derive(Clone, Debug, Default, PartialEq)]
774#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
775#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
776pub struct ConnectionDraining {
777    /// <p>Specifies whether connection draining is enabled for the load balancer.</p>
778    pub enabled: bool,
779    /// <p>The maximum time, in seconds, to keep the existing connections open before deregistering the instances.</p>
780    pub timeout: Option<i64>,
781}
782
783#[allow(dead_code)]
784struct ConnectionDrainingDeserializer;
785impl ConnectionDrainingDeserializer {
786    #[allow(dead_code, unused_variables)]
787    fn deserialize<T: Peek + Next>(
788        tag_name: &str,
789        stack: &mut T,
790    ) -> Result<ConnectionDraining, XmlParseError> {
791        deserialize_elements::<_, ConnectionDraining, _>(tag_name, stack, |name, stack, obj| {
792            match name {
793                "Enabled" => {
794                    obj.enabled =
795                        ConnectionDrainingEnabledDeserializer::deserialize("Enabled", stack)?;
796                }
797                "Timeout" => {
798                    obj.timeout = Some(ConnectionDrainingTimeoutDeserializer::deserialize(
799                        "Timeout", stack,
800                    )?);
801                }
802                _ => skip_tree(stack),
803            }
804            Ok(())
805        })
806    }
807}
808
809/// Serialize `ConnectionDraining` contents to a `SignedRequest`.
810struct ConnectionDrainingSerializer;
811impl ConnectionDrainingSerializer {
812    fn serialize(params: &mut Params, name: &str, obj: &ConnectionDraining) {
813        let mut prefix = name.to_string();
814        if prefix != "" {
815            prefix.push_str(".");
816        }
817
818        params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
819        if let Some(ref field_value) = obj.timeout {
820            params.put(&format!("{}{}", prefix, "Timeout"), &field_value);
821        }
822    }
823}
824
825#[allow(dead_code)]
826struct ConnectionDrainingEnabledDeserializer;
827impl ConnectionDrainingEnabledDeserializer {
828    #[allow(dead_code, unused_variables)]
829    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
830        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
831    }
832}
833#[allow(dead_code)]
834struct ConnectionDrainingTimeoutDeserializer;
835impl ConnectionDrainingTimeoutDeserializer {
836    #[allow(dead_code, unused_variables)]
837    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
838        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
839    }
840}
841/// <p>Information about the <code>ConnectionSettings</code> attribute.</p>
842#[derive(Clone, Debug, Default, PartialEq)]
843#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
844#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
845pub struct ConnectionSettings {
846    /// <p>The time, in seconds, that the connection is allowed to be idle (no data has been sent over the connection) before it is closed by the load balancer.</p>
847    pub idle_timeout: i64,
848}
849
850#[allow(dead_code)]
851struct ConnectionSettingsDeserializer;
852impl ConnectionSettingsDeserializer {
853    #[allow(dead_code, unused_variables)]
854    fn deserialize<T: Peek + Next>(
855        tag_name: &str,
856        stack: &mut T,
857    ) -> Result<ConnectionSettings, XmlParseError> {
858        deserialize_elements::<_, ConnectionSettings, _>(tag_name, stack, |name, stack, obj| {
859            match name {
860                "IdleTimeout" => {
861                    obj.idle_timeout = IdleTimeoutDeserializer::deserialize("IdleTimeout", stack)?;
862                }
863                _ => skip_tree(stack),
864            }
865            Ok(())
866        })
867    }
868}
869
870/// Serialize `ConnectionSettings` contents to a `SignedRequest`.
871struct ConnectionSettingsSerializer;
872impl ConnectionSettingsSerializer {
873    fn serialize(params: &mut Params, name: &str, obj: &ConnectionSettings) {
874        let mut prefix = name.to_string();
875        if prefix != "" {
876            prefix.push_str(".");
877        }
878
879        params.put(&format!("{}{}", prefix, "IdleTimeout"), &obj.idle_timeout);
880    }
881}
882
883#[allow(dead_code)]
884struct CookieExpirationPeriodDeserializer;
885impl CookieExpirationPeriodDeserializer {
886    #[allow(dead_code, unused_variables)]
887    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
888        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
889    }
890}
891#[allow(dead_code)]
892struct CookieNameDeserializer;
893impl CookieNameDeserializer {
894    #[allow(dead_code, unused_variables)]
895    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
896        xml_util::deserialize_primitive(tag_name, stack, Ok)
897    }
898}
899/// <p>Contains the parameters for CreateLoadBalancer.</p>
900#[derive(Clone, Debug, Default, PartialEq)]
901#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
902pub struct CreateAccessPointInput {
903    /// <p>One or more Availability Zones from the same region as the load balancer.</p> <p>You must specify at least one Availability Zone.</p> <p>You can add more Availability Zones after you create the load balancer using <a>EnableAvailabilityZonesForLoadBalancer</a>.</p>
904    pub availability_zones: Option<Vec<String>>,
905    /// <p>The listeners.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html">Listeners for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
906    pub listeners: Vec<Listener>,
907    /// <p>The name of the load balancer.</p> <p>This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.</p>
908    pub load_balancer_name: String,
909    /// <p>The type of a load balancer. Valid only for load balancers in a VPC.</p> <p>By default, Elastic Load Balancing creates an Internet-facing load balancer with a DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#load-balancer-scheme">Load Balancer Scheme</a> in the <i>Elastic Load Balancing User Guide</i>.</p> <p>Specify <code>internal</code> to create a load balancer with a DNS name that resolves to private IP addresses.</p>
910    pub scheme: Option<String>,
911    /// <p>The IDs of the security groups to assign to the load balancer.</p>
912    pub security_groups: Option<Vec<String>>,
913    /// <p>The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone specified in <code>AvailabilityZones</code>.</p>
914    pub subnets: Option<Vec<String>>,
915    /// <p>A list of tags to assign to the load balancer.</p> <p>For more information about tagging your load balancer, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html">Tag Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
916    pub tags: Option<Vec<Tag>>,
917}
918
919/// Serialize `CreateAccessPointInput` contents to a `SignedRequest`.
920struct CreateAccessPointInputSerializer;
921impl CreateAccessPointInputSerializer {
922    fn serialize(params: &mut Params, name: &str, obj: &CreateAccessPointInput) {
923        let mut prefix = name.to_string();
924        if prefix != "" {
925            prefix.push_str(".");
926        }
927
928        if let Some(ref field_value) = obj.availability_zones {
929            AvailabilityZonesSerializer::serialize(
930                params,
931                &format!("{}{}", prefix, "AvailabilityZones"),
932                field_value,
933            );
934        }
935        ListenersSerializer::serialize(
936            params,
937            &format!("{}{}", prefix, "Listeners"),
938            &obj.listeners,
939        );
940        params.put(
941            &format!("{}{}", prefix, "LoadBalancerName"),
942            &obj.load_balancer_name,
943        );
944        if let Some(ref field_value) = obj.scheme {
945            params.put(&format!("{}{}", prefix, "Scheme"), &field_value);
946        }
947        if let Some(ref field_value) = obj.security_groups {
948            SecurityGroupsSerializer::serialize(
949                params,
950                &format!("{}{}", prefix, "SecurityGroups"),
951                field_value,
952            );
953        }
954        if let Some(ref field_value) = obj.subnets {
955            SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), field_value);
956        }
957        if let Some(ref field_value) = obj.tags {
958            TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), field_value);
959        }
960    }
961}
962
963/// <p>Contains the output for CreateLoadBalancer.</p>
964#[derive(Clone, Debug, Default, PartialEq)]
965#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
966pub struct CreateAccessPointOutput {
967    /// <p>The DNS name of the load balancer.</p>
968    pub dns_name: Option<String>,
969}
970
971#[allow(dead_code)]
972struct CreateAccessPointOutputDeserializer;
973impl CreateAccessPointOutputDeserializer {
974    #[allow(dead_code, unused_variables)]
975    fn deserialize<T: Peek + Next>(
976        tag_name: &str,
977        stack: &mut T,
978    ) -> Result<CreateAccessPointOutput, XmlParseError> {
979        deserialize_elements::<_, CreateAccessPointOutput, _>(
980            tag_name,
981            stack,
982            |name, stack, obj| {
983                match name {
984                    "DNSName" => {
985                        obj.dns_name = Some(DNSNameDeserializer::deserialize("DNSName", stack)?);
986                    }
987                    _ => skip_tree(stack),
988                }
989                Ok(())
990            },
991        )
992    }
993}
994/// <p>Contains the parameters for CreateAppCookieStickinessPolicy.</p>
995#[derive(Clone, Debug, Default, PartialEq)]
996#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
997pub struct CreateAppCookieStickinessPolicyInput {
998    /// <p>The name of the application cookie used for stickiness.</p>
999    pub cookie_name: String,
1000    /// <p>The name of the load balancer.</p>
1001    pub load_balancer_name: String,
1002    /// <p>The name of the policy being created. Policy names must consist of alphanumeric characters and dashes (-). This name must be unique within the set of policies for this load balancer.</p>
1003    pub policy_name: String,
1004}
1005
1006/// Serialize `CreateAppCookieStickinessPolicyInput` contents to a `SignedRequest`.
1007struct CreateAppCookieStickinessPolicyInputSerializer;
1008impl CreateAppCookieStickinessPolicyInputSerializer {
1009    fn serialize(params: &mut Params, name: &str, obj: &CreateAppCookieStickinessPolicyInput) {
1010        let mut prefix = name.to_string();
1011        if prefix != "" {
1012            prefix.push_str(".");
1013        }
1014
1015        params.put(&format!("{}{}", prefix, "CookieName"), &obj.cookie_name);
1016        params.put(
1017            &format!("{}{}", prefix, "LoadBalancerName"),
1018            &obj.load_balancer_name,
1019        );
1020        params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
1021    }
1022}
1023
1024/// <p>Contains the output for CreateAppCookieStickinessPolicy.</p>
1025#[derive(Clone, Debug, Default, PartialEq)]
1026#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1027pub struct CreateAppCookieStickinessPolicyOutput {}
1028
1029#[allow(dead_code)]
1030struct CreateAppCookieStickinessPolicyOutputDeserializer;
1031impl CreateAppCookieStickinessPolicyOutputDeserializer {
1032    #[allow(dead_code, unused_variables)]
1033    fn deserialize<T: Peek + Next>(
1034        tag_name: &str,
1035        stack: &mut T,
1036    ) -> Result<CreateAppCookieStickinessPolicyOutput, XmlParseError> {
1037        xml_util::start_element(tag_name, stack)?;
1038
1039        let obj = CreateAppCookieStickinessPolicyOutput::default();
1040
1041        xml_util::end_element(tag_name, stack)?;
1042
1043        Ok(obj)
1044    }
1045}
1046/// <p>Contains the parameters for CreateLBCookieStickinessPolicy.</p>
1047#[derive(Clone, Debug, Default, PartialEq)]
1048#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1049pub struct CreateLBCookieStickinessPolicyInput {
1050    /// <p>The time period, in seconds, after which the cookie should be considered stale. If you do not specify this parameter, the default value is 0, which indicates that the sticky session should last for the duration of the browser session.</p>
1051    pub cookie_expiration_period: Option<i64>,
1052    /// <p>The name of the load balancer.</p>
1053    pub load_balancer_name: String,
1054    /// <p>The name of the policy being created. Policy names must consist of alphanumeric characters and dashes (-). This name must be unique within the set of policies for this load balancer.</p>
1055    pub policy_name: String,
1056}
1057
1058/// Serialize `CreateLBCookieStickinessPolicyInput` contents to a `SignedRequest`.
1059struct CreateLBCookieStickinessPolicyInputSerializer;
1060impl CreateLBCookieStickinessPolicyInputSerializer {
1061    fn serialize(params: &mut Params, name: &str, obj: &CreateLBCookieStickinessPolicyInput) {
1062        let mut prefix = name.to_string();
1063        if prefix != "" {
1064            prefix.push_str(".");
1065        }
1066
1067        if let Some(ref field_value) = obj.cookie_expiration_period {
1068            params.put(
1069                &format!("{}{}", prefix, "CookieExpirationPeriod"),
1070                &field_value,
1071            );
1072        }
1073        params.put(
1074            &format!("{}{}", prefix, "LoadBalancerName"),
1075            &obj.load_balancer_name,
1076        );
1077        params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
1078    }
1079}
1080
1081/// <p>Contains the output for CreateLBCookieStickinessPolicy.</p>
1082#[derive(Clone, Debug, Default, PartialEq)]
1083#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1084pub struct CreateLBCookieStickinessPolicyOutput {}
1085
1086#[allow(dead_code)]
1087struct CreateLBCookieStickinessPolicyOutputDeserializer;
1088impl CreateLBCookieStickinessPolicyOutputDeserializer {
1089    #[allow(dead_code, unused_variables)]
1090    fn deserialize<T: Peek + Next>(
1091        tag_name: &str,
1092        stack: &mut T,
1093    ) -> Result<CreateLBCookieStickinessPolicyOutput, XmlParseError> {
1094        xml_util::start_element(tag_name, stack)?;
1095
1096        let obj = CreateLBCookieStickinessPolicyOutput::default();
1097
1098        xml_util::end_element(tag_name, stack)?;
1099
1100        Ok(obj)
1101    }
1102}
1103/// <p>Contains the parameters for CreateLoadBalancerListeners.</p>
1104#[derive(Clone, Debug, Default, PartialEq)]
1105#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1106pub struct CreateLoadBalancerListenerInput {
1107    /// <p>The listeners.</p>
1108    pub listeners: Vec<Listener>,
1109    /// <p>The name of the load balancer.</p>
1110    pub load_balancer_name: String,
1111}
1112
1113/// Serialize `CreateLoadBalancerListenerInput` contents to a `SignedRequest`.
1114struct CreateLoadBalancerListenerInputSerializer;
1115impl CreateLoadBalancerListenerInputSerializer {
1116    fn serialize(params: &mut Params, name: &str, obj: &CreateLoadBalancerListenerInput) {
1117        let mut prefix = name.to_string();
1118        if prefix != "" {
1119            prefix.push_str(".");
1120        }
1121
1122        ListenersSerializer::serialize(
1123            params,
1124            &format!("{}{}", prefix, "Listeners"),
1125            &obj.listeners,
1126        );
1127        params.put(
1128            &format!("{}{}", prefix, "LoadBalancerName"),
1129            &obj.load_balancer_name,
1130        );
1131    }
1132}
1133
1134/// <p>Contains the parameters for CreateLoadBalancerListener.</p>
1135#[derive(Clone, Debug, Default, PartialEq)]
1136#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1137pub struct CreateLoadBalancerListenerOutput {}
1138
1139#[allow(dead_code)]
1140struct CreateLoadBalancerListenerOutputDeserializer;
1141impl CreateLoadBalancerListenerOutputDeserializer {
1142    #[allow(dead_code, unused_variables)]
1143    fn deserialize<T: Peek + Next>(
1144        tag_name: &str,
1145        stack: &mut T,
1146    ) -> Result<CreateLoadBalancerListenerOutput, XmlParseError> {
1147        xml_util::start_element(tag_name, stack)?;
1148
1149        let obj = CreateLoadBalancerListenerOutput::default();
1150
1151        xml_util::end_element(tag_name, stack)?;
1152
1153        Ok(obj)
1154    }
1155}
1156/// <p>Contains the parameters for CreateLoadBalancerPolicy.</p>
1157#[derive(Clone, Debug, Default, PartialEq)]
1158#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1159pub struct CreateLoadBalancerPolicyInput {
1160    /// <p>The name of the load balancer.</p>
1161    pub load_balancer_name: String,
1162    /// <p>The policy attributes.</p>
1163    pub policy_attributes: Option<Vec<PolicyAttribute>>,
1164    /// <p>The name of the load balancer policy to be created. This name must be unique within the set of policies for this load balancer.</p>
1165    pub policy_name: String,
1166    /// <p>The name of the base policy type. To get the list of policy types, use <a>DescribeLoadBalancerPolicyTypes</a>.</p>
1167    pub policy_type_name: String,
1168}
1169
1170/// Serialize `CreateLoadBalancerPolicyInput` contents to a `SignedRequest`.
1171struct CreateLoadBalancerPolicyInputSerializer;
1172impl CreateLoadBalancerPolicyInputSerializer {
1173    fn serialize(params: &mut Params, name: &str, obj: &CreateLoadBalancerPolicyInput) {
1174        let mut prefix = name.to_string();
1175        if prefix != "" {
1176            prefix.push_str(".");
1177        }
1178
1179        params.put(
1180            &format!("{}{}", prefix, "LoadBalancerName"),
1181            &obj.load_balancer_name,
1182        );
1183        if let Some(ref field_value) = obj.policy_attributes {
1184            PolicyAttributesSerializer::serialize(
1185                params,
1186                &format!("{}{}", prefix, "PolicyAttributes"),
1187                field_value,
1188            );
1189        }
1190        params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
1191        params.put(
1192            &format!("{}{}", prefix, "PolicyTypeName"),
1193            &obj.policy_type_name,
1194        );
1195    }
1196}
1197
1198/// <p>Contains the output of CreateLoadBalancerPolicy.</p>
1199#[derive(Clone, Debug, Default, PartialEq)]
1200#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1201pub struct CreateLoadBalancerPolicyOutput {}
1202
1203#[allow(dead_code)]
1204struct CreateLoadBalancerPolicyOutputDeserializer;
1205impl CreateLoadBalancerPolicyOutputDeserializer {
1206    #[allow(dead_code, unused_variables)]
1207    fn deserialize<T: Peek + Next>(
1208        tag_name: &str,
1209        stack: &mut T,
1210    ) -> Result<CreateLoadBalancerPolicyOutput, XmlParseError> {
1211        xml_util::start_element(tag_name, stack)?;
1212
1213        let obj = CreateLoadBalancerPolicyOutput::default();
1214
1215        xml_util::end_element(tag_name, stack)?;
1216
1217        Ok(obj)
1218    }
1219}
1220#[allow(dead_code)]
1221struct CreatedTimeDeserializer;
1222impl CreatedTimeDeserializer {
1223    #[allow(dead_code, unused_variables)]
1224    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1225        xml_util::deserialize_primitive(tag_name, stack, Ok)
1226    }
1227}
1228/// <p>Information about the <code>CrossZoneLoadBalancing</code> attribute.</p>
1229#[derive(Clone, Debug, Default, PartialEq)]
1230#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1231#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1232pub struct CrossZoneLoadBalancing {
1233    /// <p>Specifies whether cross-zone load balancing is enabled for the load balancer.</p>
1234    pub enabled: bool,
1235}
1236
1237#[allow(dead_code)]
1238struct CrossZoneLoadBalancingDeserializer;
1239impl CrossZoneLoadBalancingDeserializer {
1240    #[allow(dead_code, unused_variables)]
1241    fn deserialize<T: Peek + Next>(
1242        tag_name: &str,
1243        stack: &mut T,
1244    ) -> Result<CrossZoneLoadBalancing, XmlParseError> {
1245        deserialize_elements::<_, CrossZoneLoadBalancing, _>(tag_name, stack, |name, stack, obj| {
1246            match name {
1247                "Enabled" => {
1248                    obj.enabled =
1249                        CrossZoneLoadBalancingEnabledDeserializer::deserialize("Enabled", stack)?;
1250                }
1251                _ => skip_tree(stack),
1252            }
1253            Ok(())
1254        })
1255    }
1256}
1257
1258/// Serialize `CrossZoneLoadBalancing` contents to a `SignedRequest`.
1259struct CrossZoneLoadBalancingSerializer;
1260impl CrossZoneLoadBalancingSerializer {
1261    fn serialize(params: &mut Params, name: &str, obj: &CrossZoneLoadBalancing) {
1262        let mut prefix = name.to_string();
1263        if prefix != "" {
1264            prefix.push_str(".");
1265        }
1266
1267        params.put(&format!("{}{}", prefix, "Enabled"), &obj.enabled);
1268    }
1269}
1270
1271#[allow(dead_code)]
1272struct CrossZoneLoadBalancingEnabledDeserializer;
1273impl CrossZoneLoadBalancingEnabledDeserializer {
1274    #[allow(dead_code, unused_variables)]
1275    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
1276        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
1277    }
1278}
1279#[allow(dead_code)]
1280struct DNSNameDeserializer;
1281impl DNSNameDeserializer {
1282    #[allow(dead_code, unused_variables)]
1283    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1284        xml_util::deserialize_primitive(tag_name, stack, Ok)
1285    }
1286}
1287#[allow(dead_code)]
1288struct DefaultValueDeserializer;
1289impl DefaultValueDeserializer {
1290    #[allow(dead_code, unused_variables)]
1291    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1292        xml_util::deserialize_primitive(tag_name, stack, Ok)
1293    }
1294}
1295/// <p>Contains the parameters for DeleteLoadBalancer.</p>
1296#[derive(Clone, Debug, Default, PartialEq)]
1297#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1298pub struct DeleteAccessPointInput {
1299    /// <p>The name of the load balancer.</p>
1300    pub load_balancer_name: String,
1301}
1302
1303/// Serialize `DeleteAccessPointInput` contents to a `SignedRequest`.
1304struct DeleteAccessPointInputSerializer;
1305impl DeleteAccessPointInputSerializer {
1306    fn serialize(params: &mut Params, name: &str, obj: &DeleteAccessPointInput) {
1307        let mut prefix = name.to_string();
1308        if prefix != "" {
1309            prefix.push_str(".");
1310        }
1311
1312        params.put(
1313            &format!("{}{}", prefix, "LoadBalancerName"),
1314            &obj.load_balancer_name,
1315        );
1316    }
1317}
1318
1319/// <p>Contains the output of DeleteLoadBalancer.</p>
1320#[derive(Clone, Debug, Default, PartialEq)]
1321#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1322pub struct DeleteAccessPointOutput {}
1323
1324#[allow(dead_code)]
1325struct DeleteAccessPointOutputDeserializer;
1326impl DeleteAccessPointOutputDeserializer {
1327    #[allow(dead_code, unused_variables)]
1328    fn deserialize<T: Peek + Next>(
1329        tag_name: &str,
1330        stack: &mut T,
1331    ) -> Result<DeleteAccessPointOutput, XmlParseError> {
1332        xml_util::start_element(tag_name, stack)?;
1333
1334        let obj = DeleteAccessPointOutput::default();
1335
1336        xml_util::end_element(tag_name, stack)?;
1337
1338        Ok(obj)
1339    }
1340}
1341/// <p>Contains the parameters for DeleteLoadBalancerListeners.</p>
1342#[derive(Clone, Debug, Default, PartialEq)]
1343#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1344pub struct DeleteLoadBalancerListenerInput {
1345    /// <p>The name of the load balancer.</p>
1346    pub load_balancer_name: String,
1347    /// <p>The client port numbers of the listeners.</p>
1348    pub load_balancer_ports: Vec<i64>,
1349}
1350
1351/// Serialize `DeleteLoadBalancerListenerInput` contents to a `SignedRequest`.
1352struct DeleteLoadBalancerListenerInputSerializer;
1353impl DeleteLoadBalancerListenerInputSerializer {
1354    fn serialize(params: &mut Params, name: &str, obj: &DeleteLoadBalancerListenerInput) {
1355        let mut prefix = name.to_string();
1356        if prefix != "" {
1357            prefix.push_str(".");
1358        }
1359
1360        params.put(
1361            &format!("{}{}", prefix, "LoadBalancerName"),
1362            &obj.load_balancer_name,
1363        );
1364        PortsSerializer::serialize(
1365            params,
1366            &format!("{}{}", prefix, "LoadBalancerPorts"),
1367            &obj.load_balancer_ports,
1368        );
1369    }
1370}
1371
1372/// <p>Contains the output of DeleteLoadBalancerListeners.</p>
1373#[derive(Clone, Debug, Default, PartialEq)]
1374#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1375pub struct DeleteLoadBalancerListenerOutput {}
1376
1377#[allow(dead_code)]
1378struct DeleteLoadBalancerListenerOutputDeserializer;
1379impl DeleteLoadBalancerListenerOutputDeserializer {
1380    #[allow(dead_code, unused_variables)]
1381    fn deserialize<T: Peek + Next>(
1382        tag_name: &str,
1383        stack: &mut T,
1384    ) -> Result<DeleteLoadBalancerListenerOutput, XmlParseError> {
1385        xml_util::start_element(tag_name, stack)?;
1386
1387        let obj = DeleteLoadBalancerListenerOutput::default();
1388
1389        xml_util::end_element(tag_name, stack)?;
1390
1391        Ok(obj)
1392    }
1393}
1394/// <p>Contains the parameters for DeleteLoadBalancerPolicy.</p>
1395#[derive(Clone, Debug, Default, PartialEq)]
1396#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1397pub struct DeleteLoadBalancerPolicyInput {
1398    /// <p>The name of the load balancer.</p>
1399    pub load_balancer_name: String,
1400    /// <p>The name of the policy.</p>
1401    pub policy_name: String,
1402}
1403
1404/// Serialize `DeleteLoadBalancerPolicyInput` contents to a `SignedRequest`.
1405struct DeleteLoadBalancerPolicyInputSerializer;
1406impl DeleteLoadBalancerPolicyInputSerializer {
1407    fn serialize(params: &mut Params, name: &str, obj: &DeleteLoadBalancerPolicyInput) {
1408        let mut prefix = name.to_string();
1409        if prefix != "" {
1410            prefix.push_str(".");
1411        }
1412
1413        params.put(
1414            &format!("{}{}", prefix, "LoadBalancerName"),
1415            &obj.load_balancer_name,
1416        );
1417        params.put(&format!("{}{}", prefix, "PolicyName"), &obj.policy_name);
1418    }
1419}
1420
1421/// <p>Contains the output of DeleteLoadBalancerPolicy.</p>
1422#[derive(Clone, Debug, Default, PartialEq)]
1423#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1424pub struct DeleteLoadBalancerPolicyOutput {}
1425
1426#[allow(dead_code)]
1427struct DeleteLoadBalancerPolicyOutputDeserializer;
1428impl DeleteLoadBalancerPolicyOutputDeserializer {
1429    #[allow(dead_code, unused_variables)]
1430    fn deserialize<T: Peek + Next>(
1431        tag_name: &str,
1432        stack: &mut T,
1433    ) -> Result<DeleteLoadBalancerPolicyOutput, XmlParseError> {
1434        xml_util::start_element(tag_name, stack)?;
1435
1436        let obj = DeleteLoadBalancerPolicyOutput::default();
1437
1438        xml_util::end_element(tag_name, stack)?;
1439
1440        Ok(obj)
1441    }
1442}
1443/// <p>Contains the parameters for DeregisterInstancesFromLoadBalancer.</p>
1444#[derive(Clone, Debug, Default, PartialEq)]
1445#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1446pub struct DeregisterEndPointsInput {
1447    /// <p>The IDs of the instances.</p>
1448    pub instances: Vec<Instance>,
1449    /// <p>The name of the load balancer.</p>
1450    pub load_balancer_name: String,
1451}
1452
1453/// Serialize `DeregisterEndPointsInput` contents to a `SignedRequest`.
1454struct DeregisterEndPointsInputSerializer;
1455impl DeregisterEndPointsInputSerializer {
1456    fn serialize(params: &mut Params, name: &str, obj: &DeregisterEndPointsInput) {
1457        let mut prefix = name.to_string();
1458        if prefix != "" {
1459            prefix.push_str(".");
1460        }
1461
1462        InstancesSerializer::serialize(
1463            params,
1464            &format!("{}{}", prefix, "Instances"),
1465            &obj.instances,
1466        );
1467        params.put(
1468            &format!("{}{}", prefix, "LoadBalancerName"),
1469            &obj.load_balancer_name,
1470        );
1471    }
1472}
1473
1474/// <p>Contains the output of DeregisterInstancesFromLoadBalancer.</p>
1475#[derive(Clone, Debug, Default, PartialEq)]
1476#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1477pub struct DeregisterEndPointsOutput {
1478    /// <p>The remaining instances registered with the load balancer.</p>
1479    pub instances: Option<Vec<Instance>>,
1480}
1481
1482#[allow(dead_code)]
1483struct DeregisterEndPointsOutputDeserializer;
1484impl DeregisterEndPointsOutputDeserializer {
1485    #[allow(dead_code, unused_variables)]
1486    fn deserialize<T: Peek + Next>(
1487        tag_name: &str,
1488        stack: &mut T,
1489    ) -> Result<DeregisterEndPointsOutput, XmlParseError> {
1490        deserialize_elements::<_, DeregisterEndPointsOutput, _>(
1491            tag_name,
1492            stack,
1493            |name, stack, obj| {
1494                match name {
1495                    "Instances" => {
1496                        obj.instances
1497                            .get_or_insert(vec![])
1498                            .extend(InstancesDeserializer::deserialize("Instances", stack)?);
1499                    }
1500                    _ => skip_tree(stack),
1501                }
1502                Ok(())
1503            },
1504        )
1505    }
1506}
1507/// <p>Contains the parameters for DescribeLoadBalancers.</p>
1508#[derive(Clone, Debug, Default, PartialEq)]
1509#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1510pub struct DescribeAccessPointsInput {
1511    /// <p>The names of the load balancers.</p>
1512    pub load_balancer_names: Option<Vec<String>>,
1513    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1514    pub marker: Option<String>,
1515    /// <p>The maximum number of results to return with this call (a number from 1 to 400). The default is 400.</p>
1516    pub page_size: Option<i64>,
1517}
1518
1519/// Serialize `DescribeAccessPointsInput` contents to a `SignedRequest`.
1520struct DescribeAccessPointsInputSerializer;
1521impl DescribeAccessPointsInputSerializer {
1522    fn serialize(params: &mut Params, name: &str, obj: &DescribeAccessPointsInput) {
1523        let mut prefix = name.to_string();
1524        if prefix != "" {
1525            prefix.push_str(".");
1526        }
1527
1528        if let Some(ref field_value) = obj.load_balancer_names {
1529            LoadBalancerNamesSerializer::serialize(
1530                params,
1531                &format!("{}{}", prefix, "LoadBalancerNames"),
1532                field_value,
1533            );
1534        }
1535        if let Some(ref field_value) = obj.marker {
1536            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
1537        }
1538        if let Some(ref field_value) = obj.page_size {
1539            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
1540        }
1541    }
1542}
1543
1544/// <p>Contains the parameters for DescribeLoadBalancers.</p>
1545#[derive(Clone, Debug, Default, PartialEq)]
1546#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1547pub struct DescribeAccessPointsOutput {
1548    /// <p>Information about the load balancers.</p>
1549    pub load_balancer_descriptions: Option<Vec<LoadBalancerDescription>>,
1550    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
1551    pub next_marker: Option<String>,
1552}
1553
1554#[allow(dead_code)]
1555struct DescribeAccessPointsOutputDeserializer;
1556impl DescribeAccessPointsOutputDeserializer {
1557    #[allow(dead_code, unused_variables)]
1558    fn deserialize<T: Peek + Next>(
1559        tag_name: &str,
1560        stack: &mut T,
1561    ) -> Result<DescribeAccessPointsOutput, XmlParseError> {
1562        deserialize_elements::<_, DescribeAccessPointsOutput, _>(
1563            tag_name,
1564            stack,
1565            |name, stack, obj| {
1566                match name {
1567                    "LoadBalancerDescriptions" => {
1568                        obj.load_balancer_descriptions.get_or_insert(vec![]).extend(
1569                            LoadBalancerDescriptionsDeserializer::deserialize(
1570                                "LoadBalancerDescriptions",
1571                                stack,
1572                            )?,
1573                        );
1574                    }
1575                    "NextMarker" => {
1576                        obj.next_marker =
1577                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
1578                    }
1579                    _ => skip_tree(stack),
1580                }
1581                Ok(())
1582            },
1583        )
1584    }
1585}
1586#[derive(Clone, Debug, Default, PartialEq)]
1587#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1588pub struct DescribeAccountLimitsInput {
1589    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1590    pub marker: Option<String>,
1591    /// <p>The maximum number of results to return with this call.</p>
1592    pub page_size: Option<i64>,
1593}
1594
1595/// Serialize `DescribeAccountLimitsInput` contents to a `SignedRequest`.
1596struct DescribeAccountLimitsInputSerializer;
1597impl DescribeAccountLimitsInputSerializer {
1598    fn serialize(params: &mut Params, name: &str, obj: &DescribeAccountLimitsInput) {
1599        let mut prefix = name.to_string();
1600        if prefix != "" {
1601            prefix.push_str(".");
1602        }
1603
1604        if let Some(ref field_value) = obj.marker {
1605            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
1606        }
1607        if let Some(ref field_value) = obj.page_size {
1608            params.put(&format!("{}{}", prefix, "PageSize"), &field_value);
1609        }
1610    }
1611}
1612
1613#[derive(Clone, Debug, Default, PartialEq)]
1614#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1615pub struct DescribeAccountLimitsOutput {
1616    /// <p>Information about the limits.</p>
1617    pub limits: Option<Vec<Limit>>,
1618    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
1619    pub next_marker: Option<String>,
1620}
1621
1622#[allow(dead_code)]
1623struct DescribeAccountLimitsOutputDeserializer;
1624impl DescribeAccountLimitsOutputDeserializer {
1625    #[allow(dead_code, unused_variables)]
1626    fn deserialize<T: Peek + Next>(
1627        tag_name: &str,
1628        stack: &mut T,
1629    ) -> Result<DescribeAccountLimitsOutput, XmlParseError> {
1630        deserialize_elements::<_, DescribeAccountLimitsOutput, _>(
1631            tag_name,
1632            stack,
1633            |name, stack, obj| {
1634                match name {
1635                    "Limits" => {
1636                        obj.limits
1637                            .get_or_insert(vec![])
1638                            .extend(LimitsDeserializer::deserialize("Limits", stack)?);
1639                    }
1640                    "NextMarker" => {
1641                        obj.next_marker =
1642                            Some(MarkerDeserializer::deserialize("NextMarker", stack)?);
1643                    }
1644                    _ => skip_tree(stack),
1645                }
1646                Ok(())
1647            },
1648        )
1649    }
1650}
1651/// <p>Contains the parameters for DescribeInstanceHealth.</p>
1652#[derive(Clone, Debug, Default, PartialEq)]
1653#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1654pub struct DescribeEndPointStateInput {
1655    /// <p>The IDs of the instances.</p>
1656    pub instances: Option<Vec<Instance>>,
1657    /// <p>The name of the load balancer.</p>
1658    pub load_balancer_name: String,
1659}
1660
1661/// Serialize `DescribeEndPointStateInput` contents to a `SignedRequest`.
1662struct DescribeEndPointStateInputSerializer;
1663impl DescribeEndPointStateInputSerializer {
1664    fn serialize(params: &mut Params, name: &str, obj: &DescribeEndPointStateInput) {
1665        let mut prefix = name.to_string();
1666        if prefix != "" {
1667            prefix.push_str(".");
1668        }
1669
1670        if let Some(ref field_value) = obj.instances {
1671            InstancesSerializer::serialize(
1672                params,
1673                &format!("{}{}", prefix, "Instances"),
1674                field_value,
1675            );
1676        }
1677        params.put(
1678            &format!("{}{}", prefix, "LoadBalancerName"),
1679            &obj.load_balancer_name,
1680        );
1681    }
1682}
1683
1684/// <p>Contains the output for DescribeInstanceHealth.</p>
1685#[derive(Clone, Debug, Default, PartialEq)]
1686#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1687pub struct DescribeEndPointStateOutput {
1688    /// <p>Information about the health of the instances.</p>
1689    pub instance_states: Option<Vec<InstanceState>>,
1690}
1691
1692#[allow(dead_code)]
1693struct DescribeEndPointStateOutputDeserializer;
1694impl DescribeEndPointStateOutputDeserializer {
1695    #[allow(dead_code, unused_variables)]
1696    fn deserialize<T: Peek + Next>(
1697        tag_name: &str,
1698        stack: &mut T,
1699    ) -> Result<DescribeEndPointStateOutput, XmlParseError> {
1700        deserialize_elements::<_, DescribeEndPointStateOutput, _>(
1701            tag_name,
1702            stack,
1703            |name, stack, obj| {
1704                match name {
1705                    "InstanceStates" => {
1706                        obj.instance_states.get_or_insert(vec![]).extend(
1707                            InstanceStatesDeserializer::deserialize("InstanceStates", stack)?,
1708                        );
1709                    }
1710                    _ => skip_tree(stack),
1711                }
1712                Ok(())
1713            },
1714        )
1715    }
1716}
1717/// <p>Contains the parameters for DescribeLoadBalancerAttributes.</p>
1718#[derive(Clone, Debug, Default, PartialEq)]
1719#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1720pub struct DescribeLoadBalancerAttributesInput {
1721    /// <p>The name of the load balancer.</p>
1722    pub load_balancer_name: String,
1723}
1724
1725/// Serialize `DescribeLoadBalancerAttributesInput` contents to a `SignedRequest`.
1726struct DescribeLoadBalancerAttributesInputSerializer;
1727impl DescribeLoadBalancerAttributesInputSerializer {
1728    fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancerAttributesInput) {
1729        let mut prefix = name.to_string();
1730        if prefix != "" {
1731            prefix.push_str(".");
1732        }
1733
1734        params.put(
1735            &format!("{}{}", prefix, "LoadBalancerName"),
1736            &obj.load_balancer_name,
1737        );
1738    }
1739}
1740
1741/// <p>Contains the output of DescribeLoadBalancerAttributes.</p>
1742#[derive(Clone, Debug, Default, PartialEq)]
1743#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1744pub struct DescribeLoadBalancerAttributesOutput {
1745    /// <p>Information about the load balancer attributes.</p>
1746    pub load_balancer_attributes: Option<LoadBalancerAttributes>,
1747}
1748
1749#[allow(dead_code)]
1750struct DescribeLoadBalancerAttributesOutputDeserializer;
1751impl DescribeLoadBalancerAttributesOutputDeserializer {
1752    #[allow(dead_code, unused_variables)]
1753    fn deserialize<T: Peek + Next>(
1754        tag_name: &str,
1755        stack: &mut T,
1756    ) -> Result<DescribeLoadBalancerAttributesOutput, XmlParseError> {
1757        deserialize_elements::<_, DescribeLoadBalancerAttributesOutput, _>(
1758            tag_name,
1759            stack,
1760            |name, stack, obj| {
1761                match name {
1762                    "LoadBalancerAttributes" => {
1763                        obj.load_balancer_attributes =
1764                            Some(LoadBalancerAttributesDeserializer::deserialize(
1765                                "LoadBalancerAttributes",
1766                                stack,
1767                            )?);
1768                    }
1769                    _ => skip_tree(stack),
1770                }
1771                Ok(())
1772            },
1773        )
1774    }
1775}
1776/// <p>Contains the parameters for DescribeLoadBalancerPolicies.</p>
1777#[derive(Clone, Debug, Default, PartialEq)]
1778#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1779pub struct DescribeLoadBalancerPoliciesInput {
1780    /// <p>The name of the load balancer.</p>
1781    pub load_balancer_name: Option<String>,
1782    /// <p>The names of the policies.</p>
1783    pub policy_names: Option<Vec<String>>,
1784}
1785
1786/// Serialize `DescribeLoadBalancerPoliciesInput` contents to a `SignedRequest`.
1787struct DescribeLoadBalancerPoliciesInputSerializer;
1788impl DescribeLoadBalancerPoliciesInputSerializer {
1789    fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancerPoliciesInput) {
1790        let mut prefix = name.to_string();
1791        if prefix != "" {
1792            prefix.push_str(".");
1793        }
1794
1795        if let Some(ref field_value) = obj.load_balancer_name {
1796            params.put(&format!("{}{}", prefix, "LoadBalancerName"), &field_value);
1797        }
1798        if let Some(ref field_value) = obj.policy_names {
1799            PolicyNamesSerializer::serialize(
1800                params,
1801                &format!("{}{}", prefix, "PolicyNames"),
1802                field_value,
1803            );
1804        }
1805    }
1806}
1807
1808/// <p>Contains the output of DescribeLoadBalancerPolicies.</p>
1809#[derive(Clone, Debug, Default, PartialEq)]
1810#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1811pub struct DescribeLoadBalancerPoliciesOutput {
1812    /// <p>Information about the policies.</p>
1813    pub policy_descriptions: Option<Vec<PolicyDescription>>,
1814}
1815
1816#[allow(dead_code)]
1817struct DescribeLoadBalancerPoliciesOutputDeserializer;
1818impl DescribeLoadBalancerPoliciesOutputDeserializer {
1819    #[allow(dead_code, unused_variables)]
1820    fn deserialize<T: Peek + Next>(
1821        tag_name: &str,
1822        stack: &mut T,
1823    ) -> Result<DescribeLoadBalancerPoliciesOutput, XmlParseError> {
1824        deserialize_elements::<_, DescribeLoadBalancerPoliciesOutput, _>(
1825            tag_name,
1826            stack,
1827            |name, stack, obj| {
1828                match name {
1829                    "PolicyDescriptions" => {
1830                        obj.policy_descriptions.get_or_insert(vec![]).extend(
1831                            PolicyDescriptionsDeserializer::deserialize(
1832                                "PolicyDescriptions",
1833                                stack,
1834                            )?,
1835                        );
1836                    }
1837                    _ => skip_tree(stack),
1838                }
1839                Ok(())
1840            },
1841        )
1842    }
1843}
1844/// <p>Contains the parameters for DescribeLoadBalancerPolicyTypes.</p>
1845#[derive(Clone, Debug, Default, PartialEq)]
1846#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1847pub struct DescribeLoadBalancerPolicyTypesInput {
1848    /// <p>The names of the policy types. If no names are specified, describes all policy types defined by Elastic Load Balancing.</p>
1849    pub policy_type_names: Option<Vec<String>>,
1850}
1851
1852/// Serialize `DescribeLoadBalancerPolicyTypesInput` contents to a `SignedRequest`.
1853struct DescribeLoadBalancerPolicyTypesInputSerializer;
1854impl DescribeLoadBalancerPolicyTypesInputSerializer {
1855    fn serialize(params: &mut Params, name: &str, obj: &DescribeLoadBalancerPolicyTypesInput) {
1856        let mut prefix = name.to_string();
1857        if prefix != "" {
1858            prefix.push_str(".");
1859        }
1860
1861        if let Some(ref field_value) = obj.policy_type_names {
1862            PolicyTypeNamesSerializer::serialize(
1863                params,
1864                &format!("{}{}", prefix, "PolicyTypeNames"),
1865                field_value,
1866            );
1867        }
1868    }
1869}
1870
1871/// <p>Contains the output of DescribeLoadBalancerPolicyTypes.</p>
1872#[derive(Clone, Debug, Default, PartialEq)]
1873#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1874pub struct DescribeLoadBalancerPolicyTypesOutput {
1875    /// <p>Information about the policy types.</p>
1876    pub policy_type_descriptions: Option<Vec<PolicyTypeDescription>>,
1877}
1878
1879#[allow(dead_code)]
1880struct DescribeLoadBalancerPolicyTypesOutputDeserializer;
1881impl DescribeLoadBalancerPolicyTypesOutputDeserializer {
1882    #[allow(dead_code, unused_variables)]
1883    fn deserialize<T: Peek + Next>(
1884        tag_name: &str,
1885        stack: &mut T,
1886    ) -> Result<DescribeLoadBalancerPolicyTypesOutput, XmlParseError> {
1887        deserialize_elements::<_, DescribeLoadBalancerPolicyTypesOutput, _>(
1888            tag_name,
1889            stack,
1890            |name, stack, obj| {
1891                match name {
1892                    "PolicyTypeDescriptions" => {
1893                        obj.policy_type_descriptions.get_or_insert(vec![]).extend(
1894                            PolicyTypeDescriptionsDeserializer::deserialize(
1895                                "PolicyTypeDescriptions",
1896                                stack,
1897                            )?,
1898                        );
1899                    }
1900                    _ => skip_tree(stack),
1901                }
1902                Ok(())
1903            },
1904        )
1905    }
1906}
1907/// <p>Contains the parameters for DescribeTags.</p>
1908#[derive(Clone, Debug, Default, PartialEq)]
1909#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1910pub struct DescribeTagsInput {
1911    /// <p>The names of the load balancers.</p>
1912    pub load_balancer_names: Vec<String>,
1913}
1914
1915/// Serialize `DescribeTagsInput` contents to a `SignedRequest`.
1916struct DescribeTagsInputSerializer;
1917impl DescribeTagsInputSerializer {
1918    fn serialize(params: &mut Params, name: &str, obj: &DescribeTagsInput) {
1919        let mut prefix = name.to_string();
1920        if prefix != "" {
1921            prefix.push_str(".");
1922        }
1923
1924        LoadBalancerNamesMax20Serializer::serialize(
1925            params,
1926            &format!("{}{}", prefix, "LoadBalancerNames"),
1927            &obj.load_balancer_names,
1928        );
1929    }
1930}
1931
1932/// <p>Contains the output for DescribeTags.</p>
1933#[derive(Clone, Debug, Default, PartialEq)]
1934#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1935pub struct DescribeTagsOutput {
1936    /// <p>Information about the tags.</p>
1937    pub tag_descriptions: Option<Vec<TagDescription>>,
1938}
1939
1940#[allow(dead_code)]
1941struct DescribeTagsOutputDeserializer;
1942impl DescribeTagsOutputDeserializer {
1943    #[allow(dead_code, unused_variables)]
1944    fn deserialize<T: Peek + Next>(
1945        tag_name: &str,
1946        stack: &mut T,
1947    ) -> Result<DescribeTagsOutput, XmlParseError> {
1948        deserialize_elements::<_, DescribeTagsOutput, _>(tag_name, stack, |name, stack, obj| {
1949            match name {
1950                "TagDescriptions" => {
1951                    obj.tag_descriptions.get_or_insert(vec![]).extend(
1952                        TagDescriptionsDeserializer::deserialize("TagDescriptions", stack)?,
1953                    );
1954                }
1955                _ => skip_tree(stack),
1956            }
1957            Ok(())
1958        })
1959    }
1960}
1961#[allow(dead_code)]
1962struct DescriptionDeserializer;
1963impl DescriptionDeserializer {
1964    #[allow(dead_code, unused_variables)]
1965    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1966        xml_util::deserialize_primitive(tag_name, stack, Ok)
1967    }
1968}
1969/// <p>Contains the parameters for DetachLoadBalancerFromSubnets.</p>
1970#[derive(Clone, Debug, Default, PartialEq)]
1971#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1972pub struct DetachLoadBalancerFromSubnetsInput {
1973    /// <p>The name of the load balancer.</p>
1974    pub load_balancer_name: String,
1975    /// <p>The IDs of the subnets.</p>
1976    pub subnets: Vec<String>,
1977}
1978
1979/// Serialize `DetachLoadBalancerFromSubnetsInput` contents to a `SignedRequest`.
1980struct DetachLoadBalancerFromSubnetsInputSerializer;
1981impl DetachLoadBalancerFromSubnetsInputSerializer {
1982    fn serialize(params: &mut Params, name: &str, obj: &DetachLoadBalancerFromSubnetsInput) {
1983        let mut prefix = name.to_string();
1984        if prefix != "" {
1985            prefix.push_str(".");
1986        }
1987
1988        params.put(
1989            &format!("{}{}", prefix, "LoadBalancerName"),
1990            &obj.load_balancer_name,
1991        );
1992        SubnetsSerializer::serialize(params, &format!("{}{}", prefix, "Subnets"), &obj.subnets);
1993    }
1994}
1995
1996/// <p>Contains the output of DetachLoadBalancerFromSubnets.</p>
1997#[derive(Clone, Debug, Default, PartialEq)]
1998#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1999pub struct DetachLoadBalancerFromSubnetsOutput {
2000    /// <p>The IDs of the remaining subnets for the load balancer.</p>
2001    pub subnets: Option<Vec<String>>,
2002}
2003
2004#[allow(dead_code)]
2005struct DetachLoadBalancerFromSubnetsOutputDeserializer;
2006impl DetachLoadBalancerFromSubnetsOutputDeserializer {
2007    #[allow(dead_code, unused_variables)]
2008    fn deserialize<T: Peek + Next>(
2009        tag_name: &str,
2010        stack: &mut T,
2011    ) -> Result<DetachLoadBalancerFromSubnetsOutput, XmlParseError> {
2012        deserialize_elements::<_, DetachLoadBalancerFromSubnetsOutput, _>(
2013            tag_name,
2014            stack,
2015            |name, stack, obj| {
2016                match name {
2017                    "Subnets" => {
2018                        obj.subnets
2019                            .get_or_insert(vec![])
2020                            .extend(SubnetsDeserializer::deserialize("Subnets", stack)?);
2021                    }
2022                    _ => skip_tree(stack),
2023                }
2024                Ok(())
2025            },
2026        )
2027    }
2028}
2029/// <p>Information about a health check.</p>
2030#[derive(Clone, Debug, Default, PartialEq)]
2031#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2032#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2033pub struct HealthCheck {
2034    /// <p>The number of consecutive health checks successes required before moving the instance to the <code>Healthy</code> state.</p>
2035    pub healthy_threshold: i64,
2036    /// <p>The approximate interval, in seconds, between health checks of an individual instance.</p>
2037    pub interval: i64,
2038    /// <p>The instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. The range of valid ports is one (1) through 65535.</p> <p>TCP is the default, specified as a TCP: port pair, for example "TCP:5000". In this case, a health check simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy.</p> <p>SSL is also specified as SSL: port pair, for example, SSL:5000.</p> <p>For HTTP/HTTPS, you must include a ping path in the string. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than "200 OK" within the timeout period is considered unhealthy.</p> <p>The total length of the HTTP ping target must be 1024 16-bit Unicode characters or less.</p>
2039    pub target: String,
2040    /// <p>The amount of time, in seconds, during which no response means a failed health check.</p> <p>This value must be less than the <code>Interval</code> value.</p>
2041    pub timeout: i64,
2042    /// <p>The number of consecutive health check failures required before moving the instance to the <code>Unhealthy</code> state.</p>
2043    pub unhealthy_threshold: i64,
2044}
2045
2046#[allow(dead_code)]
2047struct HealthCheckDeserializer;
2048impl HealthCheckDeserializer {
2049    #[allow(dead_code, unused_variables)]
2050    fn deserialize<T: Peek + Next>(
2051        tag_name: &str,
2052        stack: &mut T,
2053    ) -> Result<HealthCheck, XmlParseError> {
2054        deserialize_elements::<_, HealthCheck, _>(tag_name, stack, |name, stack, obj| {
2055            match name {
2056                "HealthyThreshold" => {
2057                    obj.healthy_threshold =
2058                        HealthyThresholdDeserializer::deserialize("HealthyThreshold", stack)?;
2059                }
2060                "Interval" => {
2061                    obj.interval = HealthCheckIntervalDeserializer::deserialize("Interval", stack)?;
2062                }
2063                "Target" => {
2064                    obj.target = HealthCheckTargetDeserializer::deserialize("Target", stack)?;
2065                }
2066                "Timeout" => {
2067                    obj.timeout = HealthCheckTimeoutDeserializer::deserialize("Timeout", stack)?;
2068                }
2069                "UnhealthyThreshold" => {
2070                    obj.unhealthy_threshold =
2071                        UnhealthyThresholdDeserializer::deserialize("UnhealthyThreshold", stack)?;
2072                }
2073                _ => skip_tree(stack),
2074            }
2075            Ok(())
2076        })
2077    }
2078}
2079
2080/// Serialize `HealthCheck` contents to a `SignedRequest`.
2081struct HealthCheckSerializer;
2082impl HealthCheckSerializer {
2083    fn serialize(params: &mut Params, name: &str, obj: &HealthCheck) {
2084        let mut prefix = name.to_string();
2085        if prefix != "" {
2086            prefix.push_str(".");
2087        }
2088
2089        params.put(
2090            &format!("{}{}", prefix, "HealthyThreshold"),
2091            &obj.healthy_threshold,
2092        );
2093        params.put(&format!("{}{}", prefix, "Interval"), &obj.interval);
2094        params.put(&format!("{}{}", prefix, "Target"), &obj.target);
2095        params.put(&format!("{}{}", prefix, "Timeout"), &obj.timeout);
2096        params.put(
2097            &format!("{}{}", prefix, "UnhealthyThreshold"),
2098            &obj.unhealthy_threshold,
2099        );
2100    }
2101}
2102
2103#[allow(dead_code)]
2104struct HealthCheckIntervalDeserializer;
2105impl HealthCheckIntervalDeserializer {
2106    #[allow(dead_code, unused_variables)]
2107    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2108        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2109    }
2110}
2111#[allow(dead_code)]
2112struct HealthCheckTargetDeserializer;
2113impl HealthCheckTargetDeserializer {
2114    #[allow(dead_code, unused_variables)]
2115    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2116        xml_util::deserialize_primitive(tag_name, stack, Ok)
2117    }
2118}
2119#[allow(dead_code)]
2120struct HealthCheckTimeoutDeserializer;
2121impl HealthCheckTimeoutDeserializer {
2122    #[allow(dead_code, unused_variables)]
2123    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2124        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2125    }
2126}
2127#[allow(dead_code)]
2128struct HealthyThresholdDeserializer;
2129impl HealthyThresholdDeserializer {
2130    #[allow(dead_code, unused_variables)]
2131    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2132        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2133    }
2134}
2135#[allow(dead_code)]
2136struct IdleTimeoutDeserializer;
2137impl IdleTimeoutDeserializer {
2138    #[allow(dead_code, unused_variables)]
2139    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2140        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2141    }
2142}
2143/// <p>The ID of an EC2 instance.</p>
2144#[derive(Clone, Debug, Default, PartialEq)]
2145#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2146#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2147pub struct Instance {
2148    /// <p>The instance ID.</p>
2149    pub instance_id: Option<String>,
2150}
2151
2152#[allow(dead_code)]
2153struct InstanceDeserializer;
2154impl InstanceDeserializer {
2155    #[allow(dead_code, unused_variables)]
2156    fn deserialize<T: Peek + Next>(
2157        tag_name: &str,
2158        stack: &mut T,
2159    ) -> Result<Instance, XmlParseError> {
2160        deserialize_elements::<_, Instance, _>(tag_name, stack, |name, stack, obj| {
2161            match name {
2162                "InstanceId" => {
2163                    obj.instance_id =
2164                        Some(InstanceIdDeserializer::deserialize("InstanceId", stack)?);
2165                }
2166                _ => skip_tree(stack),
2167            }
2168            Ok(())
2169        })
2170    }
2171}
2172
2173/// Serialize `Instance` contents to a `SignedRequest`.
2174struct InstanceSerializer;
2175impl InstanceSerializer {
2176    fn serialize(params: &mut Params, name: &str, obj: &Instance) {
2177        let mut prefix = name.to_string();
2178        if prefix != "" {
2179            prefix.push_str(".");
2180        }
2181
2182        if let Some(ref field_value) = obj.instance_id {
2183            params.put(&format!("{}{}", prefix, "InstanceId"), &field_value);
2184        }
2185    }
2186}
2187
2188#[allow(dead_code)]
2189struct InstanceIdDeserializer;
2190impl InstanceIdDeserializer {
2191    #[allow(dead_code, unused_variables)]
2192    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2193        xml_util::deserialize_primitive(tag_name, stack, Ok)
2194    }
2195}
2196#[allow(dead_code)]
2197struct InstancePortDeserializer;
2198impl InstancePortDeserializer {
2199    #[allow(dead_code, unused_variables)]
2200    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
2201        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
2202    }
2203}
2204/// <p>Information about the state of an EC2 instance.</p>
2205#[derive(Clone, Debug, Default, PartialEq)]
2206#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2207pub struct InstanceState {
2208    /// <p><p>A description of the instance state. This string can contain one or more of the following messages.</p> <ul> <li> <p> <code>N/A</code> </p> </li> <li> <p> <code>A transient error occurred. Please try again later.</code> </p> </li> <li> <p> <code>Instance has failed at least the UnhealthyThreshold number of health checks consecutively.</code> </p> </li> <li> <p> <code>Instance has not passed the configured HealthyThreshold number of health checks consecutively.</code> </p> </li> <li> <p> <code>Instance registration is still in progress.</code> </p> </li> <li> <p> <code>Instance is in the EC2 Availability Zone for which LoadBalancer is not configured to route traffic to.</code> </p> </li> <li> <p> <code>Instance is not currently registered with the LoadBalancer.</code> </p> </li> <li> <p> <code>Instance deregistration currently in progress.</code> </p> </li> <li> <p> <code>Disable Availability Zone is currently in progress.</code> </p> </li> <li> <p> <code>Instance is in pending state.</code> </p> </li> <li> <p> <code>Instance is in stopped state.</code> </p> </li> <li> <p> <code>Instance is in terminated state.</code> </p> </li> </ul></p>
2209    pub description: Option<String>,
2210    /// <p>The ID of the instance.</p>
2211    pub instance_id: Option<String>,
2212    /// <p>Information about the cause of <code>OutOfService</code> instances. Specifically, whether the cause is Elastic Load Balancing or the instance.</p> <p>Valid values: <code>ELB</code> | <code>Instance</code> | <code>N/A</code> </p>
2213    pub reason_code: Option<String>,
2214    /// <p>The current state of the instance.</p> <p>Valid values: <code>InService</code> | <code>OutOfService</code> | <code>Unknown</code> </p>
2215    pub state: Option<String>,
2216}
2217
2218#[allow(dead_code)]
2219struct InstanceStateDeserializer;
2220impl InstanceStateDeserializer {
2221    #[allow(dead_code, unused_variables)]
2222    fn deserialize<T: Peek + Next>(
2223        tag_name: &str,
2224        stack: &mut T,
2225    ) -> Result<InstanceState, XmlParseError> {
2226        deserialize_elements::<_, InstanceState, _>(tag_name, stack, |name, stack, obj| {
2227            match name {
2228                "Description" => {
2229                    obj.description =
2230                        Some(DescriptionDeserializer::deserialize("Description", stack)?);
2231                }
2232                "InstanceId" => {
2233                    obj.instance_id =
2234                        Some(InstanceIdDeserializer::deserialize("InstanceId", stack)?);
2235                }
2236                "ReasonCode" => {
2237                    obj.reason_code =
2238                        Some(ReasonCodeDeserializer::deserialize("ReasonCode", stack)?);
2239                }
2240                "State" => {
2241                    obj.state = Some(StateDeserializer::deserialize("State", stack)?);
2242                }
2243                _ => skip_tree(stack),
2244            }
2245            Ok(())
2246        })
2247    }
2248}
2249#[allow(dead_code)]
2250struct InstanceStatesDeserializer;
2251impl InstanceStatesDeserializer {
2252    #[allow(dead_code, unused_variables)]
2253    fn deserialize<T: Peek + Next>(
2254        tag_name: &str,
2255        stack: &mut T,
2256    ) -> Result<Vec<InstanceState>, XmlParseError> {
2257        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
2258            if name == "member" {
2259                obj.push(InstanceStateDeserializer::deserialize("member", stack)?);
2260            } else {
2261                skip_tree(stack);
2262            }
2263            Ok(())
2264        })
2265    }
2266}
2267#[allow(dead_code)]
2268struct InstancesDeserializer;
2269impl InstancesDeserializer {
2270    #[allow(dead_code, unused_variables)]
2271    fn deserialize<T: Peek + Next>(
2272        tag_name: &str,
2273        stack: &mut T,
2274    ) -> Result<Vec<Instance>, XmlParseError> {
2275        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
2276            if name == "member" {
2277                obj.push(InstanceDeserializer::deserialize("member", stack)?);
2278            } else {
2279                skip_tree(stack);
2280            }
2281            Ok(())
2282        })
2283    }
2284}
2285
2286/// Serialize `Instances` contents to a `SignedRequest`.
2287struct InstancesSerializer;
2288impl InstancesSerializer {
2289    fn serialize(params: &mut Params, name: &str, obj: &Vec<Instance>) {
2290        for (index, obj) in obj.iter().enumerate() {
2291            let key = format!("{}.member.{}", name, index + 1);
2292            InstanceSerializer::serialize(params, &key, obj);
2293        }
2294    }
2295}
2296
2297#[allow(dead_code)]
2298struct LBCookieStickinessPoliciesDeserializer;
2299impl LBCookieStickinessPoliciesDeserializer {
2300    #[allow(dead_code, unused_variables)]
2301    fn deserialize<T: Peek + Next>(
2302        tag_name: &str,
2303        stack: &mut T,
2304    ) -> Result<Vec<LBCookieStickinessPolicy>, XmlParseError> {
2305        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
2306            if name == "member" {
2307                obj.push(LBCookieStickinessPolicyDeserializer::deserialize(
2308                    "member", stack,
2309                )?);
2310            } else {
2311                skip_tree(stack);
2312            }
2313            Ok(())
2314        })
2315    }
2316}
2317/// <p>Information about a policy for duration-based session stickiness.</p>
2318#[derive(Clone, Debug, Default, PartialEq)]
2319#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2320pub struct LBCookieStickinessPolicy {
2321    /// <p>The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.</p>
2322    pub cookie_expiration_period: Option<i64>,
2323    /// <p>The name of the policy. This name must be unique within the set of policies for this load balancer.</p>
2324    pub policy_name: Option<String>,
2325}
2326
2327#[allow(dead_code)]
2328struct LBCookieStickinessPolicyDeserializer;
2329impl LBCookieStickinessPolicyDeserializer {
2330    #[allow(dead_code, unused_variables)]
2331    fn deserialize<T: Peek + Next>(
2332        tag_name: &str,
2333        stack: &mut T,
2334    ) -> Result<LBCookieStickinessPolicy, XmlParseError> {
2335        deserialize_elements::<_, LBCookieStickinessPolicy, _>(
2336            tag_name,
2337            stack,
2338            |name, stack, obj| {
2339                match name {
2340                    "CookieExpirationPeriod" => {
2341                        obj.cookie_expiration_period =
2342                            Some(CookieExpirationPeriodDeserializer::deserialize(
2343                                "CookieExpirationPeriod",
2344                                stack,
2345                            )?);
2346                    }
2347                    "PolicyName" => {
2348                        obj.policy_name =
2349                            Some(PolicyNameDeserializer::deserialize("PolicyName", stack)?);
2350                    }
2351                    _ => skip_tree(stack),
2352                }
2353                Ok(())
2354            },
2355        )
2356    }
2357}
2358/// <p>Information about an Elastic Load Balancing resource limit for your AWS account.</p>
2359#[derive(Clone, Debug, Default, PartialEq)]
2360#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2361pub struct Limit {
2362    /// <p>The maximum value of the limit.</p>
2363    pub max: Option<String>,
2364    /// <p><p>The name of the limit. The possible values are:</p> <ul> <li> <p>classic-listeners</p> </li> <li> <p>classic-load-balancers</p> </li> <li> <p>classic-registered-instances</p> </li> </ul></p>
2365    pub name: Option<String>,
2366}
2367
2368#[allow(dead_code)]
2369struct LimitDeserializer;
2370impl LimitDeserializer {
2371    #[allow(dead_code, unused_variables)]
2372    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Limit, XmlParseError> {
2373        deserialize_elements::<_, Limit, _>(tag_name, stack, |name, stack, obj| {
2374            match name {
2375                "Max" => {
2376                    obj.max = Some(MaxDeserializer::deserialize("Max", stack)?);
2377                }
2378                "Name" => {
2379                    obj.name = Some(NameDeserializer::deserialize("Name", stack)?);
2380                }
2381                _ => skip_tree(stack),
2382            }
2383            Ok(())
2384        })
2385    }
2386}
2387#[allow(dead_code)]
2388struct LimitsDeserializer;
2389impl LimitsDeserializer {
2390    #[allow(dead_code, unused_variables)]
2391    fn deserialize<T: Peek + Next>(
2392        tag_name: &str,
2393        stack: &mut T,
2394    ) -> Result<Vec<Limit>, XmlParseError> {
2395        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
2396            if name == "member" {
2397                obj.push(LimitDeserializer::deserialize("member", stack)?);
2398            } else {
2399                skip_tree(stack);
2400            }
2401            Ok(())
2402        })
2403    }
2404}
2405/// <p>Information about a listener.</p> <p>For information about the protocols and the ports supported by Elastic Load Balancing, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html">Listeners for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
2406#[derive(Clone, Debug, Default, PartialEq)]
2407#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2408#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2409pub struct Listener {
2410    /// <p>The port on which the instance is listening.</p>
2411    pub instance_port: i64,
2412    /// <p>The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.</p> <p>If the front-end protocol is HTTP, HTTPS, TCP, or SSL, <code>InstanceProtocol</code> must be at the same protocol.</p> <p>If there is another listener with the same <code>InstancePort</code> whose <code>InstanceProtocol</code> is secure, (HTTPS or SSL), the listener's <code>InstanceProtocol</code> must also be secure.</p> <p>If there is another listener with the same <code>InstancePort</code> whose <code>InstanceProtocol</code> is HTTP or TCP, the listener's <code>InstanceProtocol</code> must be HTTP or TCP.</p>
2413    pub instance_protocol: Option<String>,
2414    /// <p>The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.</p>
2415    pub load_balancer_port: i64,
2416    /// <p>The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.</p>
2417    pub protocol: String,
2418    /// <p>The Amazon Resource Name (ARN) of the server certificate.</p>
2419    pub ssl_certificate_id: Option<String>,
2420}
2421
2422#[allow(dead_code)]
2423struct ListenerDeserializer;
2424impl ListenerDeserializer {
2425    #[allow(dead_code, unused_variables)]
2426    fn deserialize<T: Peek + Next>(
2427        tag_name: &str,
2428        stack: &mut T,
2429    ) -> Result<Listener, XmlParseError> {
2430        deserialize_elements::<_, Listener, _>(tag_name, stack, |name, stack, obj| {
2431            match name {
2432                "InstancePort" => {
2433                    obj.instance_port =
2434                        InstancePortDeserializer::deserialize("InstancePort", stack)?;
2435                }
2436                "InstanceProtocol" => {
2437                    obj.instance_protocol = Some(ProtocolDeserializer::deserialize(
2438                        "InstanceProtocol",
2439                        stack,
2440                    )?);
2441                }
2442                "LoadBalancerPort" => {
2443                    obj.load_balancer_port =
2444                        AccessPointPortDeserializer::deserialize("LoadBalancerPort", stack)?;
2445                }
2446                "Protocol" => {
2447                    obj.protocol = ProtocolDeserializer::deserialize("Protocol", stack)?;
2448                }
2449                "SSLCertificateId" => {
2450                    obj.ssl_certificate_id = Some(SSLCertificateIdDeserializer::deserialize(
2451                        "SSLCertificateId",
2452                        stack,
2453                    )?);
2454                }
2455                _ => skip_tree(stack),
2456            }
2457            Ok(())
2458        })
2459    }
2460}
2461
2462/// Serialize `Listener` contents to a `SignedRequest`.
2463struct ListenerSerializer;
2464impl ListenerSerializer {
2465    fn serialize(params: &mut Params, name: &str, obj: &Listener) {
2466        let mut prefix = name.to_string();
2467        if prefix != "" {
2468            prefix.push_str(".");
2469        }
2470
2471        params.put(&format!("{}{}", prefix, "InstancePort"), &obj.instance_port);
2472        if let Some(ref field_value) = obj.instance_protocol {
2473            params.put(&format!("{}{}", prefix, "InstanceProtocol"), &field_value);
2474        }
2475        params.put(
2476            &format!("{}{}", prefix, "LoadBalancerPort"),
2477            &obj.load_balancer_port,
2478        );
2479        params.put(&format!("{}{}", prefix, "Protocol"), &obj.protocol);
2480        if let Some(ref field_value) = obj.ssl_certificate_id {
2481            params.put(&format!("{}{}", prefix, "SSLCertificateId"), &field_value);
2482        }
2483    }
2484}
2485
2486/// <p>The policies enabled for a listener.</p>
2487#[derive(Clone, Debug, Default, PartialEq)]
2488#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2489pub struct ListenerDescription {
2490    /// <p>The listener.</p>
2491    pub listener: Option<Listener>,
2492    /// <p>The policies. If there are no policies enabled, the list is empty.</p>
2493    pub policy_names: Option<Vec<String>>,
2494}
2495
2496#[allow(dead_code)]
2497struct ListenerDescriptionDeserializer;
2498impl ListenerDescriptionDeserializer {
2499    #[allow(dead_code, unused_variables)]
2500    fn deserialize<T: Peek + Next>(
2501        tag_name: &str,
2502        stack: &mut T,
2503    ) -> Result<ListenerDescription, XmlParseError> {
2504        deserialize_elements::<_, ListenerDescription, _>(tag_name, stack, |name, stack, obj| {
2505            match name {
2506                "Listener" => {
2507                    obj.listener = Some(ListenerDeserializer::deserialize("Listener", stack)?);
2508                }
2509                "PolicyNames" => {
2510                    obj.policy_names
2511                        .get_or_insert(vec![])
2512                        .extend(PolicyNamesDeserializer::deserialize("PolicyNames", stack)?);
2513                }
2514                _ => skip_tree(stack),
2515            }
2516            Ok(())
2517        })
2518    }
2519}
2520#[allow(dead_code)]
2521struct ListenerDescriptionsDeserializer;
2522impl ListenerDescriptionsDeserializer {
2523    #[allow(dead_code, unused_variables)]
2524    fn deserialize<T: Peek + Next>(
2525        tag_name: &str,
2526        stack: &mut T,
2527    ) -> Result<Vec<ListenerDescription>, XmlParseError> {
2528        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
2529            if name == "member" {
2530                obj.push(ListenerDescriptionDeserializer::deserialize(
2531                    "member", stack,
2532                )?);
2533            } else {
2534                skip_tree(stack);
2535            }
2536            Ok(())
2537        })
2538    }
2539}
2540
2541/// Serialize `Listeners` contents to a `SignedRequest`.
2542struct ListenersSerializer;
2543impl ListenersSerializer {
2544    fn serialize(params: &mut Params, name: &str, obj: &Vec<Listener>) {
2545        for (index, obj) in obj.iter().enumerate() {
2546            let key = format!("{}.member.{}", name, index + 1);
2547            ListenerSerializer::serialize(params, &key, obj);
2548        }
2549    }
2550}
2551
2552/// <p>The attributes for a load balancer.</p>
2553#[derive(Clone, Debug, Default, PartialEq)]
2554#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2555#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2556pub struct LoadBalancerAttributes {
2557    /// <p>If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html">Enable Access Logs</a> in the <i>Classic Load Balancers Guide</i>.</p>
2558    pub access_log: Option<AccessLog>,
2559    /// <p>This parameter is reserved.</p>
2560    pub additional_attributes: Option<Vec<AdditionalAttribute>>,
2561    /// <p>If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html">Configure Connection Draining</a> in the <i>Classic Load Balancers Guide</i>.</p>
2562    pub connection_draining: Option<ConnectionDraining>,
2563    /// <p>If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.</p> <p>By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html">Configure Idle Connection Timeout</a> in the <i>Classic Load Balancers Guide</i>.</p>
2564    pub connection_settings: Option<ConnectionSettings>,
2565    /// <p>If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html">Configure Cross-Zone Load Balancing</a> in the <i>Classic Load Balancers Guide</i>.</p>
2566    pub cross_zone_load_balancing: Option<CrossZoneLoadBalancing>,
2567}
2568
2569#[allow(dead_code)]
2570struct LoadBalancerAttributesDeserializer;
2571impl LoadBalancerAttributesDeserializer {
2572    #[allow(dead_code, unused_variables)]
2573    fn deserialize<T: Peek + Next>(
2574        tag_name: &str,
2575        stack: &mut T,
2576    ) -> Result<LoadBalancerAttributes, XmlParseError> {
2577        deserialize_elements::<_, LoadBalancerAttributes, _>(tag_name, stack, |name, stack, obj| {
2578            match name {
2579                "AccessLog" => {
2580                    obj.access_log = Some(AccessLogDeserializer::deserialize("AccessLog", stack)?);
2581                }
2582                "AdditionalAttributes" => {
2583                    obj.additional_attributes.get_or_insert(vec![]).extend(
2584                        AdditionalAttributesDeserializer::deserialize(
2585                            "AdditionalAttributes",
2586                            stack,
2587                        )?,
2588                    );
2589                }
2590                "ConnectionDraining" => {
2591                    obj.connection_draining = Some(ConnectionDrainingDeserializer::deserialize(
2592                        "ConnectionDraining",
2593                        stack,
2594                    )?);
2595                }
2596                "ConnectionSettings" => {
2597                    obj.connection_settings = Some(ConnectionSettingsDeserializer::deserialize(
2598                        "ConnectionSettings",
2599                        stack,
2600                    )?);
2601                }
2602                "CrossZoneLoadBalancing" => {
2603                    obj.cross_zone_load_balancing =
2604                        Some(CrossZoneLoadBalancingDeserializer::deserialize(
2605                            "CrossZoneLoadBalancing",
2606                            stack,
2607                        )?);
2608                }
2609                _ => skip_tree(stack),
2610            }
2611            Ok(())
2612        })
2613    }
2614}
2615
2616/// Serialize `LoadBalancerAttributes` contents to a `SignedRequest`.
2617struct LoadBalancerAttributesSerializer;
2618impl LoadBalancerAttributesSerializer {
2619    fn serialize(params: &mut Params, name: &str, obj: &LoadBalancerAttributes) {
2620        let mut prefix = name.to_string();
2621        if prefix != "" {
2622            prefix.push_str(".");
2623        }
2624
2625        if let Some(ref field_value) = obj.access_log {
2626            AccessLogSerializer::serialize(
2627                params,
2628                &format!("{}{}", prefix, "AccessLog"),
2629                field_value,
2630            );
2631        }
2632        if let Some(ref field_value) = obj.additional_attributes {
2633            AdditionalAttributesSerializer::serialize(
2634                params,
2635                &format!("{}{}", prefix, "AdditionalAttributes"),
2636                field_value,
2637            );
2638        }
2639        if let Some(ref field_value) = obj.connection_draining {
2640            ConnectionDrainingSerializer::serialize(
2641                params,
2642                &format!("{}{}", prefix, "ConnectionDraining"),
2643                field_value,
2644            );
2645        }
2646        if let Some(ref field_value) = obj.connection_settings {
2647            ConnectionSettingsSerializer::serialize(
2648                params,
2649                &format!("{}{}", prefix, "ConnectionSettings"),
2650                field_value,
2651            );
2652        }
2653        if let Some(ref field_value) = obj.cross_zone_load_balancing {
2654            CrossZoneLoadBalancingSerializer::serialize(
2655                params,
2656                &format!("{}{}", prefix, "CrossZoneLoadBalancing"),
2657                field_value,
2658            );
2659        }
2660    }
2661}
2662
2663/// <p>Information about a load balancer.</p>
2664#[derive(Clone, Debug, Default, PartialEq)]
2665#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2666pub struct LoadBalancerDescription {
2667    /// <p>The Availability Zones for the load balancer.</p>
2668    pub availability_zones: Option<Vec<String>>,
2669    /// <p>Information about your EC2 instances.</p>
2670    pub backend_server_descriptions: Option<Vec<BackendServerDescription>>,
2671    /// <p>The DNS name of the load balancer.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html">Configure a Custom Domain Name</a> in the <i>Classic Load Balancers Guide</i>.</p>
2672    pub canonical_hosted_zone_name: Option<String>,
2673    /// <p>The ID of the Amazon Route 53 hosted zone for the load balancer.</p>
2674    pub canonical_hosted_zone_name_id: Option<String>,
2675    /// <p>The date and time the load balancer was created.</p>
2676    pub created_time: Option<String>,
2677    /// <p>The DNS name of the load balancer.</p>
2678    pub dns_name: Option<String>,
2679    /// <p>Information about the health checks conducted on the load balancer.</p>
2680    pub health_check: Option<HealthCheck>,
2681    /// <p>The IDs of the instances for the load balancer.</p>
2682    pub instances: Option<Vec<Instance>>,
2683    /// <p>The listeners for the load balancer.</p>
2684    pub listener_descriptions: Option<Vec<ListenerDescription>>,
2685    /// <p>The name of the load balancer.</p>
2686    pub load_balancer_name: Option<String>,
2687    /// <p>The policies defined for the load balancer.</p>
2688    pub policies: Option<Policies>,
2689    /// <p>The type of load balancer. Valid only for load balancers in a VPC.</p> <p>If <code>Scheme</code> is <code>internet-facing</code>, the load balancer has a public DNS name that resolves to a public IP address.</p> <p>If <code>Scheme</code> is <code>internal</code>, the load balancer has a public DNS name that resolves to a private IP address.</p>
2690    pub scheme: Option<String>,
2691    /// <p>The security groups for the load balancer. Valid only for load balancers in a VPC.</p>
2692    pub security_groups: Option<Vec<String>>,
2693    /// <p>The security group for the load balancer, which you can use as part of your inbound rules for your registered instances. To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.</p>
2694    pub source_security_group: Option<SourceSecurityGroup>,
2695    /// <p>The IDs of the subnets for the load balancer.</p>
2696    pub subnets: Option<Vec<String>>,
2697    /// <p>The ID of the VPC for the load balancer.</p>
2698    pub vpc_id: Option<String>,
2699}
2700
2701#[allow(dead_code)]
2702struct LoadBalancerDescriptionDeserializer;
2703impl LoadBalancerDescriptionDeserializer {
2704    #[allow(dead_code, unused_variables)]
2705    fn deserialize<T: Peek + Next>(
2706        tag_name: &str,
2707        stack: &mut T,
2708    ) -> Result<LoadBalancerDescription, XmlParseError> {
2709        deserialize_elements::<_, LoadBalancerDescription, _>(
2710            tag_name,
2711            stack,
2712            |name, stack, obj| {
2713                match name {
2714                    "AvailabilityZones" => {
2715                        obj.availability_zones.get_or_insert(vec![]).extend(
2716                            AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
2717                        );
2718                    }
2719                    "BackendServerDescriptions" => {
2720                        obj.backend_server_descriptions
2721                            .get_or_insert(vec![])
2722                            .extend(BackendServerDescriptionsDeserializer::deserialize(
2723                                "BackendServerDescriptions",
2724                                stack,
2725                            )?);
2726                    }
2727                    "CanonicalHostedZoneName" => {
2728                        obj.canonical_hosted_zone_name = Some(DNSNameDeserializer::deserialize(
2729                            "CanonicalHostedZoneName",
2730                            stack,
2731                        )?);
2732                    }
2733                    "CanonicalHostedZoneNameID" => {
2734                        obj.canonical_hosted_zone_name_id = Some(DNSNameDeserializer::deserialize(
2735                            "CanonicalHostedZoneNameID",
2736                            stack,
2737                        )?);
2738                    }
2739                    "CreatedTime" => {
2740                        obj.created_time =
2741                            Some(CreatedTimeDeserializer::deserialize("CreatedTime", stack)?);
2742                    }
2743                    "DNSName" => {
2744                        obj.dns_name = Some(DNSNameDeserializer::deserialize("DNSName", stack)?);
2745                    }
2746                    "HealthCheck" => {
2747                        obj.health_check =
2748                            Some(HealthCheckDeserializer::deserialize("HealthCheck", stack)?);
2749                    }
2750                    "Instances" => {
2751                        obj.instances
2752                            .get_or_insert(vec![])
2753                            .extend(InstancesDeserializer::deserialize("Instances", stack)?);
2754                    }
2755                    "ListenerDescriptions" => {
2756                        obj.listener_descriptions.get_or_insert(vec![]).extend(
2757                            ListenerDescriptionsDeserializer::deserialize(
2758                                "ListenerDescriptions",
2759                                stack,
2760                            )?,
2761                        );
2762                    }
2763                    "LoadBalancerName" => {
2764                        obj.load_balancer_name = Some(AccessPointNameDeserializer::deserialize(
2765                            "LoadBalancerName",
2766                            stack,
2767                        )?);
2768                    }
2769                    "Policies" => {
2770                        obj.policies = Some(PoliciesDeserializer::deserialize("Policies", stack)?);
2771                    }
2772                    "Scheme" => {
2773                        obj.scheme = Some(LoadBalancerSchemeDeserializer::deserialize(
2774                            "Scheme", stack,
2775                        )?);
2776                    }
2777                    "SecurityGroups" => {
2778                        obj.security_groups.get_or_insert(vec![]).extend(
2779                            SecurityGroupsDeserializer::deserialize("SecurityGroups", stack)?,
2780                        );
2781                    }
2782                    "SourceSecurityGroup" => {
2783                        obj.source_security_group =
2784                            Some(SourceSecurityGroupDeserializer::deserialize(
2785                                "SourceSecurityGroup",
2786                                stack,
2787                            )?);
2788                    }
2789                    "Subnets" => {
2790                        obj.subnets
2791                            .get_or_insert(vec![])
2792                            .extend(SubnetsDeserializer::deserialize("Subnets", stack)?);
2793                    }
2794                    "VPCId" => {
2795                        obj.vpc_id = Some(VPCIdDeserializer::deserialize("VPCId", stack)?);
2796                    }
2797                    _ => skip_tree(stack),
2798                }
2799                Ok(())
2800            },
2801        )
2802    }
2803}
2804#[allow(dead_code)]
2805struct LoadBalancerDescriptionsDeserializer;
2806impl LoadBalancerDescriptionsDeserializer {
2807    #[allow(dead_code, unused_variables)]
2808    fn deserialize<T: Peek + Next>(
2809        tag_name: &str,
2810        stack: &mut T,
2811    ) -> Result<Vec<LoadBalancerDescription>, XmlParseError> {
2812        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
2813            if name == "member" {
2814                obj.push(LoadBalancerDescriptionDeserializer::deserialize(
2815                    "member", stack,
2816                )?);
2817            } else {
2818                skip_tree(stack);
2819            }
2820            Ok(())
2821        })
2822    }
2823}
2824
2825/// Serialize `LoadBalancerNames` contents to a `SignedRequest`.
2826struct LoadBalancerNamesSerializer;
2827impl LoadBalancerNamesSerializer {
2828    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
2829        for (index, obj) in obj.iter().enumerate() {
2830            let key = format!("{}.member.{}", name, index + 1);
2831            params.put(&key, &obj);
2832        }
2833    }
2834}
2835
2836/// Serialize `LoadBalancerNamesMax20` contents to a `SignedRequest`.
2837struct LoadBalancerNamesMax20Serializer;
2838impl LoadBalancerNamesMax20Serializer {
2839    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
2840        for (index, obj) in obj.iter().enumerate() {
2841            let key = format!("{}.member.{}", name, index + 1);
2842            params.put(&key, &obj);
2843        }
2844    }
2845}
2846
2847#[allow(dead_code)]
2848struct LoadBalancerSchemeDeserializer;
2849impl LoadBalancerSchemeDeserializer {
2850    #[allow(dead_code, unused_variables)]
2851    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2852        xml_util::deserialize_primitive(tag_name, stack, Ok)
2853    }
2854}
2855#[allow(dead_code)]
2856struct MarkerDeserializer;
2857impl MarkerDeserializer {
2858    #[allow(dead_code, unused_variables)]
2859    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2860        xml_util::deserialize_primitive(tag_name, stack, Ok)
2861    }
2862}
2863#[allow(dead_code)]
2864struct MaxDeserializer;
2865impl MaxDeserializer {
2866    #[allow(dead_code, unused_variables)]
2867    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2868        xml_util::deserialize_primitive(tag_name, stack, Ok)
2869    }
2870}
2871/// <p>Contains the parameters for ModifyLoadBalancerAttributes.</p>
2872#[derive(Clone, Debug, Default, PartialEq)]
2873#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2874pub struct ModifyLoadBalancerAttributesInput {
2875    /// <p>The attributes for the load balancer.</p>
2876    pub load_balancer_attributes: LoadBalancerAttributes,
2877    /// <p>The name of the load balancer.</p>
2878    pub load_balancer_name: String,
2879}
2880
2881/// Serialize `ModifyLoadBalancerAttributesInput` contents to a `SignedRequest`.
2882struct ModifyLoadBalancerAttributesInputSerializer;
2883impl ModifyLoadBalancerAttributesInputSerializer {
2884    fn serialize(params: &mut Params, name: &str, obj: &ModifyLoadBalancerAttributesInput) {
2885        let mut prefix = name.to_string();
2886        if prefix != "" {
2887            prefix.push_str(".");
2888        }
2889
2890        LoadBalancerAttributesSerializer::serialize(
2891            params,
2892            &format!("{}{}", prefix, "LoadBalancerAttributes"),
2893            &obj.load_balancer_attributes,
2894        );
2895        params.put(
2896            &format!("{}{}", prefix, "LoadBalancerName"),
2897            &obj.load_balancer_name,
2898        );
2899    }
2900}
2901
2902/// <p>Contains the output of ModifyLoadBalancerAttributes.</p>
2903#[derive(Clone, Debug, Default, PartialEq)]
2904#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2905pub struct ModifyLoadBalancerAttributesOutput {
2906    /// <p>Information about the load balancer attributes.</p>
2907    pub load_balancer_attributes: Option<LoadBalancerAttributes>,
2908    /// <p>The name of the load balancer.</p>
2909    pub load_balancer_name: Option<String>,
2910}
2911
2912#[allow(dead_code)]
2913struct ModifyLoadBalancerAttributesOutputDeserializer;
2914impl ModifyLoadBalancerAttributesOutputDeserializer {
2915    #[allow(dead_code, unused_variables)]
2916    fn deserialize<T: Peek + Next>(
2917        tag_name: &str,
2918        stack: &mut T,
2919    ) -> Result<ModifyLoadBalancerAttributesOutput, XmlParseError> {
2920        deserialize_elements::<_, ModifyLoadBalancerAttributesOutput, _>(
2921            tag_name,
2922            stack,
2923            |name, stack, obj| {
2924                match name {
2925                    "LoadBalancerAttributes" => {
2926                        obj.load_balancer_attributes =
2927                            Some(LoadBalancerAttributesDeserializer::deserialize(
2928                                "LoadBalancerAttributes",
2929                                stack,
2930                            )?);
2931                    }
2932                    "LoadBalancerName" => {
2933                        obj.load_balancer_name = Some(AccessPointNameDeserializer::deserialize(
2934                            "LoadBalancerName",
2935                            stack,
2936                        )?);
2937                    }
2938                    _ => skip_tree(stack),
2939                }
2940                Ok(())
2941            },
2942        )
2943    }
2944}
2945#[allow(dead_code)]
2946struct NameDeserializer;
2947impl NameDeserializer {
2948    #[allow(dead_code, unused_variables)]
2949    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
2950        xml_util::deserialize_primitive(tag_name, stack, Ok)
2951    }
2952}
2953/// <p>The policies for a load balancer.</p>
2954#[derive(Clone, Debug, Default, PartialEq)]
2955#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2956pub struct Policies {
2957    /// <p>The stickiness policies created using <a>CreateAppCookieStickinessPolicy</a>.</p>
2958    pub app_cookie_stickiness_policies: Option<Vec<AppCookieStickinessPolicy>>,
2959    /// <p>The stickiness policies created using <a>CreateLBCookieStickinessPolicy</a>.</p>
2960    pub lb_cookie_stickiness_policies: Option<Vec<LBCookieStickinessPolicy>>,
2961    /// <p>The policies other than the stickiness policies.</p>
2962    pub other_policies: Option<Vec<String>>,
2963}
2964
2965#[allow(dead_code)]
2966struct PoliciesDeserializer;
2967impl PoliciesDeserializer {
2968    #[allow(dead_code, unused_variables)]
2969    fn deserialize<T: Peek + Next>(
2970        tag_name: &str,
2971        stack: &mut T,
2972    ) -> Result<Policies, XmlParseError> {
2973        deserialize_elements::<_, Policies, _>(tag_name, stack, |name, stack, obj| {
2974            match name {
2975                "AppCookieStickinessPolicies" => {
2976                    obj.app_cookie_stickiness_policies
2977                        .get_or_insert(vec![])
2978                        .extend(AppCookieStickinessPoliciesDeserializer::deserialize(
2979                            "AppCookieStickinessPolicies",
2980                            stack,
2981                        )?);
2982                }
2983                "LBCookieStickinessPolicies" => {
2984                    obj.lb_cookie_stickiness_policies
2985                        .get_or_insert(vec![])
2986                        .extend(LBCookieStickinessPoliciesDeserializer::deserialize(
2987                            "LBCookieStickinessPolicies",
2988                            stack,
2989                        )?);
2990                }
2991                "OtherPolicies" => {
2992                    obj.other_policies.get_or_insert(vec![]).extend(
2993                        PolicyNamesDeserializer::deserialize("OtherPolicies", stack)?,
2994                    );
2995                }
2996                _ => skip_tree(stack),
2997            }
2998            Ok(())
2999        })
3000    }
3001}
3002/// <p>Information about a policy attribute.</p>
3003#[derive(Clone, Debug, Default, PartialEq)]
3004#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3005pub struct PolicyAttribute {
3006    /// <p>The name of the attribute.</p>
3007    pub attribute_name: Option<String>,
3008    /// <p>The value of the attribute.</p>
3009    pub attribute_value: Option<String>,
3010}
3011
3012/// Serialize `PolicyAttribute` contents to a `SignedRequest`.
3013struct PolicyAttributeSerializer;
3014impl PolicyAttributeSerializer {
3015    fn serialize(params: &mut Params, name: &str, obj: &PolicyAttribute) {
3016        let mut prefix = name.to_string();
3017        if prefix != "" {
3018            prefix.push_str(".");
3019        }
3020
3021        if let Some(ref field_value) = obj.attribute_name {
3022            params.put(&format!("{}{}", prefix, "AttributeName"), &field_value);
3023        }
3024        if let Some(ref field_value) = obj.attribute_value {
3025            params.put(&format!("{}{}", prefix, "AttributeValue"), &field_value);
3026        }
3027    }
3028}
3029
3030/// <p>Information about a policy attribute.</p>
3031#[derive(Clone, Debug, Default, PartialEq)]
3032#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3033pub struct PolicyAttributeDescription {
3034    /// <p>The name of the attribute.</p>
3035    pub attribute_name: Option<String>,
3036    /// <p>The value of the attribute.</p>
3037    pub attribute_value: Option<String>,
3038}
3039
3040#[allow(dead_code)]
3041struct PolicyAttributeDescriptionDeserializer;
3042impl PolicyAttributeDescriptionDeserializer {
3043    #[allow(dead_code, unused_variables)]
3044    fn deserialize<T: Peek + Next>(
3045        tag_name: &str,
3046        stack: &mut T,
3047    ) -> Result<PolicyAttributeDescription, XmlParseError> {
3048        deserialize_elements::<_, PolicyAttributeDescription, _>(
3049            tag_name,
3050            stack,
3051            |name, stack, obj| {
3052                match name {
3053                    "AttributeName" => {
3054                        obj.attribute_name = Some(AttributeNameDeserializer::deserialize(
3055                            "AttributeName",
3056                            stack,
3057                        )?);
3058                    }
3059                    "AttributeValue" => {
3060                        obj.attribute_value = Some(AttributeValueDeserializer::deserialize(
3061                            "AttributeValue",
3062                            stack,
3063                        )?);
3064                    }
3065                    _ => skip_tree(stack),
3066                }
3067                Ok(())
3068            },
3069        )
3070    }
3071}
3072#[allow(dead_code)]
3073struct PolicyAttributeDescriptionsDeserializer;
3074impl PolicyAttributeDescriptionsDeserializer {
3075    #[allow(dead_code, unused_variables)]
3076    fn deserialize<T: Peek + Next>(
3077        tag_name: &str,
3078        stack: &mut T,
3079    ) -> Result<Vec<PolicyAttributeDescription>, XmlParseError> {
3080        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3081            if name == "member" {
3082                obj.push(PolicyAttributeDescriptionDeserializer::deserialize(
3083                    "member", stack,
3084                )?);
3085            } else {
3086                skip_tree(stack);
3087            }
3088            Ok(())
3089        })
3090    }
3091}
3092/// <p>Information about a policy attribute type.</p>
3093#[derive(Clone, Debug, Default, PartialEq)]
3094#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3095pub struct PolicyAttributeTypeDescription {
3096    /// <p>The name of the attribute.</p>
3097    pub attribute_name: Option<String>,
3098    /// <p>The type of the attribute. For example, <code>Boolean</code> or <code>Integer</code>.</p>
3099    pub attribute_type: Option<String>,
3100    /// <p><p>The cardinality of the attribute.</p> <p>Valid values:</p> <ul> <li> <p>ONE(1) : Single value required</p> </li> <li> <p>ZERO<em>OR</em>ONE(0..1) : Up to one value is allowed</p> </li> <li> <p>ZERO<em>OR</em>MORE(0..<em>) : Optional. Multiple values are allowed</p> </li> <li> <p>ONE<em>OR</em>MORE(1..</em>0) : Required. Multiple values are allowed</p> </li> </ul></p>
3101    pub cardinality: Option<String>,
3102    /// <p>The default value of the attribute, if applicable.</p>
3103    pub default_value: Option<String>,
3104    /// <p>A description of the attribute.</p>
3105    pub description: Option<String>,
3106}
3107
3108#[allow(dead_code)]
3109struct PolicyAttributeTypeDescriptionDeserializer;
3110impl PolicyAttributeTypeDescriptionDeserializer {
3111    #[allow(dead_code, unused_variables)]
3112    fn deserialize<T: Peek + Next>(
3113        tag_name: &str,
3114        stack: &mut T,
3115    ) -> Result<PolicyAttributeTypeDescription, XmlParseError> {
3116        deserialize_elements::<_, PolicyAttributeTypeDescription, _>(
3117            tag_name,
3118            stack,
3119            |name, stack, obj| {
3120                match name {
3121                    "AttributeName" => {
3122                        obj.attribute_name = Some(AttributeNameDeserializer::deserialize(
3123                            "AttributeName",
3124                            stack,
3125                        )?);
3126                    }
3127                    "AttributeType" => {
3128                        obj.attribute_type = Some(AttributeTypeDeserializer::deserialize(
3129                            "AttributeType",
3130                            stack,
3131                        )?);
3132                    }
3133                    "Cardinality" => {
3134                        obj.cardinality =
3135                            Some(CardinalityDeserializer::deserialize("Cardinality", stack)?);
3136                    }
3137                    "DefaultValue" => {
3138                        obj.default_value = Some(DefaultValueDeserializer::deserialize(
3139                            "DefaultValue",
3140                            stack,
3141                        )?);
3142                    }
3143                    "Description" => {
3144                        obj.description =
3145                            Some(DescriptionDeserializer::deserialize("Description", stack)?);
3146                    }
3147                    _ => skip_tree(stack),
3148                }
3149                Ok(())
3150            },
3151        )
3152    }
3153}
3154#[allow(dead_code)]
3155struct PolicyAttributeTypeDescriptionsDeserializer;
3156impl PolicyAttributeTypeDescriptionsDeserializer {
3157    #[allow(dead_code, unused_variables)]
3158    fn deserialize<T: Peek + Next>(
3159        tag_name: &str,
3160        stack: &mut T,
3161    ) -> Result<Vec<PolicyAttributeTypeDescription>, XmlParseError> {
3162        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3163            if name == "member" {
3164                obj.push(PolicyAttributeTypeDescriptionDeserializer::deserialize(
3165                    "member", stack,
3166                )?);
3167            } else {
3168                skip_tree(stack);
3169            }
3170            Ok(())
3171        })
3172    }
3173}
3174
3175/// Serialize `PolicyAttributes` contents to a `SignedRequest`.
3176struct PolicyAttributesSerializer;
3177impl PolicyAttributesSerializer {
3178    fn serialize(params: &mut Params, name: &str, obj: &Vec<PolicyAttribute>) {
3179        for (index, obj) in obj.iter().enumerate() {
3180            let key = format!("{}.member.{}", name, index + 1);
3181            PolicyAttributeSerializer::serialize(params, &key, obj);
3182        }
3183    }
3184}
3185
3186/// <p>Information about a policy.</p>
3187#[derive(Clone, Debug, Default, PartialEq)]
3188#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3189pub struct PolicyDescription {
3190    /// <p>The policy attributes.</p>
3191    pub policy_attribute_descriptions: Option<Vec<PolicyAttributeDescription>>,
3192    /// <p>The name of the policy.</p>
3193    pub policy_name: Option<String>,
3194    /// <p>The name of the policy type.</p>
3195    pub policy_type_name: Option<String>,
3196}
3197
3198#[allow(dead_code)]
3199struct PolicyDescriptionDeserializer;
3200impl PolicyDescriptionDeserializer {
3201    #[allow(dead_code, unused_variables)]
3202    fn deserialize<T: Peek + Next>(
3203        tag_name: &str,
3204        stack: &mut T,
3205    ) -> Result<PolicyDescription, XmlParseError> {
3206        deserialize_elements::<_, PolicyDescription, _>(tag_name, stack, |name, stack, obj| {
3207            match name {
3208                "PolicyAttributeDescriptions" => {
3209                    obj.policy_attribute_descriptions
3210                        .get_or_insert(vec![])
3211                        .extend(PolicyAttributeDescriptionsDeserializer::deserialize(
3212                            "PolicyAttributeDescriptions",
3213                            stack,
3214                        )?);
3215                }
3216                "PolicyName" => {
3217                    obj.policy_name =
3218                        Some(PolicyNameDeserializer::deserialize("PolicyName", stack)?);
3219                }
3220                "PolicyTypeName" => {
3221                    obj.policy_type_name = Some(PolicyTypeNameDeserializer::deserialize(
3222                        "PolicyTypeName",
3223                        stack,
3224                    )?);
3225                }
3226                _ => skip_tree(stack),
3227            }
3228            Ok(())
3229        })
3230    }
3231}
3232#[allow(dead_code)]
3233struct PolicyDescriptionsDeserializer;
3234impl PolicyDescriptionsDeserializer {
3235    #[allow(dead_code, unused_variables)]
3236    fn deserialize<T: Peek + Next>(
3237        tag_name: &str,
3238        stack: &mut T,
3239    ) -> Result<Vec<PolicyDescription>, XmlParseError> {
3240        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3241            if name == "member" {
3242                obj.push(PolicyDescriptionDeserializer::deserialize("member", stack)?);
3243            } else {
3244                skip_tree(stack);
3245            }
3246            Ok(())
3247        })
3248    }
3249}
3250#[allow(dead_code)]
3251struct PolicyNameDeserializer;
3252impl PolicyNameDeserializer {
3253    #[allow(dead_code, unused_variables)]
3254    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3255        xml_util::deserialize_primitive(tag_name, stack, Ok)
3256    }
3257}
3258#[allow(dead_code)]
3259struct PolicyNamesDeserializer;
3260impl PolicyNamesDeserializer {
3261    #[allow(dead_code, unused_variables)]
3262    fn deserialize<T: Peek + Next>(
3263        tag_name: &str,
3264        stack: &mut T,
3265    ) -> Result<Vec<String>, XmlParseError> {
3266        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3267            if name == "member" {
3268                obj.push(PolicyNameDeserializer::deserialize("member", stack)?);
3269            } else {
3270                skip_tree(stack);
3271            }
3272            Ok(())
3273        })
3274    }
3275}
3276
3277/// Serialize `PolicyNames` contents to a `SignedRequest`.
3278struct PolicyNamesSerializer;
3279impl PolicyNamesSerializer {
3280    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3281        for (index, obj) in obj.iter().enumerate() {
3282            let key = format!("{}.member.{}", name, index + 1);
3283            params.put(&key, &obj);
3284        }
3285    }
3286}
3287
3288/// <p>Information about a policy type.</p>
3289#[derive(Clone, Debug, Default, PartialEq)]
3290#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3291pub struct PolicyTypeDescription {
3292    /// <p>A description of the policy type.</p>
3293    pub description: Option<String>,
3294    /// <p>The description of the policy attributes associated with the policies defined by Elastic Load Balancing.</p>
3295    pub policy_attribute_type_descriptions: Option<Vec<PolicyAttributeTypeDescription>>,
3296    /// <p>The name of the policy type.</p>
3297    pub policy_type_name: Option<String>,
3298}
3299
3300#[allow(dead_code)]
3301struct PolicyTypeDescriptionDeserializer;
3302impl PolicyTypeDescriptionDeserializer {
3303    #[allow(dead_code, unused_variables)]
3304    fn deserialize<T: Peek + Next>(
3305        tag_name: &str,
3306        stack: &mut T,
3307    ) -> Result<PolicyTypeDescription, XmlParseError> {
3308        deserialize_elements::<_, PolicyTypeDescription, _>(tag_name, stack, |name, stack, obj| {
3309            match name {
3310                "Description" => {
3311                    obj.description =
3312                        Some(DescriptionDeserializer::deserialize("Description", stack)?);
3313                }
3314                "PolicyAttributeTypeDescriptions" => {
3315                    obj.policy_attribute_type_descriptions
3316                        .get_or_insert(vec![])
3317                        .extend(PolicyAttributeTypeDescriptionsDeserializer::deserialize(
3318                            "PolicyAttributeTypeDescriptions",
3319                            stack,
3320                        )?);
3321                }
3322                "PolicyTypeName" => {
3323                    obj.policy_type_name = Some(PolicyTypeNameDeserializer::deserialize(
3324                        "PolicyTypeName",
3325                        stack,
3326                    )?);
3327                }
3328                _ => skip_tree(stack),
3329            }
3330            Ok(())
3331        })
3332    }
3333}
3334#[allow(dead_code)]
3335struct PolicyTypeDescriptionsDeserializer;
3336impl PolicyTypeDescriptionsDeserializer {
3337    #[allow(dead_code, unused_variables)]
3338    fn deserialize<T: Peek + Next>(
3339        tag_name: &str,
3340        stack: &mut T,
3341    ) -> Result<Vec<PolicyTypeDescription>, XmlParseError> {
3342        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3343            if name == "member" {
3344                obj.push(PolicyTypeDescriptionDeserializer::deserialize(
3345                    "member", stack,
3346                )?);
3347            } else {
3348                skip_tree(stack);
3349            }
3350            Ok(())
3351        })
3352    }
3353}
3354#[allow(dead_code)]
3355struct PolicyTypeNameDeserializer;
3356impl PolicyTypeNameDeserializer {
3357    #[allow(dead_code, unused_variables)]
3358    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3359        xml_util::deserialize_primitive(tag_name, stack, Ok)
3360    }
3361}
3362
3363/// Serialize `PolicyTypeNames` contents to a `SignedRequest`.
3364struct PolicyTypeNamesSerializer;
3365impl PolicyTypeNamesSerializer {
3366    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3367        for (index, obj) in obj.iter().enumerate() {
3368            let key = format!("{}.member.{}", name, index + 1);
3369            params.put(&key, &obj);
3370        }
3371    }
3372}
3373
3374/// Serialize `Ports` contents to a `SignedRequest`.
3375struct PortsSerializer;
3376impl PortsSerializer {
3377    fn serialize(params: &mut Params, name: &str, obj: &Vec<i64>) {
3378        for (index, obj) in obj.iter().enumerate() {
3379            let key = format!("{}.member.{}", name, index + 1);
3380            params.put(&key, &obj);
3381        }
3382    }
3383}
3384
3385#[allow(dead_code)]
3386struct ProtocolDeserializer;
3387impl ProtocolDeserializer {
3388    #[allow(dead_code, unused_variables)]
3389    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3390        xml_util::deserialize_primitive(tag_name, stack, Ok)
3391    }
3392}
3393#[allow(dead_code)]
3394struct ReasonCodeDeserializer;
3395impl ReasonCodeDeserializer {
3396    #[allow(dead_code, unused_variables)]
3397    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3398        xml_util::deserialize_primitive(tag_name, stack, Ok)
3399    }
3400}
3401/// <p>Contains the parameters for RegisterInstancesWithLoadBalancer.</p>
3402#[derive(Clone, Debug, Default, PartialEq)]
3403#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3404pub struct RegisterEndPointsInput {
3405    /// <p>The IDs of the instances.</p>
3406    pub instances: Vec<Instance>,
3407    /// <p>The name of the load balancer.</p>
3408    pub load_balancer_name: String,
3409}
3410
3411/// Serialize `RegisterEndPointsInput` contents to a `SignedRequest`.
3412struct RegisterEndPointsInputSerializer;
3413impl RegisterEndPointsInputSerializer {
3414    fn serialize(params: &mut Params, name: &str, obj: &RegisterEndPointsInput) {
3415        let mut prefix = name.to_string();
3416        if prefix != "" {
3417            prefix.push_str(".");
3418        }
3419
3420        InstancesSerializer::serialize(
3421            params,
3422            &format!("{}{}", prefix, "Instances"),
3423            &obj.instances,
3424        );
3425        params.put(
3426            &format!("{}{}", prefix, "LoadBalancerName"),
3427            &obj.load_balancer_name,
3428        );
3429    }
3430}
3431
3432/// <p>Contains the output of RegisterInstancesWithLoadBalancer.</p>
3433#[derive(Clone, Debug, Default, PartialEq)]
3434#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3435pub struct RegisterEndPointsOutput {
3436    /// <p>The updated list of instances for the load balancer.</p>
3437    pub instances: Option<Vec<Instance>>,
3438}
3439
3440#[allow(dead_code)]
3441struct RegisterEndPointsOutputDeserializer;
3442impl RegisterEndPointsOutputDeserializer {
3443    #[allow(dead_code, unused_variables)]
3444    fn deserialize<T: Peek + Next>(
3445        tag_name: &str,
3446        stack: &mut T,
3447    ) -> Result<RegisterEndPointsOutput, XmlParseError> {
3448        deserialize_elements::<_, RegisterEndPointsOutput, _>(
3449            tag_name,
3450            stack,
3451            |name, stack, obj| {
3452                match name {
3453                    "Instances" => {
3454                        obj.instances
3455                            .get_or_insert(vec![])
3456                            .extend(InstancesDeserializer::deserialize("Instances", stack)?);
3457                    }
3458                    _ => skip_tree(stack),
3459                }
3460                Ok(())
3461            },
3462        )
3463    }
3464}
3465/// <p>Contains the parameters for DisableAvailabilityZonesForLoadBalancer.</p>
3466#[derive(Clone, Debug, Default, PartialEq)]
3467#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3468pub struct RemoveAvailabilityZonesInput {
3469    /// <p>The Availability Zones.</p>
3470    pub availability_zones: Vec<String>,
3471    /// <p>The name of the load balancer.</p>
3472    pub load_balancer_name: String,
3473}
3474
3475/// Serialize `RemoveAvailabilityZonesInput` contents to a `SignedRequest`.
3476struct RemoveAvailabilityZonesInputSerializer;
3477impl RemoveAvailabilityZonesInputSerializer {
3478    fn serialize(params: &mut Params, name: &str, obj: &RemoveAvailabilityZonesInput) {
3479        let mut prefix = name.to_string();
3480        if prefix != "" {
3481            prefix.push_str(".");
3482        }
3483
3484        AvailabilityZonesSerializer::serialize(
3485            params,
3486            &format!("{}{}", prefix, "AvailabilityZones"),
3487            &obj.availability_zones,
3488        );
3489        params.put(
3490            &format!("{}{}", prefix, "LoadBalancerName"),
3491            &obj.load_balancer_name,
3492        );
3493    }
3494}
3495
3496/// <p>Contains the output for DisableAvailabilityZonesForLoadBalancer.</p>
3497#[derive(Clone, Debug, Default, PartialEq)]
3498#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3499pub struct RemoveAvailabilityZonesOutput {
3500    /// <p>The remaining Availability Zones for the load balancer.</p>
3501    pub availability_zones: Option<Vec<String>>,
3502}
3503
3504#[allow(dead_code)]
3505struct RemoveAvailabilityZonesOutputDeserializer;
3506impl RemoveAvailabilityZonesOutputDeserializer {
3507    #[allow(dead_code, unused_variables)]
3508    fn deserialize<T: Peek + Next>(
3509        tag_name: &str,
3510        stack: &mut T,
3511    ) -> Result<RemoveAvailabilityZonesOutput, XmlParseError> {
3512        deserialize_elements::<_, RemoveAvailabilityZonesOutput, _>(
3513            tag_name,
3514            stack,
3515            |name, stack, obj| {
3516                match name {
3517                    "AvailabilityZones" => {
3518                        obj.availability_zones.get_or_insert(vec![]).extend(
3519                            AvailabilityZonesDeserializer::deserialize("AvailabilityZones", stack)?,
3520                        );
3521                    }
3522                    _ => skip_tree(stack),
3523                }
3524                Ok(())
3525            },
3526        )
3527    }
3528}
3529/// <p>Contains the parameters for RemoveTags.</p>
3530#[derive(Clone, Debug, Default, PartialEq)]
3531#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3532pub struct RemoveTagsInput {
3533    /// <p>The name of the load balancer. You can specify a maximum of one load balancer name.</p>
3534    pub load_balancer_names: Vec<String>,
3535    /// <p>The list of tag keys to remove.</p>
3536    pub tags: Vec<TagKeyOnly>,
3537}
3538
3539/// Serialize `RemoveTagsInput` contents to a `SignedRequest`.
3540struct RemoveTagsInputSerializer;
3541impl RemoveTagsInputSerializer {
3542    fn serialize(params: &mut Params, name: &str, obj: &RemoveTagsInput) {
3543        let mut prefix = name.to_string();
3544        if prefix != "" {
3545            prefix.push_str(".");
3546        }
3547
3548        LoadBalancerNamesSerializer::serialize(
3549            params,
3550            &format!("{}{}", prefix, "LoadBalancerNames"),
3551            &obj.load_balancer_names,
3552        );
3553        TagKeyListSerializer::serialize(params, &format!("{}{}", prefix, "Tags"), &obj.tags);
3554    }
3555}
3556
3557/// <p>Contains the output of RemoveTags.</p>
3558#[derive(Clone, Debug, Default, PartialEq)]
3559#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3560pub struct RemoveTagsOutput {}
3561
3562#[allow(dead_code)]
3563struct RemoveTagsOutputDeserializer;
3564impl RemoveTagsOutputDeserializer {
3565    #[allow(dead_code, unused_variables)]
3566    fn deserialize<T: Peek + Next>(
3567        tag_name: &str,
3568        stack: &mut T,
3569    ) -> Result<RemoveTagsOutput, XmlParseError> {
3570        xml_util::start_element(tag_name, stack)?;
3571
3572        let obj = RemoveTagsOutput::default();
3573
3574        xml_util::end_element(tag_name, stack)?;
3575
3576        Ok(obj)
3577    }
3578}
3579#[allow(dead_code)]
3580struct S3BucketNameDeserializer;
3581impl S3BucketNameDeserializer {
3582    #[allow(dead_code, unused_variables)]
3583    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3584        xml_util::deserialize_primitive(tag_name, stack, Ok)
3585    }
3586}
3587#[allow(dead_code)]
3588struct SSLCertificateIdDeserializer;
3589impl SSLCertificateIdDeserializer {
3590    #[allow(dead_code, unused_variables)]
3591    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3592        xml_util::deserialize_primitive(tag_name, stack, Ok)
3593    }
3594}
3595#[allow(dead_code)]
3596struct SecurityGroupIdDeserializer;
3597impl SecurityGroupIdDeserializer {
3598    #[allow(dead_code, unused_variables)]
3599    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3600        xml_util::deserialize_primitive(tag_name, stack, Ok)
3601    }
3602}
3603#[allow(dead_code)]
3604struct SecurityGroupNameDeserializer;
3605impl SecurityGroupNameDeserializer {
3606    #[allow(dead_code, unused_variables)]
3607    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3608        xml_util::deserialize_primitive(tag_name, stack, Ok)
3609    }
3610}
3611#[allow(dead_code)]
3612struct SecurityGroupOwnerAliasDeserializer;
3613impl SecurityGroupOwnerAliasDeserializer {
3614    #[allow(dead_code, unused_variables)]
3615    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3616        xml_util::deserialize_primitive(tag_name, stack, Ok)
3617    }
3618}
3619#[allow(dead_code)]
3620struct SecurityGroupsDeserializer;
3621impl SecurityGroupsDeserializer {
3622    #[allow(dead_code, unused_variables)]
3623    fn deserialize<T: Peek + Next>(
3624        tag_name: &str,
3625        stack: &mut T,
3626    ) -> Result<Vec<String>, XmlParseError> {
3627        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3628            if name == "member" {
3629                obj.push(SecurityGroupIdDeserializer::deserialize("member", stack)?);
3630            } else {
3631                skip_tree(stack);
3632            }
3633            Ok(())
3634        })
3635    }
3636}
3637
3638/// Serialize `SecurityGroups` contents to a `SignedRequest`.
3639struct SecurityGroupsSerializer;
3640impl SecurityGroupsSerializer {
3641    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3642        for (index, obj) in obj.iter().enumerate() {
3643            let key = format!("{}.member.{}", name, index + 1);
3644            params.put(&key, &obj);
3645        }
3646    }
3647}
3648
3649/// <p>Contains the parameters for SetLoadBalancerListenerSSLCertificate.</p>
3650#[derive(Clone, Debug, Default, PartialEq)]
3651#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3652pub struct SetLoadBalancerListenerSSLCertificateInput {
3653    /// <p>The name of the load balancer.</p>
3654    pub load_balancer_name: String,
3655    /// <p>The port that uses the specified SSL certificate.</p>
3656    pub load_balancer_port: i64,
3657    /// <p>The Amazon Resource Name (ARN) of the SSL certificate.</p>
3658    pub ssl_certificate_id: String,
3659}
3660
3661/// Serialize `SetLoadBalancerListenerSSLCertificateInput` contents to a `SignedRequest`.
3662struct SetLoadBalancerListenerSSLCertificateInputSerializer;
3663impl SetLoadBalancerListenerSSLCertificateInputSerializer {
3664    fn serialize(
3665        params: &mut Params,
3666        name: &str,
3667        obj: &SetLoadBalancerListenerSSLCertificateInput,
3668    ) {
3669        let mut prefix = name.to_string();
3670        if prefix != "" {
3671            prefix.push_str(".");
3672        }
3673
3674        params.put(
3675            &format!("{}{}", prefix, "LoadBalancerName"),
3676            &obj.load_balancer_name,
3677        );
3678        params.put(
3679            &format!("{}{}", prefix, "LoadBalancerPort"),
3680            &obj.load_balancer_port,
3681        );
3682        params.put(
3683            &format!("{}{}", prefix, "SSLCertificateId"),
3684            &obj.ssl_certificate_id,
3685        );
3686    }
3687}
3688
3689/// <p>Contains the output of SetLoadBalancerListenerSSLCertificate.</p>
3690#[derive(Clone, Debug, Default, PartialEq)]
3691#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3692pub struct SetLoadBalancerListenerSSLCertificateOutput {}
3693
3694#[allow(dead_code)]
3695struct SetLoadBalancerListenerSSLCertificateOutputDeserializer;
3696impl SetLoadBalancerListenerSSLCertificateOutputDeserializer {
3697    #[allow(dead_code, unused_variables)]
3698    fn deserialize<T: Peek + Next>(
3699        tag_name: &str,
3700        stack: &mut T,
3701    ) -> Result<SetLoadBalancerListenerSSLCertificateOutput, XmlParseError> {
3702        xml_util::start_element(tag_name, stack)?;
3703
3704        let obj = SetLoadBalancerListenerSSLCertificateOutput::default();
3705
3706        xml_util::end_element(tag_name, stack)?;
3707
3708        Ok(obj)
3709    }
3710}
3711/// <p>Contains the parameters for SetLoadBalancerPoliciesForBackendServer.</p>
3712#[derive(Clone, Debug, Default, PartialEq)]
3713#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3714pub struct SetLoadBalancerPoliciesForBackendServerInput {
3715    /// <p>The port number associated with the EC2 instance.</p>
3716    pub instance_port: i64,
3717    /// <p>The name of the load balancer.</p>
3718    pub load_balancer_name: String,
3719    /// <p>The names of the policies. If the list is empty, then all current polices are removed from the EC2 instance.</p>
3720    pub policy_names: Vec<String>,
3721}
3722
3723/// Serialize `SetLoadBalancerPoliciesForBackendServerInput` contents to a `SignedRequest`.
3724struct SetLoadBalancerPoliciesForBackendServerInputSerializer;
3725impl SetLoadBalancerPoliciesForBackendServerInputSerializer {
3726    fn serialize(
3727        params: &mut Params,
3728        name: &str,
3729        obj: &SetLoadBalancerPoliciesForBackendServerInput,
3730    ) {
3731        let mut prefix = name.to_string();
3732        if prefix != "" {
3733            prefix.push_str(".");
3734        }
3735
3736        params.put(&format!("{}{}", prefix, "InstancePort"), &obj.instance_port);
3737        params.put(
3738            &format!("{}{}", prefix, "LoadBalancerName"),
3739            &obj.load_balancer_name,
3740        );
3741        PolicyNamesSerializer::serialize(
3742            params,
3743            &format!("{}{}", prefix, "PolicyNames"),
3744            &obj.policy_names,
3745        );
3746    }
3747}
3748
3749/// <p>Contains the output of SetLoadBalancerPoliciesForBackendServer.</p>
3750#[derive(Clone, Debug, Default, PartialEq)]
3751#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3752pub struct SetLoadBalancerPoliciesForBackendServerOutput {}
3753
3754#[allow(dead_code)]
3755struct SetLoadBalancerPoliciesForBackendServerOutputDeserializer;
3756impl SetLoadBalancerPoliciesForBackendServerOutputDeserializer {
3757    #[allow(dead_code, unused_variables)]
3758    fn deserialize<T: Peek + Next>(
3759        tag_name: &str,
3760        stack: &mut T,
3761    ) -> Result<SetLoadBalancerPoliciesForBackendServerOutput, XmlParseError> {
3762        xml_util::start_element(tag_name, stack)?;
3763
3764        let obj = SetLoadBalancerPoliciesForBackendServerOutput::default();
3765
3766        xml_util::end_element(tag_name, stack)?;
3767
3768        Ok(obj)
3769    }
3770}
3771/// <p>Contains the parameters for SetLoadBalancePoliciesOfListener.</p>
3772#[derive(Clone, Debug, Default, PartialEq)]
3773#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3774pub struct SetLoadBalancerPoliciesOfListenerInput {
3775    /// <p>The name of the load balancer.</p>
3776    pub load_balancer_name: String,
3777    /// <p>The external port of the load balancer.</p>
3778    pub load_balancer_port: i64,
3779    /// <p>The names of the policies. This list must include all policies to be enabled. If you omit a policy that is currently enabled, it is disabled. If the list is empty, all current policies are disabled.</p>
3780    pub policy_names: Vec<String>,
3781}
3782
3783/// Serialize `SetLoadBalancerPoliciesOfListenerInput` contents to a `SignedRequest`.
3784struct SetLoadBalancerPoliciesOfListenerInputSerializer;
3785impl SetLoadBalancerPoliciesOfListenerInputSerializer {
3786    fn serialize(params: &mut Params, name: &str, obj: &SetLoadBalancerPoliciesOfListenerInput) {
3787        let mut prefix = name.to_string();
3788        if prefix != "" {
3789            prefix.push_str(".");
3790        }
3791
3792        params.put(
3793            &format!("{}{}", prefix, "LoadBalancerName"),
3794            &obj.load_balancer_name,
3795        );
3796        params.put(
3797            &format!("{}{}", prefix, "LoadBalancerPort"),
3798            &obj.load_balancer_port,
3799        );
3800        PolicyNamesSerializer::serialize(
3801            params,
3802            &format!("{}{}", prefix, "PolicyNames"),
3803            &obj.policy_names,
3804        );
3805    }
3806}
3807
3808/// <p>Contains the output of SetLoadBalancePoliciesOfListener.</p>
3809#[derive(Clone, Debug, Default, PartialEq)]
3810#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3811pub struct SetLoadBalancerPoliciesOfListenerOutput {}
3812
3813#[allow(dead_code)]
3814struct SetLoadBalancerPoliciesOfListenerOutputDeserializer;
3815impl SetLoadBalancerPoliciesOfListenerOutputDeserializer {
3816    #[allow(dead_code, unused_variables)]
3817    fn deserialize<T: Peek + Next>(
3818        tag_name: &str,
3819        stack: &mut T,
3820    ) -> Result<SetLoadBalancerPoliciesOfListenerOutput, XmlParseError> {
3821        xml_util::start_element(tag_name, stack)?;
3822
3823        let obj = SetLoadBalancerPoliciesOfListenerOutput::default();
3824
3825        xml_util::end_element(tag_name, stack)?;
3826
3827        Ok(obj)
3828    }
3829}
3830/// <p>Information about a source security group.</p>
3831#[derive(Clone, Debug, Default, PartialEq)]
3832#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3833pub struct SourceSecurityGroup {
3834    /// <p>The name of the security group.</p>
3835    pub group_name: Option<String>,
3836    /// <p>The owner of the security group.</p>
3837    pub owner_alias: Option<String>,
3838}
3839
3840#[allow(dead_code)]
3841struct SourceSecurityGroupDeserializer;
3842impl SourceSecurityGroupDeserializer {
3843    #[allow(dead_code, unused_variables)]
3844    fn deserialize<T: Peek + Next>(
3845        tag_name: &str,
3846        stack: &mut T,
3847    ) -> Result<SourceSecurityGroup, XmlParseError> {
3848        deserialize_elements::<_, SourceSecurityGroup, _>(tag_name, stack, |name, stack, obj| {
3849            match name {
3850                "GroupName" => {
3851                    obj.group_name = Some(SecurityGroupNameDeserializer::deserialize(
3852                        "GroupName",
3853                        stack,
3854                    )?);
3855                }
3856                "OwnerAlias" => {
3857                    obj.owner_alias = Some(SecurityGroupOwnerAliasDeserializer::deserialize(
3858                        "OwnerAlias",
3859                        stack,
3860                    )?);
3861                }
3862                _ => skip_tree(stack),
3863            }
3864            Ok(())
3865        })
3866    }
3867}
3868#[allow(dead_code)]
3869struct StateDeserializer;
3870impl StateDeserializer {
3871    #[allow(dead_code, unused_variables)]
3872    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3873        xml_util::deserialize_primitive(tag_name, stack, Ok)
3874    }
3875}
3876#[allow(dead_code)]
3877struct SubnetIdDeserializer;
3878impl SubnetIdDeserializer {
3879    #[allow(dead_code, unused_variables)]
3880    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
3881        xml_util::deserialize_primitive(tag_name, stack, Ok)
3882    }
3883}
3884#[allow(dead_code)]
3885struct SubnetsDeserializer;
3886impl SubnetsDeserializer {
3887    #[allow(dead_code, unused_variables)]
3888    fn deserialize<T: Peek + Next>(
3889        tag_name: &str,
3890        stack: &mut T,
3891    ) -> Result<Vec<String>, XmlParseError> {
3892        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
3893            if name == "member" {
3894                obj.push(SubnetIdDeserializer::deserialize("member", stack)?);
3895            } else {
3896                skip_tree(stack);
3897            }
3898            Ok(())
3899        })
3900    }
3901}
3902
3903/// Serialize `Subnets` contents to a `SignedRequest`.
3904struct SubnetsSerializer;
3905impl SubnetsSerializer {
3906    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
3907        for (index, obj) in obj.iter().enumerate() {
3908            let key = format!("{}.member.{}", name, index + 1);
3909            params.put(&key, &obj);
3910        }
3911    }
3912}
3913
3914/// <p>Information about a tag.</p>
3915#[derive(Clone, Debug, Default, PartialEq)]
3916#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3917#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3918pub struct Tag {
3919    /// <p>The key of the tag.</p>
3920    pub key: String,
3921    /// <p>The value of the tag.</p>
3922    pub value: Option<String>,
3923}
3924
3925#[allow(dead_code)]
3926struct TagDeserializer;
3927impl TagDeserializer {
3928    #[allow(dead_code, unused_variables)]
3929    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
3930        deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
3931            match name {
3932                "Key" => {
3933                    obj.key = TagKeyDeserializer::deserialize("Key", stack)?;
3934                }
3935                "Value" => {
3936                    obj.value = Some(TagValueDeserializer::deserialize("Value", stack)?);
3937                }
3938                _ => skip_tree(stack),
3939            }
3940            Ok(())
3941        })
3942    }
3943}
3944
3945/// Serialize `Tag` contents to a `SignedRequest`.
3946struct TagSerializer;
3947impl TagSerializer {
3948    fn serialize(params: &mut Params, name: &str, obj: &Tag) {
3949        let mut prefix = name.to_string();
3950        if prefix != "" {
3951            prefix.push_str(".");
3952        }
3953
3954        params.put(&format!("{}{}", prefix, "Key"), &obj.key);
3955        if let Some(ref field_value) = obj.value {
3956            params.put(&format!("{}{}", prefix, "Value"), &field_value);
3957        }
3958    }
3959}
3960
3961/// <p>The tags associated with a load balancer.</p>
3962#[derive(Clone, Debug, Default, PartialEq)]
3963#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3964pub struct TagDescription {
3965    /// <p>The name of the load balancer.</p>
3966    pub load_balancer_name: Option<String>,
3967    /// <p>The tags.</p>
3968    pub tags: Option<Vec<Tag>>,
3969}
3970
3971#[allow(dead_code)]
3972struct TagDescriptionDeserializer;
3973impl TagDescriptionDeserializer {
3974    #[allow(dead_code, unused_variables)]
3975    fn deserialize<T: Peek + Next>(
3976        tag_name: &str,
3977        stack: &mut T,
3978    ) -> Result<TagDescription, XmlParseError> {
3979        deserialize_elements::<_, TagDescription, _>(tag_name, stack, |name, stack, obj| {
3980            match name {
3981                "LoadBalancerName" => {
3982                    obj.load_balancer_name = Some(AccessPointNameDeserializer::deserialize(
3983                        "LoadBalancerName",
3984                        stack,
3985                    )?);
3986                }
3987                "Tags" => {
3988                    obj.tags
3989                        .get_or_insert(vec![])
3990                        .extend(TagListDeserializer::deserialize("Tags", stack)?);
3991                }
3992                _ => skip_tree(stack),
3993            }
3994            Ok(())
3995        })
3996    }
3997}
3998#[allow(dead_code)]
3999struct TagDescriptionsDeserializer;
4000impl TagDescriptionsDeserializer {
4001    #[allow(dead_code, unused_variables)]
4002    fn deserialize<T: Peek + Next>(
4003        tag_name: &str,
4004        stack: &mut T,
4005    ) -> Result<Vec<TagDescription>, XmlParseError> {
4006        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4007            if name == "member" {
4008                obj.push(TagDescriptionDeserializer::deserialize("member", stack)?);
4009            } else {
4010                skip_tree(stack);
4011            }
4012            Ok(())
4013        })
4014    }
4015}
4016#[allow(dead_code)]
4017struct TagKeyDeserializer;
4018impl TagKeyDeserializer {
4019    #[allow(dead_code, unused_variables)]
4020    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4021        xml_util::deserialize_primitive(tag_name, stack, Ok)
4022    }
4023}
4024
4025/// Serialize `TagKeyList` contents to a `SignedRequest`.
4026struct TagKeyListSerializer;
4027impl TagKeyListSerializer {
4028    fn serialize(params: &mut Params, name: &str, obj: &Vec<TagKeyOnly>) {
4029        for (index, obj) in obj.iter().enumerate() {
4030            let key = format!("{}.member.{}", name, index + 1);
4031            TagKeyOnlySerializer::serialize(params, &key, obj);
4032        }
4033    }
4034}
4035
4036/// <p>The key of a tag.</p>
4037#[derive(Clone, Debug, Default, PartialEq)]
4038#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4039pub struct TagKeyOnly {
4040    /// <p>The name of the key.</p>
4041    pub key: Option<String>,
4042}
4043
4044/// Serialize `TagKeyOnly` contents to a `SignedRequest`.
4045struct TagKeyOnlySerializer;
4046impl TagKeyOnlySerializer {
4047    fn serialize(params: &mut Params, name: &str, obj: &TagKeyOnly) {
4048        let mut prefix = name.to_string();
4049        if prefix != "" {
4050            prefix.push_str(".");
4051        }
4052
4053        if let Some(ref field_value) = obj.key {
4054            params.put(&format!("{}{}", prefix, "Key"), &field_value);
4055        }
4056    }
4057}
4058
4059#[allow(dead_code)]
4060struct TagListDeserializer;
4061impl TagListDeserializer {
4062    #[allow(dead_code, unused_variables)]
4063    fn deserialize<T: Peek + Next>(
4064        tag_name: &str,
4065        stack: &mut T,
4066    ) -> Result<Vec<Tag>, XmlParseError> {
4067        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4068            if name == "member" {
4069                obj.push(TagDeserializer::deserialize("member", stack)?);
4070            } else {
4071                skip_tree(stack);
4072            }
4073            Ok(())
4074        })
4075    }
4076}
4077
4078/// Serialize `TagList` contents to a `SignedRequest`.
4079struct TagListSerializer;
4080impl TagListSerializer {
4081    fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
4082        for (index, obj) in obj.iter().enumerate() {
4083            let key = format!("{}.member.{}", name, index + 1);
4084            TagSerializer::serialize(params, &key, obj);
4085        }
4086    }
4087}
4088
4089#[allow(dead_code)]
4090struct TagValueDeserializer;
4091impl TagValueDeserializer {
4092    #[allow(dead_code, unused_variables)]
4093    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4094        xml_util::deserialize_primitive(tag_name, stack, Ok)
4095    }
4096}
4097#[allow(dead_code)]
4098struct UnhealthyThresholdDeserializer;
4099impl UnhealthyThresholdDeserializer {
4100    #[allow(dead_code, unused_variables)]
4101    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
4102        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
4103    }
4104}
4105#[allow(dead_code)]
4106struct VPCIdDeserializer;
4107impl VPCIdDeserializer {
4108    #[allow(dead_code, unused_variables)]
4109    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
4110        xml_util::deserialize_primitive(tag_name, stack, Ok)
4111    }
4112}
4113/// Errors returned by AddTags
4114#[derive(Debug, PartialEq)]
4115pub enum AddTagsError {
4116    /// <p>The specified load balancer does not exist.</p>
4117    AccessPointNotFound(String),
4118    /// <p>A tag key was specified more than once.</p>
4119    DuplicateTagKeys(String),
4120    /// <p>The quota for the number of tags that can be assigned to a load balancer has been reached.</p>
4121    TooManyTags(String),
4122}
4123
4124impl AddTagsError {
4125    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsError> {
4126        {
4127            let reader = EventReader::new(res.body.as_ref());
4128            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4129            find_start_element(&mut stack);
4130            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4131                match &parsed_error.code[..] {
4132                    "LoadBalancerNotFound" => {
4133                        return RusotoError::Service(AddTagsError::AccessPointNotFound(
4134                            parsed_error.message,
4135                        ))
4136                    }
4137                    "DuplicateTagKeys" => {
4138                        return RusotoError::Service(AddTagsError::DuplicateTagKeys(
4139                            parsed_error.message,
4140                        ))
4141                    }
4142                    "TooManyTags" => {
4143                        return RusotoError::Service(AddTagsError::TooManyTags(
4144                            parsed_error.message,
4145                        ))
4146                    }
4147                    _ => {}
4148                }
4149            }
4150        }
4151        RusotoError::Unknown(res)
4152    }
4153
4154    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4155    where
4156        T: Peek + Next,
4157    {
4158        xml_util::start_element("ErrorResponse", stack)?;
4159        XmlErrorDeserializer::deserialize("Error", stack)
4160    }
4161}
4162impl fmt::Display for AddTagsError {
4163    #[allow(unused_variables)]
4164    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4165        match *self {
4166            AddTagsError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
4167            AddTagsError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
4168            AddTagsError::TooManyTags(ref cause) => write!(f, "{}", cause),
4169        }
4170    }
4171}
4172impl Error for AddTagsError {}
4173/// Errors returned by ApplySecurityGroupsToLoadBalancer
4174#[derive(Debug, PartialEq)]
4175pub enum ApplySecurityGroupsToLoadBalancerError {
4176    /// <p>The specified load balancer does not exist.</p>
4177    AccessPointNotFound(String),
4178    /// <p>The requested configuration change is not valid.</p>
4179    InvalidConfigurationRequest(String),
4180    /// <p>One or more of the specified security groups do not exist.</p>
4181    InvalidSecurityGroup(String),
4182}
4183
4184impl ApplySecurityGroupsToLoadBalancerError {
4185    pub fn from_response(
4186        res: BufferedHttpResponse,
4187    ) -> RusotoError<ApplySecurityGroupsToLoadBalancerError> {
4188        {
4189            let reader = EventReader::new(res.body.as_ref());
4190            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4191            find_start_element(&mut stack);
4192            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4193                match &parsed_error.code[..] {
4194                    "LoadBalancerNotFound" => {
4195                        return RusotoError::Service(
4196                            ApplySecurityGroupsToLoadBalancerError::AccessPointNotFound(
4197                                parsed_error.message,
4198                            ),
4199                        )
4200                    }
4201                    "InvalidConfigurationRequest" => {
4202                        return RusotoError::Service(
4203                            ApplySecurityGroupsToLoadBalancerError::InvalidConfigurationRequest(
4204                                parsed_error.message,
4205                            ),
4206                        )
4207                    }
4208                    "InvalidSecurityGroup" => {
4209                        return RusotoError::Service(
4210                            ApplySecurityGroupsToLoadBalancerError::InvalidSecurityGroup(
4211                                parsed_error.message,
4212                            ),
4213                        )
4214                    }
4215                    _ => {}
4216                }
4217            }
4218        }
4219        RusotoError::Unknown(res)
4220    }
4221
4222    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4223    where
4224        T: Peek + Next,
4225    {
4226        xml_util::start_element("ErrorResponse", stack)?;
4227        XmlErrorDeserializer::deserialize("Error", stack)
4228    }
4229}
4230impl fmt::Display for ApplySecurityGroupsToLoadBalancerError {
4231    #[allow(unused_variables)]
4232    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4233        match *self {
4234            ApplySecurityGroupsToLoadBalancerError::AccessPointNotFound(ref cause) => {
4235                write!(f, "{}", cause)
4236            }
4237            ApplySecurityGroupsToLoadBalancerError::InvalidConfigurationRequest(ref cause) => {
4238                write!(f, "{}", cause)
4239            }
4240            ApplySecurityGroupsToLoadBalancerError::InvalidSecurityGroup(ref cause) => {
4241                write!(f, "{}", cause)
4242            }
4243        }
4244    }
4245}
4246impl Error for ApplySecurityGroupsToLoadBalancerError {}
4247/// Errors returned by AttachLoadBalancerToSubnets
4248#[derive(Debug, PartialEq)]
4249pub enum AttachLoadBalancerToSubnetsError {
4250    /// <p>The specified load balancer does not exist.</p>
4251    AccessPointNotFound(String),
4252    /// <p>The requested configuration change is not valid.</p>
4253    InvalidConfigurationRequest(String),
4254    /// <p>The specified VPC has no associated Internet gateway.</p>
4255    InvalidSubnet(String),
4256    /// <p>One or more of the specified subnets do not exist.</p>
4257    SubnetNotFound(String),
4258}
4259
4260impl AttachLoadBalancerToSubnetsError {
4261    pub fn from_response(
4262        res: BufferedHttpResponse,
4263    ) -> RusotoError<AttachLoadBalancerToSubnetsError> {
4264        {
4265            let reader = EventReader::new(res.body.as_ref());
4266            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4267            find_start_element(&mut stack);
4268            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4269                match &parsed_error.code[..] {
4270                    "LoadBalancerNotFound" => {
4271                        return RusotoError::Service(
4272                            AttachLoadBalancerToSubnetsError::AccessPointNotFound(
4273                                parsed_error.message,
4274                            ),
4275                        )
4276                    }
4277                    "InvalidConfigurationRequest" => {
4278                        return RusotoError::Service(
4279                            AttachLoadBalancerToSubnetsError::InvalidConfigurationRequest(
4280                                parsed_error.message,
4281                            ),
4282                        )
4283                    }
4284                    "InvalidSubnet" => {
4285                        return RusotoError::Service(
4286                            AttachLoadBalancerToSubnetsError::InvalidSubnet(parsed_error.message),
4287                        )
4288                    }
4289                    "SubnetNotFound" => {
4290                        return RusotoError::Service(
4291                            AttachLoadBalancerToSubnetsError::SubnetNotFound(parsed_error.message),
4292                        )
4293                    }
4294                    _ => {}
4295                }
4296            }
4297        }
4298        RusotoError::Unknown(res)
4299    }
4300
4301    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4302    where
4303        T: Peek + Next,
4304    {
4305        xml_util::start_element("ErrorResponse", stack)?;
4306        XmlErrorDeserializer::deserialize("Error", stack)
4307    }
4308}
4309impl fmt::Display for AttachLoadBalancerToSubnetsError {
4310    #[allow(unused_variables)]
4311    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4312        match *self {
4313            AttachLoadBalancerToSubnetsError::AccessPointNotFound(ref cause) => {
4314                write!(f, "{}", cause)
4315            }
4316            AttachLoadBalancerToSubnetsError::InvalidConfigurationRequest(ref cause) => {
4317                write!(f, "{}", cause)
4318            }
4319            AttachLoadBalancerToSubnetsError::InvalidSubnet(ref cause) => write!(f, "{}", cause),
4320            AttachLoadBalancerToSubnetsError::SubnetNotFound(ref cause) => write!(f, "{}", cause),
4321        }
4322    }
4323}
4324impl Error for AttachLoadBalancerToSubnetsError {}
4325/// Errors returned by ConfigureHealthCheck
4326#[derive(Debug, PartialEq)]
4327pub enum ConfigureHealthCheckError {
4328    /// <p>The specified load balancer does not exist.</p>
4329    AccessPointNotFound(String),
4330}
4331
4332impl ConfigureHealthCheckError {
4333    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfigureHealthCheckError> {
4334        {
4335            let reader = EventReader::new(res.body.as_ref());
4336            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4337            find_start_element(&mut stack);
4338            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4339                match &parsed_error.code[..] {
4340                    "LoadBalancerNotFound" => {
4341                        return RusotoError::Service(
4342                            ConfigureHealthCheckError::AccessPointNotFound(parsed_error.message),
4343                        )
4344                    }
4345                    _ => {}
4346                }
4347            }
4348        }
4349        RusotoError::Unknown(res)
4350    }
4351
4352    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4353    where
4354        T: Peek + Next,
4355    {
4356        xml_util::start_element("ErrorResponse", stack)?;
4357        XmlErrorDeserializer::deserialize("Error", stack)
4358    }
4359}
4360impl fmt::Display for ConfigureHealthCheckError {
4361    #[allow(unused_variables)]
4362    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4363        match *self {
4364            ConfigureHealthCheckError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
4365        }
4366    }
4367}
4368impl Error for ConfigureHealthCheckError {}
4369/// Errors returned by CreateAppCookieStickinessPolicy
4370#[derive(Debug, PartialEq)]
4371pub enum CreateAppCookieStickinessPolicyError {
4372    /// <p>The specified load balancer does not exist.</p>
4373    AccessPointNotFound(String),
4374    /// <p>A policy with the specified name already exists for this load balancer.</p>
4375    DuplicatePolicyName(String),
4376    /// <p>The requested configuration change is not valid.</p>
4377    InvalidConfigurationRequest(String),
4378    /// <p>The quota for the number of policies for this load balancer has been reached.</p>
4379    TooManyPolicies(String),
4380}
4381
4382impl CreateAppCookieStickinessPolicyError {
4383    pub fn from_response(
4384        res: BufferedHttpResponse,
4385    ) -> RusotoError<CreateAppCookieStickinessPolicyError> {
4386        {
4387            let reader = EventReader::new(res.body.as_ref());
4388            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4389            find_start_element(&mut stack);
4390            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4391                match &parsed_error.code[..] {
4392                    "LoadBalancerNotFound" => {
4393                        return RusotoError::Service(
4394                            CreateAppCookieStickinessPolicyError::AccessPointNotFound(
4395                                parsed_error.message,
4396                            ),
4397                        )
4398                    }
4399                    "DuplicatePolicyName" => {
4400                        return RusotoError::Service(
4401                            CreateAppCookieStickinessPolicyError::DuplicatePolicyName(
4402                                parsed_error.message,
4403                            ),
4404                        )
4405                    }
4406                    "InvalidConfigurationRequest" => {
4407                        return RusotoError::Service(
4408                            CreateAppCookieStickinessPolicyError::InvalidConfigurationRequest(
4409                                parsed_error.message,
4410                            ),
4411                        )
4412                    }
4413                    "TooManyPolicies" => {
4414                        return RusotoError::Service(
4415                            CreateAppCookieStickinessPolicyError::TooManyPolicies(
4416                                parsed_error.message,
4417                            ),
4418                        )
4419                    }
4420                    _ => {}
4421                }
4422            }
4423        }
4424        RusotoError::Unknown(res)
4425    }
4426
4427    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4428    where
4429        T: Peek + Next,
4430    {
4431        xml_util::start_element("ErrorResponse", stack)?;
4432        XmlErrorDeserializer::deserialize("Error", stack)
4433    }
4434}
4435impl fmt::Display for CreateAppCookieStickinessPolicyError {
4436    #[allow(unused_variables)]
4437    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4438        match *self {
4439            CreateAppCookieStickinessPolicyError::AccessPointNotFound(ref cause) => {
4440                write!(f, "{}", cause)
4441            }
4442            CreateAppCookieStickinessPolicyError::DuplicatePolicyName(ref cause) => {
4443                write!(f, "{}", cause)
4444            }
4445            CreateAppCookieStickinessPolicyError::InvalidConfigurationRequest(ref cause) => {
4446                write!(f, "{}", cause)
4447            }
4448            CreateAppCookieStickinessPolicyError::TooManyPolicies(ref cause) => {
4449                write!(f, "{}", cause)
4450            }
4451        }
4452    }
4453}
4454impl Error for CreateAppCookieStickinessPolicyError {}
4455/// Errors returned by CreateLBCookieStickinessPolicy
4456#[derive(Debug, PartialEq)]
4457pub enum CreateLBCookieStickinessPolicyError {
4458    /// <p>The specified load balancer does not exist.</p>
4459    AccessPointNotFound(String),
4460    /// <p>A policy with the specified name already exists for this load balancer.</p>
4461    DuplicatePolicyName(String),
4462    /// <p>The requested configuration change is not valid.</p>
4463    InvalidConfigurationRequest(String),
4464    /// <p>The quota for the number of policies for this load balancer has been reached.</p>
4465    TooManyPolicies(String),
4466}
4467
4468impl CreateLBCookieStickinessPolicyError {
4469    pub fn from_response(
4470        res: BufferedHttpResponse,
4471    ) -> RusotoError<CreateLBCookieStickinessPolicyError> {
4472        {
4473            let reader = EventReader::new(res.body.as_ref());
4474            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4475            find_start_element(&mut stack);
4476            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4477                match &parsed_error.code[..] {
4478                    "LoadBalancerNotFound" => {
4479                        return RusotoError::Service(
4480                            CreateLBCookieStickinessPolicyError::AccessPointNotFound(
4481                                parsed_error.message,
4482                            ),
4483                        )
4484                    }
4485                    "DuplicatePolicyName" => {
4486                        return RusotoError::Service(
4487                            CreateLBCookieStickinessPolicyError::DuplicatePolicyName(
4488                                parsed_error.message,
4489                            ),
4490                        )
4491                    }
4492                    "InvalidConfigurationRequest" => {
4493                        return RusotoError::Service(
4494                            CreateLBCookieStickinessPolicyError::InvalidConfigurationRequest(
4495                                parsed_error.message,
4496                            ),
4497                        )
4498                    }
4499                    "TooManyPolicies" => {
4500                        return RusotoError::Service(
4501                            CreateLBCookieStickinessPolicyError::TooManyPolicies(
4502                                parsed_error.message,
4503                            ),
4504                        )
4505                    }
4506                    _ => {}
4507                }
4508            }
4509        }
4510        RusotoError::Unknown(res)
4511    }
4512
4513    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4514    where
4515        T: Peek + Next,
4516    {
4517        xml_util::start_element("ErrorResponse", stack)?;
4518        XmlErrorDeserializer::deserialize("Error", stack)
4519    }
4520}
4521impl fmt::Display for CreateLBCookieStickinessPolicyError {
4522    #[allow(unused_variables)]
4523    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4524        match *self {
4525            CreateLBCookieStickinessPolicyError::AccessPointNotFound(ref cause) => {
4526                write!(f, "{}", cause)
4527            }
4528            CreateLBCookieStickinessPolicyError::DuplicatePolicyName(ref cause) => {
4529                write!(f, "{}", cause)
4530            }
4531            CreateLBCookieStickinessPolicyError::InvalidConfigurationRequest(ref cause) => {
4532                write!(f, "{}", cause)
4533            }
4534            CreateLBCookieStickinessPolicyError::TooManyPolicies(ref cause) => {
4535                write!(f, "{}", cause)
4536            }
4537        }
4538    }
4539}
4540impl Error for CreateLBCookieStickinessPolicyError {}
4541/// Errors returned by CreateLoadBalancer
4542#[derive(Debug, PartialEq)]
4543pub enum CreateLoadBalancerError {
4544    /// <p>The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.</p>
4545    CertificateNotFound(String),
4546    /// <p>The specified load balancer name already exists for this account.</p>
4547    DuplicateAccessPointName(String),
4548    /// <p>A tag key was specified more than once.</p>
4549    DuplicateTagKeys(String),
4550    /// <p>The requested configuration change is not valid.</p>
4551    InvalidConfigurationRequest(String),
4552    /// <p>The specified value for the schema is not valid. You can only specify a scheme for load balancers in a VPC.</p>
4553    InvalidScheme(String),
4554    /// <p>One or more of the specified security groups do not exist.</p>
4555    InvalidSecurityGroup(String),
4556    /// <p>The specified VPC has no associated Internet gateway.</p>
4557    InvalidSubnet(String),
4558    /// <p>This operation is not allowed.</p>
4559    OperationNotPermitted(String),
4560    /// <p>One or more of the specified subnets do not exist.</p>
4561    SubnetNotFound(String),
4562    /// <p>The quota for the number of load balancers has been reached.</p>
4563    TooManyAccessPoints(String),
4564    /// <p>The quota for the number of tags that can be assigned to a load balancer has been reached.</p>
4565    TooManyTags(String),
4566    /// <p>The specified protocol or signature version is not supported.</p>
4567    UnsupportedProtocol(String),
4568}
4569
4570impl CreateLoadBalancerError {
4571    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLoadBalancerError> {
4572        {
4573            let reader = EventReader::new(res.body.as_ref());
4574            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4575            find_start_element(&mut stack);
4576            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4577                match &parsed_error.code[..] {
4578                    "CertificateNotFound" => {
4579                        return RusotoError::Service(CreateLoadBalancerError::CertificateNotFound(
4580                            parsed_error.message,
4581                        ))
4582                    }
4583                    "DuplicateLoadBalancerName" => {
4584                        return RusotoError::Service(
4585                            CreateLoadBalancerError::DuplicateAccessPointName(parsed_error.message),
4586                        )
4587                    }
4588                    "DuplicateTagKeys" => {
4589                        return RusotoError::Service(CreateLoadBalancerError::DuplicateTagKeys(
4590                            parsed_error.message,
4591                        ))
4592                    }
4593                    "InvalidConfigurationRequest" => {
4594                        return RusotoError::Service(
4595                            CreateLoadBalancerError::InvalidConfigurationRequest(
4596                                parsed_error.message,
4597                            ),
4598                        )
4599                    }
4600                    "InvalidScheme" => {
4601                        return RusotoError::Service(CreateLoadBalancerError::InvalidScheme(
4602                            parsed_error.message,
4603                        ))
4604                    }
4605                    "InvalidSecurityGroup" => {
4606                        return RusotoError::Service(CreateLoadBalancerError::InvalidSecurityGroup(
4607                            parsed_error.message,
4608                        ))
4609                    }
4610                    "InvalidSubnet" => {
4611                        return RusotoError::Service(CreateLoadBalancerError::InvalidSubnet(
4612                            parsed_error.message,
4613                        ))
4614                    }
4615                    "OperationNotPermitted" => {
4616                        return RusotoError::Service(
4617                            CreateLoadBalancerError::OperationNotPermitted(parsed_error.message),
4618                        )
4619                    }
4620                    "SubnetNotFound" => {
4621                        return RusotoError::Service(CreateLoadBalancerError::SubnetNotFound(
4622                            parsed_error.message,
4623                        ))
4624                    }
4625                    "TooManyLoadBalancers" => {
4626                        return RusotoError::Service(CreateLoadBalancerError::TooManyAccessPoints(
4627                            parsed_error.message,
4628                        ))
4629                    }
4630                    "TooManyTags" => {
4631                        return RusotoError::Service(CreateLoadBalancerError::TooManyTags(
4632                            parsed_error.message,
4633                        ))
4634                    }
4635                    "UnsupportedProtocol" => {
4636                        return RusotoError::Service(CreateLoadBalancerError::UnsupportedProtocol(
4637                            parsed_error.message,
4638                        ))
4639                    }
4640                    _ => {}
4641                }
4642            }
4643        }
4644        RusotoError::Unknown(res)
4645    }
4646
4647    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4648    where
4649        T: Peek + Next,
4650    {
4651        xml_util::start_element("ErrorResponse", stack)?;
4652        XmlErrorDeserializer::deserialize("Error", stack)
4653    }
4654}
4655impl fmt::Display for CreateLoadBalancerError {
4656    #[allow(unused_variables)]
4657    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4658        match *self {
4659            CreateLoadBalancerError::CertificateNotFound(ref cause) => write!(f, "{}", cause),
4660            CreateLoadBalancerError::DuplicateAccessPointName(ref cause) => write!(f, "{}", cause),
4661            CreateLoadBalancerError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
4662            CreateLoadBalancerError::InvalidConfigurationRequest(ref cause) => {
4663                write!(f, "{}", cause)
4664            }
4665            CreateLoadBalancerError::InvalidScheme(ref cause) => write!(f, "{}", cause),
4666            CreateLoadBalancerError::InvalidSecurityGroup(ref cause) => write!(f, "{}", cause),
4667            CreateLoadBalancerError::InvalidSubnet(ref cause) => write!(f, "{}", cause),
4668            CreateLoadBalancerError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
4669            CreateLoadBalancerError::SubnetNotFound(ref cause) => write!(f, "{}", cause),
4670            CreateLoadBalancerError::TooManyAccessPoints(ref cause) => write!(f, "{}", cause),
4671            CreateLoadBalancerError::TooManyTags(ref cause) => write!(f, "{}", cause),
4672            CreateLoadBalancerError::UnsupportedProtocol(ref cause) => write!(f, "{}", cause),
4673        }
4674    }
4675}
4676impl Error for CreateLoadBalancerError {}
4677/// Errors returned by CreateLoadBalancerListeners
4678#[derive(Debug, PartialEq)]
4679pub enum CreateLoadBalancerListenersError {
4680    /// <p>The specified load balancer does not exist.</p>
4681    AccessPointNotFound(String),
4682    /// <p>The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.</p>
4683    CertificateNotFound(String),
4684    /// <p>A listener already exists for the specified load balancer name and port, but with a different instance port, protocol, or SSL certificate.</p>
4685    DuplicateListener(String),
4686    /// <p>The requested configuration change is not valid.</p>
4687    InvalidConfigurationRequest(String),
4688    /// <p>The specified protocol or signature version is not supported.</p>
4689    UnsupportedProtocol(String),
4690}
4691
4692impl CreateLoadBalancerListenersError {
4693    pub fn from_response(
4694        res: BufferedHttpResponse,
4695    ) -> RusotoError<CreateLoadBalancerListenersError> {
4696        {
4697            let reader = EventReader::new(res.body.as_ref());
4698            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4699            find_start_element(&mut stack);
4700            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4701                match &parsed_error.code[..] {
4702                    "LoadBalancerNotFound" => {
4703                        return RusotoError::Service(
4704                            CreateLoadBalancerListenersError::AccessPointNotFound(
4705                                parsed_error.message,
4706                            ),
4707                        )
4708                    }
4709                    "CertificateNotFound" => {
4710                        return RusotoError::Service(
4711                            CreateLoadBalancerListenersError::CertificateNotFound(
4712                                parsed_error.message,
4713                            ),
4714                        )
4715                    }
4716                    "DuplicateListener" => {
4717                        return RusotoError::Service(
4718                            CreateLoadBalancerListenersError::DuplicateListener(
4719                                parsed_error.message,
4720                            ),
4721                        )
4722                    }
4723                    "InvalidConfigurationRequest" => {
4724                        return RusotoError::Service(
4725                            CreateLoadBalancerListenersError::InvalidConfigurationRequest(
4726                                parsed_error.message,
4727                            ),
4728                        )
4729                    }
4730                    "UnsupportedProtocol" => {
4731                        return RusotoError::Service(
4732                            CreateLoadBalancerListenersError::UnsupportedProtocol(
4733                                parsed_error.message,
4734                            ),
4735                        )
4736                    }
4737                    _ => {}
4738                }
4739            }
4740        }
4741        RusotoError::Unknown(res)
4742    }
4743
4744    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4745    where
4746        T: Peek + Next,
4747    {
4748        xml_util::start_element("ErrorResponse", stack)?;
4749        XmlErrorDeserializer::deserialize("Error", stack)
4750    }
4751}
4752impl fmt::Display for CreateLoadBalancerListenersError {
4753    #[allow(unused_variables)]
4754    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4755        match *self {
4756            CreateLoadBalancerListenersError::AccessPointNotFound(ref cause) => {
4757                write!(f, "{}", cause)
4758            }
4759            CreateLoadBalancerListenersError::CertificateNotFound(ref cause) => {
4760                write!(f, "{}", cause)
4761            }
4762            CreateLoadBalancerListenersError::DuplicateListener(ref cause) => {
4763                write!(f, "{}", cause)
4764            }
4765            CreateLoadBalancerListenersError::InvalidConfigurationRequest(ref cause) => {
4766                write!(f, "{}", cause)
4767            }
4768            CreateLoadBalancerListenersError::UnsupportedProtocol(ref cause) => {
4769                write!(f, "{}", cause)
4770            }
4771        }
4772    }
4773}
4774impl Error for CreateLoadBalancerListenersError {}
4775/// Errors returned by CreateLoadBalancerPolicy
4776#[derive(Debug, PartialEq)]
4777pub enum CreateLoadBalancerPolicyError {
4778    /// <p>The specified load balancer does not exist.</p>
4779    AccessPointNotFound(String),
4780    /// <p>A policy with the specified name already exists for this load balancer.</p>
4781    DuplicatePolicyName(String),
4782    /// <p>The requested configuration change is not valid.</p>
4783    InvalidConfigurationRequest(String),
4784    /// <p>One or more of the specified policy types do not exist.</p>
4785    PolicyTypeNotFound(String),
4786    /// <p>The quota for the number of policies for this load balancer has been reached.</p>
4787    TooManyPolicies(String),
4788}
4789
4790impl CreateLoadBalancerPolicyError {
4791    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLoadBalancerPolicyError> {
4792        {
4793            let reader = EventReader::new(res.body.as_ref());
4794            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4795            find_start_element(&mut stack);
4796            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4797                match &parsed_error.code[..] {
4798                    "LoadBalancerNotFound" => {
4799                        return RusotoError::Service(
4800                            CreateLoadBalancerPolicyError::AccessPointNotFound(
4801                                parsed_error.message,
4802                            ),
4803                        )
4804                    }
4805                    "DuplicatePolicyName" => {
4806                        return RusotoError::Service(
4807                            CreateLoadBalancerPolicyError::DuplicatePolicyName(
4808                                parsed_error.message,
4809                            ),
4810                        )
4811                    }
4812                    "InvalidConfigurationRequest" => {
4813                        return RusotoError::Service(
4814                            CreateLoadBalancerPolicyError::InvalidConfigurationRequest(
4815                                parsed_error.message,
4816                            ),
4817                        )
4818                    }
4819                    "PolicyTypeNotFound" => {
4820                        return RusotoError::Service(
4821                            CreateLoadBalancerPolicyError::PolicyTypeNotFound(parsed_error.message),
4822                        )
4823                    }
4824                    "TooManyPolicies" => {
4825                        return RusotoError::Service(
4826                            CreateLoadBalancerPolicyError::TooManyPolicies(parsed_error.message),
4827                        )
4828                    }
4829                    _ => {}
4830                }
4831            }
4832        }
4833        RusotoError::Unknown(res)
4834    }
4835
4836    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4837    where
4838        T: Peek + Next,
4839    {
4840        xml_util::start_element("ErrorResponse", stack)?;
4841        XmlErrorDeserializer::deserialize("Error", stack)
4842    }
4843}
4844impl fmt::Display for CreateLoadBalancerPolicyError {
4845    #[allow(unused_variables)]
4846    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4847        match *self {
4848            CreateLoadBalancerPolicyError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
4849            CreateLoadBalancerPolicyError::DuplicatePolicyName(ref cause) => write!(f, "{}", cause),
4850            CreateLoadBalancerPolicyError::InvalidConfigurationRequest(ref cause) => {
4851                write!(f, "{}", cause)
4852            }
4853            CreateLoadBalancerPolicyError::PolicyTypeNotFound(ref cause) => write!(f, "{}", cause),
4854            CreateLoadBalancerPolicyError::TooManyPolicies(ref cause) => write!(f, "{}", cause),
4855        }
4856    }
4857}
4858impl Error for CreateLoadBalancerPolicyError {}
4859/// Errors returned by DeleteLoadBalancer
4860#[derive(Debug, PartialEq)]
4861pub enum DeleteLoadBalancerError {}
4862
4863impl DeleteLoadBalancerError {
4864    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLoadBalancerError> {
4865        {
4866            let reader = EventReader::new(res.body.as_ref());
4867            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4868            find_start_element(&mut stack);
4869            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4870                match &parsed_error.code[..] {
4871                    _ => {}
4872                }
4873            }
4874        }
4875        RusotoError::Unknown(res)
4876    }
4877
4878    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4879    where
4880        T: Peek + Next,
4881    {
4882        xml_util::start_element("ErrorResponse", stack)?;
4883        XmlErrorDeserializer::deserialize("Error", stack)
4884    }
4885}
4886impl fmt::Display for DeleteLoadBalancerError {
4887    #[allow(unused_variables)]
4888    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4889        match *self {}
4890    }
4891}
4892impl Error for DeleteLoadBalancerError {}
4893/// Errors returned by DeleteLoadBalancerListeners
4894#[derive(Debug, PartialEq)]
4895pub enum DeleteLoadBalancerListenersError {
4896    /// <p>The specified load balancer does not exist.</p>
4897    AccessPointNotFound(String),
4898}
4899
4900impl DeleteLoadBalancerListenersError {
4901    pub fn from_response(
4902        res: BufferedHttpResponse,
4903    ) -> RusotoError<DeleteLoadBalancerListenersError> {
4904        {
4905            let reader = EventReader::new(res.body.as_ref());
4906            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4907            find_start_element(&mut stack);
4908            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4909                match &parsed_error.code[..] {
4910                    "LoadBalancerNotFound" => {
4911                        return RusotoError::Service(
4912                            DeleteLoadBalancerListenersError::AccessPointNotFound(
4913                                parsed_error.message,
4914                            ),
4915                        )
4916                    }
4917                    _ => {}
4918                }
4919            }
4920        }
4921        RusotoError::Unknown(res)
4922    }
4923
4924    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4925    where
4926        T: Peek + Next,
4927    {
4928        xml_util::start_element("ErrorResponse", stack)?;
4929        XmlErrorDeserializer::deserialize("Error", stack)
4930    }
4931}
4932impl fmt::Display for DeleteLoadBalancerListenersError {
4933    #[allow(unused_variables)]
4934    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4935        match *self {
4936            DeleteLoadBalancerListenersError::AccessPointNotFound(ref cause) => {
4937                write!(f, "{}", cause)
4938            }
4939        }
4940    }
4941}
4942impl Error for DeleteLoadBalancerListenersError {}
4943/// Errors returned by DeleteLoadBalancerPolicy
4944#[derive(Debug, PartialEq)]
4945pub enum DeleteLoadBalancerPolicyError {
4946    /// <p>The specified load balancer does not exist.</p>
4947    AccessPointNotFound(String),
4948    /// <p>The requested configuration change is not valid.</p>
4949    InvalidConfigurationRequest(String),
4950}
4951
4952impl DeleteLoadBalancerPolicyError {
4953    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLoadBalancerPolicyError> {
4954        {
4955            let reader = EventReader::new(res.body.as_ref());
4956            let mut stack = XmlResponse::new(reader.into_iter().peekable());
4957            find_start_element(&mut stack);
4958            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
4959                match &parsed_error.code[..] {
4960                    "LoadBalancerNotFound" => {
4961                        return RusotoError::Service(
4962                            DeleteLoadBalancerPolicyError::AccessPointNotFound(
4963                                parsed_error.message,
4964                            ),
4965                        )
4966                    }
4967                    "InvalidConfigurationRequest" => {
4968                        return RusotoError::Service(
4969                            DeleteLoadBalancerPolicyError::InvalidConfigurationRequest(
4970                                parsed_error.message,
4971                            ),
4972                        )
4973                    }
4974                    _ => {}
4975                }
4976            }
4977        }
4978        RusotoError::Unknown(res)
4979    }
4980
4981    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
4982    where
4983        T: Peek + Next,
4984    {
4985        xml_util::start_element("ErrorResponse", stack)?;
4986        XmlErrorDeserializer::deserialize("Error", stack)
4987    }
4988}
4989impl fmt::Display for DeleteLoadBalancerPolicyError {
4990    #[allow(unused_variables)]
4991    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4992        match *self {
4993            DeleteLoadBalancerPolicyError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
4994            DeleteLoadBalancerPolicyError::InvalidConfigurationRequest(ref cause) => {
4995                write!(f, "{}", cause)
4996            }
4997        }
4998    }
4999}
5000impl Error for DeleteLoadBalancerPolicyError {}
5001/// Errors returned by DeregisterInstancesFromLoadBalancer
5002#[derive(Debug, PartialEq)]
5003pub enum DeregisterInstancesFromLoadBalancerError {
5004    /// <p>The specified load balancer does not exist.</p>
5005    AccessPointNotFound(String),
5006    /// <p>The specified endpoint is not valid.</p>
5007    InvalidEndPoint(String),
5008}
5009
5010impl DeregisterInstancesFromLoadBalancerError {
5011    pub fn from_response(
5012        res: BufferedHttpResponse,
5013    ) -> RusotoError<DeregisterInstancesFromLoadBalancerError> {
5014        {
5015            let reader = EventReader::new(res.body.as_ref());
5016            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5017            find_start_element(&mut stack);
5018            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5019                match &parsed_error.code[..] {
5020                    "LoadBalancerNotFound" => {
5021                        return RusotoError::Service(
5022                            DeregisterInstancesFromLoadBalancerError::AccessPointNotFound(
5023                                parsed_error.message,
5024                            ),
5025                        )
5026                    }
5027                    "InvalidInstance" => {
5028                        return RusotoError::Service(
5029                            DeregisterInstancesFromLoadBalancerError::InvalidEndPoint(
5030                                parsed_error.message,
5031                            ),
5032                        )
5033                    }
5034                    _ => {}
5035                }
5036            }
5037        }
5038        RusotoError::Unknown(res)
5039    }
5040
5041    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5042    where
5043        T: Peek + Next,
5044    {
5045        xml_util::start_element("ErrorResponse", stack)?;
5046        XmlErrorDeserializer::deserialize("Error", stack)
5047    }
5048}
5049impl fmt::Display for DeregisterInstancesFromLoadBalancerError {
5050    #[allow(unused_variables)]
5051    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5052        match *self {
5053            DeregisterInstancesFromLoadBalancerError::AccessPointNotFound(ref cause) => {
5054                write!(f, "{}", cause)
5055            }
5056            DeregisterInstancesFromLoadBalancerError::InvalidEndPoint(ref cause) => {
5057                write!(f, "{}", cause)
5058            }
5059        }
5060    }
5061}
5062impl Error for DeregisterInstancesFromLoadBalancerError {}
5063/// Errors returned by DescribeAccountLimits
5064#[derive(Debug, PartialEq)]
5065pub enum DescribeAccountLimitsError {}
5066
5067impl DescribeAccountLimitsError {
5068    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountLimitsError> {
5069        {
5070            let reader = EventReader::new(res.body.as_ref());
5071            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5072            find_start_element(&mut stack);
5073            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5074                match &parsed_error.code[..] {
5075                    _ => {}
5076                }
5077            }
5078        }
5079        RusotoError::Unknown(res)
5080    }
5081
5082    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5083    where
5084        T: Peek + Next,
5085    {
5086        xml_util::start_element("ErrorResponse", stack)?;
5087        XmlErrorDeserializer::deserialize("Error", stack)
5088    }
5089}
5090impl fmt::Display for DescribeAccountLimitsError {
5091    #[allow(unused_variables)]
5092    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5093        match *self {}
5094    }
5095}
5096impl Error for DescribeAccountLimitsError {}
5097/// Errors returned by DescribeInstanceHealth
5098#[derive(Debug, PartialEq)]
5099pub enum DescribeInstanceHealthError {
5100    /// <p>The specified load balancer does not exist.</p>
5101    AccessPointNotFound(String),
5102    /// <p>The specified endpoint is not valid.</p>
5103    InvalidEndPoint(String),
5104}
5105
5106impl DescribeInstanceHealthError {
5107    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeInstanceHealthError> {
5108        {
5109            let reader = EventReader::new(res.body.as_ref());
5110            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5111            find_start_element(&mut stack);
5112            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5113                match &parsed_error.code[..] {
5114                    "LoadBalancerNotFound" => {
5115                        return RusotoError::Service(
5116                            DescribeInstanceHealthError::AccessPointNotFound(parsed_error.message),
5117                        )
5118                    }
5119                    "InvalidInstance" => {
5120                        return RusotoError::Service(DescribeInstanceHealthError::InvalidEndPoint(
5121                            parsed_error.message,
5122                        ))
5123                    }
5124                    _ => {}
5125                }
5126            }
5127        }
5128        RusotoError::Unknown(res)
5129    }
5130
5131    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5132    where
5133        T: Peek + Next,
5134    {
5135        xml_util::start_element("ErrorResponse", stack)?;
5136        XmlErrorDeserializer::deserialize("Error", stack)
5137    }
5138}
5139impl fmt::Display for DescribeInstanceHealthError {
5140    #[allow(unused_variables)]
5141    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5142        match *self {
5143            DescribeInstanceHealthError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
5144            DescribeInstanceHealthError::InvalidEndPoint(ref cause) => write!(f, "{}", cause),
5145        }
5146    }
5147}
5148impl Error for DescribeInstanceHealthError {}
5149/// Errors returned by DescribeLoadBalancerAttributes
5150#[derive(Debug, PartialEq)]
5151pub enum DescribeLoadBalancerAttributesError {
5152    /// <p>The specified load balancer does not exist.</p>
5153    AccessPointNotFound(String),
5154    /// <p>The specified load balancer attribute does not exist.</p>
5155    LoadBalancerAttributeNotFound(String),
5156}
5157
5158impl DescribeLoadBalancerAttributesError {
5159    pub fn from_response(
5160        res: BufferedHttpResponse,
5161    ) -> RusotoError<DescribeLoadBalancerAttributesError> {
5162        {
5163            let reader = EventReader::new(res.body.as_ref());
5164            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5165            find_start_element(&mut stack);
5166            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5167                match &parsed_error.code[..] {
5168                    "LoadBalancerNotFound" => {
5169                        return RusotoError::Service(
5170                            DescribeLoadBalancerAttributesError::AccessPointNotFound(
5171                                parsed_error.message,
5172                            ),
5173                        )
5174                    }
5175                    "LoadBalancerAttributeNotFound" => {
5176                        return RusotoError::Service(
5177                            DescribeLoadBalancerAttributesError::LoadBalancerAttributeNotFound(
5178                                parsed_error.message,
5179                            ),
5180                        )
5181                    }
5182                    _ => {}
5183                }
5184            }
5185        }
5186        RusotoError::Unknown(res)
5187    }
5188
5189    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5190    where
5191        T: Peek + Next,
5192    {
5193        xml_util::start_element("ErrorResponse", stack)?;
5194        XmlErrorDeserializer::deserialize("Error", stack)
5195    }
5196}
5197impl fmt::Display for DescribeLoadBalancerAttributesError {
5198    #[allow(unused_variables)]
5199    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5200        match *self {
5201            DescribeLoadBalancerAttributesError::AccessPointNotFound(ref cause) => {
5202                write!(f, "{}", cause)
5203            }
5204            DescribeLoadBalancerAttributesError::LoadBalancerAttributeNotFound(ref cause) => {
5205                write!(f, "{}", cause)
5206            }
5207        }
5208    }
5209}
5210impl Error for DescribeLoadBalancerAttributesError {}
5211/// Errors returned by DescribeLoadBalancerPolicies
5212#[derive(Debug, PartialEq)]
5213pub enum DescribeLoadBalancerPoliciesError {
5214    /// <p>The specified load balancer does not exist.</p>
5215    AccessPointNotFound(String),
5216    /// <p>One or more of the specified policies do not exist.</p>
5217    PolicyNotFound(String),
5218}
5219
5220impl DescribeLoadBalancerPoliciesError {
5221    pub fn from_response(
5222        res: BufferedHttpResponse,
5223    ) -> RusotoError<DescribeLoadBalancerPoliciesError> {
5224        {
5225            let reader = EventReader::new(res.body.as_ref());
5226            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5227            find_start_element(&mut stack);
5228            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5229                match &parsed_error.code[..] {
5230                    "LoadBalancerNotFound" => {
5231                        return RusotoError::Service(
5232                            DescribeLoadBalancerPoliciesError::AccessPointNotFound(
5233                                parsed_error.message,
5234                            ),
5235                        )
5236                    }
5237                    "PolicyNotFound" => {
5238                        return RusotoError::Service(
5239                            DescribeLoadBalancerPoliciesError::PolicyNotFound(parsed_error.message),
5240                        )
5241                    }
5242                    _ => {}
5243                }
5244            }
5245        }
5246        RusotoError::Unknown(res)
5247    }
5248
5249    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5250    where
5251        T: Peek + Next,
5252    {
5253        xml_util::start_element("ErrorResponse", stack)?;
5254        XmlErrorDeserializer::deserialize("Error", stack)
5255    }
5256}
5257impl fmt::Display for DescribeLoadBalancerPoliciesError {
5258    #[allow(unused_variables)]
5259    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5260        match *self {
5261            DescribeLoadBalancerPoliciesError::AccessPointNotFound(ref cause) => {
5262                write!(f, "{}", cause)
5263            }
5264            DescribeLoadBalancerPoliciesError::PolicyNotFound(ref cause) => write!(f, "{}", cause),
5265        }
5266    }
5267}
5268impl Error for DescribeLoadBalancerPoliciesError {}
5269/// Errors returned by DescribeLoadBalancerPolicyTypes
5270#[derive(Debug, PartialEq)]
5271pub enum DescribeLoadBalancerPolicyTypesError {
5272    /// <p>One or more of the specified policy types do not exist.</p>
5273    PolicyTypeNotFound(String),
5274}
5275
5276impl DescribeLoadBalancerPolicyTypesError {
5277    pub fn from_response(
5278        res: BufferedHttpResponse,
5279    ) -> RusotoError<DescribeLoadBalancerPolicyTypesError> {
5280        {
5281            let reader = EventReader::new(res.body.as_ref());
5282            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5283            find_start_element(&mut stack);
5284            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5285                match &parsed_error.code[..] {
5286                    "PolicyTypeNotFound" => {
5287                        return RusotoError::Service(
5288                            DescribeLoadBalancerPolicyTypesError::PolicyTypeNotFound(
5289                                parsed_error.message,
5290                            ),
5291                        )
5292                    }
5293                    _ => {}
5294                }
5295            }
5296        }
5297        RusotoError::Unknown(res)
5298    }
5299
5300    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5301    where
5302        T: Peek + Next,
5303    {
5304        xml_util::start_element("ErrorResponse", stack)?;
5305        XmlErrorDeserializer::deserialize("Error", stack)
5306    }
5307}
5308impl fmt::Display for DescribeLoadBalancerPolicyTypesError {
5309    #[allow(unused_variables)]
5310    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5311        match *self {
5312            DescribeLoadBalancerPolicyTypesError::PolicyTypeNotFound(ref cause) => {
5313                write!(f, "{}", cause)
5314            }
5315        }
5316    }
5317}
5318impl Error for DescribeLoadBalancerPolicyTypesError {}
5319/// Errors returned by DescribeLoadBalancers
5320#[derive(Debug, PartialEq)]
5321pub enum DescribeLoadBalancersError {
5322    /// <p>The specified load balancer does not exist.</p>
5323    AccessPointNotFound(String),
5324    /// <p>A request made by Elastic Load Balancing to another service exceeds the maximum request rate permitted for your account.</p>
5325    DependencyThrottle(String),
5326}
5327
5328impl DescribeLoadBalancersError {
5329    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoadBalancersError> {
5330        {
5331            let reader = EventReader::new(res.body.as_ref());
5332            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5333            find_start_element(&mut stack);
5334            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5335                match &parsed_error.code[..] {
5336                    "LoadBalancerNotFound" => {
5337                        return RusotoError::Service(
5338                            DescribeLoadBalancersError::AccessPointNotFound(parsed_error.message),
5339                        )
5340                    }
5341                    "DependencyThrottle" => {
5342                        return RusotoError::Service(
5343                            DescribeLoadBalancersError::DependencyThrottle(parsed_error.message),
5344                        )
5345                    }
5346                    _ => {}
5347                }
5348            }
5349        }
5350        RusotoError::Unknown(res)
5351    }
5352
5353    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5354    where
5355        T: Peek + Next,
5356    {
5357        xml_util::start_element("ErrorResponse", stack)?;
5358        XmlErrorDeserializer::deserialize("Error", stack)
5359    }
5360}
5361impl fmt::Display for DescribeLoadBalancersError {
5362    #[allow(unused_variables)]
5363    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5364        match *self {
5365            DescribeLoadBalancersError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
5366            DescribeLoadBalancersError::DependencyThrottle(ref cause) => write!(f, "{}", cause),
5367        }
5368    }
5369}
5370impl Error for DescribeLoadBalancersError {}
5371/// Errors returned by DescribeTags
5372#[derive(Debug, PartialEq)]
5373pub enum DescribeTagsError {
5374    /// <p>The specified load balancer does not exist.</p>
5375    AccessPointNotFound(String),
5376}
5377
5378impl DescribeTagsError {
5379    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
5380        {
5381            let reader = EventReader::new(res.body.as_ref());
5382            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5383            find_start_element(&mut stack);
5384            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5385                match &parsed_error.code[..] {
5386                    "LoadBalancerNotFound" => {
5387                        return RusotoError::Service(DescribeTagsError::AccessPointNotFound(
5388                            parsed_error.message,
5389                        ))
5390                    }
5391                    _ => {}
5392                }
5393            }
5394        }
5395        RusotoError::Unknown(res)
5396    }
5397
5398    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5399    where
5400        T: Peek + Next,
5401    {
5402        xml_util::start_element("ErrorResponse", stack)?;
5403        XmlErrorDeserializer::deserialize("Error", stack)
5404    }
5405}
5406impl fmt::Display for DescribeTagsError {
5407    #[allow(unused_variables)]
5408    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5409        match *self {
5410            DescribeTagsError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
5411        }
5412    }
5413}
5414impl Error for DescribeTagsError {}
5415/// Errors returned by DetachLoadBalancerFromSubnets
5416#[derive(Debug, PartialEq)]
5417pub enum DetachLoadBalancerFromSubnetsError {
5418    /// <p>The specified load balancer does not exist.</p>
5419    AccessPointNotFound(String),
5420    /// <p>The requested configuration change is not valid.</p>
5421    InvalidConfigurationRequest(String),
5422}
5423
5424impl DetachLoadBalancerFromSubnetsError {
5425    pub fn from_response(
5426        res: BufferedHttpResponse,
5427    ) -> RusotoError<DetachLoadBalancerFromSubnetsError> {
5428        {
5429            let reader = EventReader::new(res.body.as_ref());
5430            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5431            find_start_element(&mut stack);
5432            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5433                match &parsed_error.code[..] {
5434                    "LoadBalancerNotFound" => {
5435                        return RusotoError::Service(
5436                            DetachLoadBalancerFromSubnetsError::AccessPointNotFound(
5437                                parsed_error.message,
5438                            ),
5439                        )
5440                    }
5441                    "InvalidConfigurationRequest" => {
5442                        return RusotoError::Service(
5443                            DetachLoadBalancerFromSubnetsError::InvalidConfigurationRequest(
5444                                parsed_error.message,
5445                            ),
5446                        )
5447                    }
5448                    _ => {}
5449                }
5450            }
5451        }
5452        RusotoError::Unknown(res)
5453    }
5454
5455    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5456    where
5457        T: Peek + Next,
5458    {
5459        xml_util::start_element("ErrorResponse", stack)?;
5460        XmlErrorDeserializer::deserialize("Error", stack)
5461    }
5462}
5463impl fmt::Display for DetachLoadBalancerFromSubnetsError {
5464    #[allow(unused_variables)]
5465    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5466        match *self {
5467            DetachLoadBalancerFromSubnetsError::AccessPointNotFound(ref cause) => {
5468                write!(f, "{}", cause)
5469            }
5470            DetachLoadBalancerFromSubnetsError::InvalidConfigurationRequest(ref cause) => {
5471                write!(f, "{}", cause)
5472            }
5473        }
5474    }
5475}
5476impl Error for DetachLoadBalancerFromSubnetsError {}
5477/// Errors returned by DisableAvailabilityZonesForLoadBalancer
5478#[derive(Debug, PartialEq)]
5479pub enum DisableAvailabilityZonesForLoadBalancerError {
5480    /// <p>The specified load balancer does not exist.</p>
5481    AccessPointNotFound(String),
5482    /// <p>The requested configuration change is not valid.</p>
5483    InvalidConfigurationRequest(String),
5484}
5485
5486impl DisableAvailabilityZonesForLoadBalancerError {
5487    pub fn from_response(
5488        res: BufferedHttpResponse,
5489    ) -> RusotoError<DisableAvailabilityZonesForLoadBalancerError> {
5490        {
5491            let reader = EventReader::new(res.body.as_ref());
5492            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5493            find_start_element(&mut stack);
5494            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5495                match &parsed_error.code[..] {
5496                    "LoadBalancerNotFound" => {
5497                        return RusotoError::Service(
5498                            DisableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(
5499                                parsed_error.message,
5500                            ),
5501                        )
5502                    }
5503                    "InvalidConfigurationRequest" => return RusotoError::Service(
5504                        DisableAvailabilityZonesForLoadBalancerError::InvalidConfigurationRequest(
5505                            parsed_error.message,
5506                        ),
5507                    ),
5508                    _ => {}
5509                }
5510            }
5511        }
5512        RusotoError::Unknown(res)
5513    }
5514
5515    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5516    where
5517        T: Peek + Next,
5518    {
5519        xml_util::start_element("ErrorResponse", stack)?;
5520        XmlErrorDeserializer::deserialize("Error", stack)
5521    }
5522}
5523impl fmt::Display for DisableAvailabilityZonesForLoadBalancerError {
5524    #[allow(unused_variables)]
5525    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5526        match *self {
5527            DisableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(ref cause) => {
5528                write!(f, "{}", cause)
5529            }
5530            DisableAvailabilityZonesForLoadBalancerError::InvalidConfigurationRequest(
5531                ref cause,
5532            ) => write!(f, "{}", cause),
5533        }
5534    }
5535}
5536impl Error for DisableAvailabilityZonesForLoadBalancerError {}
5537/// Errors returned by EnableAvailabilityZonesForLoadBalancer
5538#[derive(Debug, PartialEq)]
5539pub enum EnableAvailabilityZonesForLoadBalancerError {
5540    /// <p>The specified load balancer does not exist.</p>
5541    AccessPointNotFound(String),
5542}
5543
5544impl EnableAvailabilityZonesForLoadBalancerError {
5545    pub fn from_response(
5546        res: BufferedHttpResponse,
5547    ) -> RusotoError<EnableAvailabilityZonesForLoadBalancerError> {
5548        {
5549            let reader = EventReader::new(res.body.as_ref());
5550            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5551            find_start_element(&mut stack);
5552            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5553                match &parsed_error.code[..] {
5554                    "LoadBalancerNotFound" => {
5555                        return RusotoError::Service(
5556                            EnableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(
5557                                parsed_error.message,
5558                            ),
5559                        )
5560                    }
5561                    _ => {}
5562                }
5563            }
5564        }
5565        RusotoError::Unknown(res)
5566    }
5567
5568    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5569    where
5570        T: Peek + Next,
5571    {
5572        xml_util::start_element("ErrorResponse", stack)?;
5573        XmlErrorDeserializer::deserialize("Error", stack)
5574    }
5575}
5576impl fmt::Display for EnableAvailabilityZonesForLoadBalancerError {
5577    #[allow(unused_variables)]
5578    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5579        match *self {
5580            EnableAvailabilityZonesForLoadBalancerError::AccessPointNotFound(ref cause) => {
5581                write!(f, "{}", cause)
5582            }
5583        }
5584    }
5585}
5586impl Error for EnableAvailabilityZonesForLoadBalancerError {}
5587/// Errors returned by ModifyLoadBalancerAttributes
5588#[derive(Debug, PartialEq)]
5589pub enum ModifyLoadBalancerAttributesError {
5590    /// <p>The specified load balancer does not exist.</p>
5591    AccessPointNotFound(String),
5592    /// <p>The requested configuration change is not valid.</p>
5593    InvalidConfigurationRequest(String),
5594    /// <p>The specified load balancer attribute does not exist.</p>
5595    LoadBalancerAttributeNotFound(String),
5596}
5597
5598impl ModifyLoadBalancerAttributesError {
5599    pub fn from_response(
5600        res: BufferedHttpResponse,
5601    ) -> RusotoError<ModifyLoadBalancerAttributesError> {
5602        {
5603            let reader = EventReader::new(res.body.as_ref());
5604            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5605            find_start_element(&mut stack);
5606            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5607                match &parsed_error.code[..] {
5608                    "LoadBalancerNotFound" => {
5609                        return RusotoError::Service(
5610                            ModifyLoadBalancerAttributesError::AccessPointNotFound(
5611                                parsed_error.message,
5612                            ),
5613                        )
5614                    }
5615                    "InvalidConfigurationRequest" => {
5616                        return RusotoError::Service(
5617                            ModifyLoadBalancerAttributesError::InvalidConfigurationRequest(
5618                                parsed_error.message,
5619                            ),
5620                        )
5621                    }
5622                    "LoadBalancerAttributeNotFound" => {
5623                        return RusotoError::Service(
5624                            ModifyLoadBalancerAttributesError::LoadBalancerAttributeNotFound(
5625                                parsed_error.message,
5626                            ),
5627                        )
5628                    }
5629                    _ => {}
5630                }
5631            }
5632        }
5633        RusotoError::Unknown(res)
5634    }
5635
5636    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5637    where
5638        T: Peek + Next,
5639    {
5640        xml_util::start_element("ErrorResponse", stack)?;
5641        XmlErrorDeserializer::deserialize("Error", stack)
5642    }
5643}
5644impl fmt::Display for ModifyLoadBalancerAttributesError {
5645    #[allow(unused_variables)]
5646    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5647        match *self {
5648            ModifyLoadBalancerAttributesError::AccessPointNotFound(ref cause) => {
5649                write!(f, "{}", cause)
5650            }
5651            ModifyLoadBalancerAttributesError::InvalidConfigurationRequest(ref cause) => {
5652                write!(f, "{}", cause)
5653            }
5654            ModifyLoadBalancerAttributesError::LoadBalancerAttributeNotFound(ref cause) => {
5655                write!(f, "{}", cause)
5656            }
5657        }
5658    }
5659}
5660impl Error for ModifyLoadBalancerAttributesError {}
5661/// Errors returned by RegisterInstancesWithLoadBalancer
5662#[derive(Debug, PartialEq)]
5663pub enum RegisterInstancesWithLoadBalancerError {
5664    /// <p>The specified load balancer does not exist.</p>
5665    AccessPointNotFound(String),
5666    /// <p>The specified endpoint is not valid.</p>
5667    InvalidEndPoint(String),
5668}
5669
5670impl RegisterInstancesWithLoadBalancerError {
5671    pub fn from_response(
5672        res: BufferedHttpResponse,
5673    ) -> RusotoError<RegisterInstancesWithLoadBalancerError> {
5674        {
5675            let reader = EventReader::new(res.body.as_ref());
5676            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5677            find_start_element(&mut stack);
5678            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5679                match &parsed_error.code[..] {
5680                    "LoadBalancerNotFound" => {
5681                        return RusotoError::Service(
5682                            RegisterInstancesWithLoadBalancerError::AccessPointNotFound(
5683                                parsed_error.message,
5684                            ),
5685                        )
5686                    }
5687                    "InvalidInstance" => {
5688                        return RusotoError::Service(
5689                            RegisterInstancesWithLoadBalancerError::InvalidEndPoint(
5690                                parsed_error.message,
5691                            ),
5692                        )
5693                    }
5694                    _ => {}
5695                }
5696            }
5697        }
5698        RusotoError::Unknown(res)
5699    }
5700
5701    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5702    where
5703        T: Peek + Next,
5704    {
5705        xml_util::start_element("ErrorResponse", stack)?;
5706        XmlErrorDeserializer::deserialize("Error", stack)
5707    }
5708}
5709impl fmt::Display for RegisterInstancesWithLoadBalancerError {
5710    #[allow(unused_variables)]
5711    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5712        match *self {
5713            RegisterInstancesWithLoadBalancerError::AccessPointNotFound(ref cause) => {
5714                write!(f, "{}", cause)
5715            }
5716            RegisterInstancesWithLoadBalancerError::InvalidEndPoint(ref cause) => {
5717                write!(f, "{}", cause)
5718            }
5719        }
5720    }
5721}
5722impl Error for RegisterInstancesWithLoadBalancerError {}
5723/// Errors returned by RemoveTags
5724#[derive(Debug, PartialEq)]
5725pub enum RemoveTagsError {
5726    /// <p>The specified load balancer does not exist.</p>
5727    AccessPointNotFound(String),
5728}
5729
5730impl RemoveTagsError {
5731    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsError> {
5732        {
5733            let reader = EventReader::new(res.body.as_ref());
5734            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5735            find_start_element(&mut stack);
5736            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5737                match &parsed_error.code[..] {
5738                    "LoadBalancerNotFound" => {
5739                        return RusotoError::Service(RemoveTagsError::AccessPointNotFound(
5740                            parsed_error.message,
5741                        ))
5742                    }
5743                    _ => {}
5744                }
5745            }
5746        }
5747        RusotoError::Unknown(res)
5748    }
5749
5750    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5751    where
5752        T: Peek + Next,
5753    {
5754        xml_util::start_element("ErrorResponse", stack)?;
5755        XmlErrorDeserializer::deserialize("Error", stack)
5756    }
5757}
5758impl fmt::Display for RemoveTagsError {
5759    #[allow(unused_variables)]
5760    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5761        match *self {
5762            RemoveTagsError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
5763        }
5764    }
5765}
5766impl Error for RemoveTagsError {}
5767/// Errors returned by SetLoadBalancerListenerSSLCertificate
5768#[derive(Debug, PartialEq)]
5769pub enum SetLoadBalancerListenerSSLCertificateError {
5770    /// <p>The specified load balancer does not exist.</p>
5771    AccessPointNotFound(String),
5772    /// <p>The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.</p>
5773    CertificateNotFound(String),
5774    /// <p>The requested configuration change is not valid.</p>
5775    InvalidConfigurationRequest(String),
5776    /// <p>The load balancer does not have a listener configured at the specified port.</p>
5777    ListenerNotFound(String),
5778    /// <p>The specified protocol or signature version is not supported.</p>
5779    UnsupportedProtocol(String),
5780}
5781
5782impl SetLoadBalancerListenerSSLCertificateError {
5783    pub fn from_response(
5784        res: BufferedHttpResponse,
5785    ) -> RusotoError<SetLoadBalancerListenerSSLCertificateError> {
5786        {
5787            let reader = EventReader::new(res.body.as_ref());
5788            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5789            find_start_element(&mut stack);
5790            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5791                match &parsed_error.code[..] {
5792                    "LoadBalancerNotFound" => {
5793                        return RusotoError::Service(
5794                            SetLoadBalancerListenerSSLCertificateError::AccessPointNotFound(
5795                                parsed_error.message,
5796                            ),
5797                        )
5798                    }
5799                    "CertificateNotFound" => {
5800                        return RusotoError::Service(
5801                            SetLoadBalancerListenerSSLCertificateError::CertificateNotFound(
5802                                parsed_error.message,
5803                            ),
5804                        )
5805                    }
5806                    "InvalidConfigurationRequest" => {
5807                        return RusotoError::Service(
5808                            SetLoadBalancerListenerSSLCertificateError::InvalidConfigurationRequest(
5809                                parsed_error.message,
5810                            ),
5811                        )
5812                    }
5813                    "ListenerNotFound" => {
5814                        return RusotoError::Service(
5815                            SetLoadBalancerListenerSSLCertificateError::ListenerNotFound(
5816                                parsed_error.message,
5817                            ),
5818                        )
5819                    }
5820                    "UnsupportedProtocol" => {
5821                        return RusotoError::Service(
5822                            SetLoadBalancerListenerSSLCertificateError::UnsupportedProtocol(
5823                                parsed_error.message,
5824                            ),
5825                        )
5826                    }
5827                    _ => {}
5828                }
5829            }
5830        }
5831        RusotoError::Unknown(res)
5832    }
5833
5834    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5835    where
5836        T: Peek + Next,
5837    {
5838        xml_util::start_element("ErrorResponse", stack)?;
5839        XmlErrorDeserializer::deserialize("Error", stack)
5840    }
5841}
5842impl fmt::Display for SetLoadBalancerListenerSSLCertificateError {
5843    #[allow(unused_variables)]
5844    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5845        match *self {
5846            SetLoadBalancerListenerSSLCertificateError::AccessPointNotFound(ref cause) => {
5847                write!(f, "{}", cause)
5848            }
5849            SetLoadBalancerListenerSSLCertificateError::CertificateNotFound(ref cause) => {
5850                write!(f, "{}", cause)
5851            }
5852            SetLoadBalancerListenerSSLCertificateError::InvalidConfigurationRequest(ref cause) => {
5853                write!(f, "{}", cause)
5854            }
5855            SetLoadBalancerListenerSSLCertificateError::ListenerNotFound(ref cause) => {
5856                write!(f, "{}", cause)
5857            }
5858            SetLoadBalancerListenerSSLCertificateError::UnsupportedProtocol(ref cause) => {
5859                write!(f, "{}", cause)
5860            }
5861        }
5862    }
5863}
5864impl Error for SetLoadBalancerListenerSSLCertificateError {}
5865/// Errors returned by SetLoadBalancerPoliciesForBackendServer
5866#[derive(Debug, PartialEq)]
5867pub enum SetLoadBalancerPoliciesForBackendServerError {
5868    /// <p>The specified load balancer does not exist.</p>
5869    AccessPointNotFound(String),
5870    /// <p>The requested configuration change is not valid.</p>
5871    InvalidConfigurationRequest(String),
5872    /// <p>One or more of the specified policies do not exist.</p>
5873    PolicyNotFound(String),
5874}
5875
5876impl SetLoadBalancerPoliciesForBackendServerError {
5877    pub fn from_response(
5878        res: BufferedHttpResponse,
5879    ) -> RusotoError<SetLoadBalancerPoliciesForBackendServerError> {
5880        {
5881            let reader = EventReader::new(res.body.as_ref());
5882            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5883            find_start_element(&mut stack);
5884            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5885                match &parsed_error.code[..] {
5886                    "LoadBalancerNotFound" => {
5887                        return RusotoError::Service(
5888                            SetLoadBalancerPoliciesForBackendServerError::AccessPointNotFound(
5889                                parsed_error.message,
5890                            ),
5891                        )
5892                    }
5893                    "InvalidConfigurationRequest" => return RusotoError::Service(
5894                        SetLoadBalancerPoliciesForBackendServerError::InvalidConfigurationRequest(
5895                            parsed_error.message,
5896                        ),
5897                    ),
5898                    "PolicyNotFound" => {
5899                        return RusotoError::Service(
5900                            SetLoadBalancerPoliciesForBackendServerError::PolicyNotFound(
5901                                parsed_error.message,
5902                            ),
5903                        )
5904                    }
5905                    _ => {}
5906                }
5907            }
5908        }
5909        RusotoError::Unknown(res)
5910    }
5911
5912    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5913    where
5914        T: Peek + Next,
5915    {
5916        xml_util::start_element("ErrorResponse", stack)?;
5917        XmlErrorDeserializer::deserialize("Error", stack)
5918    }
5919}
5920impl fmt::Display for SetLoadBalancerPoliciesForBackendServerError {
5921    #[allow(unused_variables)]
5922    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5923        match *self {
5924            SetLoadBalancerPoliciesForBackendServerError::AccessPointNotFound(ref cause) => {
5925                write!(f, "{}", cause)
5926            }
5927            SetLoadBalancerPoliciesForBackendServerError::InvalidConfigurationRequest(
5928                ref cause,
5929            ) => write!(f, "{}", cause),
5930            SetLoadBalancerPoliciesForBackendServerError::PolicyNotFound(ref cause) => {
5931                write!(f, "{}", cause)
5932            }
5933        }
5934    }
5935}
5936impl Error for SetLoadBalancerPoliciesForBackendServerError {}
5937/// Errors returned by SetLoadBalancerPoliciesOfListener
5938#[derive(Debug, PartialEq)]
5939pub enum SetLoadBalancerPoliciesOfListenerError {
5940    /// <p>The specified load balancer does not exist.</p>
5941    AccessPointNotFound(String),
5942    /// <p>The requested configuration change is not valid.</p>
5943    InvalidConfigurationRequest(String),
5944    /// <p>The load balancer does not have a listener configured at the specified port.</p>
5945    ListenerNotFound(String),
5946    /// <p>One or more of the specified policies do not exist.</p>
5947    PolicyNotFound(String),
5948}
5949
5950impl SetLoadBalancerPoliciesOfListenerError {
5951    pub fn from_response(
5952        res: BufferedHttpResponse,
5953    ) -> RusotoError<SetLoadBalancerPoliciesOfListenerError> {
5954        {
5955            let reader = EventReader::new(res.body.as_ref());
5956            let mut stack = XmlResponse::new(reader.into_iter().peekable());
5957            find_start_element(&mut stack);
5958            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
5959                match &parsed_error.code[..] {
5960                    "LoadBalancerNotFound" => {
5961                        return RusotoError::Service(
5962                            SetLoadBalancerPoliciesOfListenerError::AccessPointNotFound(
5963                                parsed_error.message,
5964                            ),
5965                        )
5966                    }
5967                    "InvalidConfigurationRequest" => {
5968                        return RusotoError::Service(
5969                            SetLoadBalancerPoliciesOfListenerError::InvalidConfigurationRequest(
5970                                parsed_error.message,
5971                            ),
5972                        )
5973                    }
5974                    "ListenerNotFound" => {
5975                        return RusotoError::Service(
5976                            SetLoadBalancerPoliciesOfListenerError::ListenerNotFound(
5977                                parsed_error.message,
5978                            ),
5979                        )
5980                    }
5981                    "PolicyNotFound" => {
5982                        return RusotoError::Service(
5983                            SetLoadBalancerPoliciesOfListenerError::PolicyNotFound(
5984                                parsed_error.message,
5985                            ),
5986                        )
5987                    }
5988                    _ => {}
5989                }
5990            }
5991        }
5992        RusotoError::Unknown(res)
5993    }
5994
5995    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
5996    where
5997        T: Peek + Next,
5998    {
5999        xml_util::start_element("ErrorResponse", stack)?;
6000        XmlErrorDeserializer::deserialize("Error", stack)
6001    }
6002}
6003impl fmt::Display for SetLoadBalancerPoliciesOfListenerError {
6004    #[allow(unused_variables)]
6005    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6006        match *self {
6007            SetLoadBalancerPoliciesOfListenerError::AccessPointNotFound(ref cause) => {
6008                write!(f, "{}", cause)
6009            }
6010            SetLoadBalancerPoliciesOfListenerError::InvalidConfigurationRequest(ref cause) => {
6011                write!(f, "{}", cause)
6012            }
6013            SetLoadBalancerPoliciesOfListenerError::ListenerNotFound(ref cause) => {
6014                write!(f, "{}", cause)
6015            }
6016            SetLoadBalancerPoliciesOfListenerError::PolicyNotFound(ref cause) => {
6017                write!(f, "{}", cause)
6018            }
6019        }
6020    }
6021}
6022impl Error for SetLoadBalancerPoliciesOfListenerError {}
6023/// Trait representing the capabilities of the Elastic Load Balancing API. Elastic Load Balancing clients implement this trait.
6024#[async_trait]
6025pub trait Elb {
6026    /// <p>Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.</p> <p>Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, <code>AddTags</code> updates its value.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html">Tag Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6027    async fn add_tags(
6028        &self,
6029        input: AddTagsInput,
6030    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>>;
6031
6032    /// <p>Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups">Security Groups for Load Balancers in a VPC</a> in the <i>Classic Load Balancers Guide</i>.</p>
6033    async fn apply_security_groups_to_load_balancer(
6034        &self,
6035        input: ApplySecurityGroupsToLoadBalancerInput,
6036    ) -> Result<
6037        ApplySecurityGroupsToLoadBalancerOutput,
6038        RusotoError<ApplySecurityGroupsToLoadBalancerError>,
6039    >;
6040
6041    /// <p>Adds one or more subnets to the set of configured subnets for the specified load balancer.</p> <p>The load balancer evenly distributes requests across all registered subnets. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html">Add or Remove Subnets for Your Load Balancer in a VPC</a> in the <i>Classic Load Balancers Guide</i>.</p>
6042    async fn attach_load_balancer_to_subnets(
6043        &self,
6044        input: AttachLoadBalancerToSubnetsInput,
6045    ) -> Result<AttachLoadBalancerToSubnetsOutput, RusotoError<AttachLoadBalancerToSubnetsError>>;
6046
6047    /// <p>Specifies the health check settings to use when evaluating the health state of your EC2 instances.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html">Configure Health Checks for Your Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6048    async fn configure_health_check(
6049        &self,
6050        input: ConfigureHealthCheckInput,
6051    ) -> Result<ConfigureHealthCheckOutput, RusotoError<ConfigureHealthCheckError>>;
6052
6053    /// <p>Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.</p> <p>This policy is similar to the policy created by <a>CreateLBCookieStickinessPolicy</a>, except that the lifetime of the special Elastic Load Balancing cookie, <code>AWSELB</code>, follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie.</p> <p>If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application">Application-Controlled Session Stickiness</a> in the <i>Classic Load Balancers Guide</i>.</p>
6054    async fn create_app_cookie_stickiness_policy(
6055        &self,
6056        input: CreateAppCookieStickinessPolicyInput,
6057    ) -> Result<
6058        CreateAppCookieStickinessPolicyOutput,
6059        RusotoError<CreateAppCookieStickinessPolicyError>,
6060    >;
6061
6062    /// <p>Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.</p> <p>When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.</p> <p>A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration">Duration-Based Session Stickiness</a> in the <i>Classic Load Balancers Guide</i>.</p>
6063    async fn create_lb_cookie_stickiness_policy(
6064        &self,
6065        input: CreateLBCookieStickinessPolicyInput,
6066    ) -> Result<
6067        CreateLBCookieStickinessPolicyOutput,
6068        RusotoError<CreateLBCookieStickinessPolicyError>,
6069    >;
6070
6071    /// <p>Creates a Classic Load Balancer.</p> <p>You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using <a>CreateLoadBalancerListeners</a>, <a>ApplySecurityGroupsToLoadBalancer</a>, <a>AttachLoadBalancerToSubnets</a>, and <a>AddTags</a>.</p> <p>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>You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html">Limits for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6072    async fn create_load_balancer(
6073        &self,
6074        input: CreateAccessPointInput,
6075    ) -> Result<CreateAccessPointOutput, RusotoError<CreateLoadBalancerError>>;
6076
6077    /// <p>Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html">Listeners for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6078    async fn create_load_balancer_listeners(
6079        &self,
6080        input: CreateLoadBalancerListenerInput,
6081    ) -> Result<CreateLoadBalancerListenerOutput, RusotoError<CreateLoadBalancerListenersError>>;
6082
6083    /// <p>Creates a policy with the specified attributes for the specified load balancer.</p> <p>Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.</p>
6084    async fn create_load_balancer_policy(
6085        &self,
6086        input: CreateLoadBalancerPolicyInput,
6087    ) -> Result<CreateLoadBalancerPolicyOutput, RusotoError<CreateLoadBalancerPolicyError>>;
6088
6089    /// <p>Deletes the specified load balancer.</p> <p>If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.</p> <p>If the load balancer does not exist or has already been deleted, the call to <code>DeleteLoadBalancer</code> still succeeds.</p>
6090    async fn delete_load_balancer(
6091        &self,
6092        input: DeleteAccessPointInput,
6093    ) -> Result<DeleteAccessPointOutput, RusotoError<DeleteLoadBalancerError>>;
6094
6095    /// <p>Deletes the specified listeners from the specified load balancer.</p>
6096    async fn delete_load_balancer_listeners(
6097        &self,
6098        input: DeleteLoadBalancerListenerInput,
6099    ) -> Result<DeleteLoadBalancerListenerOutput, RusotoError<DeleteLoadBalancerListenersError>>;
6100
6101    /// <p>Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.</p>
6102    async fn delete_load_balancer_policy(
6103        &self,
6104        input: DeleteLoadBalancerPolicyInput,
6105    ) -> Result<DeleteLoadBalancerPolicyOutput, RusotoError<DeleteLoadBalancerPolicyError>>;
6106
6107    /// <p>Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.</p> <p>You can use <a>DescribeLoadBalancers</a> to verify that the instance is deregistered from the load balancer.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html">Register or De-Register EC2 Instances</a> in the <i>Classic Load Balancers Guide</i>.</p>
6108    async fn deregister_instances_from_load_balancer(
6109        &self,
6110        input: DeregisterEndPointsInput,
6111    ) -> Result<DeregisterEndPointsOutput, RusotoError<DeregisterInstancesFromLoadBalancerError>>;
6112
6113    /// <p>Describes the current Elastic Load Balancing resource limits for your AWS account.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html">Limits for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6114    async fn describe_account_limits(
6115        &self,
6116        input: DescribeAccountLimitsInput,
6117    ) -> Result<DescribeAccountLimitsOutput, RusotoError<DescribeAccountLimitsError>>;
6118
6119    /// <p>Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.</p>
6120    async fn describe_instance_health(
6121        &self,
6122        input: DescribeEndPointStateInput,
6123    ) -> Result<DescribeEndPointStateOutput, RusotoError<DescribeInstanceHealthError>>;
6124
6125    /// <p>Describes the attributes for the specified load balancer.</p>
6126    async fn describe_load_balancer_attributes(
6127        &self,
6128        input: DescribeLoadBalancerAttributesInput,
6129    ) -> Result<
6130        DescribeLoadBalancerAttributesOutput,
6131        RusotoError<DescribeLoadBalancerAttributesError>,
6132    >;
6133
6134    /// <p>Describes the specified policies.</p> <p>If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer. If you specify a policy name associated with your load balancer, the action returns the description of that policy. If you don't specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies. The names of the sample policies have the <code>ELBSample-</code> prefix.</p>
6135    async fn describe_load_balancer_policies(
6136        &self,
6137        input: DescribeLoadBalancerPoliciesInput,
6138    ) -> Result<DescribeLoadBalancerPoliciesOutput, RusotoError<DescribeLoadBalancerPoliciesError>>;
6139
6140    /// <p>Describes the specified load balancer policy types or all load balancer policy types.</p> <p>The description of each type indicates how it can be used. For example, some policies can be used only with layer 7 listeners, some policies can be used only with layer 4 listeners, and some policies can be used only with your EC2 instances.</p> <p>You can use <a>CreateLoadBalancerPolicy</a> to create a policy configuration for any of these policy types. Then, depending on the policy type, use either <a>SetLoadBalancerPoliciesOfListener</a> or <a>SetLoadBalancerPoliciesForBackendServer</a> to set the policy.</p>
6141    async fn describe_load_balancer_policy_types(
6142        &self,
6143        input: DescribeLoadBalancerPolicyTypesInput,
6144    ) -> Result<
6145        DescribeLoadBalancerPolicyTypesOutput,
6146        RusotoError<DescribeLoadBalancerPolicyTypesError>,
6147    >;
6148
6149    /// <p>Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.</p>
6150    async fn describe_load_balancers(
6151        &self,
6152        input: DescribeAccessPointsInput,
6153    ) -> Result<DescribeAccessPointsOutput, RusotoError<DescribeLoadBalancersError>>;
6154
6155    /// <p>Describes the tags associated with the specified load balancers.</p>
6156    async fn describe_tags(
6157        &self,
6158        input: DescribeTagsInput,
6159    ) -> Result<DescribeTagsOutput, RusotoError<DescribeTagsError>>;
6160
6161    /// <p>Removes the specified subnets from the set of configured subnets for the load balancer.</p> <p>After a subnet is removed, all EC2 instances registered with the load balancer in the removed subnet go into the <code>OutOfService</code> state. Then, the load balancer balances the traffic among the remaining routable subnets.</p>
6162    async fn detach_load_balancer_from_subnets(
6163        &self,
6164        input: DetachLoadBalancerFromSubnetsInput,
6165    ) -> Result<DetachLoadBalancerFromSubnetsOutput, RusotoError<DetachLoadBalancerFromSubnetsError>>;
6166
6167    /// <p>Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.</p> <p>For load balancers in a non-default VPC, use <a>DetachLoadBalancerFromSubnets</a>.</p> <p>There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the <code>OutOfService</code> state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html">Add or Remove Availability Zones</a> in the <i>Classic Load Balancers Guide</i>.</p>
6168    async fn disable_availability_zones_for_load_balancer(
6169        &self,
6170        input: RemoveAvailabilityZonesInput,
6171    ) -> Result<
6172        RemoveAvailabilityZonesOutput,
6173        RusotoError<DisableAvailabilityZonesForLoadBalancerError>,
6174    >;
6175
6176    /// <p>Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.</p> <p>For load balancers in a non-default VPC, use <a>AttachLoadBalancerToSubnets</a>.</p> <p>The load balancer evenly distributes requests across all its registered Availability Zones that contain instances. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html">Add or Remove Availability Zones</a> in the <i>Classic Load Balancers Guide</i>.</p>
6177    async fn enable_availability_zones_for_load_balancer(
6178        &self,
6179        input: AddAvailabilityZonesInput,
6180    ) -> Result<AddAvailabilityZonesOutput, RusotoError<EnableAvailabilityZonesForLoadBalancerError>>;
6181
6182    /// <p><p>Modifies the attributes of the specified load balancer.</p> <p>You can modify the load balancer attributes, such as <code>AccessLogs</code>, <code>ConnectionDraining</code>, and <code>CrossZoneLoadBalancing</code> by either enabling or disabling them. Or, you can modify the load balancer attribute <code>ConnectionSettings</code> by specifying an idle connection timeout value for your load balancer.</p> <p>For more information, see the following in the <i>Classic Load Balancers Guide</i>:</p> <ul> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html">Cross-Zone Load Balancing</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html">Connection Draining</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html">Access Logs</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html">Idle Connection Timeout</a> </p> </li> </ul></p>
6183    async fn modify_load_balancer_attributes(
6184        &self,
6185        input: ModifyLoadBalancerAttributesInput,
6186    ) -> Result<ModifyLoadBalancerAttributesOutput, RusotoError<ModifyLoadBalancerAttributesError>>;
6187
6188    /// <p>Adds the specified instances to the specified load balancer.</p> <p>The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.</p> <p>Note that <code>RegisterInstanceWithLoadBalancer</code> completes when the request has been registered. Instance registration takes a little time to complete. To check the state of the registered instances, use <a>DescribeLoadBalancers</a> or <a>DescribeInstanceHealth</a>.</p> <p>After the instance is registered, it starts receiving traffic and requests from the load balancer. Any instance that is not in one of the Availability Zones registered for the load balancer is moved to the <code>OutOfService</code> state. If an Availability Zone is added to the load balancer later, any instances registered with the load balancer move to the <code>InService</code> state.</p> <p>To deregister instances from a load balancer, use <a>DeregisterInstancesFromLoadBalancer</a>.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html">Register or De-Register EC2 Instances</a> in the <i>Classic Load Balancers Guide</i>.</p>
6189    async fn register_instances_with_load_balancer(
6190        &self,
6191        input: RegisterEndPointsInput,
6192    ) -> Result<RegisterEndPointsOutput, RusotoError<RegisterInstancesWithLoadBalancerError>>;
6193
6194    /// <p>Removes one or more tags from the specified load balancer.</p>
6195    async fn remove_tags(
6196        &self,
6197        input: RemoveTagsInput,
6198    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>>;
6199
6200    /// <p>Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.</p> <p>For more information about updating your SSL certificate, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html">Replace the SSL Certificate for Your Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6201    async fn set_load_balancer_listener_ssl_certificate(
6202        &self,
6203        input: SetLoadBalancerListenerSSLCertificateInput,
6204    ) -> Result<
6205        SetLoadBalancerListenerSSLCertificateOutput,
6206        RusotoError<SetLoadBalancerListenerSSLCertificateError>,
6207    >;
6208
6209    /// <p>Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.</p> <p>Each time you use <code>SetLoadBalancerPoliciesForBackendServer</code> to enable the policies, use the <code>PolicyNames</code> parameter to list the policies that you want to enable.</p> <p>You can use <a>DescribeLoadBalancers</a> or <a>DescribeLoadBalancerPolicies</a> to verify that the policy is associated with the EC2 instance.</p> <p>For more information about enabling back-end instance authentication, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html#configure_backendauth_clt">Configure Back-end Instance Authentication</a> in the <i>Classic Load Balancers Guide</i>. For more information about Proxy Protocol, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html">Configure Proxy Protocol Support</a> in the <i>Classic Load Balancers Guide</i>.</p>
6210    async fn set_load_balancer_policies_for_backend_server(
6211        &self,
6212        input: SetLoadBalancerPoliciesForBackendServerInput,
6213    ) -> Result<
6214        SetLoadBalancerPoliciesForBackendServerOutput,
6215        RusotoError<SetLoadBalancerPoliciesForBackendServerError>,
6216    >;
6217
6218    /// <p>Replaces the current set of policies for the specified load balancer port with the specified set of policies.</p> <p>To enable back-end server authentication, use <a>SetLoadBalancerPoliciesForBackendServer</a>.</p> <p>For more information about setting policies, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ssl-config-update.html">Update the SSL Negotiation Configuration</a>, <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration">Duration-Based Session Stickiness</a>, and <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application">Application-Controlled Session Stickiness</a> in the <i>Classic Load Balancers Guide</i>.</p>
6219    async fn set_load_balancer_policies_of_listener(
6220        &self,
6221        input: SetLoadBalancerPoliciesOfListenerInput,
6222    ) -> Result<
6223        SetLoadBalancerPoliciesOfListenerOutput,
6224        RusotoError<SetLoadBalancerPoliciesOfListenerError>,
6225    >;
6226}
6227/// A client for the Elastic Load Balancing API.
6228#[derive(Clone)]
6229pub struct ElbClient {
6230    client: Client,
6231    region: region::Region,
6232}
6233
6234impl ElbClient {
6235    /// Creates a client backed by the default tokio event loop.
6236    ///
6237    /// The client will use the default credentials provider and tls client.
6238    pub fn new(region: region::Region) -> ElbClient {
6239        ElbClient {
6240            client: Client::shared(),
6241            region,
6242        }
6243    }
6244
6245    pub fn new_with<P, D>(
6246        request_dispatcher: D,
6247        credentials_provider: P,
6248        region: region::Region,
6249    ) -> ElbClient
6250    where
6251        P: ProvideAwsCredentials + Send + Sync + 'static,
6252        D: DispatchSignedRequest + Send + Sync + 'static,
6253    {
6254        ElbClient {
6255            client: Client::new_with(credentials_provider, request_dispatcher),
6256            region,
6257        }
6258    }
6259
6260    pub fn new_with_client(client: Client, region: region::Region) -> ElbClient {
6261        ElbClient { client, region }
6262    }
6263}
6264
6265#[async_trait]
6266impl Elb for ElbClient {
6267    /// <p>Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.</p> <p>Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, <code>AddTags</code> updates its value.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html">Tag Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6268    async fn add_tags(
6269        &self,
6270        input: AddTagsInput,
6271    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>> {
6272        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6273        let params = self.new_params("AddTags");
6274        let mut params = params;
6275        AddTagsInputSerializer::serialize(&mut params, "", &input);
6276        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6277        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6278
6279        let response = self
6280            .sign_and_dispatch(request, AddTagsError::from_response)
6281            .await?;
6282
6283        let result = AddTagsOutput::default();
6284
6285        drop(response); // parse non-payload
6286        Ok(result)
6287    }
6288
6289    /// <p>Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups">Security Groups for Load Balancers in a VPC</a> in the <i>Classic Load Balancers Guide</i>.</p>
6290    async fn apply_security_groups_to_load_balancer(
6291        &self,
6292        input: ApplySecurityGroupsToLoadBalancerInput,
6293    ) -> Result<
6294        ApplySecurityGroupsToLoadBalancerOutput,
6295        RusotoError<ApplySecurityGroupsToLoadBalancerError>,
6296    > {
6297        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6298        let params = self.new_params("ApplySecurityGroupsToLoadBalancer");
6299        let mut params = params;
6300        ApplySecurityGroupsToLoadBalancerInputSerializer::serialize(&mut params, "", &input);
6301        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6302        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6303
6304        let response = self
6305            .sign_and_dispatch(
6306                request,
6307                ApplySecurityGroupsToLoadBalancerError::from_response,
6308            )
6309            .await?;
6310
6311        let mut response = response;
6312        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6313            xml_util::start_element(actual_tag_name, stack)?;
6314            let result = ApplySecurityGroupsToLoadBalancerOutputDeserializer::deserialize(
6315                "ApplySecurityGroupsToLoadBalancerResult",
6316                stack,
6317            )?;
6318            skip_tree(stack);
6319            xml_util::end_element(actual_tag_name, stack)?;
6320            Ok(result)
6321        })
6322        .await?;
6323
6324        drop(response); // parse non-payload
6325        Ok(result)
6326    }
6327
6328    /// <p>Adds one or more subnets to the set of configured subnets for the specified load balancer.</p> <p>The load balancer evenly distributes requests across all registered subnets. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html">Add or Remove Subnets for Your Load Balancer in a VPC</a> in the <i>Classic Load Balancers Guide</i>.</p>
6329    async fn attach_load_balancer_to_subnets(
6330        &self,
6331        input: AttachLoadBalancerToSubnetsInput,
6332    ) -> Result<AttachLoadBalancerToSubnetsOutput, RusotoError<AttachLoadBalancerToSubnetsError>>
6333    {
6334        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6335        let params = self.new_params("AttachLoadBalancerToSubnets");
6336        let mut params = params;
6337        AttachLoadBalancerToSubnetsInputSerializer::serialize(&mut params, "", &input);
6338        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6339        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6340
6341        let response = self
6342            .sign_and_dispatch(request, AttachLoadBalancerToSubnetsError::from_response)
6343            .await?;
6344
6345        let mut response = response;
6346        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6347            xml_util::start_element(actual_tag_name, stack)?;
6348            let result = AttachLoadBalancerToSubnetsOutputDeserializer::deserialize(
6349                "AttachLoadBalancerToSubnetsResult",
6350                stack,
6351            )?;
6352            skip_tree(stack);
6353            xml_util::end_element(actual_tag_name, stack)?;
6354            Ok(result)
6355        })
6356        .await?;
6357
6358        drop(response); // parse non-payload
6359        Ok(result)
6360    }
6361
6362    /// <p>Specifies the health check settings to use when evaluating the health state of your EC2 instances.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html">Configure Health Checks for Your Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6363    async fn configure_health_check(
6364        &self,
6365        input: ConfigureHealthCheckInput,
6366    ) -> Result<ConfigureHealthCheckOutput, RusotoError<ConfigureHealthCheckError>> {
6367        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6368        let params = self.new_params("ConfigureHealthCheck");
6369        let mut params = params;
6370        ConfigureHealthCheckInputSerializer::serialize(&mut params, "", &input);
6371        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6372        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6373
6374        let response = self
6375            .sign_and_dispatch(request, ConfigureHealthCheckError::from_response)
6376            .await?;
6377
6378        let mut response = response;
6379        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6380            xml_util::start_element(actual_tag_name, stack)?;
6381            let result = ConfigureHealthCheckOutputDeserializer::deserialize(
6382                "ConfigureHealthCheckResult",
6383                stack,
6384            )?;
6385            skip_tree(stack);
6386            xml_util::end_element(actual_tag_name, stack)?;
6387            Ok(result)
6388        })
6389        .await?;
6390
6391        drop(response); // parse non-payload
6392        Ok(result)
6393    }
6394
6395    /// <p>Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.</p> <p>This policy is similar to the policy created by <a>CreateLBCookieStickinessPolicy</a>, except that the lifetime of the special Elastic Load Balancing cookie, <code>AWSELB</code>, follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie.</p> <p>If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application">Application-Controlled Session Stickiness</a> in the <i>Classic Load Balancers Guide</i>.</p>
6396    async fn create_app_cookie_stickiness_policy(
6397        &self,
6398        input: CreateAppCookieStickinessPolicyInput,
6399    ) -> Result<
6400        CreateAppCookieStickinessPolicyOutput,
6401        RusotoError<CreateAppCookieStickinessPolicyError>,
6402    > {
6403        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6404        let params = self.new_params("CreateAppCookieStickinessPolicy");
6405        let mut params = params;
6406        CreateAppCookieStickinessPolicyInputSerializer::serialize(&mut params, "", &input);
6407        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6408        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6409
6410        let response = self
6411            .sign_and_dispatch(request, CreateAppCookieStickinessPolicyError::from_response)
6412            .await?;
6413
6414        let result = CreateAppCookieStickinessPolicyOutput::default();
6415
6416        drop(response); // parse non-payload
6417        Ok(result)
6418    }
6419
6420    /// <p>Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.</p> <p>When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.</p> <p>A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration">Duration-Based Session Stickiness</a> in the <i>Classic Load Balancers Guide</i>.</p>
6421    async fn create_lb_cookie_stickiness_policy(
6422        &self,
6423        input: CreateLBCookieStickinessPolicyInput,
6424    ) -> Result<
6425        CreateLBCookieStickinessPolicyOutput,
6426        RusotoError<CreateLBCookieStickinessPolicyError>,
6427    > {
6428        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6429        let params = self.new_params("CreateLBCookieStickinessPolicy");
6430        let mut params = params;
6431        CreateLBCookieStickinessPolicyInputSerializer::serialize(&mut params, "", &input);
6432        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6433        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6434
6435        let response = self
6436            .sign_and_dispatch(request, CreateLBCookieStickinessPolicyError::from_response)
6437            .await?;
6438
6439        let result = CreateLBCookieStickinessPolicyOutput::default();
6440
6441        drop(response); // parse non-payload
6442        Ok(result)
6443    }
6444
6445    /// <p>Creates a Classic Load Balancer.</p> <p>You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using <a>CreateLoadBalancerListeners</a>, <a>ApplySecurityGroupsToLoadBalancer</a>, <a>AttachLoadBalancerToSubnets</a>, and <a>AddTags</a>.</p> <p>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>You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html">Limits for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6446    async fn create_load_balancer(
6447        &self,
6448        input: CreateAccessPointInput,
6449    ) -> Result<CreateAccessPointOutput, RusotoError<CreateLoadBalancerError>> {
6450        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6451        let params = self.new_params("CreateLoadBalancer");
6452        let mut params = params;
6453        CreateAccessPointInputSerializer::serialize(&mut params, "", &input);
6454        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6455        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6456
6457        let response = self
6458            .sign_and_dispatch(request, CreateLoadBalancerError::from_response)
6459            .await?;
6460
6461        let mut response = response;
6462        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6463            xml_util::start_element(actual_tag_name, stack)?;
6464            let result = CreateAccessPointOutputDeserializer::deserialize(
6465                "CreateLoadBalancerResult",
6466                stack,
6467            )?;
6468            skip_tree(stack);
6469            xml_util::end_element(actual_tag_name, stack)?;
6470            Ok(result)
6471        })
6472        .await?;
6473
6474        drop(response); // parse non-payload
6475        Ok(result)
6476    }
6477
6478    /// <p>Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html">Listeners for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6479    async fn create_load_balancer_listeners(
6480        &self,
6481        input: CreateLoadBalancerListenerInput,
6482    ) -> Result<CreateLoadBalancerListenerOutput, RusotoError<CreateLoadBalancerListenersError>>
6483    {
6484        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6485        let params = self.new_params("CreateLoadBalancerListeners");
6486        let mut params = params;
6487        CreateLoadBalancerListenerInputSerializer::serialize(&mut params, "", &input);
6488        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6489        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6490
6491        let response = self
6492            .sign_and_dispatch(request, CreateLoadBalancerListenersError::from_response)
6493            .await?;
6494
6495        let result = CreateLoadBalancerListenerOutput::default();
6496
6497        drop(response); // parse non-payload
6498        Ok(result)
6499    }
6500
6501    /// <p>Creates a policy with the specified attributes for the specified load balancer.</p> <p>Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.</p>
6502    async fn create_load_balancer_policy(
6503        &self,
6504        input: CreateLoadBalancerPolicyInput,
6505    ) -> Result<CreateLoadBalancerPolicyOutput, RusotoError<CreateLoadBalancerPolicyError>> {
6506        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6507        let params = self.new_params("CreateLoadBalancerPolicy");
6508        let mut params = params;
6509        CreateLoadBalancerPolicyInputSerializer::serialize(&mut params, "", &input);
6510        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6511        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6512
6513        let response = self
6514            .sign_and_dispatch(request, CreateLoadBalancerPolicyError::from_response)
6515            .await?;
6516
6517        let result = CreateLoadBalancerPolicyOutput::default();
6518
6519        drop(response); // parse non-payload
6520        Ok(result)
6521    }
6522
6523    /// <p>Deletes the specified load balancer.</p> <p>If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.</p> <p>If the load balancer does not exist or has already been deleted, the call to <code>DeleteLoadBalancer</code> still succeeds.</p>
6524    async fn delete_load_balancer(
6525        &self,
6526        input: DeleteAccessPointInput,
6527    ) -> Result<DeleteAccessPointOutput, RusotoError<DeleteLoadBalancerError>> {
6528        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6529        let params = self.new_params("DeleteLoadBalancer");
6530        let mut params = params;
6531        DeleteAccessPointInputSerializer::serialize(&mut params, "", &input);
6532        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6533        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6534
6535        let response = self
6536            .sign_and_dispatch(request, DeleteLoadBalancerError::from_response)
6537            .await?;
6538
6539        let result = DeleteAccessPointOutput::default();
6540
6541        drop(response); // parse non-payload
6542        Ok(result)
6543    }
6544
6545    /// <p>Deletes the specified listeners from the specified load balancer.</p>
6546    async fn delete_load_balancer_listeners(
6547        &self,
6548        input: DeleteLoadBalancerListenerInput,
6549    ) -> Result<DeleteLoadBalancerListenerOutput, RusotoError<DeleteLoadBalancerListenersError>>
6550    {
6551        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6552        let params = self.new_params("DeleteLoadBalancerListeners");
6553        let mut params = params;
6554        DeleteLoadBalancerListenerInputSerializer::serialize(&mut params, "", &input);
6555        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6556        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6557
6558        let response = self
6559            .sign_and_dispatch(request, DeleteLoadBalancerListenersError::from_response)
6560            .await?;
6561
6562        let result = DeleteLoadBalancerListenerOutput::default();
6563
6564        drop(response); // parse non-payload
6565        Ok(result)
6566    }
6567
6568    /// <p>Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.</p>
6569    async fn delete_load_balancer_policy(
6570        &self,
6571        input: DeleteLoadBalancerPolicyInput,
6572    ) -> Result<DeleteLoadBalancerPolicyOutput, RusotoError<DeleteLoadBalancerPolicyError>> {
6573        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6574        let params = self.new_params("DeleteLoadBalancerPolicy");
6575        let mut params = params;
6576        DeleteLoadBalancerPolicyInputSerializer::serialize(&mut params, "", &input);
6577        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6578        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6579
6580        let response = self
6581            .sign_and_dispatch(request, DeleteLoadBalancerPolicyError::from_response)
6582            .await?;
6583
6584        let result = DeleteLoadBalancerPolicyOutput::default();
6585
6586        drop(response); // parse non-payload
6587        Ok(result)
6588    }
6589
6590    /// <p>Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.</p> <p>You can use <a>DescribeLoadBalancers</a> to verify that the instance is deregistered from the load balancer.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html">Register or De-Register EC2 Instances</a> in the <i>Classic Load Balancers Guide</i>.</p>
6591    async fn deregister_instances_from_load_balancer(
6592        &self,
6593        input: DeregisterEndPointsInput,
6594    ) -> Result<DeregisterEndPointsOutput, RusotoError<DeregisterInstancesFromLoadBalancerError>>
6595    {
6596        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6597        let params = self.new_params("DeregisterInstancesFromLoadBalancer");
6598        let mut params = params;
6599        DeregisterEndPointsInputSerializer::serialize(&mut params, "", &input);
6600        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6601        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6602
6603        let response = self
6604            .sign_and_dispatch(
6605                request,
6606                DeregisterInstancesFromLoadBalancerError::from_response,
6607            )
6608            .await?;
6609
6610        let mut response = response;
6611        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6612            xml_util::start_element(actual_tag_name, stack)?;
6613            let result = DeregisterEndPointsOutputDeserializer::deserialize(
6614                "DeregisterInstancesFromLoadBalancerResult",
6615                stack,
6616            )?;
6617            skip_tree(stack);
6618            xml_util::end_element(actual_tag_name, stack)?;
6619            Ok(result)
6620        })
6621        .await?;
6622
6623        drop(response); // parse non-payload
6624        Ok(result)
6625    }
6626
6627    /// <p>Describes the current Elastic Load Balancing resource limits for your AWS account.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html">Limits for Your Classic Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
6628    async fn describe_account_limits(
6629        &self,
6630        input: DescribeAccountLimitsInput,
6631    ) -> Result<DescribeAccountLimitsOutput, RusotoError<DescribeAccountLimitsError>> {
6632        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6633        let params = self.new_params("DescribeAccountLimits");
6634        let mut params = params;
6635        DescribeAccountLimitsInputSerializer::serialize(&mut params, "", &input);
6636        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6637        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6638
6639        let response = self
6640            .sign_and_dispatch(request, DescribeAccountLimitsError::from_response)
6641            .await?;
6642
6643        let mut response = response;
6644        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6645            xml_util::start_element(actual_tag_name, stack)?;
6646            let result = DescribeAccountLimitsOutputDeserializer::deserialize(
6647                "DescribeAccountLimitsResult",
6648                stack,
6649            )?;
6650            skip_tree(stack);
6651            xml_util::end_element(actual_tag_name, stack)?;
6652            Ok(result)
6653        })
6654        .await?;
6655
6656        drop(response); // parse non-payload
6657        Ok(result)
6658    }
6659
6660    /// <p>Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.</p>
6661    async fn describe_instance_health(
6662        &self,
6663        input: DescribeEndPointStateInput,
6664    ) -> Result<DescribeEndPointStateOutput, RusotoError<DescribeInstanceHealthError>> {
6665        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6666        let params = self.new_params("DescribeInstanceHealth");
6667        let mut params = params;
6668        DescribeEndPointStateInputSerializer::serialize(&mut params, "", &input);
6669        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6670        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6671
6672        let response = self
6673            .sign_and_dispatch(request, DescribeInstanceHealthError::from_response)
6674            .await?;
6675
6676        let mut response = response;
6677        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6678            xml_util::start_element(actual_tag_name, stack)?;
6679            let result = DescribeEndPointStateOutputDeserializer::deserialize(
6680                "DescribeInstanceHealthResult",
6681                stack,
6682            )?;
6683            skip_tree(stack);
6684            xml_util::end_element(actual_tag_name, stack)?;
6685            Ok(result)
6686        })
6687        .await?;
6688
6689        drop(response); // parse non-payload
6690        Ok(result)
6691    }
6692
6693    /// <p>Describes the attributes for the specified load balancer.</p>
6694    async fn describe_load_balancer_attributes(
6695        &self,
6696        input: DescribeLoadBalancerAttributesInput,
6697    ) -> Result<
6698        DescribeLoadBalancerAttributesOutput,
6699        RusotoError<DescribeLoadBalancerAttributesError>,
6700    > {
6701        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6702        let params = self.new_params("DescribeLoadBalancerAttributes");
6703        let mut params = params;
6704        DescribeLoadBalancerAttributesInputSerializer::serialize(&mut params, "", &input);
6705        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6706        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6707
6708        let response = self
6709            .sign_and_dispatch(request, DescribeLoadBalancerAttributesError::from_response)
6710            .await?;
6711
6712        let mut response = response;
6713        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6714            xml_util::start_element(actual_tag_name, stack)?;
6715            let result = DescribeLoadBalancerAttributesOutputDeserializer::deserialize(
6716                "DescribeLoadBalancerAttributesResult",
6717                stack,
6718            )?;
6719            skip_tree(stack);
6720            xml_util::end_element(actual_tag_name, stack)?;
6721            Ok(result)
6722        })
6723        .await?;
6724
6725        drop(response); // parse non-payload
6726        Ok(result)
6727    }
6728
6729    /// <p>Describes the specified policies.</p> <p>If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer. If you specify a policy name associated with your load balancer, the action returns the description of that policy. If you don't specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies. The names of the sample policies have the <code>ELBSample-</code> prefix.</p>
6730    async fn describe_load_balancer_policies(
6731        &self,
6732        input: DescribeLoadBalancerPoliciesInput,
6733    ) -> Result<DescribeLoadBalancerPoliciesOutput, RusotoError<DescribeLoadBalancerPoliciesError>>
6734    {
6735        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6736        let params = self.new_params("DescribeLoadBalancerPolicies");
6737        let mut params = params;
6738        DescribeLoadBalancerPoliciesInputSerializer::serialize(&mut params, "", &input);
6739        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6740        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6741
6742        let response = self
6743            .sign_and_dispatch(request, DescribeLoadBalancerPoliciesError::from_response)
6744            .await?;
6745
6746        let mut response = response;
6747        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6748            xml_util::start_element(actual_tag_name, stack)?;
6749            let result = DescribeLoadBalancerPoliciesOutputDeserializer::deserialize(
6750                "DescribeLoadBalancerPoliciesResult",
6751                stack,
6752            )?;
6753            skip_tree(stack);
6754            xml_util::end_element(actual_tag_name, stack)?;
6755            Ok(result)
6756        })
6757        .await?;
6758
6759        drop(response); // parse non-payload
6760        Ok(result)
6761    }
6762
6763    /// <p>Describes the specified load balancer policy types or all load balancer policy types.</p> <p>The description of each type indicates how it can be used. For example, some policies can be used only with layer 7 listeners, some policies can be used only with layer 4 listeners, and some policies can be used only with your EC2 instances.</p> <p>You can use <a>CreateLoadBalancerPolicy</a> to create a policy configuration for any of these policy types. Then, depending on the policy type, use either <a>SetLoadBalancerPoliciesOfListener</a> or <a>SetLoadBalancerPoliciesForBackendServer</a> to set the policy.</p>
6764    async fn describe_load_balancer_policy_types(
6765        &self,
6766        input: DescribeLoadBalancerPolicyTypesInput,
6767    ) -> Result<
6768        DescribeLoadBalancerPolicyTypesOutput,
6769        RusotoError<DescribeLoadBalancerPolicyTypesError>,
6770    > {
6771        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6772        let params = self.new_params("DescribeLoadBalancerPolicyTypes");
6773        let mut params = params;
6774        DescribeLoadBalancerPolicyTypesInputSerializer::serialize(&mut params, "", &input);
6775        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6776        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6777
6778        let response = self
6779            .sign_and_dispatch(request, DescribeLoadBalancerPolicyTypesError::from_response)
6780            .await?;
6781
6782        let mut response = response;
6783        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6784            xml_util::start_element(actual_tag_name, stack)?;
6785            let result = DescribeLoadBalancerPolicyTypesOutputDeserializer::deserialize(
6786                "DescribeLoadBalancerPolicyTypesResult",
6787                stack,
6788            )?;
6789            skip_tree(stack);
6790            xml_util::end_element(actual_tag_name, stack)?;
6791            Ok(result)
6792        })
6793        .await?;
6794
6795        drop(response); // parse non-payload
6796        Ok(result)
6797    }
6798
6799    /// <p>Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.</p>
6800    async fn describe_load_balancers(
6801        &self,
6802        input: DescribeAccessPointsInput,
6803    ) -> Result<DescribeAccessPointsOutput, RusotoError<DescribeLoadBalancersError>> {
6804        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6805        let params = self.new_params("DescribeLoadBalancers");
6806        let mut params = params;
6807        DescribeAccessPointsInputSerializer::serialize(&mut params, "", &input);
6808        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6809        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6810
6811        let response = self
6812            .sign_and_dispatch(request, DescribeLoadBalancersError::from_response)
6813            .await?;
6814
6815        let mut response = response;
6816        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6817            xml_util::start_element(actual_tag_name, stack)?;
6818            let result = DescribeAccessPointsOutputDeserializer::deserialize(
6819                "DescribeLoadBalancersResult",
6820                stack,
6821            )?;
6822            skip_tree(stack);
6823            xml_util::end_element(actual_tag_name, stack)?;
6824            Ok(result)
6825        })
6826        .await?;
6827
6828        drop(response); // parse non-payload
6829        Ok(result)
6830    }
6831
6832    /// <p>Describes the tags associated with the specified load balancers.</p>
6833    async fn describe_tags(
6834        &self,
6835        input: DescribeTagsInput,
6836    ) -> Result<DescribeTagsOutput, RusotoError<DescribeTagsError>> {
6837        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6838        let params = self.new_params("DescribeTags");
6839        let mut params = params;
6840        DescribeTagsInputSerializer::serialize(&mut params, "", &input);
6841        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6842        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6843
6844        let response = self
6845            .sign_and_dispatch(request, DescribeTagsError::from_response)
6846            .await?;
6847
6848        let mut response = response;
6849        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6850            xml_util::start_element(actual_tag_name, stack)?;
6851            let result = DescribeTagsOutputDeserializer::deserialize("DescribeTagsResult", stack)?;
6852            skip_tree(stack);
6853            xml_util::end_element(actual_tag_name, stack)?;
6854            Ok(result)
6855        })
6856        .await?;
6857
6858        drop(response); // parse non-payload
6859        Ok(result)
6860    }
6861
6862    /// <p>Removes the specified subnets from the set of configured subnets for the load balancer.</p> <p>After a subnet is removed, all EC2 instances registered with the load balancer in the removed subnet go into the <code>OutOfService</code> state. Then, the load balancer balances the traffic among the remaining routable subnets.</p>
6863    async fn detach_load_balancer_from_subnets(
6864        &self,
6865        input: DetachLoadBalancerFromSubnetsInput,
6866    ) -> Result<DetachLoadBalancerFromSubnetsOutput, RusotoError<DetachLoadBalancerFromSubnetsError>>
6867    {
6868        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6869        let params = self.new_params("DetachLoadBalancerFromSubnets");
6870        let mut params = params;
6871        DetachLoadBalancerFromSubnetsInputSerializer::serialize(&mut params, "", &input);
6872        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6873        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6874
6875        let response = self
6876            .sign_and_dispatch(request, DetachLoadBalancerFromSubnetsError::from_response)
6877            .await?;
6878
6879        let mut response = response;
6880        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6881            xml_util::start_element(actual_tag_name, stack)?;
6882            let result = DetachLoadBalancerFromSubnetsOutputDeserializer::deserialize(
6883                "DetachLoadBalancerFromSubnetsResult",
6884                stack,
6885            )?;
6886            skip_tree(stack);
6887            xml_util::end_element(actual_tag_name, stack)?;
6888            Ok(result)
6889        })
6890        .await?;
6891
6892        drop(response); // parse non-payload
6893        Ok(result)
6894    }
6895
6896    /// <p>Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.</p> <p>For load balancers in a non-default VPC, use <a>DetachLoadBalancerFromSubnets</a>.</p> <p>There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the <code>OutOfService</code> state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html">Add or Remove Availability Zones</a> in the <i>Classic Load Balancers Guide</i>.</p>
6897    async fn disable_availability_zones_for_load_balancer(
6898        &self,
6899        input: RemoveAvailabilityZonesInput,
6900    ) -> Result<
6901        RemoveAvailabilityZonesOutput,
6902        RusotoError<DisableAvailabilityZonesForLoadBalancerError>,
6903    > {
6904        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6905        let params = self.new_params("DisableAvailabilityZonesForLoadBalancer");
6906        let mut params = params;
6907        RemoveAvailabilityZonesInputSerializer::serialize(&mut params, "", &input);
6908        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6909        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6910
6911        let response = self
6912            .sign_and_dispatch(
6913                request,
6914                DisableAvailabilityZonesForLoadBalancerError::from_response,
6915            )
6916            .await?;
6917
6918        let mut response = response;
6919        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6920            xml_util::start_element(actual_tag_name, stack)?;
6921            let result = RemoveAvailabilityZonesOutputDeserializer::deserialize(
6922                "DisableAvailabilityZonesForLoadBalancerResult",
6923                stack,
6924            )?;
6925            skip_tree(stack);
6926            xml_util::end_element(actual_tag_name, stack)?;
6927            Ok(result)
6928        })
6929        .await?;
6930
6931        drop(response); // parse non-payload
6932        Ok(result)
6933    }
6934
6935    /// <p>Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.</p> <p>For load balancers in a non-default VPC, use <a>AttachLoadBalancerToSubnets</a>.</p> <p>The load balancer evenly distributes requests across all its registered Availability Zones that contain instances. For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html">Add or Remove Availability Zones</a> in the <i>Classic Load Balancers Guide</i>.</p>
6936    async fn enable_availability_zones_for_load_balancer(
6937        &self,
6938        input: AddAvailabilityZonesInput,
6939    ) -> Result<AddAvailabilityZonesOutput, RusotoError<EnableAvailabilityZonesForLoadBalancerError>>
6940    {
6941        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6942        let params = self.new_params("EnableAvailabilityZonesForLoadBalancer");
6943        let mut params = params;
6944        AddAvailabilityZonesInputSerializer::serialize(&mut params, "", &input);
6945        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6946        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6947
6948        let response = self
6949            .sign_and_dispatch(
6950                request,
6951                EnableAvailabilityZonesForLoadBalancerError::from_response,
6952            )
6953            .await?;
6954
6955        let mut response = response;
6956        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6957            xml_util::start_element(actual_tag_name, stack)?;
6958            let result = AddAvailabilityZonesOutputDeserializer::deserialize(
6959                "EnableAvailabilityZonesForLoadBalancerResult",
6960                stack,
6961            )?;
6962            skip_tree(stack);
6963            xml_util::end_element(actual_tag_name, stack)?;
6964            Ok(result)
6965        })
6966        .await?;
6967
6968        drop(response); // parse non-payload
6969        Ok(result)
6970    }
6971
6972    /// <p><p>Modifies the attributes of the specified load balancer.</p> <p>You can modify the load balancer attributes, such as <code>AccessLogs</code>, <code>ConnectionDraining</code>, and <code>CrossZoneLoadBalancing</code> by either enabling or disabling them. Or, you can modify the load balancer attribute <code>ConnectionSettings</code> by specifying an idle connection timeout value for your load balancer.</p> <p>For more information, see the following in the <i>Classic Load Balancers Guide</i>:</p> <ul> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html">Cross-Zone Load Balancing</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html">Connection Draining</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html">Access Logs</a> </p> </li> <li> <p> <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html">Idle Connection Timeout</a> </p> </li> </ul></p>
6973    async fn modify_load_balancer_attributes(
6974        &self,
6975        input: ModifyLoadBalancerAttributesInput,
6976    ) -> Result<ModifyLoadBalancerAttributesOutput, RusotoError<ModifyLoadBalancerAttributesError>>
6977    {
6978        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
6979        let params = self.new_params("ModifyLoadBalancerAttributes");
6980        let mut params = params;
6981        ModifyLoadBalancerAttributesInputSerializer::serialize(&mut params, "", &input);
6982        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
6983        request.set_content_type("application/x-www-form-urlencoded".to_owned());
6984
6985        let response = self
6986            .sign_and_dispatch(request, ModifyLoadBalancerAttributesError::from_response)
6987            .await?;
6988
6989        let mut response = response;
6990        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
6991            xml_util::start_element(actual_tag_name, stack)?;
6992            let result = ModifyLoadBalancerAttributesOutputDeserializer::deserialize(
6993                "ModifyLoadBalancerAttributesResult",
6994                stack,
6995            )?;
6996            skip_tree(stack);
6997            xml_util::end_element(actual_tag_name, stack)?;
6998            Ok(result)
6999        })
7000        .await?;
7001
7002        drop(response); // parse non-payload
7003        Ok(result)
7004    }
7005
7006    /// <p>Adds the specified instances to the specified load balancer.</p> <p>The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.</p> <p>Note that <code>RegisterInstanceWithLoadBalancer</code> completes when the request has been registered. Instance registration takes a little time to complete. To check the state of the registered instances, use <a>DescribeLoadBalancers</a> or <a>DescribeInstanceHealth</a>.</p> <p>After the instance is registered, it starts receiving traffic and requests from the load balancer. Any instance that is not in one of the Availability Zones registered for the load balancer is moved to the <code>OutOfService</code> state. If an Availability Zone is added to the load balancer later, any instances registered with the load balancer move to the <code>InService</code> state.</p> <p>To deregister instances from a load balancer, use <a>DeregisterInstancesFromLoadBalancer</a>.</p> <p>For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html">Register or De-Register EC2 Instances</a> in the <i>Classic Load Balancers Guide</i>.</p>
7007    async fn register_instances_with_load_balancer(
7008        &self,
7009        input: RegisterEndPointsInput,
7010    ) -> Result<RegisterEndPointsOutput, RusotoError<RegisterInstancesWithLoadBalancerError>> {
7011        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
7012        let params = self.new_params("RegisterInstancesWithLoadBalancer");
7013        let mut params = params;
7014        RegisterEndPointsInputSerializer::serialize(&mut params, "", &input);
7015        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
7016        request.set_content_type("application/x-www-form-urlencoded".to_owned());
7017
7018        let response = self
7019            .sign_and_dispatch(
7020                request,
7021                RegisterInstancesWithLoadBalancerError::from_response,
7022            )
7023            .await?;
7024
7025        let mut response = response;
7026        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
7027            xml_util::start_element(actual_tag_name, stack)?;
7028            let result = RegisterEndPointsOutputDeserializer::deserialize(
7029                "RegisterInstancesWithLoadBalancerResult",
7030                stack,
7031            )?;
7032            skip_tree(stack);
7033            xml_util::end_element(actual_tag_name, stack)?;
7034            Ok(result)
7035        })
7036        .await?;
7037
7038        drop(response); // parse non-payload
7039        Ok(result)
7040    }
7041
7042    /// <p>Removes one or more tags from the specified load balancer.</p>
7043    async fn remove_tags(
7044        &self,
7045        input: RemoveTagsInput,
7046    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>> {
7047        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
7048        let params = self.new_params("RemoveTags");
7049        let mut params = params;
7050        RemoveTagsInputSerializer::serialize(&mut params, "", &input);
7051        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
7052        request.set_content_type("application/x-www-form-urlencoded".to_owned());
7053
7054        let response = self
7055            .sign_and_dispatch(request, RemoveTagsError::from_response)
7056            .await?;
7057
7058        let result = RemoveTagsOutput::default();
7059
7060        drop(response); // parse non-payload
7061        Ok(result)
7062    }
7063
7064    /// <p>Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.</p> <p>For more information about updating your SSL certificate, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html">Replace the SSL Certificate for Your Load Balancer</a> in the <i>Classic Load Balancers Guide</i>.</p>
7065    async fn set_load_balancer_listener_ssl_certificate(
7066        &self,
7067        input: SetLoadBalancerListenerSSLCertificateInput,
7068    ) -> Result<
7069        SetLoadBalancerListenerSSLCertificateOutput,
7070        RusotoError<SetLoadBalancerListenerSSLCertificateError>,
7071    > {
7072        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
7073        let params = self.new_params("SetLoadBalancerListenerSSLCertificate");
7074        let mut params = params;
7075        SetLoadBalancerListenerSSLCertificateInputSerializer::serialize(&mut params, "", &input);
7076        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
7077        request.set_content_type("application/x-www-form-urlencoded".to_owned());
7078
7079        let response = self
7080            .sign_and_dispatch(
7081                request,
7082                SetLoadBalancerListenerSSLCertificateError::from_response,
7083            )
7084            .await?;
7085
7086        let result = SetLoadBalancerListenerSSLCertificateOutput::default();
7087
7088        drop(response); // parse non-payload
7089        Ok(result)
7090    }
7091
7092    /// <p>Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.</p> <p>Each time you use <code>SetLoadBalancerPoliciesForBackendServer</code> to enable the policies, use the <code>PolicyNames</code> parameter to list the policies that you want to enable.</p> <p>You can use <a>DescribeLoadBalancers</a> or <a>DescribeLoadBalancerPolicies</a> to verify that the policy is associated with the EC2 instance.</p> <p>For more information about enabling back-end instance authentication, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html#configure_backendauth_clt">Configure Back-end Instance Authentication</a> in the <i>Classic Load Balancers Guide</i>. For more information about Proxy Protocol, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html">Configure Proxy Protocol Support</a> in the <i>Classic Load Balancers Guide</i>.</p>
7093    async fn set_load_balancer_policies_for_backend_server(
7094        &self,
7095        input: SetLoadBalancerPoliciesForBackendServerInput,
7096    ) -> Result<
7097        SetLoadBalancerPoliciesForBackendServerOutput,
7098        RusotoError<SetLoadBalancerPoliciesForBackendServerError>,
7099    > {
7100        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
7101        let params = self.new_params("SetLoadBalancerPoliciesForBackendServer");
7102        let mut params = params;
7103        SetLoadBalancerPoliciesForBackendServerInputSerializer::serialize(&mut params, "", &input);
7104        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
7105        request.set_content_type("application/x-www-form-urlencoded".to_owned());
7106
7107        let response = self
7108            .sign_and_dispatch(
7109                request,
7110                SetLoadBalancerPoliciesForBackendServerError::from_response,
7111            )
7112            .await?;
7113
7114        let result = SetLoadBalancerPoliciesForBackendServerOutput::default();
7115
7116        drop(response); // parse non-payload
7117        Ok(result)
7118    }
7119
7120    /// <p>Replaces the current set of policies for the specified load balancer port with the specified set of policies.</p> <p>To enable back-end server authentication, use <a>SetLoadBalancerPoliciesForBackendServer</a>.</p> <p>For more information about setting policies, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ssl-config-update.html">Update the SSL Negotiation Configuration</a>, <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration">Duration-Based Session Stickiness</a>, and <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application">Application-Controlled Session Stickiness</a> in the <i>Classic Load Balancers Guide</i>.</p>
7121    async fn set_load_balancer_policies_of_listener(
7122        &self,
7123        input: SetLoadBalancerPoliciesOfListenerInput,
7124    ) -> Result<
7125        SetLoadBalancerPoliciesOfListenerOutput,
7126        RusotoError<SetLoadBalancerPoliciesOfListenerError>,
7127    > {
7128        let mut request = SignedRequest::new("POST", "elasticloadbalancing", &self.region, "/");
7129        let params = self.new_params("SetLoadBalancerPoliciesOfListener");
7130        let mut params = params;
7131        SetLoadBalancerPoliciesOfListenerInputSerializer::serialize(&mut params, "", &input);
7132        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
7133        request.set_content_type("application/x-www-form-urlencoded".to_owned());
7134
7135        let response = self
7136            .sign_and_dispatch(
7137                request,
7138                SetLoadBalancerPoliciesOfListenerError::from_response,
7139            )
7140            .await?;
7141
7142        let result = SetLoadBalancerPoliciesOfListenerOutput::default();
7143
7144        drop(response); // parse non-payload
7145        Ok(result)
7146    }
7147}
7148
7149#[cfg(test)]
7150mod protocol_tests {
7151
7152    extern crate rusoto_mock;
7153
7154    use self::rusoto_mock::*;
7155    use super::*;
7156    use rusoto_core::Region as rusoto_region;
7157
7158    #[tokio::test]
7159    async fn test_parse_error_elb_describe_load_balancers() {
7160        let mock_response = MockResponseReader::read_response(
7161            "test_resources/generated/error",
7162            "elb-describe-load-balancers.xml",
7163        );
7164        let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
7165        let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
7166        let request = DescribeAccessPointsInput::default();
7167        let result = client.describe_load_balancers(request).await;
7168        assert!(!result.is_ok(), "parse error: {:?}", result);
7169    }
7170
7171    #[tokio::test]
7172    async fn test_parse_valid_elb_describe_load_balancer_policies() {
7173        let mock_response = MockResponseReader::read_response(
7174            "test_resources/generated/valid",
7175            "elb-describe-load-balancer-policies.xml",
7176        );
7177        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
7178        let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
7179        let request = DescribeLoadBalancerPoliciesInput::default();
7180        let result = client.describe_load_balancer_policies(request).await;
7181        assert!(result.is_ok(), "parse error: {:?}", result);
7182    }
7183
7184    #[tokio::test]
7185    async fn test_parse_valid_elb_describe_load_balancer_policy_types() {
7186        let mock_response = MockResponseReader::read_response(
7187            "test_resources/generated/valid",
7188            "elb-describe-load-balancer-policy-types.xml",
7189        );
7190        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
7191        let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
7192        let request = DescribeLoadBalancerPolicyTypesInput::default();
7193        let result = client.describe_load_balancer_policy_types(request).await;
7194        assert!(result.is_ok(), "parse error: {:?}", result);
7195    }
7196
7197    #[tokio::test]
7198    async fn test_parse_valid_elb_describe_load_balancers() {
7199        let mock_response = MockResponseReader::read_response(
7200            "test_resources/generated/valid",
7201            "elb-describe-load-balancers.xml",
7202        );
7203        let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
7204        let client = ElbClient::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
7205        let request = DescribeAccessPointsInput::default();
7206        let result = client.describe_load_balancers(request).await;
7207        assert!(result.is_ok(), "parse error: {:?}", result);
7208    }
7209}