rusoto_elasticache/
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 ElastiCacheClient {
39    fn new_params(&self, operation_name: &str) -> Params {
40        let mut params = Params::new();
41
42        params.put("Action", operation_name);
43        params.put("Version", "2015-02-02");
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>Represents the input of an AddTagsToResource operation.</p>
64#[derive(Clone, Debug, Default, PartialEq)]
65#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
66pub struct AddTagsToResourceMessage {
67    /// <p>The Amazon Resource Name (ARN) of the resource to which the tags are to be added, for example <code>arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster</code> or <code>arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot</code>. ElastiCache resources are <i>cluster</i> and <i>snapshot</i>.</p> <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>.</p>
68    pub resource_name: String,
69    /// <p>A list of cost allocation tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value.</p>
70    pub tags: Vec<Tag>,
71}
72
73/// Serialize `AddTagsToResourceMessage` contents to a `SignedRequest`.
74struct AddTagsToResourceMessageSerializer;
75impl AddTagsToResourceMessageSerializer {
76    fn serialize(params: &mut Params, name: &str, obj: &AddTagsToResourceMessage) {
77        let mut prefix = name.to_string();
78        if prefix != "" {
79            prefix.push_str(".");
80        }
81
82        params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
83        TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), &obj.tags);
84    }
85}
86
87#[allow(dead_code)]
88struct AllowedNodeGroupIdDeserializer;
89impl AllowedNodeGroupIdDeserializer {
90    #[allow(dead_code, unused_variables)]
91    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
92        xml_util::deserialize_primitive(tag_name, stack, Ok)
93    }
94}
95/// <p>Represents the allowed node types you can use to modify your cluster or replication group.</p>
96#[derive(Clone, Debug, Default, PartialEq)]
97#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
98pub struct AllowedNodeTypeModificationsMessage {
99    /// <p>A string list, each element of which specifies a cache node type which you can use to scale your cluster or replication group. When scaling down a Redis cluster or replication group using ModifyCacheCluster or ModifyReplicationGroup, use a value from this list for the CacheNodeType parameter. </p>
100    pub scale_down_modifications: Option<Vec<String>>,
101    /// <p>A string list, each element of which specifies a cache node type which you can use to scale your cluster or replication group.</p> <p>When scaling up a Redis cluster or replication group using <code>ModifyCacheCluster</code> or <code>ModifyReplicationGroup</code>, use a value from this list for the <code>CacheNodeType</code> parameter.</p>
102    pub scale_up_modifications: Option<Vec<String>>,
103}
104
105#[allow(dead_code)]
106struct AllowedNodeTypeModificationsMessageDeserializer;
107impl AllowedNodeTypeModificationsMessageDeserializer {
108    #[allow(dead_code, unused_variables)]
109    fn deserialize<T: Peek + Next>(
110        tag_name: &str,
111        stack: &mut T,
112    ) -> Result<AllowedNodeTypeModificationsMessage, XmlParseError> {
113        deserialize_elements::<_, AllowedNodeTypeModificationsMessage, _>(
114            tag_name,
115            stack,
116            |name, stack, obj| {
117                match name {
118                    "ScaleDownModifications" => {
119                        obj.scale_down_modifications.get_or_insert(vec![]).extend(
120                            NodeTypeListDeserializer::deserialize("ScaleDownModifications", stack)?,
121                        );
122                    }
123                    "ScaleUpModifications" => {
124                        obj.scale_up_modifications.get_or_insert(vec![]).extend(
125                            NodeTypeListDeserializer::deserialize("ScaleUpModifications", stack)?,
126                        );
127                    }
128                    _ => skip_tree(stack),
129                }
130                Ok(())
131            },
132        )
133    }
134}
135#[allow(dead_code)]
136struct AuthTokenUpdateStatusDeserializer;
137impl AuthTokenUpdateStatusDeserializer {
138    #[allow(dead_code, unused_variables)]
139    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
140        xml_util::deserialize_primitive(tag_name, stack, Ok)
141    }
142}
143/// <p>Represents the input of an AuthorizeCacheSecurityGroupIngress operation.</p>
144#[derive(Clone, Debug, Default, PartialEq)]
145#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
146pub struct AuthorizeCacheSecurityGroupIngressMessage {
147    /// <p>The cache security group that allows network ingress.</p>
148    pub cache_security_group_name: String,
149    /// <p>The Amazon EC2 security group to be authorized for ingress to the cache security group.</p>
150    pub ec2_security_group_name: String,
151    /// <p>The AWS account number of the Amazon EC2 security group owner. Note that this is not the same thing as an AWS access key ID - you must provide a valid AWS account number for this parameter.</p>
152    pub ec2_security_group_owner_id: String,
153}
154
155/// Serialize `AuthorizeCacheSecurityGroupIngressMessage` contents to a `SignedRequest`.
156struct AuthorizeCacheSecurityGroupIngressMessageSerializer;
157impl AuthorizeCacheSecurityGroupIngressMessageSerializer {
158    fn serialize(params: &mut Params, name: &str, obj: &AuthorizeCacheSecurityGroupIngressMessage) {
159        let mut prefix = name.to_string();
160        if prefix != "" {
161            prefix.push_str(".");
162        }
163
164        params.put(
165            &format!("{}{}", prefix, "CacheSecurityGroupName"),
166            &obj.cache_security_group_name,
167        );
168        params.put(
169            &format!("{}{}", prefix, "EC2SecurityGroupName"),
170            &obj.ec2_security_group_name,
171        );
172        params.put(
173            &format!("{}{}", prefix, "EC2SecurityGroupOwnerId"),
174            &obj.ec2_security_group_owner_id,
175        );
176    }
177}
178
179#[derive(Clone, Debug, Default, PartialEq)]
180#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
181pub struct AuthorizeCacheSecurityGroupIngressResult {
182    pub cache_security_group: Option<CacheSecurityGroup>,
183}
184
185#[allow(dead_code)]
186struct AuthorizeCacheSecurityGroupIngressResultDeserializer;
187impl AuthorizeCacheSecurityGroupIngressResultDeserializer {
188    #[allow(dead_code, unused_variables)]
189    fn deserialize<T: Peek + Next>(
190        tag_name: &str,
191        stack: &mut T,
192    ) -> Result<AuthorizeCacheSecurityGroupIngressResult, XmlParseError> {
193        deserialize_elements::<_, AuthorizeCacheSecurityGroupIngressResult, _>(
194            tag_name,
195            stack,
196            |name, stack, obj| {
197                match name {
198                    "CacheSecurityGroup" => {
199                        obj.cache_security_group =
200                            Some(CacheSecurityGroupDeserializer::deserialize(
201                                "CacheSecurityGroup",
202                                stack,
203                            )?);
204                    }
205                    _ => skip_tree(stack),
206                }
207                Ok(())
208            },
209        )
210    }
211}
212#[allow(dead_code)]
213struct AutomaticFailoverStatusDeserializer;
214impl AutomaticFailoverStatusDeserializer {
215    #[allow(dead_code, unused_variables)]
216    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
217        xml_util::deserialize_primitive(tag_name, stack, Ok)
218    }
219}
220/// <p>Describes an Availability Zone in which the cluster is launched.</p>
221#[derive(Clone, Debug, Default, PartialEq)]
222#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
223pub struct AvailabilityZone {
224    /// <p>The name of the Availability Zone.</p>
225    pub name: Option<String>,
226}
227
228#[allow(dead_code)]
229struct AvailabilityZoneDeserializer;
230impl AvailabilityZoneDeserializer {
231    #[allow(dead_code, unused_variables)]
232    fn deserialize<T: Peek + Next>(
233        tag_name: &str,
234        stack: &mut T,
235    ) -> Result<AvailabilityZone, XmlParseError> {
236        deserialize_elements::<_, AvailabilityZone, _>(tag_name, stack, |name, stack, obj| {
237            match name {
238                "Name" => {
239                    obj.name = Some(StringDeserializer::deserialize("Name", stack)?);
240                }
241                _ => skip_tree(stack),
242            }
243            Ok(())
244        })
245    }
246}
247#[allow(dead_code)]
248struct AvailabilityZonesListDeserializer;
249impl AvailabilityZonesListDeserializer {
250    #[allow(dead_code, unused_variables)]
251    fn deserialize<T: Peek + Next>(
252        tag_name: &str,
253        stack: &mut T,
254    ) -> Result<Vec<String>, XmlParseError> {
255        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
256            if name == "AvailabilityZone" {
257                obj.push(StringDeserializer::deserialize("AvailabilityZone", stack)?);
258            } else {
259                skip_tree(stack);
260            }
261            Ok(())
262        })
263    }
264}
265
266/// Serialize `AvailabilityZonesList` contents to a `SignedRequest`.
267struct AvailabilityZonesListSerializer;
268impl AvailabilityZonesListSerializer {
269    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
270        for (index, obj) in obj.iter().enumerate() {
271            let key = format!("{}.member.{}", name, index + 1);
272            params.put(&key, &obj);
273        }
274    }
275}
276
277#[derive(Clone, Debug, Default, PartialEq)]
278#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
279pub struct BatchApplyUpdateActionMessage {
280    /// <p>The cache cluster IDs</p>
281    pub cache_cluster_ids: Option<Vec<String>>,
282    /// <p>The replication group IDs</p>
283    pub replication_group_ids: Option<Vec<String>>,
284    /// <p>The unique ID of the service update</p>
285    pub service_update_name: String,
286}
287
288/// Serialize `BatchApplyUpdateActionMessage` contents to a `SignedRequest`.
289struct BatchApplyUpdateActionMessageSerializer;
290impl BatchApplyUpdateActionMessageSerializer {
291    fn serialize(params: &mut Params, name: &str, obj: &BatchApplyUpdateActionMessage) {
292        let mut prefix = name.to_string();
293        if prefix != "" {
294            prefix.push_str(".");
295        }
296
297        if let Some(ref field_value) = obj.cache_cluster_ids {
298            CacheClusterIdListSerializer::serialize(
299                params,
300                &format!("{}{}", prefix, "CacheClusterIds"),
301                field_value,
302            );
303        }
304        if let Some(ref field_value) = obj.replication_group_ids {
305            ReplicationGroupIdListSerializer::serialize(
306                params,
307                &format!("{}{}", prefix, "ReplicationGroupIds"),
308                field_value,
309            );
310        }
311        params.put(
312            &format!("{}{}", prefix, "ServiceUpdateName"),
313            &obj.service_update_name,
314        );
315    }
316}
317
318#[derive(Clone, Debug, Default, PartialEq)]
319#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
320pub struct BatchStopUpdateActionMessage {
321    /// <p>The cache cluster IDs</p>
322    pub cache_cluster_ids: Option<Vec<String>>,
323    /// <p>The replication group IDs</p>
324    pub replication_group_ids: Option<Vec<String>>,
325    /// <p>The unique ID of the service update</p>
326    pub service_update_name: String,
327}
328
329/// Serialize `BatchStopUpdateActionMessage` contents to a `SignedRequest`.
330struct BatchStopUpdateActionMessageSerializer;
331impl BatchStopUpdateActionMessageSerializer {
332    fn serialize(params: &mut Params, name: &str, obj: &BatchStopUpdateActionMessage) {
333        let mut prefix = name.to_string();
334        if prefix != "" {
335            prefix.push_str(".");
336        }
337
338        if let Some(ref field_value) = obj.cache_cluster_ids {
339            CacheClusterIdListSerializer::serialize(
340                params,
341                &format!("{}{}", prefix, "CacheClusterIds"),
342                field_value,
343            );
344        }
345        if let Some(ref field_value) = obj.replication_group_ids {
346            ReplicationGroupIdListSerializer::serialize(
347                params,
348                &format!("{}{}", prefix, "ReplicationGroupIds"),
349                field_value,
350            );
351        }
352        params.put(
353            &format!("{}{}", prefix, "ServiceUpdateName"),
354            &obj.service_update_name,
355        );
356    }
357}
358
359#[allow(dead_code)]
360struct BooleanDeserializer;
361impl BooleanDeserializer {
362    #[allow(dead_code, unused_variables)]
363    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
364        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
365    }
366}
367#[allow(dead_code)]
368struct BooleanOptionalDeserializer;
369impl BooleanOptionalDeserializer {
370    #[allow(dead_code, unused_variables)]
371    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
372        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(bool::from_str(&s).unwrap()))
373    }
374}
375/// <p>Contains all of the attributes of a specific cluster.</p>
376#[derive(Clone, Debug, Default, PartialEq)]
377#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
378pub struct CacheCluster {
379    /// <p>The ARN (Amazon Resource Name) of the cache cluster.</p>
380    pub arn: Option<String>,
381    /// <p>A flag that enables encryption at-rest when set to <code>true</code>.</p> <p>You cannot modify the value of <code>AtRestEncryptionEnabled</code> after the cluster is created. To enable at-rest encryption on a cluster you must set <code>AtRestEncryptionEnabled</code> to <code>true</code> when you create a cluster.</p> <p> <b>Required:</b> Only available when creating a replication group in an Amazon VPC using redis version <code>3.2.6</code>, <code>4.x</code> or later.</p> <p>Default: <code>false</code> </p>
382    pub at_rest_encryption_enabled: Option<bool>,
383    /// <p>A flag that enables using an <code>AuthToken</code> (password) when issuing Redis commands.</p> <p>Default: <code>false</code> </p>
384    pub auth_token_enabled: Option<bool>,
385    /// <p>The date the auth token was last modified</p>
386    pub auth_token_last_modified_date: Option<String>,
387    /// <p>This parameter is currently disabled.</p>
388    pub auto_minor_version_upgrade: Option<bool>,
389    /// <p>The date and time when the cluster was created.</p>
390    pub cache_cluster_create_time: Option<String>,
391    /// <p>The user-supplied identifier of the cluster. This identifier is a unique key that identifies a cluster.</p>
392    pub cache_cluster_id: Option<String>,
393    /// <p>The current state of this cluster, one of the following values: <code>available</code>, <code>creating</code>, <code>deleted</code>, <code>deleting</code>, <code>incompatible-network</code>, <code>modifying</code>, <code>rebooting cluster nodes</code>, <code>restore-failed</code>, or <code>snapshotting</code>.</p>
394    pub cache_cluster_status: Option<String>,
395    /// <p><p>The name of the compute and memory capacity node type for the cluster.</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
396    pub cache_node_type: Option<String>,
397    /// <p>A list of cache nodes that are members of the cluster.</p>
398    pub cache_nodes: Option<Vec<CacheNode>>,
399    /// <p>Status of the cache parameter group.</p>
400    pub cache_parameter_group: Option<CacheParameterGroupStatus>,
401    /// <p>A list of cache security group elements, composed of name and status sub-elements.</p>
402    pub cache_security_groups: Option<Vec<CacheSecurityGroupMembership>>,
403    /// <p>The name of the cache subnet group associated with the cluster.</p>
404    pub cache_subnet_group_name: Option<String>,
405    /// <p>The URL of the web page where you can download the latest ElastiCache client library.</p>
406    pub client_download_landing_page: Option<String>,
407    /// <p>Represents a Memcached cluster endpoint which, if Automatic Discovery is enabled on the cluster, can be used by an application to connect to any node in the cluster. The configuration endpoint will always have <code>.cfg</code> in it.</p> <p>Example: <code>mem-3.9dvc4r<u>.cfg</u>.usw2.cache.amazonaws.com:11211</code> </p>
408    pub configuration_endpoint: Option<Endpoint>,
409    /// <p>The name of the cache engine (<code>memcached</code> or <code>redis</code>) to be used for this cluster.</p>
410    pub engine: Option<String>,
411    /// <p>The version of the cache engine that is used in this cluster.</p>
412    pub engine_version: Option<String>,
413    /// <p>Describes a notification topic and its status. Notification topics are used for publishing ElastiCache events to subscribers using Amazon Simple Notification Service (SNS). </p>
414    pub notification_configuration: Option<NotificationConfiguration>,
415    /// <p>The number of cache nodes in the cluster.</p> <p>For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.</p>
416    pub num_cache_nodes: Option<i64>,
417    pub pending_modified_values: Option<PendingModifiedValues>,
418    /// <p>The name of the Availability Zone in which the cluster is located or "Multiple" if the cache nodes are located in different Availability Zones.</p>
419    pub preferred_availability_zone: Option<String>,
420    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p> <p>Valid values for <code>ddd</code> are:</p> <ul> <li> <p> <code>sun</code> </p> </li> <li> <p> <code>mon</code> </p> </li> <li> <p> <code>tue</code> </p> </li> <li> <p> <code>wed</code> </p> </li> <li> <p> <code>thu</code> </p> </li> <li> <p> <code>fri</code> </p> </li> <li> <p> <code>sat</code> </p> </li> </ul> <p>Example: <code>sun:23:00-mon:01:30</code> </p>
421    pub preferred_maintenance_window: Option<String>,
422    /// <p>The replication group to which this cluster belongs. If this field is empty, the cluster is not associated with any replication group.</p>
423    pub replication_group_id: Option<String>,
424    /// <p>A list of VPC Security Groups associated with the cluster.</p>
425    pub security_groups: Option<Vec<SecurityGroupMembership>>,
426    /// <p><p>The number of days for which ElastiCache retains automatic cluster snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p> <important> <p> If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.</p> </important></p>
427    pub snapshot_retention_limit: Option<i64>,
428    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your cluster.</p> <p>Example: <code>05:00-09:00</code> </p>
429    pub snapshot_window: Option<String>,
430    /// <p>A flag that enables in-transit encryption when set to <code>true</code>.</p> <p>You cannot modify the value of <code>TransitEncryptionEnabled</code> after the cluster is created. To enable in-transit encryption on a cluster you must set <code>TransitEncryptionEnabled</code> to <code>true</code> when you create a cluster.</p> <p> <b>Required:</b> Only available when creating a replication group in an Amazon VPC using redis version <code>3.2.6</code>, <code>4.x</code> or later.</p> <p>Default: <code>false</code> </p>
431    pub transit_encryption_enabled: Option<bool>,
432}
433
434#[allow(dead_code)]
435struct CacheClusterDeserializer;
436impl CacheClusterDeserializer {
437    #[allow(dead_code, unused_variables)]
438    fn deserialize<T: Peek + Next>(
439        tag_name: &str,
440        stack: &mut T,
441    ) -> Result<CacheCluster, XmlParseError> {
442        deserialize_elements::<_, CacheCluster, _>(tag_name, stack, |name, stack, obj| {
443            match name {
444                "ARN" => {
445                    obj.arn = Some(StringDeserializer::deserialize("ARN", stack)?);
446                }
447                "AtRestEncryptionEnabled" => {
448                    obj.at_rest_encryption_enabled = Some(
449                        BooleanOptionalDeserializer::deserialize("AtRestEncryptionEnabled", stack)?,
450                    );
451                }
452                "AuthTokenEnabled" => {
453                    obj.auth_token_enabled = Some(BooleanOptionalDeserializer::deserialize(
454                        "AuthTokenEnabled",
455                        stack,
456                    )?);
457                }
458                "AuthTokenLastModifiedDate" => {
459                    obj.auth_token_last_modified_date = Some(TStampDeserializer::deserialize(
460                        "AuthTokenLastModifiedDate",
461                        stack,
462                    )?);
463                }
464                "AutoMinorVersionUpgrade" => {
465                    obj.auto_minor_version_upgrade = Some(BooleanDeserializer::deserialize(
466                        "AutoMinorVersionUpgrade",
467                        stack,
468                    )?);
469                }
470                "CacheClusterCreateTime" => {
471                    obj.cache_cluster_create_time = Some(TStampDeserializer::deserialize(
472                        "CacheClusterCreateTime",
473                        stack,
474                    )?);
475                }
476                "CacheClusterId" => {
477                    obj.cache_cluster_id =
478                        Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
479                }
480                "CacheClusterStatus" => {
481                    obj.cache_cluster_status = Some(StringDeserializer::deserialize(
482                        "CacheClusterStatus",
483                        stack,
484                    )?);
485                }
486                "CacheNodeType" => {
487                    obj.cache_node_type =
488                        Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
489                }
490                "CacheNodes" => {
491                    obj.cache_nodes
492                        .get_or_insert(vec![])
493                        .extend(CacheNodeListDeserializer::deserialize("CacheNodes", stack)?);
494                }
495                "CacheParameterGroup" => {
496                    obj.cache_parameter_group =
497                        Some(CacheParameterGroupStatusDeserializer::deserialize(
498                            "CacheParameterGroup",
499                            stack,
500                        )?);
501                }
502                "CacheSecurityGroups" => {
503                    obj.cache_security_groups.get_or_insert(vec![]).extend(
504                        CacheSecurityGroupMembershipListDeserializer::deserialize(
505                            "CacheSecurityGroups",
506                            stack,
507                        )?,
508                    );
509                }
510                "CacheSubnetGroupName" => {
511                    obj.cache_subnet_group_name = Some(StringDeserializer::deserialize(
512                        "CacheSubnetGroupName",
513                        stack,
514                    )?);
515                }
516                "ClientDownloadLandingPage" => {
517                    obj.client_download_landing_page = Some(StringDeserializer::deserialize(
518                        "ClientDownloadLandingPage",
519                        stack,
520                    )?);
521                }
522                "ConfigurationEndpoint" => {
523                    obj.configuration_endpoint = Some(EndpointDeserializer::deserialize(
524                        "ConfigurationEndpoint",
525                        stack,
526                    )?);
527                }
528                "Engine" => {
529                    obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
530                }
531                "EngineVersion" => {
532                    obj.engine_version =
533                        Some(StringDeserializer::deserialize("EngineVersion", stack)?);
534                }
535                "NotificationConfiguration" => {
536                    obj.notification_configuration =
537                        Some(NotificationConfigurationDeserializer::deserialize(
538                            "NotificationConfiguration",
539                            stack,
540                        )?);
541                }
542                "NumCacheNodes" => {
543                    obj.num_cache_nodes = Some(IntegerOptionalDeserializer::deserialize(
544                        "NumCacheNodes",
545                        stack,
546                    )?);
547                }
548                "PendingModifiedValues" => {
549                    obj.pending_modified_values =
550                        Some(PendingModifiedValuesDeserializer::deserialize(
551                            "PendingModifiedValues",
552                            stack,
553                        )?);
554                }
555                "PreferredAvailabilityZone" => {
556                    obj.preferred_availability_zone = Some(StringDeserializer::deserialize(
557                        "PreferredAvailabilityZone",
558                        stack,
559                    )?);
560                }
561                "PreferredMaintenanceWindow" => {
562                    obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
563                        "PreferredMaintenanceWindow",
564                        stack,
565                    )?);
566                }
567                "ReplicationGroupId" => {
568                    obj.replication_group_id = Some(StringDeserializer::deserialize(
569                        "ReplicationGroupId",
570                        stack,
571                    )?);
572                }
573                "SecurityGroups" => {
574                    obj.security_groups.get_or_insert(vec![]).extend(
575                        SecurityGroupMembershipListDeserializer::deserialize(
576                            "SecurityGroups",
577                            stack,
578                        )?,
579                    );
580                }
581                "SnapshotRetentionLimit" => {
582                    obj.snapshot_retention_limit = Some(IntegerOptionalDeserializer::deserialize(
583                        "SnapshotRetentionLimit",
584                        stack,
585                    )?);
586                }
587                "SnapshotWindow" => {
588                    obj.snapshot_window =
589                        Some(StringDeserializer::deserialize("SnapshotWindow", stack)?);
590                }
591                "TransitEncryptionEnabled" => {
592                    obj.transit_encryption_enabled =
593                        Some(BooleanOptionalDeserializer::deserialize(
594                            "TransitEncryptionEnabled",
595                            stack,
596                        )?);
597                }
598                _ => skip_tree(stack),
599            }
600            Ok(())
601        })
602    }
603}
604
605/// Serialize `CacheClusterIdList` contents to a `SignedRequest`.
606struct CacheClusterIdListSerializer;
607impl CacheClusterIdListSerializer {
608    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
609        for (index, obj) in obj.iter().enumerate() {
610            let key = format!("{}.member.{}", name, index + 1);
611            params.put(&key, &obj);
612        }
613    }
614}
615
616#[allow(dead_code)]
617struct CacheClusterListDeserializer;
618impl CacheClusterListDeserializer {
619    #[allow(dead_code, unused_variables)]
620    fn deserialize<T: Peek + Next>(
621        tag_name: &str,
622        stack: &mut T,
623    ) -> Result<Vec<CacheCluster>, XmlParseError> {
624        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
625            if name == "CacheCluster" {
626                obj.push(CacheClusterDeserializer::deserialize(
627                    "CacheCluster",
628                    stack,
629                )?);
630            } else {
631                skip_tree(stack);
632            }
633            Ok(())
634        })
635    }
636}
637/// <p>Represents the output of a <code>DescribeCacheClusters</code> operation.</p>
638#[derive(Clone, Debug, Default, PartialEq)]
639#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
640pub struct CacheClusterMessage {
641    /// <p>A list of clusters. Each item in the list contains detailed information about one cluster.</p>
642    pub cache_clusters: Option<Vec<CacheCluster>>,
643    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
644    pub marker: Option<String>,
645}
646
647#[allow(dead_code)]
648struct CacheClusterMessageDeserializer;
649impl CacheClusterMessageDeserializer {
650    #[allow(dead_code, unused_variables)]
651    fn deserialize<T: Peek + Next>(
652        tag_name: &str,
653        stack: &mut T,
654    ) -> Result<CacheClusterMessage, XmlParseError> {
655        deserialize_elements::<_, CacheClusterMessage, _>(tag_name, stack, |name, stack, obj| {
656            match name {
657                "CacheClusters" => {
658                    obj.cache_clusters.get_or_insert(vec![]).extend(
659                        CacheClusterListDeserializer::deserialize("CacheClusters", stack)?,
660                    );
661                }
662                "Marker" => {
663                    obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
664                }
665                _ => skip_tree(stack),
666            }
667            Ok(())
668        })
669    }
670}
671/// <p>Provides all of the details about a particular cache engine version.</p>
672#[derive(Clone, Debug, Default, PartialEq)]
673#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
674pub struct CacheEngineVersion {
675    /// <p>The description of the cache engine.</p>
676    pub cache_engine_description: Option<String>,
677    /// <p>The description of the cache engine version.</p>
678    pub cache_engine_version_description: Option<String>,
679    /// <p>The name of the cache parameter group family associated with this cache engine.</p> <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | </p>
680    pub cache_parameter_group_family: Option<String>,
681    /// <p>The name of the cache engine.</p>
682    pub engine: Option<String>,
683    /// <p>The version number of the cache engine.</p>
684    pub engine_version: Option<String>,
685}
686
687#[allow(dead_code)]
688struct CacheEngineVersionDeserializer;
689impl CacheEngineVersionDeserializer {
690    #[allow(dead_code, unused_variables)]
691    fn deserialize<T: Peek + Next>(
692        tag_name: &str,
693        stack: &mut T,
694    ) -> Result<CacheEngineVersion, XmlParseError> {
695        deserialize_elements::<_, CacheEngineVersion, _>(tag_name, stack, |name, stack, obj| {
696            match name {
697                "CacheEngineDescription" => {
698                    obj.cache_engine_description = Some(StringDeserializer::deserialize(
699                        "CacheEngineDescription",
700                        stack,
701                    )?);
702                }
703                "CacheEngineVersionDescription" => {
704                    obj.cache_engine_version_description = Some(StringDeserializer::deserialize(
705                        "CacheEngineVersionDescription",
706                        stack,
707                    )?);
708                }
709                "CacheParameterGroupFamily" => {
710                    obj.cache_parameter_group_family = Some(StringDeserializer::deserialize(
711                        "CacheParameterGroupFamily",
712                        stack,
713                    )?);
714                }
715                "Engine" => {
716                    obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
717                }
718                "EngineVersion" => {
719                    obj.engine_version =
720                        Some(StringDeserializer::deserialize("EngineVersion", stack)?);
721                }
722                _ => skip_tree(stack),
723            }
724            Ok(())
725        })
726    }
727}
728#[allow(dead_code)]
729struct CacheEngineVersionListDeserializer;
730impl CacheEngineVersionListDeserializer {
731    #[allow(dead_code, unused_variables)]
732    fn deserialize<T: Peek + Next>(
733        tag_name: &str,
734        stack: &mut T,
735    ) -> Result<Vec<CacheEngineVersion>, XmlParseError> {
736        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
737            if name == "CacheEngineVersion" {
738                obj.push(CacheEngineVersionDeserializer::deserialize(
739                    "CacheEngineVersion",
740                    stack,
741                )?);
742            } else {
743                skip_tree(stack);
744            }
745            Ok(())
746        })
747    }
748}
749/// <p>Represents the output of a <a>DescribeCacheEngineVersions</a> operation.</p>
750#[derive(Clone, Debug, Default, PartialEq)]
751#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
752pub struct CacheEngineVersionMessage {
753    /// <p>A list of cache engine version details. Each element in the list contains detailed information about one cache engine version.</p>
754    pub cache_engine_versions: Option<Vec<CacheEngineVersion>>,
755    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
756    pub marker: Option<String>,
757}
758
759#[allow(dead_code)]
760struct CacheEngineVersionMessageDeserializer;
761impl CacheEngineVersionMessageDeserializer {
762    #[allow(dead_code, unused_variables)]
763    fn deserialize<T: Peek + Next>(
764        tag_name: &str,
765        stack: &mut T,
766    ) -> Result<CacheEngineVersionMessage, XmlParseError> {
767        deserialize_elements::<_, CacheEngineVersionMessage, _>(
768            tag_name,
769            stack,
770            |name, stack, obj| {
771                match name {
772                    "CacheEngineVersions" => {
773                        obj.cache_engine_versions.get_or_insert(vec![]).extend(
774                            CacheEngineVersionListDeserializer::deserialize(
775                                "CacheEngineVersions",
776                                stack,
777                            )?,
778                        );
779                    }
780                    "Marker" => {
781                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
782                    }
783                    _ => skip_tree(stack),
784                }
785                Ok(())
786            },
787        )
788    }
789}
790/// <p><p>Represents an individual cache node within a cluster. Each cache node runs its own instance of the cluster&#39;s protocol-compliant caching software - either Memcached or Redis.</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
791#[derive(Clone, Debug, Default, PartialEq)]
792#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
793pub struct CacheNode {
794    /// <p>The date and time when the cache node was created.</p>
795    pub cache_node_create_time: Option<String>,
796    /// <p>The cache node identifier. A node ID is a numeric identifier (0001, 0002, etc.). The combination of cluster ID and node ID uniquely identifies every cache node used in a customer's AWS account.</p>
797    pub cache_node_id: Option<String>,
798    /// <p>The current state of this cache node, one of the following values: <code>available</code>, <code>creating</code>, <code>rebooting</code>, or <code>deleting</code>.</p>
799    pub cache_node_status: Option<String>,
800    /// <p>The Availability Zone where this node was created and now resides.</p>
801    pub customer_availability_zone: Option<String>,
802    /// <p>The hostname for connecting to this cache node.</p>
803    pub endpoint: Option<Endpoint>,
804    /// <p>The status of the parameter group applied to this cache node.</p>
805    pub parameter_group_status: Option<String>,
806    /// <p>The ID of the primary node to which this read replica node is synchronized. If this field is empty, this node is not associated with a primary cluster.</p>
807    pub source_cache_node_id: Option<String>,
808}
809
810#[allow(dead_code)]
811struct CacheNodeDeserializer;
812impl CacheNodeDeserializer {
813    #[allow(dead_code, unused_variables)]
814    fn deserialize<T: Peek + Next>(
815        tag_name: &str,
816        stack: &mut T,
817    ) -> Result<CacheNode, XmlParseError> {
818        deserialize_elements::<_, CacheNode, _>(tag_name, stack, |name, stack, obj| {
819            match name {
820                "CacheNodeCreateTime" => {
821                    obj.cache_node_create_time = Some(TStampDeserializer::deserialize(
822                        "CacheNodeCreateTime",
823                        stack,
824                    )?);
825                }
826                "CacheNodeId" => {
827                    obj.cache_node_id =
828                        Some(StringDeserializer::deserialize("CacheNodeId", stack)?);
829                }
830                "CacheNodeStatus" => {
831                    obj.cache_node_status =
832                        Some(StringDeserializer::deserialize("CacheNodeStatus", stack)?);
833                }
834                "CustomerAvailabilityZone" => {
835                    obj.customer_availability_zone = Some(StringDeserializer::deserialize(
836                        "CustomerAvailabilityZone",
837                        stack,
838                    )?);
839                }
840                "Endpoint" => {
841                    obj.endpoint = Some(EndpointDeserializer::deserialize("Endpoint", stack)?);
842                }
843                "ParameterGroupStatus" => {
844                    obj.parameter_group_status = Some(StringDeserializer::deserialize(
845                        "ParameterGroupStatus",
846                        stack,
847                    )?);
848                }
849                "SourceCacheNodeId" => {
850                    obj.source_cache_node_id =
851                        Some(StringDeserializer::deserialize("SourceCacheNodeId", stack)?);
852                }
853                _ => skip_tree(stack),
854            }
855            Ok(())
856        })
857    }
858}
859#[allow(dead_code)]
860struct CacheNodeIdsListDeserializer;
861impl CacheNodeIdsListDeserializer {
862    #[allow(dead_code, unused_variables)]
863    fn deserialize<T: Peek + Next>(
864        tag_name: &str,
865        stack: &mut T,
866    ) -> Result<Vec<String>, XmlParseError> {
867        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
868            if name == "CacheNodeId" {
869                obj.push(StringDeserializer::deserialize("CacheNodeId", stack)?);
870            } else {
871                skip_tree(stack);
872            }
873            Ok(())
874        })
875    }
876}
877
878/// Serialize `CacheNodeIdsList` contents to a `SignedRequest`.
879struct CacheNodeIdsListSerializer;
880impl CacheNodeIdsListSerializer {
881    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
882        for (index, obj) in obj.iter().enumerate() {
883            let key = format!("{}.member.{}", name, index + 1);
884            params.put(&key, &obj);
885        }
886    }
887}
888
889#[allow(dead_code)]
890struct CacheNodeListDeserializer;
891impl CacheNodeListDeserializer {
892    #[allow(dead_code, unused_variables)]
893    fn deserialize<T: Peek + Next>(
894        tag_name: &str,
895        stack: &mut T,
896    ) -> Result<Vec<CacheNode>, XmlParseError> {
897        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
898            if name == "CacheNode" {
899                obj.push(CacheNodeDeserializer::deserialize("CacheNode", stack)?);
900            } else {
901                skip_tree(stack);
902            }
903            Ok(())
904        })
905    }
906}
907/// <p>A parameter that has a different value for each cache node type it is applied to. For example, in a Redis cluster, a <code>cache.m1.large</code> cache node type would have a larger <code>maxmemory</code> value than a <code>cache.m1.small</code> type.</p>
908#[derive(Clone, Debug, Default, PartialEq)]
909#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
910pub struct CacheNodeTypeSpecificParameter {
911    /// <p>The valid range of values for the parameter.</p>
912    pub allowed_values: Option<String>,
913    /// <p>A list of cache node types and their corresponding values for this parameter.</p>
914    pub cache_node_type_specific_values: Option<Vec<CacheNodeTypeSpecificValue>>,
915    /// <p>Indicates whether a change to the parameter is applied immediately or requires a reboot for the change to be applied. You can force a reboot or wait until the next maintenance window's reboot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html">Rebooting a Cluster</a>.</p>
916    pub change_type: Option<String>,
917    /// <p>The valid data type for the parameter.</p>
918    pub data_type: Option<String>,
919    /// <p>A description of the parameter.</p>
920    pub description: Option<String>,
921    /// <p>Indicates whether (<code>true</code>) or not (<code>false</code>) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.</p>
922    pub is_modifiable: Option<bool>,
923    /// <p>The earliest cache engine version to which the parameter can apply.</p>
924    pub minimum_engine_version: Option<String>,
925    /// <p>The name of the parameter.</p>
926    pub parameter_name: Option<String>,
927    /// <p>The source of the parameter value.</p>
928    pub source: Option<String>,
929}
930
931#[allow(dead_code)]
932struct CacheNodeTypeSpecificParameterDeserializer;
933impl CacheNodeTypeSpecificParameterDeserializer {
934    #[allow(dead_code, unused_variables)]
935    fn deserialize<T: Peek + Next>(
936        tag_name: &str,
937        stack: &mut T,
938    ) -> Result<CacheNodeTypeSpecificParameter, XmlParseError> {
939        deserialize_elements::<_, CacheNodeTypeSpecificParameter, _>(
940            tag_name,
941            stack,
942            |name, stack, obj| {
943                match name {
944                    "AllowedValues" => {
945                        obj.allowed_values =
946                            Some(StringDeserializer::deserialize("AllowedValues", stack)?);
947                    }
948                    "CacheNodeTypeSpecificValues" => {
949                        obj.cache_node_type_specific_values
950                            .get_or_insert(vec![])
951                            .extend(CacheNodeTypeSpecificValueListDeserializer::deserialize(
952                                "CacheNodeTypeSpecificValues",
953                                stack,
954                            )?);
955                    }
956                    "ChangeType" => {
957                        obj.change_type =
958                            Some(ChangeTypeDeserializer::deserialize("ChangeType", stack)?);
959                    }
960                    "DataType" => {
961                        obj.data_type = Some(StringDeserializer::deserialize("DataType", stack)?);
962                    }
963                    "Description" => {
964                        obj.description =
965                            Some(StringDeserializer::deserialize("Description", stack)?);
966                    }
967                    "IsModifiable" => {
968                        obj.is_modifiable =
969                            Some(BooleanDeserializer::deserialize("IsModifiable", stack)?);
970                    }
971                    "MinimumEngineVersion" => {
972                        obj.minimum_engine_version = Some(StringDeserializer::deserialize(
973                            "MinimumEngineVersion",
974                            stack,
975                        )?);
976                    }
977                    "ParameterName" => {
978                        obj.parameter_name =
979                            Some(StringDeserializer::deserialize("ParameterName", stack)?);
980                    }
981                    "Source" => {
982                        obj.source = Some(StringDeserializer::deserialize("Source", stack)?);
983                    }
984                    _ => skip_tree(stack),
985                }
986                Ok(())
987            },
988        )
989    }
990}
991#[allow(dead_code)]
992struct CacheNodeTypeSpecificParametersListDeserializer;
993impl CacheNodeTypeSpecificParametersListDeserializer {
994    #[allow(dead_code, unused_variables)]
995    fn deserialize<T: Peek + Next>(
996        tag_name: &str,
997        stack: &mut T,
998    ) -> Result<Vec<CacheNodeTypeSpecificParameter>, XmlParseError> {
999        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1000            if name == "CacheNodeTypeSpecificParameter" {
1001                obj.push(CacheNodeTypeSpecificParameterDeserializer::deserialize(
1002                    "CacheNodeTypeSpecificParameter",
1003                    stack,
1004                )?);
1005            } else {
1006                skip_tree(stack);
1007            }
1008            Ok(())
1009        })
1010    }
1011}
1012/// <p>A value that applies only to a certain cache node type.</p>
1013#[derive(Clone, Debug, Default, PartialEq)]
1014#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1015pub struct CacheNodeTypeSpecificValue {
1016    /// <p>The cache node type for which this value applies.</p>
1017    pub cache_node_type: Option<String>,
1018    /// <p>The value for the cache node type.</p>
1019    pub value: Option<String>,
1020}
1021
1022#[allow(dead_code)]
1023struct CacheNodeTypeSpecificValueDeserializer;
1024impl CacheNodeTypeSpecificValueDeserializer {
1025    #[allow(dead_code, unused_variables)]
1026    fn deserialize<T: Peek + Next>(
1027        tag_name: &str,
1028        stack: &mut T,
1029    ) -> Result<CacheNodeTypeSpecificValue, XmlParseError> {
1030        deserialize_elements::<_, CacheNodeTypeSpecificValue, _>(
1031            tag_name,
1032            stack,
1033            |name, stack, obj| {
1034                match name {
1035                    "CacheNodeType" => {
1036                        obj.cache_node_type =
1037                            Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
1038                    }
1039                    "Value" => {
1040                        obj.value = Some(StringDeserializer::deserialize("Value", stack)?);
1041                    }
1042                    _ => skip_tree(stack),
1043                }
1044                Ok(())
1045            },
1046        )
1047    }
1048}
1049#[allow(dead_code)]
1050struct CacheNodeTypeSpecificValueListDeserializer;
1051impl CacheNodeTypeSpecificValueListDeserializer {
1052    #[allow(dead_code, unused_variables)]
1053    fn deserialize<T: Peek + Next>(
1054        tag_name: &str,
1055        stack: &mut T,
1056    ) -> Result<Vec<CacheNodeTypeSpecificValue>, XmlParseError> {
1057        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1058            if name == "CacheNodeTypeSpecificValue" {
1059                obj.push(CacheNodeTypeSpecificValueDeserializer::deserialize(
1060                    "CacheNodeTypeSpecificValue",
1061                    stack,
1062                )?);
1063            } else {
1064                skip_tree(stack);
1065            }
1066            Ok(())
1067        })
1068    }
1069}
1070/// <p>The status of the service update on the cache node</p>
1071#[derive(Clone, Debug, Default, PartialEq)]
1072#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1073pub struct CacheNodeUpdateStatus {
1074    /// <p>The node ID of the cache cluster</p>
1075    pub cache_node_id: Option<String>,
1076    /// <p>The deletion date of the node</p>
1077    pub node_deletion_date: Option<String>,
1078    /// <p>The end date of the update for a node</p>
1079    pub node_update_end_date: Option<String>,
1080    /// <p>Reflects whether the update was initiated by the customer or automatically applied</p>
1081    pub node_update_initiated_by: Option<String>,
1082    /// <p>The date when the update is triggered</p>
1083    pub node_update_initiated_date: Option<String>,
1084    /// <p>The start date of the update for a node</p>
1085    pub node_update_start_date: Option<String>,
1086    /// <p>The update status of the node</p>
1087    pub node_update_status: Option<String>,
1088    /// <p>The date when the NodeUpdateStatus was last modified&gt;</p>
1089    pub node_update_status_modified_date: Option<String>,
1090}
1091
1092#[allow(dead_code)]
1093struct CacheNodeUpdateStatusDeserializer;
1094impl CacheNodeUpdateStatusDeserializer {
1095    #[allow(dead_code, unused_variables)]
1096    fn deserialize<T: Peek + Next>(
1097        tag_name: &str,
1098        stack: &mut T,
1099    ) -> Result<CacheNodeUpdateStatus, XmlParseError> {
1100        deserialize_elements::<_, CacheNodeUpdateStatus, _>(tag_name, stack, |name, stack, obj| {
1101            match name {
1102                "CacheNodeId" => {
1103                    obj.cache_node_id =
1104                        Some(StringDeserializer::deserialize("CacheNodeId", stack)?);
1105                }
1106                "NodeDeletionDate" => {
1107                    obj.node_deletion_date =
1108                        Some(TStampDeserializer::deserialize("NodeDeletionDate", stack)?);
1109                }
1110                "NodeUpdateEndDate" => {
1111                    obj.node_update_end_date =
1112                        Some(TStampDeserializer::deserialize("NodeUpdateEndDate", stack)?);
1113                }
1114                "NodeUpdateInitiatedBy" => {
1115                    obj.node_update_initiated_by =
1116                        Some(NodeUpdateInitiatedByDeserializer::deserialize(
1117                            "NodeUpdateInitiatedBy",
1118                            stack,
1119                        )?);
1120                }
1121                "NodeUpdateInitiatedDate" => {
1122                    obj.node_update_initiated_date = Some(TStampDeserializer::deserialize(
1123                        "NodeUpdateInitiatedDate",
1124                        stack,
1125                    )?);
1126                }
1127                "NodeUpdateStartDate" => {
1128                    obj.node_update_start_date = Some(TStampDeserializer::deserialize(
1129                        "NodeUpdateStartDate",
1130                        stack,
1131                    )?);
1132                }
1133                "NodeUpdateStatus" => {
1134                    obj.node_update_status = Some(NodeUpdateStatusDeserializer::deserialize(
1135                        "NodeUpdateStatus",
1136                        stack,
1137                    )?);
1138                }
1139                "NodeUpdateStatusModifiedDate" => {
1140                    obj.node_update_status_modified_date = Some(TStampDeserializer::deserialize(
1141                        "NodeUpdateStatusModifiedDate",
1142                        stack,
1143                    )?);
1144                }
1145                _ => skip_tree(stack),
1146            }
1147            Ok(())
1148        })
1149    }
1150}
1151#[allow(dead_code)]
1152struct CacheNodeUpdateStatusListDeserializer;
1153impl CacheNodeUpdateStatusListDeserializer {
1154    #[allow(dead_code, unused_variables)]
1155    fn deserialize<T: Peek + Next>(
1156        tag_name: &str,
1157        stack: &mut T,
1158    ) -> Result<Vec<CacheNodeUpdateStatus>, XmlParseError> {
1159        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1160            if name == "CacheNodeUpdateStatus" {
1161                obj.push(CacheNodeUpdateStatusDeserializer::deserialize(
1162                    "CacheNodeUpdateStatus",
1163                    stack,
1164                )?);
1165            } else {
1166                skip_tree(stack);
1167            }
1168            Ok(())
1169        })
1170    }
1171}
1172/// <p>Represents the output of a <code>CreateCacheParameterGroup</code> operation.</p>
1173#[derive(Clone, Debug, Default, PartialEq)]
1174#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1175pub struct CacheParameterGroup {
1176    /// <p>The ARN (Amazon Resource Name) of the cache parameter group.</p>
1177    pub arn: Option<String>,
1178    /// <p>The name of the cache parameter group family that this cache parameter group is compatible with.</p> <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | </p>
1179    pub cache_parameter_group_family: Option<String>,
1180    /// <p>The name of the cache parameter group.</p>
1181    pub cache_parameter_group_name: Option<String>,
1182    /// <p>The description for this cache parameter group.</p>
1183    pub description: Option<String>,
1184    /// <p>Indicates whether the parameter group is associated with a Global Datastore</p>
1185    pub is_global: Option<bool>,
1186}
1187
1188#[allow(dead_code)]
1189struct CacheParameterGroupDeserializer;
1190impl CacheParameterGroupDeserializer {
1191    #[allow(dead_code, unused_variables)]
1192    fn deserialize<T: Peek + Next>(
1193        tag_name: &str,
1194        stack: &mut T,
1195    ) -> Result<CacheParameterGroup, XmlParseError> {
1196        deserialize_elements::<_, CacheParameterGroup, _>(tag_name, stack, |name, stack, obj| {
1197            match name {
1198                "ARN" => {
1199                    obj.arn = Some(StringDeserializer::deserialize("ARN", stack)?);
1200                }
1201                "CacheParameterGroupFamily" => {
1202                    obj.cache_parameter_group_family = Some(StringDeserializer::deserialize(
1203                        "CacheParameterGroupFamily",
1204                        stack,
1205                    )?);
1206                }
1207                "CacheParameterGroupName" => {
1208                    obj.cache_parameter_group_name = Some(StringDeserializer::deserialize(
1209                        "CacheParameterGroupName",
1210                        stack,
1211                    )?);
1212                }
1213                "Description" => {
1214                    obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
1215                }
1216                "IsGlobal" => {
1217                    obj.is_global = Some(BooleanDeserializer::deserialize("IsGlobal", stack)?);
1218                }
1219                _ => skip_tree(stack),
1220            }
1221            Ok(())
1222        })
1223    }
1224}
1225/// <p>Represents the output of a <code>DescribeCacheParameters</code> operation.</p>
1226#[derive(Clone, Debug, Default, PartialEq)]
1227#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1228pub struct CacheParameterGroupDetails {
1229    /// <p>A list of parameters specific to a particular cache node type. Each element in the list contains detailed information about one parameter.</p>
1230    pub cache_node_type_specific_parameters: Option<Vec<CacheNodeTypeSpecificParameter>>,
1231    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
1232    pub marker: Option<String>,
1233    /// <p>A list of <a>Parameter</a> instances.</p>
1234    pub parameters: Option<Vec<Parameter>>,
1235}
1236
1237#[allow(dead_code)]
1238struct CacheParameterGroupDetailsDeserializer;
1239impl CacheParameterGroupDetailsDeserializer {
1240    #[allow(dead_code, unused_variables)]
1241    fn deserialize<T: Peek + Next>(
1242        tag_name: &str,
1243        stack: &mut T,
1244    ) -> Result<CacheParameterGroupDetails, XmlParseError> {
1245        deserialize_elements::<_, CacheParameterGroupDetails, _>(
1246            tag_name,
1247            stack,
1248            |name, stack, obj| {
1249                match name {
1250                    "CacheNodeTypeSpecificParameters" => {
1251                        obj.cache_node_type_specific_parameters
1252                            .get_or_insert(vec![])
1253                            .extend(
1254                                CacheNodeTypeSpecificParametersListDeserializer::deserialize(
1255                                    "CacheNodeTypeSpecificParameters",
1256                                    stack,
1257                                )?,
1258                            );
1259                    }
1260                    "Marker" => {
1261                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
1262                    }
1263                    "Parameters" => {
1264                        obj.parameters.get_or_insert(vec![]).extend(
1265                            ParametersListDeserializer::deserialize("Parameters", stack)?,
1266                        );
1267                    }
1268                    _ => skip_tree(stack),
1269                }
1270                Ok(())
1271            },
1272        )
1273    }
1274}
1275#[allow(dead_code)]
1276struct CacheParameterGroupListDeserializer;
1277impl CacheParameterGroupListDeserializer {
1278    #[allow(dead_code, unused_variables)]
1279    fn deserialize<T: Peek + Next>(
1280        tag_name: &str,
1281        stack: &mut T,
1282    ) -> Result<Vec<CacheParameterGroup>, XmlParseError> {
1283        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1284            if name == "CacheParameterGroup" {
1285                obj.push(CacheParameterGroupDeserializer::deserialize(
1286                    "CacheParameterGroup",
1287                    stack,
1288                )?);
1289            } else {
1290                skip_tree(stack);
1291            }
1292            Ok(())
1293        })
1294    }
1295}
1296/// <p><p>Represents the output of one of the following operations:</p> <ul> <li> <p> <code>ModifyCacheParameterGroup</code> </p> </li> <li> <p> <code>ResetCacheParameterGroup</code> </p> </li> </ul></p>
1297#[derive(Clone, Debug, Default, PartialEq)]
1298#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1299pub struct CacheParameterGroupNameMessage {
1300    /// <p>The name of the cache parameter group.</p>
1301    pub cache_parameter_group_name: Option<String>,
1302}
1303
1304#[allow(dead_code)]
1305struct CacheParameterGroupNameMessageDeserializer;
1306impl CacheParameterGroupNameMessageDeserializer {
1307    #[allow(dead_code, unused_variables)]
1308    fn deserialize<T: Peek + Next>(
1309        tag_name: &str,
1310        stack: &mut T,
1311    ) -> Result<CacheParameterGroupNameMessage, XmlParseError> {
1312        deserialize_elements::<_, CacheParameterGroupNameMessage, _>(
1313            tag_name,
1314            stack,
1315            |name, stack, obj| {
1316                match name {
1317                    "CacheParameterGroupName" => {
1318                        obj.cache_parameter_group_name = Some(StringDeserializer::deserialize(
1319                            "CacheParameterGroupName",
1320                            stack,
1321                        )?);
1322                    }
1323                    _ => skip_tree(stack),
1324                }
1325                Ok(())
1326            },
1327        )
1328    }
1329}
1330/// <p>Status of the cache parameter group.</p>
1331#[derive(Clone, Debug, Default, PartialEq)]
1332#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1333pub struct CacheParameterGroupStatus {
1334    /// <p>A list of the cache node IDs which need to be rebooted for parameter changes to be applied. A node ID is a numeric identifier (0001, 0002, etc.).</p>
1335    pub cache_node_ids_to_reboot: Option<Vec<String>>,
1336    /// <p>The name of the cache parameter group.</p>
1337    pub cache_parameter_group_name: Option<String>,
1338    /// <p>The status of parameter updates.</p>
1339    pub parameter_apply_status: Option<String>,
1340}
1341
1342#[allow(dead_code)]
1343struct CacheParameterGroupStatusDeserializer;
1344impl CacheParameterGroupStatusDeserializer {
1345    #[allow(dead_code, unused_variables)]
1346    fn deserialize<T: Peek + Next>(
1347        tag_name: &str,
1348        stack: &mut T,
1349    ) -> Result<CacheParameterGroupStatus, XmlParseError> {
1350        deserialize_elements::<_, CacheParameterGroupStatus, _>(
1351            tag_name,
1352            stack,
1353            |name, stack, obj| {
1354                match name {
1355                    "CacheNodeIdsToReboot" => {
1356                        obj.cache_node_ids_to_reboot.get_or_insert(vec![]).extend(
1357                            CacheNodeIdsListDeserializer::deserialize(
1358                                "CacheNodeIdsToReboot",
1359                                stack,
1360                            )?,
1361                        );
1362                    }
1363                    "CacheParameterGroupName" => {
1364                        obj.cache_parameter_group_name = Some(StringDeserializer::deserialize(
1365                            "CacheParameterGroupName",
1366                            stack,
1367                        )?);
1368                    }
1369                    "ParameterApplyStatus" => {
1370                        obj.parameter_apply_status = Some(StringDeserializer::deserialize(
1371                            "ParameterApplyStatus",
1372                            stack,
1373                        )?);
1374                    }
1375                    _ => skip_tree(stack),
1376                }
1377                Ok(())
1378            },
1379        )
1380    }
1381}
1382/// <p>Represents the output of a <code>DescribeCacheParameterGroups</code> operation.</p>
1383#[derive(Clone, Debug, Default, PartialEq)]
1384#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1385pub struct CacheParameterGroupsMessage {
1386    /// <p>A list of cache parameter groups. Each element in the list contains detailed information about one cache parameter group.</p>
1387    pub cache_parameter_groups: Option<Vec<CacheParameterGroup>>,
1388    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
1389    pub marker: Option<String>,
1390}
1391
1392#[allow(dead_code)]
1393struct CacheParameterGroupsMessageDeserializer;
1394impl CacheParameterGroupsMessageDeserializer {
1395    #[allow(dead_code, unused_variables)]
1396    fn deserialize<T: Peek + Next>(
1397        tag_name: &str,
1398        stack: &mut T,
1399    ) -> Result<CacheParameterGroupsMessage, XmlParseError> {
1400        deserialize_elements::<_, CacheParameterGroupsMessage, _>(
1401            tag_name,
1402            stack,
1403            |name, stack, obj| {
1404                match name {
1405                    "CacheParameterGroups" => {
1406                        obj.cache_parameter_groups.get_or_insert(vec![]).extend(
1407                            CacheParameterGroupListDeserializer::deserialize(
1408                                "CacheParameterGroups",
1409                                stack,
1410                            )?,
1411                        );
1412                    }
1413                    "Marker" => {
1414                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
1415                    }
1416                    _ => skip_tree(stack),
1417                }
1418                Ok(())
1419            },
1420        )
1421    }
1422}
1423/// <p><p>Represents the output of one of the following operations:</p> <ul> <li> <p> <code>AuthorizeCacheSecurityGroupIngress</code> </p> </li> <li> <p> <code>CreateCacheSecurityGroup</code> </p> </li> <li> <p> <code>RevokeCacheSecurityGroupIngress</code> </p> </li> </ul></p>
1424#[derive(Clone, Debug, Default, PartialEq)]
1425#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1426pub struct CacheSecurityGroup {
1427    /// <p>The ARN (Amazon Resource Name) of the cache security group.</p>
1428    pub arn: Option<String>,
1429    /// <p>The name of the cache security group.</p>
1430    pub cache_security_group_name: Option<String>,
1431    /// <p>The description of the cache security group.</p>
1432    pub description: Option<String>,
1433    /// <p>A list of Amazon EC2 security groups that are associated with this cache security group.</p>
1434    pub ec2_security_groups: Option<Vec<EC2SecurityGroup>>,
1435    /// <p>The AWS account ID of the cache security group owner.</p>
1436    pub owner_id: Option<String>,
1437}
1438
1439#[allow(dead_code)]
1440struct CacheSecurityGroupDeserializer;
1441impl CacheSecurityGroupDeserializer {
1442    #[allow(dead_code, unused_variables)]
1443    fn deserialize<T: Peek + Next>(
1444        tag_name: &str,
1445        stack: &mut T,
1446    ) -> Result<CacheSecurityGroup, XmlParseError> {
1447        deserialize_elements::<_, CacheSecurityGroup, _>(tag_name, stack, |name, stack, obj| {
1448            match name {
1449                "ARN" => {
1450                    obj.arn = Some(StringDeserializer::deserialize("ARN", stack)?);
1451                }
1452                "CacheSecurityGroupName" => {
1453                    obj.cache_security_group_name = Some(StringDeserializer::deserialize(
1454                        "CacheSecurityGroupName",
1455                        stack,
1456                    )?);
1457                }
1458                "Description" => {
1459                    obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
1460                }
1461                "EC2SecurityGroups" => {
1462                    obj.ec2_security_groups.get_or_insert(vec![]).extend(
1463                        EC2SecurityGroupListDeserializer::deserialize("EC2SecurityGroups", stack)?,
1464                    );
1465                }
1466                "OwnerId" => {
1467                    obj.owner_id = Some(StringDeserializer::deserialize("OwnerId", stack)?);
1468                }
1469                _ => skip_tree(stack),
1470            }
1471            Ok(())
1472        })
1473    }
1474}
1475/// <p>Represents a cluster's status within a particular cache security group.</p>
1476#[derive(Clone, Debug, Default, PartialEq)]
1477#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1478pub struct CacheSecurityGroupMembership {
1479    /// <p>The name of the cache security group.</p>
1480    pub cache_security_group_name: Option<String>,
1481    /// <p>The membership status in the cache security group. The status changes when a cache security group is modified, or when the cache security groups assigned to a cluster are modified.</p>
1482    pub status: Option<String>,
1483}
1484
1485#[allow(dead_code)]
1486struct CacheSecurityGroupMembershipDeserializer;
1487impl CacheSecurityGroupMembershipDeserializer {
1488    #[allow(dead_code, unused_variables)]
1489    fn deserialize<T: Peek + Next>(
1490        tag_name: &str,
1491        stack: &mut T,
1492    ) -> Result<CacheSecurityGroupMembership, XmlParseError> {
1493        deserialize_elements::<_, CacheSecurityGroupMembership, _>(
1494            tag_name,
1495            stack,
1496            |name, stack, obj| {
1497                match name {
1498                    "CacheSecurityGroupName" => {
1499                        obj.cache_security_group_name = Some(StringDeserializer::deserialize(
1500                            "CacheSecurityGroupName",
1501                            stack,
1502                        )?);
1503                    }
1504                    "Status" => {
1505                        obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
1506                    }
1507                    _ => skip_tree(stack),
1508                }
1509                Ok(())
1510            },
1511        )
1512    }
1513}
1514#[allow(dead_code)]
1515struct CacheSecurityGroupMembershipListDeserializer;
1516impl CacheSecurityGroupMembershipListDeserializer {
1517    #[allow(dead_code, unused_variables)]
1518    fn deserialize<T: Peek + Next>(
1519        tag_name: &str,
1520        stack: &mut T,
1521    ) -> Result<Vec<CacheSecurityGroupMembership>, XmlParseError> {
1522        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1523            if name == "CacheSecurityGroup" {
1524                obj.push(CacheSecurityGroupMembershipDeserializer::deserialize(
1525                    "CacheSecurityGroup",
1526                    stack,
1527                )?);
1528            } else {
1529                skip_tree(stack);
1530            }
1531            Ok(())
1532        })
1533    }
1534}
1535/// <p>Represents the output of a <code>DescribeCacheSecurityGroups</code> operation.</p>
1536#[derive(Clone, Debug, Default, PartialEq)]
1537#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1538pub struct CacheSecurityGroupMessage {
1539    /// <p>A list of cache security groups. Each element in the list contains detailed information about one group.</p>
1540    pub cache_security_groups: Option<Vec<CacheSecurityGroup>>,
1541    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
1542    pub marker: Option<String>,
1543}
1544
1545#[allow(dead_code)]
1546struct CacheSecurityGroupMessageDeserializer;
1547impl CacheSecurityGroupMessageDeserializer {
1548    #[allow(dead_code, unused_variables)]
1549    fn deserialize<T: Peek + Next>(
1550        tag_name: &str,
1551        stack: &mut T,
1552    ) -> Result<CacheSecurityGroupMessage, XmlParseError> {
1553        deserialize_elements::<_, CacheSecurityGroupMessage, _>(
1554            tag_name,
1555            stack,
1556            |name, stack, obj| {
1557                match name {
1558                    "CacheSecurityGroups" => {
1559                        obj.cache_security_groups.get_or_insert(vec![]).extend(
1560                            CacheSecurityGroupsDeserializer::deserialize(
1561                                "CacheSecurityGroups",
1562                                stack,
1563                            )?,
1564                        );
1565                    }
1566                    "Marker" => {
1567                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
1568                    }
1569                    _ => skip_tree(stack),
1570                }
1571                Ok(())
1572            },
1573        )
1574    }
1575}
1576
1577/// Serialize `CacheSecurityGroupNameList` contents to a `SignedRequest`.
1578struct CacheSecurityGroupNameListSerializer;
1579impl CacheSecurityGroupNameListSerializer {
1580    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
1581        for (index, obj) in obj.iter().enumerate() {
1582            let key = format!("{}.member.{}", name, index + 1);
1583            params.put(&key, &obj);
1584        }
1585    }
1586}
1587
1588#[allow(dead_code)]
1589struct CacheSecurityGroupsDeserializer;
1590impl CacheSecurityGroupsDeserializer {
1591    #[allow(dead_code, unused_variables)]
1592    fn deserialize<T: Peek + Next>(
1593        tag_name: &str,
1594        stack: &mut T,
1595    ) -> Result<Vec<CacheSecurityGroup>, XmlParseError> {
1596        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1597            if name == "CacheSecurityGroup" {
1598                obj.push(CacheSecurityGroupDeserializer::deserialize(
1599                    "CacheSecurityGroup",
1600                    stack,
1601                )?);
1602            } else {
1603                skip_tree(stack);
1604            }
1605            Ok(())
1606        })
1607    }
1608}
1609/// <p><p>Represents the output of one of the following operations:</p> <ul> <li> <p> <code>CreateCacheSubnetGroup</code> </p> </li> <li> <p> <code>ModifyCacheSubnetGroup</code> </p> </li> </ul></p>
1610#[derive(Clone, Debug, Default, PartialEq)]
1611#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1612pub struct CacheSubnetGroup {
1613    /// <p>The ARN (Amazon Resource Name) of the cache subnet group.</p>
1614    pub arn: Option<String>,
1615    /// <p>The description of the cache subnet group.</p>
1616    pub cache_subnet_group_description: Option<String>,
1617    /// <p>The name of the cache subnet group.</p>
1618    pub cache_subnet_group_name: Option<String>,
1619    /// <p>A list of subnets associated with the cache subnet group.</p>
1620    pub subnets: Option<Vec<Subnet>>,
1621    /// <p>The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group.</p>
1622    pub vpc_id: Option<String>,
1623}
1624
1625#[allow(dead_code)]
1626struct CacheSubnetGroupDeserializer;
1627impl CacheSubnetGroupDeserializer {
1628    #[allow(dead_code, unused_variables)]
1629    fn deserialize<T: Peek + Next>(
1630        tag_name: &str,
1631        stack: &mut T,
1632    ) -> Result<CacheSubnetGroup, XmlParseError> {
1633        deserialize_elements::<_, CacheSubnetGroup, _>(tag_name, stack, |name, stack, obj| {
1634            match name {
1635                "ARN" => {
1636                    obj.arn = Some(StringDeserializer::deserialize("ARN", stack)?);
1637                }
1638                "CacheSubnetGroupDescription" => {
1639                    obj.cache_subnet_group_description = Some(StringDeserializer::deserialize(
1640                        "CacheSubnetGroupDescription",
1641                        stack,
1642                    )?);
1643                }
1644                "CacheSubnetGroupName" => {
1645                    obj.cache_subnet_group_name = Some(StringDeserializer::deserialize(
1646                        "CacheSubnetGroupName",
1647                        stack,
1648                    )?);
1649                }
1650                "Subnets" => {
1651                    obj.subnets
1652                        .get_or_insert(vec![])
1653                        .extend(SubnetListDeserializer::deserialize("Subnets", stack)?);
1654                }
1655                "VpcId" => {
1656                    obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
1657                }
1658                _ => skip_tree(stack),
1659            }
1660            Ok(())
1661        })
1662    }
1663}
1664/// <p>Represents the output of a <code>DescribeCacheSubnetGroups</code> operation.</p>
1665#[derive(Clone, Debug, Default, PartialEq)]
1666#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1667pub struct CacheSubnetGroupMessage {
1668    /// <p>A list of cache subnet groups. Each element in the list contains detailed information about one group.</p>
1669    pub cache_subnet_groups: Option<Vec<CacheSubnetGroup>>,
1670    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
1671    pub marker: Option<String>,
1672}
1673
1674#[allow(dead_code)]
1675struct CacheSubnetGroupMessageDeserializer;
1676impl CacheSubnetGroupMessageDeserializer {
1677    #[allow(dead_code, unused_variables)]
1678    fn deserialize<T: Peek + Next>(
1679        tag_name: &str,
1680        stack: &mut T,
1681    ) -> Result<CacheSubnetGroupMessage, XmlParseError> {
1682        deserialize_elements::<_, CacheSubnetGroupMessage, _>(
1683            tag_name,
1684            stack,
1685            |name, stack, obj| {
1686                match name {
1687                    "CacheSubnetGroups" => {
1688                        obj.cache_subnet_groups.get_or_insert(vec![]).extend(
1689                            CacheSubnetGroupsDeserializer::deserialize("CacheSubnetGroups", stack)?,
1690                        );
1691                    }
1692                    "Marker" => {
1693                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
1694                    }
1695                    _ => skip_tree(stack),
1696                }
1697                Ok(())
1698            },
1699        )
1700    }
1701}
1702#[allow(dead_code)]
1703struct CacheSubnetGroupsDeserializer;
1704impl CacheSubnetGroupsDeserializer {
1705    #[allow(dead_code, unused_variables)]
1706    fn deserialize<T: Peek + Next>(
1707        tag_name: &str,
1708        stack: &mut T,
1709    ) -> Result<Vec<CacheSubnetGroup>, XmlParseError> {
1710        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1711            if name == "CacheSubnetGroup" {
1712                obj.push(CacheSubnetGroupDeserializer::deserialize(
1713                    "CacheSubnetGroup",
1714                    stack,
1715                )?);
1716            } else {
1717                skip_tree(stack);
1718            }
1719            Ok(())
1720        })
1721    }
1722}
1723#[allow(dead_code)]
1724struct ChangeTypeDeserializer;
1725impl ChangeTypeDeserializer {
1726    #[allow(dead_code, unused_variables)]
1727    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
1728        xml_util::deserialize_primitive(tag_name, stack, Ok)
1729    }
1730}
1731#[allow(dead_code)]
1732struct ClusterIdListDeserializer;
1733impl ClusterIdListDeserializer {
1734    #[allow(dead_code, unused_variables)]
1735    fn deserialize<T: Peek + Next>(
1736        tag_name: &str,
1737        stack: &mut T,
1738    ) -> Result<Vec<String>, XmlParseError> {
1739        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
1740            if name == "ClusterId" {
1741                obj.push(StringDeserializer::deserialize("ClusterId", stack)?);
1742            } else {
1743                skip_tree(stack);
1744            }
1745            Ok(())
1746        })
1747    }
1748}
1749#[derive(Clone, Debug, Default, PartialEq)]
1750#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1751pub struct CompleteMigrationMessage {
1752    /// <p>Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.</p>
1753    pub force: Option<bool>,
1754    /// <p>The ID of the replication group to which data is being migrated.</p>
1755    pub replication_group_id: String,
1756}
1757
1758/// Serialize `CompleteMigrationMessage` contents to a `SignedRequest`.
1759struct CompleteMigrationMessageSerializer;
1760impl CompleteMigrationMessageSerializer {
1761    fn serialize(params: &mut Params, name: &str, obj: &CompleteMigrationMessage) {
1762        let mut prefix = name.to_string();
1763        if prefix != "" {
1764            prefix.push_str(".");
1765        }
1766
1767        if let Some(ref field_value) = obj.force {
1768            params.put(&format!("{}{}", prefix, "Force"), &field_value);
1769        }
1770        params.put(
1771            &format!("{}{}", prefix, "ReplicationGroupId"),
1772            &obj.replication_group_id,
1773        );
1774    }
1775}
1776
1777#[derive(Clone, Debug, Default, PartialEq)]
1778#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1779pub struct CompleteMigrationResponse {
1780    pub replication_group: Option<ReplicationGroup>,
1781}
1782
1783#[allow(dead_code)]
1784struct CompleteMigrationResponseDeserializer;
1785impl CompleteMigrationResponseDeserializer {
1786    #[allow(dead_code, unused_variables)]
1787    fn deserialize<T: Peek + Next>(
1788        tag_name: &str,
1789        stack: &mut T,
1790    ) -> Result<CompleteMigrationResponse, XmlParseError> {
1791        deserialize_elements::<_, CompleteMigrationResponse, _>(
1792            tag_name,
1793            stack,
1794            |name, stack, obj| {
1795                match name {
1796                    "ReplicationGroup" => {
1797                        obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
1798                            "ReplicationGroup",
1799                            stack,
1800                        )?);
1801                    }
1802                    _ => skip_tree(stack),
1803                }
1804                Ok(())
1805            },
1806        )
1807    }
1808}
1809/// <p>Node group (shard) configuration options when adding or removing replicas. Each node group (shard) configuration has the following members: NodeGroupId, NewReplicaCount, and PreferredAvailabilityZones. </p>
1810#[derive(Clone, Debug, Default, PartialEq)]
1811#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1812pub struct ConfigureShard {
1813    /// <p><p>The number of replicas you want in this node group at the end of this operation. The maximum value for <code>NewReplicaCount</code> is 5. The minimum value depends upon the type of Redis replication group you are working with.</p> <p>The minimum number of replicas in a shard or replication group is:</p> <ul> <li> <p>Redis (cluster mode disabled)</p> <ul> <li> <p>If Multi-AZ: 1</p> </li> <li> <p>If Multi-AZ: 0</p> </li> </ul> </li> <li> <p>Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails)</p> </li> </ul></p>
1814    pub new_replica_count: i64,
1815    /// <p>The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication groups, the node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) id, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/shard-find-id.html">Finding a Shard's Id</a>.</p>
1816    pub node_group_id: String,
1817    /// <p>A list of <code>PreferredAvailabilityZone</code> strings that specify which availability zones the replication group's nodes are to be in. The nummber of <code>PreferredAvailabilityZone</code> values must equal the value of <code>NewReplicaCount</code> plus 1 to account for the primary node. If this member of <code>ReplicaConfiguration</code> is omitted, ElastiCache for Redis selects the availability zone for each of the replicas.</p>
1818    pub preferred_availability_zones: Option<Vec<String>>,
1819}
1820
1821/// Serialize `ConfigureShard` contents to a `SignedRequest`.
1822struct ConfigureShardSerializer;
1823impl ConfigureShardSerializer {
1824    fn serialize(params: &mut Params, name: &str, obj: &ConfigureShard) {
1825        let mut prefix = name.to_string();
1826        if prefix != "" {
1827            prefix.push_str(".");
1828        }
1829
1830        params.put(
1831            &format!("{}{}", prefix, "NewReplicaCount"),
1832            &obj.new_replica_count,
1833        );
1834        params.put(&format!("{}{}", prefix, "NodeGroupId"), &obj.node_group_id);
1835        if let Some(ref field_value) = obj.preferred_availability_zones {
1836            PreferredAvailabilityZoneListSerializer::serialize(
1837                params,
1838                &format!("{}{}", prefix, "PreferredAvailabilityZone"),
1839                field_value,
1840            );
1841        }
1842    }
1843}
1844
1845/// <p>Represents the input of a <code>CopySnapshotMessage</code> operation.</p>
1846#[derive(Clone, Debug, Default, PartialEq)]
1847#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1848pub struct CopySnapshotMessage {
1849    /// <p>The ID of the KMS key used to encrypt the target snapshot.</p>
1850    pub kms_key_id: Option<String>,
1851    /// <p>The name of an existing snapshot from which to make a copy.</p>
1852    pub source_snapshot_name: String,
1853    /// <p>The Amazon S3 bucket to which the snapshot is exported. This parameter is used only when exporting a snapshot for external access.</p> <p>When using this parameter to export a snapshot, be sure Amazon ElastiCache has the needed permissions to this S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access">Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket</a> in the <i>Amazon ElastiCache User Guide</i>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html">Exporting a Snapshot</a> in the <i>Amazon ElastiCache User Guide</i>.</p>
1854    pub target_bucket: Option<String>,
1855    /// <p>A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, therefore this name must be unique within its context - ElastiCache or an Amazon S3 bucket if exporting.</p>
1856    pub target_snapshot_name: String,
1857}
1858
1859/// Serialize `CopySnapshotMessage` contents to a `SignedRequest`.
1860struct CopySnapshotMessageSerializer;
1861impl CopySnapshotMessageSerializer {
1862    fn serialize(params: &mut Params, name: &str, obj: &CopySnapshotMessage) {
1863        let mut prefix = name.to_string();
1864        if prefix != "" {
1865            prefix.push_str(".");
1866        }
1867
1868        if let Some(ref field_value) = obj.kms_key_id {
1869            params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
1870        }
1871        params.put(
1872            &format!("{}{}", prefix, "SourceSnapshotName"),
1873            &obj.source_snapshot_name,
1874        );
1875        if let Some(ref field_value) = obj.target_bucket {
1876            params.put(&format!("{}{}", prefix, "TargetBucket"), &field_value);
1877        }
1878        params.put(
1879            &format!("{}{}", prefix, "TargetSnapshotName"),
1880            &obj.target_snapshot_name,
1881        );
1882    }
1883}
1884
1885#[derive(Clone, Debug, Default, PartialEq)]
1886#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
1887pub struct CopySnapshotResult {
1888    pub snapshot: Option<Snapshot>,
1889}
1890
1891#[allow(dead_code)]
1892struct CopySnapshotResultDeserializer;
1893impl CopySnapshotResultDeserializer {
1894    #[allow(dead_code, unused_variables)]
1895    fn deserialize<T: Peek + Next>(
1896        tag_name: &str,
1897        stack: &mut T,
1898    ) -> Result<CopySnapshotResult, XmlParseError> {
1899        deserialize_elements::<_, CopySnapshotResult, _>(tag_name, stack, |name, stack, obj| {
1900            match name {
1901                "Snapshot" => {
1902                    obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
1903                }
1904                _ => skip_tree(stack),
1905            }
1906            Ok(())
1907        })
1908    }
1909}
1910/// <p>Represents the input of a CreateCacheCluster operation.</p>
1911#[derive(Clone, Debug, Default, PartialEq)]
1912#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1913pub struct CreateCacheClusterMessage {
1914    /// <p>Specifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.</p> <p>This parameter is only supported for Memcached clusters.</p> <p>If the <code>AZMode</code> and <code>PreferredAvailabilityZones</code> are not specified, ElastiCache assumes <code>single-az</code> mode.</p>
1915    pub az_mode: Option<String>,
1916    /// <p> <b>Reserved parameter.</b> The password used to access a password protected server.</p> <p>Password constraints:</p> <ul> <li> <p>Must be only printable ASCII characters.</p> </li> <li> <p>Must be at least 16 characters and no more than 128 characters in length.</p> </li> <li> <p>The only permitted printable special characters are !, &amp;, #, $, ^, &lt;, &gt;, and -. Other printable special characters cannot be used in the AUTH token.</p> </li> </ul> <p>For more information, see <a href="http://redis.io/commands/AUTH">AUTH password</a> at http://redis.io/commands/AUTH.</p>
1917    pub auth_token: Option<String>,
1918    /// <p>This parameter is currently disabled.</p>
1919    pub auto_minor_version_upgrade: Option<bool>,
1920    /// <p><p>The node group (shard) identifier. This parameter is stored as a lowercase string.</p> <p> <b>Constraints:</b> </p> <ul> <li> <p>A name must contain from 1 to 50 alphanumeric characters or hyphens.</p> </li> <li> <p>The first character must be a letter.</p> </li> <li> <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p> </li> </ul></p>
1921    pub cache_cluster_id: String,
1922    /// <p><p>The compute and memory capacity of the nodes in the node group (shard).</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
1923    pub cache_node_type: Option<String>,
1924    /// <p>The name of the parameter group to associate with this cluster. If this argument is omitted, the default parameter group for the specified engine is used. You cannot use any parameter group which has <code>cluster-enabled='yes'</code> when creating a cluster.</p>
1925    pub cache_parameter_group_name: Option<String>,
1926    /// <p>A list of security group names to associate with this cluster.</p> <p>Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC).</p>
1927    pub cache_security_group_names: Option<Vec<String>>,
1928    /// <p><p>The name of the subnet group to be used for the cluster.</p> <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p> <important> <p>If you&#39;re going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html">Subnets and Subnet Groups</a>.</p> </important></p>
1929    pub cache_subnet_group_name: Option<String>,
1930    /// <p>The name of the cache engine to be used for this cluster.</p> <p>Valid values for this parameter are: <code>memcached</code> | <code>redis</code> </p>
1931    pub engine: Option<String>,
1932    /// <p>The version number of the cache engine to be used for this cluster. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation.</p> <p> <b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement">Selecting a Cache Engine and Version</a>), but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster or replication group and create it anew with the earlier engine version. </p>
1933    pub engine_version: Option<String>,
1934    /// <p><p>The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.</p> <note> <p>The Amazon SNS topic owner must be the same as the cluster owner.</p> </note></p>
1935    pub notification_topic_arn: Option<String>,
1936    /// <p>The initial number of cache nodes that the cluster has.</p> <p>For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.</p> <p>If you need more than 20 nodes for your Memcached cluster, please fill out the ElastiCache Limit Increase Request form at <a href="http://aws.amazon.com/contact-us/elasticache-node-limit-request/">http://aws.amazon.com/contact-us/elasticache-node-limit-request/</a>.</p>
1937    pub num_cache_nodes: Option<i64>,
1938    /// <p>The port number on which each of the cache nodes accepts connections.</p>
1939    pub port: Option<i64>,
1940    /// <p>The EC2 Availability Zone in which the cluster is created.</p> <p>All nodes belonging to this cluster are placed in the preferred Availability Zone. If you want to create your nodes across multiple Availability Zones, use <code>PreferredAvailabilityZones</code>.</p> <p>Default: System chosen Availability Zone.</p>
1941    pub preferred_availability_zone: Option<String>,
1942    /// <p>A list of the Availability Zones in which cache nodes are created. The order of the zones in the list is not important.</p> <p>This option is only supported on Memcached.</p> <note> <p>If you are creating your cluster in an Amazon VPC (recommended) you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group.</p> <p>The number of Availability Zones listed must equal the value of <code>NumCacheNodes</code>.</p> </note> <p>If you want all the nodes in the same Availability Zone, use <code>PreferredAvailabilityZone</code> instead, or repeat the Availability Zone multiple times in the list.</p> <p>Default: System chosen Availability Zones.</p>
1943    pub preferred_availability_zones: Option<Vec<String>>,
1944    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid values for <code>ddd</code> are:</p> <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p> <p>Valid values for <code>ddd</code> are:</p> <ul> <li> <p> <code>sun</code> </p> </li> <li> <p> <code>mon</code> </p> </li> <li> <p> <code>tue</code> </p> </li> <li> <p> <code>wed</code> </p> </li> <li> <p> <code>thu</code> </p> </li> <li> <p> <code>fri</code> </p> </li> <li> <p> <code>sat</code> </p> </li> </ul> <p>Example: <code>sun:23:00-mon:01:30</code> </p>
1945    pub preferred_maintenance_window: Option<String>,
1946    /// <p><p>The ID of the replication group to which this cluster should belong. If this parameter is specified, the cluster is added to the specified replication group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group.</p> <p>If the specified replication group is Multi-AZ enabled and the Availability Zone is not specified, the cluster is created in Availability Zones that provide the best spread of read replicas across Availability Zones.</p> <note> <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p> </note></p>
1947    pub replication_group_id: Option<String>,
1948    /// <p>One or more VPC security groups associated with the cluster.</p> <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
1949    pub security_group_ids: Option<Vec<String>>,
1950    /// <p>A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot file is used to populate the node group (shard). The Amazon S3 object name in the ARN cannot contain any commas.</p> <note> <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p> </note> <p>Example of an Amazon S3 ARN: <code>arn:aws:s3:::my_bucket/snapshot1.rdb</code> </p>
1951    pub snapshot_arns: Option<Vec<String>>,
1952    /// <p><p>The name of a Redis snapshot from which to restore data into the new node group (shard). The snapshot status changes to <code>restoring</code> while the new node group (shard) is being created.</p> <note> <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p> </note></p>
1953    pub snapshot_name: Option<String>,
1954    /// <p>The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot taken today is retained for 5 days before being deleted.</p> <note> <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p> </note> <p>Default: 0 (i.e., automatic backups are disabled for this cache cluster).</p>
1955    pub snapshot_retention_limit: Option<i64>,
1956    /// <p><p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p> <p>Example: <code>05:00-09:00</code> </p> <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p> <note> <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p> </note></p>
1957    pub snapshot_window: Option<String>,
1958    /// <p>A list of cost allocation tags to be added to this resource.</p>
1959    pub tags: Option<Vec<Tag>>,
1960}
1961
1962/// Serialize `CreateCacheClusterMessage` contents to a `SignedRequest`.
1963struct CreateCacheClusterMessageSerializer;
1964impl CreateCacheClusterMessageSerializer {
1965    fn serialize(params: &mut Params, name: &str, obj: &CreateCacheClusterMessage) {
1966        let mut prefix = name.to_string();
1967        if prefix != "" {
1968            prefix.push_str(".");
1969        }
1970
1971        if let Some(ref field_value) = obj.az_mode {
1972            params.put(&format!("{}{}", prefix, "AZMode"), &field_value);
1973        }
1974        if let Some(ref field_value) = obj.auth_token {
1975            params.put(&format!("{}{}", prefix, "AuthToken"), &field_value);
1976        }
1977        if let Some(ref field_value) = obj.auto_minor_version_upgrade {
1978            params.put(
1979                &format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
1980                &field_value,
1981            );
1982        }
1983        params.put(
1984            &format!("{}{}", prefix, "CacheClusterId"),
1985            &obj.cache_cluster_id,
1986        );
1987        if let Some(ref field_value) = obj.cache_node_type {
1988            params.put(&format!("{}{}", prefix, "CacheNodeType"), &field_value);
1989        }
1990        if let Some(ref field_value) = obj.cache_parameter_group_name {
1991            params.put(
1992                &format!("{}{}", prefix, "CacheParameterGroupName"),
1993                &field_value,
1994            );
1995        }
1996        if let Some(ref field_value) = obj.cache_security_group_names {
1997            CacheSecurityGroupNameListSerializer::serialize(
1998                params,
1999                &format!("{}{}", prefix, "CacheSecurityGroupName"),
2000                field_value,
2001            );
2002        }
2003        if let Some(ref field_value) = obj.cache_subnet_group_name {
2004            params.put(
2005                &format!("{}{}", prefix, "CacheSubnetGroupName"),
2006                &field_value,
2007            );
2008        }
2009        if let Some(ref field_value) = obj.engine {
2010            params.put(&format!("{}{}", prefix, "Engine"), &field_value);
2011        }
2012        if let Some(ref field_value) = obj.engine_version {
2013            params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
2014        }
2015        if let Some(ref field_value) = obj.notification_topic_arn {
2016            params.put(
2017                &format!("{}{}", prefix, "NotificationTopicArn"),
2018                &field_value,
2019            );
2020        }
2021        if let Some(ref field_value) = obj.num_cache_nodes {
2022            params.put(&format!("{}{}", prefix, "NumCacheNodes"), &field_value);
2023        }
2024        if let Some(ref field_value) = obj.port {
2025            params.put(&format!("{}{}", prefix, "Port"), &field_value);
2026        }
2027        if let Some(ref field_value) = obj.preferred_availability_zone {
2028            params.put(
2029                &format!("{}{}", prefix, "PreferredAvailabilityZone"),
2030                &field_value,
2031            );
2032        }
2033        if let Some(ref field_value) = obj.preferred_availability_zones {
2034            PreferredAvailabilityZoneListSerializer::serialize(
2035                params,
2036                &format!("{}{}", prefix, "PreferredAvailabilityZone"),
2037                field_value,
2038            );
2039        }
2040        if let Some(ref field_value) = obj.preferred_maintenance_window {
2041            params.put(
2042                &format!("{}{}", prefix, "PreferredMaintenanceWindow"),
2043                &field_value,
2044            );
2045        }
2046        if let Some(ref field_value) = obj.replication_group_id {
2047            params.put(&format!("{}{}", prefix, "ReplicationGroupId"), &field_value);
2048        }
2049        if let Some(ref field_value) = obj.security_group_ids {
2050            SecurityGroupIdsListSerializer::serialize(
2051                params,
2052                &format!("{}{}", prefix, "SecurityGroupId"),
2053                field_value,
2054            );
2055        }
2056        if let Some(ref field_value) = obj.snapshot_arns {
2057            SnapshotArnsListSerializer::serialize(
2058                params,
2059                &format!("{}{}", prefix, "SnapshotArn"),
2060                field_value,
2061            );
2062        }
2063        if let Some(ref field_value) = obj.snapshot_name {
2064            params.put(&format!("{}{}", prefix, "SnapshotName"), &field_value);
2065        }
2066        if let Some(ref field_value) = obj.snapshot_retention_limit {
2067            params.put(
2068                &format!("{}{}", prefix, "SnapshotRetentionLimit"),
2069                &field_value,
2070            );
2071        }
2072        if let Some(ref field_value) = obj.snapshot_window {
2073            params.put(&format!("{}{}", prefix, "SnapshotWindow"), &field_value);
2074        }
2075        if let Some(ref field_value) = obj.tags {
2076            TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
2077        }
2078    }
2079}
2080
2081#[derive(Clone, Debug, Default, PartialEq)]
2082#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2083pub struct CreateCacheClusterResult {
2084    pub cache_cluster: Option<CacheCluster>,
2085}
2086
2087#[allow(dead_code)]
2088struct CreateCacheClusterResultDeserializer;
2089impl CreateCacheClusterResultDeserializer {
2090    #[allow(dead_code, unused_variables)]
2091    fn deserialize<T: Peek + Next>(
2092        tag_name: &str,
2093        stack: &mut T,
2094    ) -> Result<CreateCacheClusterResult, XmlParseError> {
2095        deserialize_elements::<_, CreateCacheClusterResult, _>(
2096            tag_name,
2097            stack,
2098            |name, stack, obj| {
2099                match name {
2100                    "CacheCluster" => {
2101                        obj.cache_cluster = Some(CacheClusterDeserializer::deserialize(
2102                            "CacheCluster",
2103                            stack,
2104                        )?);
2105                    }
2106                    _ => skip_tree(stack),
2107                }
2108                Ok(())
2109            },
2110        )
2111    }
2112}
2113/// <p>Represents the input of a <code>CreateCacheParameterGroup</code> operation.</p>
2114#[derive(Clone, Debug, Default, PartialEq)]
2115#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2116pub struct CreateCacheParameterGroupMessage {
2117    /// <p>The name of the cache parameter group family that the cache parameter group can be used with.</p> <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | </p>
2118    pub cache_parameter_group_family: String,
2119    /// <p>A user-specified name for the cache parameter group.</p>
2120    pub cache_parameter_group_name: String,
2121    /// <p>A user-specified description for the cache parameter group.</p>
2122    pub description: String,
2123}
2124
2125/// Serialize `CreateCacheParameterGroupMessage` contents to a `SignedRequest`.
2126struct CreateCacheParameterGroupMessageSerializer;
2127impl CreateCacheParameterGroupMessageSerializer {
2128    fn serialize(params: &mut Params, name: &str, obj: &CreateCacheParameterGroupMessage) {
2129        let mut prefix = name.to_string();
2130        if prefix != "" {
2131            prefix.push_str(".");
2132        }
2133
2134        params.put(
2135            &format!("{}{}", prefix, "CacheParameterGroupFamily"),
2136            &obj.cache_parameter_group_family,
2137        );
2138        params.put(
2139            &format!("{}{}", prefix, "CacheParameterGroupName"),
2140            &obj.cache_parameter_group_name,
2141        );
2142        params.put(&format!("{}{}", prefix, "Description"), &obj.description);
2143    }
2144}
2145
2146#[derive(Clone, Debug, Default, PartialEq)]
2147#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2148pub struct CreateCacheParameterGroupResult {
2149    pub cache_parameter_group: Option<CacheParameterGroup>,
2150}
2151
2152#[allow(dead_code)]
2153struct CreateCacheParameterGroupResultDeserializer;
2154impl CreateCacheParameterGroupResultDeserializer {
2155    #[allow(dead_code, unused_variables)]
2156    fn deserialize<T: Peek + Next>(
2157        tag_name: &str,
2158        stack: &mut T,
2159    ) -> Result<CreateCacheParameterGroupResult, XmlParseError> {
2160        deserialize_elements::<_, CreateCacheParameterGroupResult, _>(
2161            tag_name,
2162            stack,
2163            |name, stack, obj| {
2164                match name {
2165                    "CacheParameterGroup" => {
2166                        obj.cache_parameter_group =
2167                            Some(CacheParameterGroupDeserializer::deserialize(
2168                                "CacheParameterGroup",
2169                                stack,
2170                            )?);
2171                    }
2172                    _ => skip_tree(stack),
2173                }
2174                Ok(())
2175            },
2176        )
2177    }
2178}
2179/// <p>Represents the input of a <code>CreateCacheSecurityGroup</code> operation.</p>
2180#[derive(Clone, Debug, Default, PartialEq)]
2181#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2182pub struct CreateCacheSecurityGroupMessage {
2183    /// <p>A name for the cache security group. This value is stored as a lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric characters. Cannot be the word "Default".</p> <p>Example: <code>mysecuritygroup</code> </p>
2184    pub cache_security_group_name: String,
2185    /// <p>A description for the cache security group.</p>
2186    pub description: String,
2187}
2188
2189/// Serialize `CreateCacheSecurityGroupMessage` contents to a `SignedRequest`.
2190struct CreateCacheSecurityGroupMessageSerializer;
2191impl CreateCacheSecurityGroupMessageSerializer {
2192    fn serialize(params: &mut Params, name: &str, obj: &CreateCacheSecurityGroupMessage) {
2193        let mut prefix = name.to_string();
2194        if prefix != "" {
2195            prefix.push_str(".");
2196        }
2197
2198        params.put(
2199            &format!("{}{}", prefix, "CacheSecurityGroupName"),
2200            &obj.cache_security_group_name,
2201        );
2202        params.put(&format!("{}{}", prefix, "Description"), &obj.description);
2203    }
2204}
2205
2206#[derive(Clone, Debug, Default, PartialEq)]
2207#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2208pub struct CreateCacheSecurityGroupResult {
2209    pub cache_security_group: Option<CacheSecurityGroup>,
2210}
2211
2212#[allow(dead_code)]
2213struct CreateCacheSecurityGroupResultDeserializer;
2214impl CreateCacheSecurityGroupResultDeserializer {
2215    #[allow(dead_code, unused_variables)]
2216    fn deserialize<T: Peek + Next>(
2217        tag_name: &str,
2218        stack: &mut T,
2219    ) -> Result<CreateCacheSecurityGroupResult, XmlParseError> {
2220        deserialize_elements::<_, CreateCacheSecurityGroupResult, _>(
2221            tag_name,
2222            stack,
2223            |name, stack, obj| {
2224                match name {
2225                    "CacheSecurityGroup" => {
2226                        obj.cache_security_group =
2227                            Some(CacheSecurityGroupDeserializer::deserialize(
2228                                "CacheSecurityGroup",
2229                                stack,
2230                            )?);
2231                    }
2232                    _ => skip_tree(stack),
2233                }
2234                Ok(())
2235            },
2236        )
2237    }
2238}
2239/// <p>Represents the input of a <code>CreateCacheSubnetGroup</code> operation.</p>
2240#[derive(Clone, Debug, Default, PartialEq)]
2241#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2242pub struct CreateCacheSubnetGroupMessage {
2243    /// <p>A description for the cache subnet group.</p>
2244    pub cache_subnet_group_description: String,
2245    /// <p>A name for the cache subnet group. This value is stored as a lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric characters or hyphens.</p> <p>Example: <code>mysubnetgroup</code> </p>
2246    pub cache_subnet_group_name: String,
2247    /// <p>A list of VPC subnet IDs for the cache subnet group.</p>
2248    pub subnet_ids: Vec<String>,
2249}
2250
2251/// Serialize `CreateCacheSubnetGroupMessage` contents to a `SignedRequest`.
2252struct CreateCacheSubnetGroupMessageSerializer;
2253impl CreateCacheSubnetGroupMessageSerializer {
2254    fn serialize(params: &mut Params, name: &str, obj: &CreateCacheSubnetGroupMessage) {
2255        let mut prefix = name.to_string();
2256        if prefix != "" {
2257            prefix.push_str(".");
2258        }
2259
2260        params.put(
2261            &format!("{}{}", prefix, "CacheSubnetGroupDescription"),
2262            &obj.cache_subnet_group_description,
2263        );
2264        params.put(
2265            &format!("{}{}", prefix, "CacheSubnetGroupName"),
2266            &obj.cache_subnet_group_name,
2267        );
2268        SubnetIdentifierListSerializer::serialize(
2269            params,
2270            &format!("{}{}", prefix, "SubnetIdentifier"),
2271            &obj.subnet_ids,
2272        );
2273    }
2274}
2275
2276#[derive(Clone, Debug, Default, PartialEq)]
2277#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2278pub struct CreateCacheSubnetGroupResult {
2279    pub cache_subnet_group: Option<CacheSubnetGroup>,
2280}
2281
2282#[allow(dead_code)]
2283struct CreateCacheSubnetGroupResultDeserializer;
2284impl CreateCacheSubnetGroupResultDeserializer {
2285    #[allow(dead_code, unused_variables)]
2286    fn deserialize<T: Peek + Next>(
2287        tag_name: &str,
2288        stack: &mut T,
2289    ) -> Result<CreateCacheSubnetGroupResult, XmlParseError> {
2290        deserialize_elements::<_, CreateCacheSubnetGroupResult, _>(
2291            tag_name,
2292            stack,
2293            |name, stack, obj| {
2294                match name {
2295                    "CacheSubnetGroup" => {
2296                        obj.cache_subnet_group = Some(CacheSubnetGroupDeserializer::deserialize(
2297                            "CacheSubnetGroup",
2298                            stack,
2299                        )?);
2300                    }
2301                    _ => skip_tree(stack),
2302                }
2303                Ok(())
2304            },
2305        )
2306    }
2307}
2308#[derive(Clone, Debug, Default, PartialEq)]
2309#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2310pub struct CreateGlobalReplicationGroupMessage {
2311    /// <p>Provides details of the Global Datastore</p>
2312    pub global_replication_group_description: Option<String>,
2313    /// <p>The suffix name of a Global Datastore. The suffix guarantees uniqueness of the Global Datastore name across multiple regions.</p>
2314    pub global_replication_group_id_suffix: String,
2315    /// <p>The name of the primary cluster that accepts writes and will replicate updates to the secondary cluster.</p>
2316    pub primary_replication_group_id: String,
2317}
2318
2319/// Serialize `CreateGlobalReplicationGroupMessage` contents to a `SignedRequest`.
2320struct CreateGlobalReplicationGroupMessageSerializer;
2321impl CreateGlobalReplicationGroupMessageSerializer {
2322    fn serialize(params: &mut Params, name: &str, obj: &CreateGlobalReplicationGroupMessage) {
2323        let mut prefix = name.to_string();
2324        if prefix != "" {
2325            prefix.push_str(".");
2326        }
2327
2328        if let Some(ref field_value) = obj.global_replication_group_description {
2329            params.put(
2330                &format!("{}{}", prefix, "GlobalReplicationGroupDescription"),
2331                &field_value,
2332            );
2333        }
2334        params.put(
2335            &format!("{}{}", prefix, "GlobalReplicationGroupIdSuffix"),
2336            &obj.global_replication_group_id_suffix,
2337        );
2338        params.put(
2339            &format!("{}{}", prefix, "PrimaryReplicationGroupId"),
2340            &obj.primary_replication_group_id,
2341        );
2342    }
2343}
2344
2345#[derive(Clone, Debug, Default, PartialEq)]
2346#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2347pub struct CreateGlobalReplicationGroupResult {
2348    pub global_replication_group: Option<GlobalReplicationGroup>,
2349}
2350
2351#[allow(dead_code)]
2352struct CreateGlobalReplicationGroupResultDeserializer;
2353impl CreateGlobalReplicationGroupResultDeserializer {
2354    #[allow(dead_code, unused_variables)]
2355    fn deserialize<T: Peek + Next>(
2356        tag_name: &str,
2357        stack: &mut T,
2358    ) -> Result<CreateGlobalReplicationGroupResult, XmlParseError> {
2359        deserialize_elements::<_, CreateGlobalReplicationGroupResult, _>(
2360            tag_name,
2361            stack,
2362            |name, stack, obj| {
2363                match name {
2364                    "GlobalReplicationGroup" => {
2365                        obj.global_replication_group =
2366                            Some(GlobalReplicationGroupDeserializer::deserialize(
2367                                "GlobalReplicationGroup",
2368                                stack,
2369                            )?);
2370                    }
2371                    _ => skip_tree(stack),
2372                }
2373                Ok(())
2374            },
2375        )
2376    }
2377}
2378/// <p>Represents the input of a <code>CreateReplicationGroup</code> operation.</p>
2379#[derive(Clone, Debug, Default, PartialEq)]
2380#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2381pub struct CreateReplicationGroupMessage {
2382    /// <p>A flag that enables encryption at rest when set to <code>true</code>.</p> <p>You cannot modify the value of <code>AtRestEncryptionEnabled</code> after the replication group is created. To enable encryption at rest on a replication group you must set <code>AtRestEncryptionEnabled</code> to <code>true</code> when you create the replication group. </p> <p> <b>Required:</b> Only available when creating a replication group in an Amazon VPC using redis version <code>3.2.6</code>, <code>4.x</code> or later.</p> <p>Default: <code>false</code> </p>
2383    pub at_rest_encryption_enabled: Option<bool>,
2384    /// <p> <b>Reserved parameter.</b> The password used to access a password protected server.</p> <p> <code>AuthToken</code> can be specified only on replication groups where <code>TransitEncryptionEnabled</code> is <code>true</code>.</p> <important> <p>For HIPAA compliance, you must specify <code>TransitEncryptionEnabled</code> as <code>true</code>, an <code>AuthToken</code>, and a <code>CacheSubnetGroup</code>.</p> </important> <p>Password constraints:</p> <ul> <li> <p>Must be only printable ASCII characters.</p> </li> <li> <p>Must be at least 16 characters and no more than 128 characters in length.</p> </li> <li> <p>The only permitted printable special characters are !, &amp;, #, $, ^, &lt;, &gt;, and -. Other printable special characters cannot be used in the AUTH token.</p> </li> </ul> <p>For more information, see <a href="http://redis.io/commands/AUTH">AUTH password</a> at http://redis.io/commands/AUTH.</p>
2385    pub auth_token: Option<String>,
2386    /// <p>This parameter is currently disabled.</p>
2387    pub auto_minor_version_upgrade: Option<bool>,
2388    /// <p>Specifies whether a read-only replica is automatically promoted to read/write primary if the existing primary fails.</p> <p> <code>AutomaticFailoverEnabled</code> must be enabled for Redis (cluster mode enabled) replication groups.</p> <p>Default: false</p>
2389    pub automatic_failover_enabled: Option<bool>,
2390    /// <p><p>The compute and memory capacity of the nodes in the node group (shard).</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
2391    pub cache_node_type: Option<String>,
2392    /// <p><p>The name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used.</p> <note> <p>If you are restoring to an engine version that is different than the original, you must specify the default version of that version. For example, <code>CacheParameterGroupName=default.redis4.0</code>.</p> </note> <p>If you are running Redis version 3.2.4 or later, only one node group (shard), and want to use a default parameter group, we recommend that you specify the parameter group by name. </p> <ul> <li> <p>To create a Redis (cluster mode disabled) replication group, use <code>CacheParameterGroupName=default.redis3.2</code>.</p> </li> <li> <p>To create a Redis (cluster mode enabled) replication group, use <code>CacheParameterGroupName=default.redis3.2.cluster.on</code>.</p> </li> </ul></p>
2393    pub cache_parameter_group_name: Option<String>,
2394    /// <p>A list of cache security group names to associate with this replication group.</p>
2395    pub cache_security_group_names: Option<Vec<String>>,
2396    /// <p><p>The name of the cache subnet group to be used for the replication group.</p> <important> <p>If you&#39;re going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html">Subnets and Subnet Groups</a>.</p> </important></p>
2397    pub cache_subnet_group_name: Option<String>,
2398    /// <p>The name of the cache engine to be used for the clusters in this replication group.</p>
2399    pub engine: Option<String>,
2400    /// <p>The version number of the cache engine to be used for the clusters in this replication group. To view the supported cache engine versions, use the <code>DescribeCacheEngineVersions</code> operation.</p> <p> <b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement">Selecting a Cache Engine and Version</a>) in the <i>ElastiCache User Guide</i>, but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster or replication group and create it anew with the earlier engine version. </p>
2401    pub engine_version: Option<String>,
2402    /// <p>The name of the Global Datastore</p>
2403    pub global_replication_group_id: Option<String>,
2404    /// <p>The ID of the KMS key used to encrypt the disk in the cluster.</p>
2405    pub kms_key_id: Option<String>,
2406    /// <p>A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html">Minimizing Downtime: Multi-AZ</a>.</p>
2407    pub multi_az_enabled: Option<bool>,
2408    /// <p>A list of node group (shard) configuration options. Each node group (shard) configuration has the following members: <code>PrimaryAvailabilityZone</code>, <code>ReplicaAvailabilityZones</code>, <code>ReplicaCount</code>, and <code>Slots</code>.</p> <p>If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication group, you can use this parameter to individually configure each node group (shard), or you can omit this parameter. However, it is required when seeding a Redis (cluster mode enabled) cluster from a S3 rdb file. You must configure each node group (shard) using this parameter because you must specify the slots for each node group.</p>
2409    pub node_group_configuration: Option<Vec<NodeGroupConfiguration>>,
2410    /// <p><p>The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.</p> <note> <p>The Amazon SNS topic owner must be the same as the cluster owner.</p> </note></p>
2411    pub notification_topic_arn: Option<String>,
2412    /// <p>The number of clusters this replication group initially has.</p> <p>This parameter is not used if there is more than one node group (shard). You should use <code>ReplicasPerNodeGroup</code> instead.</p> <p>If <code>AutomaticFailoverEnabled</code> is <code>true</code>, the value of this parameter must be at least 2. If <code>AutomaticFailoverEnabled</code> is <code>false</code> you can omit this parameter (it will default to 1), or you can explicitly set it to a value between 2 and 6.</p> <p>The maximum permitted value for <code>NumCacheClusters</code> is 6 (1 primary plus 5 replicas).</p>
2413    pub num_cache_clusters: Option<i64>,
2414    /// <p>An optional parameter that specifies the number of node groups (shards) for this Redis (cluster mode enabled) replication group. For Redis (cluster mode disabled) either omit this parameter or set it to 1.</p> <p>Default: 1</p>
2415    pub num_node_groups: Option<i64>,
2416    /// <p>The port number on which each member of the replication group accepts connections.</p>
2417    pub port: Option<i64>,
2418    /// <p>A list of EC2 Availability Zones in which the replication group's clusters are created. The order of the Availability Zones in the list is the order in which clusters are allocated. The primary cluster is created in the first AZ in the list.</p> <p>This parameter is not used if there is more than one node group (shard). You should use <code>NodeGroupConfiguration</code> instead.</p> <note> <p>If you are creating your replication group in an Amazon VPC (recommended), you can only locate clusters in Availability Zones associated with the subnets in the selected subnet group.</p> <p>The number of Availability Zones listed must equal the value of <code>NumCacheClusters</code>.</p> </note> <p>Default: system chosen Availability Zones.</p>
2419    pub preferred_cache_cluster_a_zs: Option<Vec<String>>,
2420    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid values for <code>ddd</code> are:</p> <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p> <p>Valid values for <code>ddd</code> are:</p> <ul> <li> <p> <code>sun</code> </p> </li> <li> <p> <code>mon</code> </p> </li> <li> <p> <code>tue</code> </p> </li> <li> <p> <code>wed</code> </p> </li> <li> <p> <code>thu</code> </p> </li> <li> <p> <code>fri</code> </p> </li> <li> <p> <code>sat</code> </p> </li> </ul> <p>Example: <code>sun:23:00-mon:01:30</code> </p>
2421    pub preferred_maintenance_window: Option<String>,
2422    /// <p>The identifier of the cluster that serves as the primary for this replication group. This cluster must already exist and have a status of <code>available</code>.</p> <p>This parameter is not required if <code>NumCacheClusters</code>, <code>NumNodeGroups</code>, or <code>ReplicasPerNodeGroup</code> is specified.</p>
2423    pub primary_cluster_id: Option<String>,
2424    /// <p>An optional parameter that specifies the number of replica nodes in each node group (shard). Valid values are 0 to 5.</p>
2425    pub replicas_per_node_group: Option<i64>,
2426    /// <p>A user-created description for the replication group.</p>
2427    pub replication_group_description: String,
2428    /// <p><p>The replication group identifier. This parameter is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>A name must contain from 1 to 40 alphanumeric characters or hyphens.</p> </li> <li> <p>The first character must be a letter.</p> </li> <li> <p>A name cannot end with a hyphen or contain two consecutive hyphens.</p> </li> </ul></p>
2429    pub replication_group_id: String,
2430    /// <p>One or more Amazon VPC security groups associated with this replication group.</p> <p>Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud (Amazon VPC).</p>
2431    pub security_group_ids: Option<Vec<String>>,
2432    /// <p>A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB snapshot files stored in Amazon S3. The snapshot files are used to populate the new replication group. The Amazon S3 object name in the ARN cannot contain any commas. The new replication group will have the number of node groups (console: shards) specified by the parameter <i>NumNodeGroups</i> or the number of node groups configured by <i>NodeGroupConfiguration</i> regardless of the number of ARNs specified here.</p> <p>Example of an Amazon S3 ARN: <code>arn:aws:s3:::my_bucket/snapshot1.rdb</code> </p>
2433    pub snapshot_arns: Option<Vec<String>>,
2434    /// <p>The name of a snapshot from which to restore data into the new replication group. The snapshot status changes to <code>restoring</code> while the new replication group is being created.</p>
2435    pub snapshot_name: Option<String>,
2436    /// <p>The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p> <p>Default: 0 (i.e., automatic backups are disabled for this cluster).</p>
2437    pub snapshot_retention_limit: Option<i64>,
2438    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p> <p>Example: <code>05:00-09:00</code> </p> <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p>
2439    pub snapshot_window: Option<String>,
2440    /// <p>A list of cost allocation tags to be added to this resource. Tags are comma-separated key,value pairs (e.g. Key=<code>myKey</code>, Value=<code>myKeyValue</code>. You can include multiple tags as shown following: Key=<code>myKey</code>, Value=<code>myKeyValue</code> Key=<code>mySecondKey</code>, Value=<code>mySecondKeyValue</code>.</p>
2441    pub tags: Option<Vec<Tag>>,
2442    /// <p><p>A flag that enables in-transit encryption when set to <code>true</code>.</p> <p>You cannot modify the value of <code>TransitEncryptionEnabled</code> after the cluster is created. To enable in-transit encryption on a cluster you must set <code>TransitEncryptionEnabled</code> to <code>true</code> when you create a cluster.</p> <p>This parameter is valid only if the <code>Engine</code> parameter is <code>redis</code>, the <code>EngineVersion</code> parameter is <code>3.2.6</code>, <code>4.x</code> or later, and the cluster is being created in an Amazon VPC.</p> <p>If you enable in-transit encryption, you must also specify a value for <code>CacheSubnetGroup</code>.</p> <p> <b>Required:</b> Only available when creating a replication group in an Amazon VPC using redis version <code>3.2.6</code>, <code>4.x</code> or later.</p> <p>Default: <code>false</code> </p> <important> <p>For HIPAA compliance, you must specify <code>TransitEncryptionEnabled</code> as <code>true</code>, an <code>AuthToken</code>, and a <code>CacheSubnetGroup</code>.</p> </important></p>
2443    pub transit_encryption_enabled: Option<bool>,
2444}
2445
2446/// Serialize `CreateReplicationGroupMessage` contents to a `SignedRequest`.
2447struct CreateReplicationGroupMessageSerializer;
2448impl CreateReplicationGroupMessageSerializer {
2449    fn serialize(params: &mut Params, name: &str, obj: &CreateReplicationGroupMessage) {
2450        let mut prefix = name.to_string();
2451        if prefix != "" {
2452            prefix.push_str(".");
2453        }
2454
2455        if let Some(ref field_value) = obj.at_rest_encryption_enabled {
2456            params.put(
2457                &format!("{}{}", prefix, "AtRestEncryptionEnabled"),
2458                &field_value,
2459            );
2460        }
2461        if let Some(ref field_value) = obj.auth_token {
2462            params.put(&format!("{}{}", prefix, "AuthToken"), &field_value);
2463        }
2464        if let Some(ref field_value) = obj.auto_minor_version_upgrade {
2465            params.put(
2466                &format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
2467                &field_value,
2468            );
2469        }
2470        if let Some(ref field_value) = obj.automatic_failover_enabled {
2471            params.put(
2472                &format!("{}{}", prefix, "AutomaticFailoverEnabled"),
2473                &field_value,
2474            );
2475        }
2476        if let Some(ref field_value) = obj.cache_node_type {
2477            params.put(&format!("{}{}", prefix, "CacheNodeType"), &field_value);
2478        }
2479        if let Some(ref field_value) = obj.cache_parameter_group_name {
2480            params.put(
2481                &format!("{}{}", prefix, "CacheParameterGroupName"),
2482                &field_value,
2483            );
2484        }
2485        if let Some(ref field_value) = obj.cache_security_group_names {
2486            CacheSecurityGroupNameListSerializer::serialize(
2487                params,
2488                &format!("{}{}", prefix, "CacheSecurityGroupName"),
2489                field_value,
2490            );
2491        }
2492        if let Some(ref field_value) = obj.cache_subnet_group_name {
2493            params.put(
2494                &format!("{}{}", prefix, "CacheSubnetGroupName"),
2495                &field_value,
2496            );
2497        }
2498        if let Some(ref field_value) = obj.engine {
2499            params.put(&format!("{}{}", prefix, "Engine"), &field_value);
2500        }
2501        if let Some(ref field_value) = obj.engine_version {
2502            params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
2503        }
2504        if let Some(ref field_value) = obj.global_replication_group_id {
2505            params.put(
2506                &format!("{}{}", prefix, "GlobalReplicationGroupId"),
2507                &field_value,
2508            );
2509        }
2510        if let Some(ref field_value) = obj.kms_key_id {
2511            params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
2512        }
2513        if let Some(ref field_value) = obj.multi_az_enabled {
2514            params.put(&format!("{}{}", prefix, "MultiAZEnabled"), &field_value);
2515        }
2516        if let Some(ref field_value) = obj.node_group_configuration {
2517            NodeGroupConfigurationListSerializer::serialize(
2518                params,
2519                &format!("{}{}", prefix, "NodeGroupConfiguration"),
2520                field_value,
2521            );
2522        }
2523        if let Some(ref field_value) = obj.notification_topic_arn {
2524            params.put(
2525                &format!("{}{}", prefix, "NotificationTopicArn"),
2526                &field_value,
2527            );
2528        }
2529        if let Some(ref field_value) = obj.num_cache_clusters {
2530            params.put(&format!("{}{}", prefix, "NumCacheClusters"), &field_value);
2531        }
2532        if let Some(ref field_value) = obj.num_node_groups {
2533            params.put(&format!("{}{}", prefix, "NumNodeGroups"), &field_value);
2534        }
2535        if let Some(ref field_value) = obj.port {
2536            params.put(&format!("{}{}", prefix, "Port"), &field_value);
2537        }
2538        if let Some(ref field_value) = obj.preferred_cache_cluster_a_zs {
2539            AvailabilityZonesListSerializer::serialize(
2540                params,
2541                &format!("{}{}", prefix, "AvailabilityZone"),
2542                field_value,
2543            );
2544        }
2545        if let Some(ref field_value) = obj.preferred_maintenance_window {
2546            params.put(
2547                &format!("{}{}", prefix, "PreferredMaintenanceWindow"),
2548                &field_value,
2549            );
2550        }
2551        if let Some(ref field_value) = obj.primary_cluster_id {
2552            params.put(&format!("{}{}", prefix, "PrimaryClusterId"), &field_value);
2553        }
2554        if let Some(ref field_value) = obj.replicas_per_node_group {
2555            params.put(
2556                &format!("{}{}", prefix, "ReplicasPerNodeGroup"),
2557                &field_value,
2558            );
2559        }
2560        params.put(
2561            &format!("{}{}", prefix, "ReplicationGroupDescription"),
2562            &obj.replication_group_description,
2563        );
2564        params.put(
2565            &format!("{}{}", prefix, "ReplicationGroupId"),
2566            &obj.replication_group_id,
2567        );
2568        if let Some(ref field_value) = obj.security_group_ids {
2569            SecurityGroupIdsListSerializer::serialize(
2570                params,
2571                &format!("{}{}", prefix, "SecurityGroupId"),
2572                field_value,
2573            );
2574        }
2575        if let Some(ref field_value) = obj.snapshot_arns {
2576            SnapshotArnsListSerializer::serialize(
2577                params,
2578                &format!("{}{}", prefix, "SnapshotArn"),
2579                field_value,
2580            );
2581        }
2582        if let Some(ref field_value) = obj.snapshot_name {
2583            params.put(&format!("{}{}", prefix, "SnapshotName"), &field_value);
2584        }
2585        if let Some(ref field_value) = obj.snapshot_retention_limit {
2586            params.put(
2587                &format!("{}{}", prefix, "SnapshotRetentionLimit"),
2588                &field_value,
2589            );
2590        }
2591        if let Some(ref field_value) = obj.snapshot_window {
2592            params.put(&format!("{}{}", prefix, "SnapshotWindow"), &field_value);
2593        }
2594        if let Some(ref field_value) = obj.tags {
2595            TagListSerializer::serialize(params, &format!("{}{}", prefix, "Tag"), field_value);
2596        }
2597        if let Some(ref field_value) = obj.transit_encryption_enabled {
2598            params.put(
2599                &format!("{}{}", prefix, "TransitEncryptionEnabled"),
2600                &field_value,
2601            );
2602        }
2603    }
2604}
2605
2606#[derive(Clone, Debug, Default, PartialEq)]
2607#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2608pub struct CreateReplicationGroupResult {
2609    pub replication_group: Option<ReplicationGroup>,
2610}
2611
2612#[allow(dead_code)]
2613struct CreateReplicationGroupResultDeserializer;
2614impl CreateReplicationGroupResultDeserializer {
2615    #[allow(dead_code, unused_variables)]
2616    fn deserialize<T: Peek + Next>(
2617        tag_name: &str,
2618        stack: &mut T,
2619    ) -> Result<CreateReplicationGroupResult, XmlParseError> {
2620        deserialize_elements::<_, CreateReplicationGroupResult, _>(
2621            tag_name,
2622            stack,
2623            |name, stack, obj| {
2624                match name {
2625                    "ReplicationGroup" => {
2626                        obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
2627                            "ReplicationGroup",
2628                            stack,
2629                        )?);
2630                    }
2631                    _ => skip_tree(stack),
2632                }
2633                Ok(())
2634            },
2635        )
2636    }
2637}
2638/// <p>Represents the input of a <code>CreateSnapshot</code> operation.</p>
2639#[derive(Clone, Debug, Default, PartialEq)]
2640#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2641pub struct CreateSnapshotMessage {
2642    /// <p>The identifier of an existing cluster. The snapshot is created from this cluster.</p>
2643    pub cache_cluster_id: Option<String>,
2644    /// <p>The ID of the KMS key used to encrypt the snapshot.</p>
2645    pub kms_key_id: Option<String>,
2646    /// <p>The identifier of an existing replication group. The snapshot is created from this replication group.</p>
2647    pub replication_group_id: Option<String>,
2648    /// <p>A name for the snapshot being created.</p>
2649    pub snapshot_name: String,
2650}
2651
2652/// Serialize `CreateSnapshotMessage` contents to a `SignedRequest`.
2653struct CreateSnapshotMessageSerializer;
2654impl CreateSnapshotMessageSerializer {
2655    fn serialize(params: &mut Params, name: &str, obj: &CreateSnapshotMessage) {
2656        let mut prefix = name.to_string();
2657        if prefix != "" {
2658            prefix.push_str(".");
2659        }
2660
2661        if let Some(ref field_value) = obj.cache_cluster_id {
2662            params.put(&format!("{}{}", prefix, "CacheClusterId"), &field_value);
2663        }
2664        if let Some(ref field_value) = obj.kms_key_id {
2665            params.put(&format!("{}{}", prefix, "KmsKeyId"), &field_value);
2666        }
2667        if let Some(ref field_value) = obj.replication_group_id {
2668            params.put(&format!("{}{}", prefix, "ReplicationGroupId"), &field_value);
2669        }
2670        params.put(&format!("{}{}", prefix, "SnapshotName"), &obj.snapshot_name);
2671    }
2672}
2673
2674#[derive(Clone, Debug, Default, PartialEq)]
2675#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2676pub struct CreateSnapshotResult {
2677    pub snapshot: Option<Snapshot>,
2678}
2679
2680#[allow(dead_code)]
2681struct CreateSnapshotResultDeserializer;
2682impl CreateSnapshotResultDeserializer {
2683    #[allow(dead_code, unused_variables)]
2684    fn deserialize<T: Peek + Next>(
2685        tag_name: &str,
2686        stack: &mut T,
2687    ) -> Result<CreateSnapshotResult, XmlParseError> {
2688        deserialize_elements::<_, CreateSnapshotResult, _>(tag_name, stack, |name, stack, obj| {
2689            match name {
2690                "Snapshot" => {
2691                    obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
2692                }
2693                _ => skip_tree(stack),
2694            }
2695            Ok(())
2696        })
2697    }
2698}
2699/// <p>The endpoint from which data should be migrated.</p>
2700#[derive(Clone, Debug, Default, PartialEq)]
2701#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2702pub struct CustomerNodeEndpoint {
2703    /// <p>The address of the node endpoint</p>
2704    pub address: Option<String>,
2705    /// <p>The port of the node endpoint</p>
2706    pub port: Option<i64>,
2707}
2708
2709/// Serialize `CustomerNodeEndpoint` contents to a `SignedRequest`.
2710struct CustomerNodeEndpointSerializer;
2711impl CustomerNodeEndpointSerializer {
2712    fn serialize(params: &mut Params, name: &str, obj: &CustomerNodeEndpoint) {
2713        let mut prefix = name.to_string();
2714        if prefix != "" {
2715            prefix.push_str(".");
2716        }
2717
2718        if let Some(ref field_value) = obj.address {
2719            params.put(&format!("{}{}", prefix, "Address"), &field_value);
2720        }
2721        if let Some(ref field_value) = obj.port {
2722            params.put(&format!("{}{}", prefix, "Port"), &field_value);
2723        }
2724    }
2725}
2726
2727/// Serialize `CustomerNodeEndpointList` contents to a `SignedRequest`.
2728struct CustomerNodeEndpointListSerializer;
2729impl CustomerNodeEndpointListSerializer {
2730    fn serialize(params: &mut Params, name: &str, obj: &Vec<CustomerNodeEndpoint>) {
2731        for (index, obj) in obj.iter().enumerate() {
2732            let key = format!("{}.member.{}", name, index + 1);
2733            CustomerNodeEndpointSerializer::serialize(params, &key, obj);
2734        }
2735    }
2736}
2737
2738#[derive(Clone, Debug, Default, PartialEq)]
2739#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2740pub struct DecreaseNodeGroupsInGlobalReplicationGroupMessage {
2741    /// <p>Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for this parameter is true. </p>
2742    pub apply_immediately: bool,
2743    /// <p>If the value of NodeGroupCount is less than the current number of node groups (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. NodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove from the cluster. </p>
2744    pub global_node_groups_to_remove: Option<Vec<String>>,
2745    /// <p>If the value of NodeGroupCount is less than the current number of node groups (shards), then either NodeGroupsToRemove or NodeGroupsToRetain is required. NodeGroupsToRemove is a list of NodeGroupIds to remove from the cluster. ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove from the cluster. </p>
2746    pub global_node_groups_to_retain: Option<Vec<String>>,
2747    /// <p>The name of the Global Datastore</p>
2748    pub global_replication_group_id: String,
2749    /// <p>The number of node groups (shards) that results from the modification of the shard configuration</p>
2750    pub node_group_count: i64,
2751}
2752
2753/// Serialize `DecreaseNodeGroupsInGlobalReplicationGroupMessage` contents to a `SignedRequest`.
2754struct DecreaseNodeGroupsInGlobalReplicationGroupMessageSerializer;
2755impl DecreaseNodeGroupsInGlobalReplicationGroupMessageSerializer {
2756    fn serialize(
2757        params: &mut Params,
2758        name: &str,
2759        obj: &DecreaseNodeGroupsInGlobalReplicationGroupMessage,
2760    ) {
2761        let mut prefix = name.to_string();
2762        if prefix != "" {
2763            prefix.push_str(".");
2764        }
2765
2766        params.put(
2767            &format!("{}{}", prefix, "ApplyImmediately"),
2768            &obj.apply_immediately,
2769        );
2770        if let Some(ref field_value) = obj.global_node_groups_to_remove {
2771            GlobalNodeGroupIdListSerializer::serialize(
2772                params,
2773                &format!("{}{}", prefix, "GlobalNodeGroupId"),
2774                field_value,
2775            );
2776        }
2777        if let Some(ref field_value) = obj.global_node_groups_to_retain {
2778            GlobalNodeGroupIdListSerializer::serialize(
2779                params,
2780                &format!("{}{}", prefix, "GlobalNodeGroupId"),
2781                field_value,
2782            );
2783        }
2784        params.put(
2785            &format!("{}{}", prefix, "GlobalReplicationGroupId"),
2786            &obj.global_replication_group_id,
2787        );
2788        params.put(
2789            &format!("{}{}", prefix, "NodeGroupCount"),
2790            &obj.node_group_count,
2791        );
2792    }
2793}
2794
2795#[derive(Clone, Debug, Default, PartialEq)]
2796#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2797pub struct DecreaseNodeGroupsInGlobalReplicationGroupResult {
2798    pub global_replication_group: Option<GlobalReplicationGroup>,
2799}
2800
2801#[allow(dead_code)]
2802struct DecreaseNodeGroupsInGlobalReplicationGroupResultDeserializer;
2803impl DecreaseNodeGroupsInGlobalReplicationGroupResultDeserializer {
2804    #[allow(dead_code, unused_variables)]
2805    fn deserialize<T: Peek + Next>(
2806        tag_name: &str,
2807        stack: &mut T,
2808    ) -> Result<DecreaseNodeGroupsInGlobalReplicationGroupResult, XmlParseError> {
2809        deserialize_elements::<_, DecreaseNodeGroupsInGlobalReplicationGroupResult, _>(
2810            tag_name,
2811            stack,
2812            |name, stack, obj| {
2813                match name {
2814                    "GlobalReplicationGroup" => {
2815                        obj.global_replication_group =
2816                            Some(GlobalReplicationGroupDeserializer::deserialize(
2817                                "GlobalReplicationGroup",
2818                                stack,
2819                            )?);
2820                    }
2821                    _ => skip_tree(stack),
2822                }
2823                Ok(())
2824            },
2825        )
2826    }
2827}
2828#[derive(Clone, Debug, Default, PartialEq)]
2829#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2830pub struct DecreaseReplicaCountMessage {
2831    /// <p>If <code>True</code>, the number of replica nodes is decreased immediately. <code>ApplyImmediately=False</code> is not currently supported.</p>
2832    pub apply_immediately: bool,
2833    /// <p><p>The number of read replica nodes you want at the completion of this operation. For Redis (cluster mode disabled) replication groups, this is the number of replica nodes in the replication group. For Redis (cluster mode enabled) replication groups, this is the number of replica nodes in each of the replication group&#39;s node groups.</p> <p>The minimum number of replicas in a shard or replication group is:</p> <ul> <li> <p>Redis (cluster mode disabled)</p> <ul> <li> <p>If Multi-AZ is enabled: 1</p> </li> <li> <p>If Multi-AZ is not enabled: 0</p> </li> </ul> </li> <li> <p>Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails)</p> </li> </ul></p>
2834    pub new_replica_count: Option<i64>,
2835    /// <p>A list of <code>ConfigureShard</code> objects that can be used to configure each shard in a Redis (cluster mode enabled) replication group. The <code>ConfigureShard</code> has three members: <code>NewReplicaCount</code>, <code>NodeGroupId</code>, and <code>PreferredAvailabilityZones</code>.</p>
2836    pub replica_configuration: Option<Vec<ConfigureShard>>,
2837    /// <p>A list of the node ids to remove from the replication group or node group (shard).</p>
2838    pub replicas_to_remove: Option<Vec<String>>,
2839    /// <p>The id of the replication group from which you want to remove replica nodes.</p>
2840    pub replication_group_id: String,
2841}
2842
2843/// Serialize `DecreaseReplicaCountMessage` contents to a `SignedRequest`.
2844struct DecreaseReplicaCountMessageSerializer;
2845impl DecreaseReplicaCountMessageSerializer {
2846    fn serialize(params: &mut Params, name: &str, obj: &DecreaseReplicaCountMessage) {
2847        let mut prefix = name.to_string();
2848        if prefix != "" {
2849            prefix.push_str(".");
2850        }
2851
2852        params.put(
2853            &format!("{}{}", prefix, "ApplyImmediately"),
2854            &obj.apply_immediately,
2855        );
2856        if let Some(ref field_value) = obj.new_replica_count {
2857            params.put(&format!("{}{}", prefix, "NewReplicaCount"), &field_value);
2858        }
2859        if let Some(ref field_value) = obj.replica_configuration {
2860            ReplicaConfigurationListSerializer::serialize(
2861                params,
2862                &format!("{}{}", prefix, "ConfigureShard"),
2863                field_value,
2864            );
2865        }
2866        if let Some(ref field_value) = obj.replicas_to_remove {
2867            RemoveReplicasListSerializer::serialize(
2868                params,
2869                &format!("{}{}", prefix, "ReplicasToRemove"),
2870                field_value,
2871            );
2872        }
2873        params.put(
2874            &format!("{}{}", prefix, "ReplicationGroupId"),
2875            &obj.replication_group_id,
2876        );
2877    }
2878}
2879
2880#[derive(Clone, Debug, Default, PartialEq)]
2881#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2882pub struct DecreaseReplicaCountResult {
2883    pub replication_group: Option<ReplicationGroup>,
2884}
2885
2886#[allow(dead_code)]
2887struct DecreaseReplicaCountResultDeserializer;
2888impl DecreaseReplicaCountResultDeserializer {
2889    #[allow(dead_code, unused_variables)]
2890    fn deserialize<T: Peek + Next>(
2891        tag_name: &str,
2892        stack: &mut T,
2893    ) -> Result<DecreaseReplicaCountResult, XmlParseError> {
2894        deserialize_elements::<_, DecreaseReplicaCountResult, _>(
2895            tag_name,
2896            stack,
2897            |name, stack, obj| {
2898                match name {
2899                    "ReplicationGroup" => {
2900                        obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
2901                            "ReplicationGroup",
2902                            stack,
2903                        )?);
2904                    }
2905                    _ => skip_tree(stack),
2906                }
2907                Ok(())
2908            },
2909        )
2910    }
2911}
2912/// <p>Represents the input of a <code>DeleteCacheCluster</code> operation.</p>
2913#[derive(Clone, Debug, Default, PartialEq)]
2914#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2915pub struct DeleteCacheClusterMessage {
2916    /// <p>The cluster identifier for the cluster to be deleted. This parameter is not case sensitive.</p>
2917    pub cache_cluster_id: String,
2918    /// <p>The user-supplied name of a final cluster snapshot. This is the unique name that identifies the snapshot. ElastiCache creates the snapshot, and then deletes the cluster immediately afterward.</p>
2919    pub final_snapshot_identifier: Option<String>,
2920}
2921
2922/// Serialize `DeleteCacheClusterMessage` contents to a `SignedRequest`.
2923struct DeleteCacheClusterMessageSerializer;
2924impl DeleteCacheClusterMessageSerializer {
2925    fn serialize(params: &mut Params, name: &str, obj: &DeleteCacheClusterMessage) {
2926        let mut prefix = name.to_string();
2927        if prefix != "" {
2928            prefix.push_str(".");
2929        }
2930
2931        params.put(
2932            &format!("{}{}", prefix, "CacheClusterId"),
2933            &obj.cache_cluster_id,
2934        );
2935        if let Some(ref field_value) = obj.final_snapshot_identifier {
2936            params.put(
2937                &format!("{}{}", prefix, "FinalSnapshotIdentifier"),
2938                &field_value,
2939            );
2940        }
2941    }
2942}
2943
2944#[derive(Clone, Debug, Default, PartialEq)]
2945#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
2946pub struct DeleteCacheClusterResult {
2947    pub cache_cluster: Option<CacheCluster>,
2948}
2949
2950#[allow(dead_code)]
2951struct DeleteCacheClusterResultDeserializer;
2952impl DeleteCacheClusterResultDeserializer {
2953    #[allow(dead_code, unused_variables)]
2954    fn deserialize<T: Peek + Next>(
2955        tag_name: &str,
2956        stack: &mut T,
2957    ) -> Result<DeleteCacheClusterResult, XmlParseError> {
2958        deserialize_elements::<_, DeleteCacheClusterResult, _>(
2959            tag_name,
2960            stack,
2961            |name, stack, obj| {
2962                match name {
2963                    "CacheCluster" => {
2964                        obj.cache_cluster = Some(CacheClusterDeserializer::deserialize(
2965                            "CacheCluster",
2966                            stack,
2967                        )?);
2968                    }
2969                    _ => skip_tree(stack),
2970                }
2971                Ok(())
2972            },
2973        )
2974    }
2975}
2976/// <p>Represents the input of a <code>DeleteCacheParameterGroup</code> operation.</p>
2977#[derive(Clone, Debug, Default, PartialEq)]
2978#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2979pub struct DeleteCacheParameterGroupMessage {
2980    /// <p><p>The name of the cache parameter group to delete.</p> <note> <p>The specified cache security group must not be associated with any clusters.</p> </note></p>
2981    pub cache_parameter_group_name: String,
2982}
2983
2984/// Serialize `DeleteCacheParameterGroupMessage` contents to a `SignedRequest`.
2985struct DeleteCacheParameterGroupMessageSerializer;
2986impl DeleteCacheParameterGroupMessageSerializer {
2987    fn serialize(params: &mut Params, name: &str, obj: &DeleteCacheParameterGroupMessage) {
2988        let mut prefix = name.to_string();
2989        if prefix != "" {
2990            prefix.push_str(".");
2991        }
2992
2993        params.put(
2994            &format!("{}{}", prefix, "CacheParameterGroupName"),
2995            &obj.cache_parameter_group_name,
2996        );
2997    }
2998}
2999
3000/// <p>Represents the input of a <code>DeleteCacheSecurityGroup</code> operation.</p>
3001#[derive(Clone, Debug, Default, PartialEq)]
3002#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3003pub struct DeleteCacheSecurityGroupMessage {
3004    /// <p><p>The name of the cache security group to delete.</p> <note> <p>You cannot delete the default security group.</p> </note></p>
3005    pub cache_security_group_name: String,
3006}
3007
3008/// Serialize `DeleteCacheSecurityGroupMessage` contents to a `SignedRequest`.
3009struct DeleteCacheSecurityGroupMessageSerializer;
3010impl DeleteCacheSecurityGroupMessageSerializer {
3011    fn serialize(params: &mut Params, name: &str, obj: &DeleteCacheSecurityGroupMessage) {
3012        let mut prefix = name.to_string();
3013        if prefix != "" {
3014            prefix.push_str(".");
3015        }
3016
3017        params.put(
3018            &format!("{}{}", prefix, "CacheSecurityGroupName"),
3019            &obj.cache_security_group_name,
3020        );
3021    }
3022}
3023
3024/// <p>Represents the input of a <code>DeleteCacheSubnetGroup</code> operation.</p>
3025#[derive(Clone, Debug, Default, PartialEq)]
3026#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3027pub struct DeleteCacheSubnetGroupMessage {
3028    /// <p>The name of the cache subnet group to delete.</p> <p>Constraints: Must contain no more than 255 alphanumeric characters or hyphens.</p>
3029    pub cache_subnet_group_name: String,
3030}
3031
3032/// Serialize `DeleteCacheSubnetGroupMessage` contents to a `SignedRequest`.
3033struct DeleteCacheSubnetGroupMessageSerializer;
3034impl DeleteCacheSubnetGroupMessageSerializer {
3035    fn serialize(params: &mut Params, name: &str, obj: &DeleteCacheSubnetGroupMessage) {
3036        let mut prefix = name.to_string();
3037        if prefix != "" {
3038            prefix.push_str(".");
3039        }
3040
3041        params.put(
3042            &format!("{}{}", prefix, "CacheSubnetGroupName"),
3043            &obj.cache_subnet_group_name,
3044        );
3045    }
3046}
3047
3048#[derive(Clone, Debug, Default, PartialEq)]
3049#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3050pub struct DeleteGlobalReplicationGroupMessage {
3051    /// <p>The name of the Global Datastore</p>
3052    pub global_replication_group_id: String,
3053    /// <p>The primary replication group is retained as a standalone replication group. </p>
3054    pub retain_primary_replication_group: bool,
3055}
3056
3057/// Serialize `DeleteGlobalReplicationGroupMessage` contents to a `SignedRequest`.
3058struct DeleteGlobalReplicationGroupMessageSerializer;
3059impl DeleteGlobalReplicationGroupMessageSerializer {
3060    fn serialize(params: &mut Params, name: &str, obj: &DeleteGlobalReplicationGroupMessage) {
3061        let mut prefix = name.to_string();
3062        if prefix != "" {
3063            prefix.push_str(".");
3064        }
3065
3066        params.put(
3067            &format!("{}{}", prefix, "GlobalReplicationGroupId"),
3068            &obj.global_replication_group_id,
3069        );
3070        params.put(
3071            &format!("{}{}", prefix, "RetainPrimaryReplicationGroup"),
3072            &obj.retain_primary_replication_group,
3073        );
3074    }
3075}
3076
3077#[derive(Clone, Debug, Default, PartialEq)]
3078#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3079pub struct DeleteGlobalReplicationGroupResult {
3080    pub global_replication_group: Option<GlobalReplicationGroup>,
3081}
3082
3083#[allow(dead_code)]
3084struct DeleteGlobalReplicationGroupResultDeserializer;
3085impl DeleteGlobalReplicationGroupResultDeserializer {
3086    #[allow(dead_code, unused_variables)]
3087    fn deserialize<T: Peek + Next>(
3088        tag_name: &str,
3089        stack: &mut T,
3090    ) -> Result<DeleteGlobalReplicationGroupResult, XmlParseError> {
3091        deserialize_elements::<_, DeleteGlobalReplicationGroupResult, _>(
3092            tag_name,
3093            stack,
3094            |name, stack, obj| {
3095                match name {
3096                    "GlobalReplicationGroup" => {
3097                        obj.global_replication_group =
3098                            Some(GlobalReplicationGroupDeserializer::deserialize(
3099                                "GlobalReplicationGroup",
3100                                stack,
3101                            )?);
3102                    }
3103                    _ => skip_tree(stack),
3104                }
3105                Ok(())
3106            },
3107        )
3108    }
3109}
3110/// <p>Represents the input of a <code>DeleteReplicationGroup</code> operation.</p>
3111#[derive(Clone, Debug, Default, PartialEq)]
3112#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3113pub struct DeleteReplicationGroupMessage {
3114    /// <p>The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.</p>
3115    pub final_snapshot_identifier: Option<String>,
3116    /// <p>The identifier for the cluster to be deleted. This parameter is not case sensitive.</p>
3117    pub replication_group_id: String,
3118    /// <p>If set to <code>true</code>, all of the read replicas are deleted, but the primary node is retained.</p>
3119    pub retain_primary_cluster: Option<bool>,
3120}
3121
3122/// Serialize `DeleteReplicationGroupMessage` contents to a `SignedRequest`.
3123struct DeleteReplicationGroupMessageSerializer;
3124impl DeleteReplicationGroupMessageSerializer {
3125    fn serialize(params: &mut Params, name: &str, obj: &DeleteReplicationGroupMessage) {
3126        let mut prefix = name.to_string();
3127        if prefix != "" {
3128            prefix.push_str(".");
3129        }
3130
3131        if let Some(ref field_value) = obj.final_snapshot_identifier {
3132            params.put(
3133                &format!("{}{}", prefix, "FinalSnapshotIdentifier"),
3134                &field_value,
3135            );
3136        }
3137        params.put(
3138            &format!("{}{}", prefix, "ReplicationGroupId"),
3139            &obj.replication_group_id,
3140        );
3141        if let Some(ref field_value) = obj.retain_primary_cluster {
3142            params.put(
3143                &format!("{}{}", prefix, "RetainPrimaryCluster"),
3144                &field_value,
3145            );
3146        }
3147    }
3148}
3149
3150#[derive(Clone, Debug, Default, PartialEq)]
3151#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3152pub struct DeleteReplicationGroupResult {
3153    pub replication_group: Option<ReplicationGroup>,
3154}
3155
3156#[allow(dead_code)]
3157struct DeleteReplicationGroupResultDeserializer;
3158impl DeleteReplicationGroupResultDeserializer {
3159    #[allow(dead_code, unused_variables)]
3160    fn deserialize<T: Peek + Next>(
3161        tag_name: &str,
3162        stack: &mut T,
3163    ) -> Result<DeleteReplicationGroupResult, XmlParseError> {
3164        deserialize_elements::<_, DeleteReplicationGroupResult, _>(
3165            tag_name,
3166            stack,
3167            |name, stack, obj| {
3168                match name {
3169                    "ReplicationGroup" => {
3170                        obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
3171                            "ReplicationGroup",
3172                            stack,
3173                        )?);
3174                    }
3175                    _ => skip_tree(stack),
3176                }
3177                Ok(())
3178            },
3179        )
3180    }
3181}
3182/// <p>Represents the input of a <code>DeleteSnapshot</code> operation.</p>
3183#[derive(Clone, Debug, Default, PartialEq)]
3184#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3185pub struct DeleteSnapshotMessage {
3186    /// <p>The name of the snapshot to be deleted.</p>
3187    pub snapshot_name: String,
3188}
3189
3190/// Serialize `DeleteSnapshotMessage` contents to a `SignedRequest`.
3191struct DeleteSnapshotMessageSerializer;
3192impl DeleteSnapshotMessageSerializer {
3193    fn serialize(params: &mut Params, name: &str, obj: &DeleteSnapshotMessage) {
3194        let mut prefix = name.to_string();
3195        if prefix != "" {
3196            prefix.push_str(".");
3197        }
3198
3199        params.put(&format!("{}{}", prefix, "SnapshotName"), &obj.snapshot_name);
3200    }
3201}
3202
3203#[derive(Clone, Debug, Default, PartialEq)]
3204#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3205pub struct DeleteSnapshotResult {
3206    pub snapshot: Option<Snapshot>,
3207}
3208
3209#[allow(dead_code)]
3210struct DeleteSnapshotResultDeserializer;
3211impl DeleteSnapshotResultDeserializer {
3212    #[allow(dead_code, unused_variables)]
3213    fn deserialize<T: Peek + Next>(
3214        tag_name: &str,
3215        stack: &mut T,
3216    ) -> Result<DeleteSnapshotResult, XmlParseError> {
3217        deserialize_elements::<_, DeleteSnapshotResult, _>(tag_name, stack, |name, stack, obj| {
3218            match name {
3219                "Snapshot" => {
3220                    obj.snapshot = Some(SnapshotDeserializer::deserialize("Snapshot", stack)?);
3221                }
3222                _ => skip_tree(stack),
3223            }
3224            Ok(())
3225        })
3226    }
3227}
3228/// <p>Represents the input of a <code>DescribeCacheClusters</code> operation.</p>
3229#[derive(Clone, Debug, Default, PartialEq)]
3230#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3231pub struct DescribeCacheClustersMessage {
3232    /// <p>The user-supplied cluster identifier. If this parameter is specified, only information about that specific cluster is returned. This parameter isn't case sensitive.</p>
3233    pub cache_cluster_id: Option<String>,
3234    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3235    pub marker: Option<String>,
3236    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3237    pub max_records: Option<i64>,
3238    /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to show only nodes (API/CLI: clusters) that are not members of a replication group. In practice, this mean Memcached and single node Redis clusters.</p>
3239    pub show_cache_clusters_not_in_replication_groups: Option<bool>,
3240    /// <p>An optional flag that can be included in the <code>DescribeCacheCluster</code> request to retrieve information about the individual cache nodes.</p>
3241    pub show_cache_node_info: Option<bool>,
3242}
3243
3244/// Serialize `DescribeCacheClustersMessage` contents to a `SignedRequest`.
3245struct DescribeCacheClustersMessageSerializer;
3246impl DescribeCacheClustersMessageSerializer {
3247    fn serialize(params: &mut Params, name: &str, obj: &DescribeCacheClustersMessage) {
3248        let mut prefix = name.to_string();
3249        if prefix != "" {
3250            prefix.push_str(".");
3251        }
3252
3253        if let Some(ref field_value) = obj.cache_cluster_id {
3254            params.put(&format!("{}{}", prefix, "CacheClusterId"), &field_value);
3255        }
3256        if let Some(ref field_value) = obj.marker {
3257            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3258        }
3259        if let Some(ref field_value) = obj.max_records {
3260            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3261        }
3262        if let Some(ref field_value) = obj.show_cache_clusters_not_in_replication_groups {
3263            params.put(
3264                &format!("{}{}", prefix, "ShowCacheClustersNotInReplicationGroups"),
3265                &field_value,
3266            );
3267        }
3268        if let Some(ref field_value) = obj.show_cache_node_info {
3269            params.put(&format!("{}{}", prefix, "ShowCacheNodeInfo"), &field_value);
3270        }
3271    }
3272}
3273
3274/// <p>Represents the input of a <code>DescribeCacheEngineVersions</code> operation.</p>
3275#[derive(Clone, Debug, Default, PartialEq)]
3276#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3277pub struct DescribeCacheEngineVersionsMessage {
3278    /// <p><p>The name of a specific cache parameter group family to return details for.</p> <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | </p> <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters</p> </li> <li> <p>First character must be a letter</p> </li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens</p> </li> </ul></p>
3279    pub cache_parameter_group_family: Option<String>,
3280    /// <p>If <code>true</code>, specifies that only the default version of the specified engine or engine and major version combination is to be returned.</p>
3281    pub default_only: Option<bool>,
3282    /// <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code> </p>
3283    pub engine: Option<String>,
3284    /// <p>The cache engine version to return.</p> <p>Example: <code>1.4.14</code> </p>
3285    pub engine_version: Option<String>,
3286    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3287    pub marker: Option<String>,
3288    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3289    pub max_records: Option<i64>,
3290}
3291
3292/// Serialize `DescribeCacheEngineVersionsMessage` contents to a `SignedRequest`.
3293struct DescribeCacheEngineVersionsMessageSerializer;
3294impl DescribeCacheEngineVersionsMessageSerializer {
3295    fn serialize(params: &mut Params, name: &str, obj: &DescribeCacheEngineVersionsMessage) {
3296        let mut prefix = name.to_string();
3297        if prefix != "" {
3298            prefix.push_str(".");
3299        }
3300
3301        if let Some(ref field_value) = obj.cache_parameter_group_family {
3302            params.put(
3303                &format!("{}{}", prefix, "CacheParameterGroupFamily"),
3304                &field_value,
3305            );
3306        }
3307        if let Some(ref field_value) = obj.default_only {
3308            params.put(&format!("{}{}", prefix, "DefaultOnly"), &field_value);
3309        }
3310        if let Some(ref field_value) = obj.engine {
3311            params.put(&format!("{}{}", prefix, "Engine"), &field_value);
3312        }
3313        if let Some(ref field_value) = obj.engine_version {
3314            params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
3315        }
3316        if let Some(ref field_value) = obj.marker {
3317            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3318        }
3319        if let Some(ref field_value) = obj.max_records {
3320            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3321        }
3322    }
3323}
3324
3325/// <p>Represents the input of a <code>DescribeCacheParameterGroups</code> operation.</p>
3326#[derive(Clone, Debug, Default, PartialEq)]
3327#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3328pub struct DescribeCacheParameterGroupsMessage {
3329    /// <p>The name of a specific cache parameter group to return details for.</p>
3330    pub cache_parameter_group_name: Option<String>,
3331    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3332    pub marker: Option<String>,
3333    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3334    pub max_records: Option<i64>,
3335}
3336
3337/// Serialize `DescribeCacheParameterGroupsMessage` contents to a `SignedRequest`.
3338struct DescribeCacheParameterGroupsMessageSerializer;
3339impl DescribeCacheParameterGroupsMessageSerializer {
3340    fn serialize(params: &mut Params, name: &str, obj: &DescribeCacheParameterGroupsMessage) {
3341        let mut prefix = name.to_string();
3342        if prefix != "" {
3343            prefix.push_str(".");
3344        }
3345
3346        if let Some(ref field_value) = obj.cache_parameter_group_name {
3347            params.put(
3348                &format!("{}{}", prefix, "CacheParameterGroupName"),
3349                &field_value,
3350            );
3351        }
3352        if let Some(ref field_value) = obj.marker {
3353            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3354        }
3355        if let Some(ref field_value) = obj.max_records {
3356            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3357        }
3358    }
3359}
3360
3361/// <p>Represents the input of a <code>DescribeCacheParameters</code> operation.</p>
3362#[derive(Clone, Debug, Default, PartialEq)]
3363#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3364pub struct DescribeCacheParametersMessage {
3365    /// <p>The name of a specific cache parameter group to return details for.</p>
3366    pub cache_parameter_group_name: String,
3367    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3368    pub marker: Option<String>,
3369    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3370    pub max_records: Option<i64>,
3371    /// <p>The parameter types to return.</p> <p>Valid values: <code>user</code> | <code>system</code> | <code>engine-default</code> </p>
3372    pub source: Option<String>,
3373}
3374
3375/// Serialize `DescribeCacheParametersMessage` contents to a `SignedRequest`.
3376struct DescribeCacheParametersMessageSerializer;
3377impl DescribeCacheParametersMessageSerializer {
3378    fn serialize(params: &mut Params, name: &str, obj: &DescribeCacheParametersMessage) {
3379        let mut prefix = name.to_string();
3380        if prefix != "" {
3381            prefix.push_str(".");
3382        }
3383
3384        params.put(
3385            &format!("{}{}", prefix, "CacheParameterGroupName"),
3386            &obj.cache_parameter_group_name,
3387        );
3388        if let Some(ref field_value) = obj.marker {
3389            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3390        }
3391        if let Some(ref field_value) = obj.max_records {
3392            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3393        }
3394        if let Some(ref field_value) = obj.source {
3395            params.put(&format!("{}{}", prefix, "Source"), &field_value);
3396        }
3397    }
3398}
3399
3400/// <p>Represents the input of a <code>DescribeCacheSecurityGroups</code> operation.</p>
3401#[derive(Clone, Debug, Default, PartialEq)]
3402#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3403pub struct DescribeCacheSecurityGroupsMessage {
3404    /// <p>The name of the cache security group to return details for.</p>
3405    pub cache_security_group_name: Option<String>,
3406    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3407    pub marker: Option<String>,
3408    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3409    pub max_records: Option<i64>,
3410}
3411
3412/// Serialize `DescribeCacheSecurityGroupsMessage` contents to a `SignedRequest`.
3413struct DescribeCacheSecurityGroupsMessageSerializer;
3414impl DescribeCacheSecurityGroupsMessageSerializer {
3415    fn serialize(params: &mut Params, name: &str, obj: &DescribeCacheSecurityGroupsMessage) {
3416        let mut prefix = name.to_string();
3417        if prefix != "" {
3418            prefix.push_str(".");
3419        }
3420
3421        if let Some(ref field_value) = obj.cache_security_group_name {
3422            params.put(
3423                &format!("{}{}", prefix, "CacheSecurityGroupName"),
3424                &field_value,
3425            );
3426        }
3427        if let Some(ref field_value) = obj.marker {
3428            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3429        }
3430        if let Some(ref field_value) = obj.max_records {
3431            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3432        }
3433    }
3434}
3435
3436/// <p>Represents the input of a <code>DescribeCacheSubnetGroups</code> operation.</p>
3437#[derive(Clone, Debug, Default, PartialEq)]
3438#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3439pub struct DescribeCacheSubnetGroupsMessage {
3440    /// <p>The name of the cache subnet group to return details for.</p>
3441    pub cache_subnet_group_name: Option<String>,
3442    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3443    pub marker: Option<String>,
3444    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3445    pub max_records: Option<i64>,
3446}
3447
3448/// Serialize `DescribeCacheSubnetGroupsMessage` contents to a `SignedRequest`.
3449struct DescribeCacheSubnetGroupsMessageSerializer;
3450impl DescribeCacheSubnetGroupsMessageSerializer {
3451    fn serialize(params: &mut Params, name: &str, obj: &DescribeCacheSubnetGroupsMessage) {
3452        let mut prefix = name.to_string();
3453        if prefix != "" {
3454            prefix.push_str(".");
3455        }
3456
3457        if let Some(ref field_value) = obj.cache_subnet_group_name {
3458            params.put(
3459                &format!("{}{}", prefix, "CacheSubnetGroupName"),
3460                &field_value,
3461            );
3462        }
3463        if let Some(ref field_value) = obj.marker {
3464            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3465        }
3466        if let Some(ref field_value) = obj.max_records {
3467            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3468        }
3469    }
3470}
3471
3472/// <p>Represents the input of a <code>DescribeEngineDefaultParameters</code> operation.</p>
3473#[derive(Clone, Debug, Default, PartialEq)]
3474#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3475pub struct DescribeEngineDefaultParametersMessage {
3476    /// <p>The name of the cache parameter group family.</p> <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | </p>
3477    pub cache_parameter_group_family: String,
3478    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3479    pub marker: Option<String>,
3480    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3481    pub max_records: Option<i64>,
3482}
3483
3484/// Serialize `DescribeEngineDefaultParametersMessage` contents to a `SignedRequest`.
3485struct DescribeEngineDefaultParametersMessageSerializer;
3486impl DescribeEngineDefaultParametersMessageSerializer {
3487    fn serialize(params: &mut Params, name: &str, obj: &DescribeEngineDefaultParametersMessage) {
3488        let mut prefix = name.to_string();
3489        if prefix != "" {
3490            prefix.push_str(".");
3491        }
3492
3493        params.put(
3494            &format!("{}{}", prefix, "CacheParameterGroupFamily"),
3495            &obj.cache_parameter_group_family,
3496        );
3497        if let Some(ref field_value) = obj.marker {
3498            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3499        }
3500        if let Some(ref field_value) = obj.max_records {
3501            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3502        }
3503    }
3504}
3505
3506#[derive(Clone, Debug, Default, PartialEq)]
3507#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3508pub struct DescribeEngineDefaultParametersResult {
3509    pub engine_defaults: Option<EngineDefaults>,
3510}
3511
3512#[allow(dead_code)]
3513struct DescribeEngineDefaultParametersResultDeserializer;
3514impl DescribeEngineDefaultParametersResultDeserializer {
3515    #[allow(dead_code, unused_variables)]
3516    fn deserialize<T: Peek + Next>(
3517        tag_name: &str,
3518        stack: &mut T,
3519    ) -> Result<DescribeEngineDefaultParametersResult, XmlParseError> {
3520        deserialize_elements::<_, DescribeEngineDefaultParametersResult, _>(
3521            tag_name,
3522            stack,
3523            |name, stack, obj| {
3524                match name {
3525                    "EngineDefaults" => {
3526                        obj.engine_defaults = Some(EngineDefaultsDeserializer::deserialize(
3527                            "EngineDefaults",
3528                            stack,
3529                        )?);
3530                    }
3531                    _ => skip_tree(stack),
3532                }
3533                Ok(())
3534            },
3535        )
3536    }
3537}
3538/// <p>Represents the input of a <code>DescribeEvents</code> operation.</p>
3539#[derive(Clone, Debug, Default, PartialEq)]
3540#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3541pub struct DescribeEventsMessage {
3542    /// <p>The number of minutes worth of events to retrieve.</p>
3543    pub duration: Option<i64>,
3544    /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format.</p> <p> <b>Example:</b> 2017-03-30T07:03:49.555Z</p>
3545    pub end_time: Option<String>,
3546    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3547    pub marker: Option<String>,
3548    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3549    pub max_records: Option<i64>,
3550    /// <p>The identifier of the event source for which events are returned. If not specified, all sources are included in the response.</p>
3551    pub source_identifier: Option<String>,
3552    /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
3553    pub source_type: Option<String>,
3554    /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format.</p> <p> <b>Example:</b> 2017-03-30T07:03:49.555Z</p>
3555    pub start_time: Option<String>,
3556}
3557
3558/// Serialize `DescribeEventsMessage` contents to a `SignedRequest`.
3559struct DescribeEventsMessageSerializer;
3560impl DescribeEventsMessageSerializer {
3561    fn serialize(params: &mut Params, name: &str, obj: &DescribeEventsMessage) {
3562        let mut prefix = name.to_string();
3563        if prefix != "" {
3564            prefix.push_str(".");
3565        }
3566
3567        if let Some(ref field_value) = obj.duration {
3568            params.put(&format!("{}{}", prefix, "Duration"), &field_value);
3569        }
3570        if let Some(ref field_value) = obj.end_time {
3571            params.put(&format!("{}{}", prefix, "EndTime"), &field_value);
3572        }
3573        if let Some(ref field_value) = obj.marker {
3574            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3575        }
3576        if let Some(ref field_value) = obj.max_records {
3577            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3578        }
3579        if let Some(ref field_value) = obj.source_identifier {
3580            params.put(&format!("{}{}", prefix, "SourceIdentifier"), &field_value);
3581        }
3582        if let Some(ref field_value) = obj.source_type {
3583            params.put(&format!("{}{}", prefix, "SourceType"), &field_value);
3584        }
3585        if let Some(ref field_value) = obj.start_time {
3586            params.put(&format!("{}{}", prefix, "StartTime"), &field_value);
3587        }
3588    }
3589}
3590
3591#[derive(Clone, Debug, Default, PartialEq)]
3592#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3593pub struct DescribeGlobalReplicationGroupsMessage {
3594    /// <p>The name of the Global Datastore</p>
3595    pub global_replication_group_id: Option<String>,
3596    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>. </p>
3597    pub marker: Option<String>,
3598    /// <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved. </p>
3599    pub max_records: Option<i64>,
3600    /// <p>Returns the list of members that comprise the Global Datastore.</p>
3601    pub show_member_info: Option<bool>,
3602}
3603
3604/// Serialize `DescribeGlobalReplicationGroupsMessage` contents to a `SignedRequest`.
3605struct DescribeGlobalReplicationGroupsMessageSerializer;
3606impl DescribeGlobalReplicationGroupsMessageSerializer {
3607    fn serialize(params: &mut Params, name: &str, obj: &DescribeGlobalReplicationGroupsMessage) {
3608        let mut prefix = name.to_string();
3609        if prefix != "" {
3610            prefix.push_str(".");
3611        }
3612
3613        if let Some(ref field_value) = obj.global_replication_group_id {
3614            params.put(
3615                &format!("{}{}", prefix, "GlobalReplicationGroupId"),
3616                &field_value,
3617            );
3618        }
3619        if let Some(ref field_value) = obj.marker {
3620            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3621        }
3622        if let Some(ref field_value) = obj.max_records {
3623            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3624        }
3625        if let Some(ref field_value) = obj.show_member_info {
3626            params.put(&format!("{}{}", prefix, "ShowMemberInfo"), &field_value);
3627        }
3628    }
3629}
3630
3631#[derive(Clone, Debug, Default, PartialEq)]
3632#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3633pub struct DescribeGlobalReplicationGroupsResult {
3634    /// <p>Indicates the slot configuration and global identifier for each slice group.</p>
3635    pub global_replication_groups: Option<Vec<GlobalReplicationGroup>>,
3636    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. &gt;</p>
3637    pub marker: Option<String>,
3638}
3639
3640#[allow(dead_code)]
3641struct DescribeGlobalReplicationGroupsResultDeserializer;
3642impl DescribeGlobalReplicationGroupsResultDeserializer {
3643    #[allow(dead_code, unused_variables)]
3644    fn deserialize<T: Peek + Next>(
3645        tag_name: &str,
3646        stack: &mut T,
3647    ) -> Result<DescribeGlobalReplicationGroupsResult, XmlParseError> {
3648        deserialize_elements::<_, DescribeGlobalReplicationGroupsResult, _>(
3649            tag_name,
3650            stack,
3651            |name, stack, obj| {
3652                match name {
3653                    "GlobalReplicationGroups" => {
3654                        obj.global_replication_groups.get_or_insert(vec![]).extend(
3655                            GlobalReplicationGroupListDeserializer::deserialize(
3656                                "GlobalReplicationGroups",
3657                                stack,
3658                            )?,
3659                        );
3660                    }
3661                    "Marker" => {
3662                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
3663                    }
3664                    _ => skip_tree(stack),
3665                }
3666                Ok(())
3667            },
3668        )
3669    }
3670}
3671/// <p>Represents the input of a <code>DescribeReplicationGroups</code> operation.</p>
3672#[derive(Clone, Debug, Default, PartialEq)]
3673#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3674pub struct DescribeReplicationGroupsMessage {
3675    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3676    pub marker: Option<String>,
3677    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3678    pub max_records: Option<i64>,
3679    /// <p>The identifier for the replication group to be described. This parameter is not case sensitive.</p> <p>If you do not specify this parameter, information about all replication groups is returned.</p>
3680    pub replication_group_id: Option<String>,
3681}
3682
3683/// Serialize `DescribeReplicationGroupsMessage` contents to a `SignedRequest`.
3684struct DescribeReplicationGroupsMessageSerializer;
3685impl DescribeReplicationGroupsMessageSerializer {
3686    fn serialize(params: &mut Params, name: &str, obj: &DescribeReplicationGroupsMessage) {
3687        let mut prefix = name.to_string();
3688        if prefix != "" {
3689            prefix.push_str(".");
3690        }
3691
3692        if let Some(ref field_value) = obj.marker {
3693            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3694        }
3695        if let Some(ref field_value) = obj.max_records {
3696            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3697        }
3698        if let Some(ref field_value) = obj.replication_group_id {
3699            params.put(&format!("{}{}", prefix, "ReplicationGroupId"), &field_value);
3700        }
3701    }
3702}
3703
3704/// <p>Represents the input of a <code>DescribeReservedCacheNodes</code> operation.</p>
3705#[derive(Clone, Debug, Default, PartialEq)]
3706#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3707pub struct DescribeReservedCacheNodesMessage {
3708    /// <p><p>The cache node type filter value. Use this parameter to show only those reservations matching the specified cache node type.</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
3709    pub cache_node_type: Option<String>,
3710    /// <p>The duration filter value, specified in years or seconds. Use this parameter to show only reservations for this duration.</p> <p>Valid Values: <code>1 | 3 | 31536000 | 94608000</code> </p>
3711    pub duration: Option<String>,
3712    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3713    pub marker: Option<String>,
3714    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3715    pub max_records: Option<i64>,
3716    /// <p>The offering type filter value. Use this parameter to show only the available offerings matching the specified offering type.</p> <p>Valid values: <code>"Light Utilization"|"Medium Utilization"|"Heavy Utilization"</code> </p>
3717    pub offering_type: Option<String>,
3718    /// <p>The product description filter value. Use this parameter to show only those reservations matching the specified product description.</p>
3719    pub product_description: Option<String>,
3720    /// <p>The reserved cache node identifier filter value. Use this parameter to show only the reservation that matches the specified reservation ID.</p>
3721    pub reserved_cache_node_id: Option<String>,
3722    /// <p>The offering identifier filter value. Use this parameter to show only purchased reservations matching the specified offering identifier.</p>
3723    pub reserved_cache_nodes_offering_id: Option<String>,
3724}
3725
3726/// Serialize `DescribeReservedCacheNodesMessage` contents to a `SignedRequest`.
3727struct DescribeReservedCacheNodesMessageSerializer;
3728impl DescribeReservedCacheNodesMessageSerializer {
3729    fn serialize(params: &mut Params, name: &str, obj: &DescribeReservedCacheNodesMessage) {
3730        let mut prefix = name.to_string();
3731        if prefix != "" {
3732            prefix.push_str(".");
3733        }
3734
3735        if let Some(ref field_value) = obj.cache_node_type {
3736            params.put(&format!("{}{}", prefix, "CacheNodeType"), &field_value);
3737        }
3738        if let Some(ref field_value) = obj.duration {
3739            params.put(&format!("{}{}", prefix, "Duration"), &field_value);
3740        }
3741        if let Some(ref field_value) = obj.marker {
3742            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3743        }
3744        if let Some(ref field_value) = obj.max_records {
3745            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3746        }
3747        if let Some(ref field_value) = obj.offering_type {
3748            params.put(&format!("{}{}", prefix, "OfferingType"), &field_value);
3749        }
3750        if let Some(ref field_value) = obj.product_description {
3751            params.put(&format!("{}{}", prefix, "ProductDescription"), &field_value);
3752        }
3753        if let Some(ref field_value) = obj.reserved_cache_node_id {
3754            params.put(
3755                &format!("{}{}", prefix, "ReservedCacheNodeId"),
3756                &field_value,
3757            );
3758        }
3759        if let Some(ref field_value) = obj.reserved_cache_nodes_offering_id {
3760            params.put(
3761                &format!("{}{}", prefix, "ReservedCacheNodesOfferingId"),
3762                &field_value,
3763            );
3764        }
3765    }
3766}
3767
3768/// <p>Represents the input of a <code>DescribeReservedCacheNodesOfferings</code> operation.</p>
3769#[derive(Clone, Debug, Default, PartialEq)]
3770#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3771pub struct DescribeReservedCacheNodesOfferingsMessage {
3772    /// <p><p>The cache node type filter value. Use this parameter to show only the available offerings matching the specified cache node type.</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
3773    pub cache_node_type: Option<String>,
3774    /// <p>Duration filter value, specified in years or seconds. Use this parameter to show only reservations for a given duration.</p> <p>Valid Values: <code>1 | 3 | 31536000 | 94608000</code> </p>
3775    pub duration: Option<String>,
3776    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3777    pub marker: Option<String>,
3778    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
3779    pub max_records: Option<i64>,
3780    /// <p>The offering type filter value. Use this parameter to show only the available offerings matching the specified offering type.</p> <p>Valid Values: <code>"Light Utilization"|"Medium Utilization"|"Heavy Utilization"</code> </p>
3781    pub offering_type: Option<String>,
3782    /// <p>The product description filter value. Use this parameter to show only the available offerings matching the specified product description.</p>
3783    pub product_description: Option<String>,
3784    /// <p>The offering identifier filter value. Use this parameter to show only the available offering that matches the specified reservation identifier.</p> <p>Example: <code>438012d3-4052-4cc7-b2e3-8d3372e0e706</code> </p>
3785    pub reserved_cache_nodes_offering_id: Option<String>,
3786}
3787
3788/// Serialize `DescribeReservedCacheNodesOfferingsMessage` contents to a `SignedRequest`.
3789struct DescribeReservedCacheNodesOfferingsMessageSerializer;
3790impl DescribeReservedCacheNodesOfferingsMessageSerializer {
3791    fn serialize(
3792        params: &mut Params,
3793        name: &str,
3794        obj: &DescribeReservedCacheNodesOfferingsMessage,
3795    ) {
3796        let mut prefix = name.to_string();
3797        if prefix != "" {
3798            prefix.push_str(".");
3799        }
3800
3801        if let Some(ref field_value) = obj.cache_node_type {
3802            params.put(&format!("{}{}", prefix, "CacheNodeType"), &field_value);
3803        }
3804        if let Some(ref field_value) = obj.duration {
3805            params.put(&format!("{}{}", prefix, "Duration"), &field_value);
3806        }
3807        if let Some(ref field_value) = obj.marker {
3808            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3809        }
3810        if let Some(ref field_value) = obj.max_records {
3811            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3812        }
3813        if let Some(ref field_value) = obj.offering_type {
3814            params.put(&format!("{}{}", prefix, "OfferingType"), &field_value);
3815        }
3816        if let Some(ref field_value) = obj.product_description {
3817            params.put(&format!("{}{}", prefix, "ProductDescription"), &field_value);
3818        }
3819        if let Some(ref field_value) = obj.reserved_cache_nodes_offering_id {
3820            params.put(
3821                &format!("{}{}", prefix, "ReservedCacheNodesOfferingId"),
3822                &field_value,
3823            );
3824        }
3825    }
3826}
3827
3828#[derive(Clone, Debug, Default, PartialEq)]
3829#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3830pub struct DescribeServiceUpdatesMessage {
3831    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3832    pub marker: Option<String>,
3833    /// <p>The maximum number of records to include in the response</p>
3834    pub max_records: Option<i64>,
3835    /// <p>The unique ID of the service update</p>
3836    pub service_update_name: Option<String>,
3837    /// <p>The status of the service update</p>
3838    pub service_update_status: Option<Vec<String>>,
3839}
3840
3841/// Serialize `DescribeServiceUpdatesMessage` contents to a `SignedRequest`.
3842struct DescribeServiceUpdatesMessageSerializer;
3843impl DescribeServiceUpdatesMessageSerializer {
3844    fn serialize(params: &mut Params, name: &str, obj: &DescribeServiceUpdatesMessage) {
3845        let mut prefix = name.to_string();
3846        if prefix != "" {
3847            prefix.push_str(".");
3848        }
3849
3850        if let Some(ref field_value) = obj.marker {
3851            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3852        }
3853        if let Some(ref field_value) = obj.max_records {
3854            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3855        }
3856        if let Some(ref field_value) = obj.service_update_name {
3857            params.put(&format!("{}{}", prefix, "ServiceUpdateName"), &field_value);
3858        }
3859        if let Some(ref field_value) = obj.service_update_status {
3860            ServiceUpdateStatusListSerializer::serialize(
3861                params,
3862                &format!("{}{}", prefix, "ServiceUpdateStatus"),
3863                field_value,
3864            );
3865        }
3866    }
3867}
3868
3869/// <p>Represents the output of a <code>DescribeSnapshots</code> operation.</p>
3870#[derive(Clone, Debug, Default, PartialEq)]
3871#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
3872pub struct DescribeSnapshotsListMessage {
3873    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3874    pub marker: Option<String>,
3875    /// <p>A list of snapshots. Each item in the list contains detailed information about one snapshot.</p>
3876    pub snapshots: Option<Vec<Snapshot>>,
3877}
3878
3879#[allow(dead_code)]
3880struct DescribeSnapshotsListMessageDeserializer;
3881impl DescribeSnapshotsListMessageDeserializer {
3882    #[allow(dead_code, unused_variables)]
3883    fn deserialize<T: Peek + Next>(
3884        tag_name: &str,
3885        stack: &mut T,
3886    ) -> Result<DescribeSnapshotsListMessage, XmlParseError> {
3887        deserialize_elements::<_, DescribeSnapshotsListMessage, _>(
3888            tag_name,
3889            stack,
3890            |name, stack, obj| {
3891                match name {
3892                    "Marker" => {
3893                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
3894                    }
3895                    "Snapshots" => {
3896                        obj.snapshots
3897                            .get_or_insert(vec![])
3898                            .extend(SnapshotListDeserializer::deserialize("Snapshots", stack)?);
3899                    }
3900                    _ => skip_tree(stack),
3901                }
3902                Ok(())
3903            },
3904        )
3905    }
3906}
3907/// <p>Represents the input of a <code>DescribeSnapshotsMessage</code> operation.</p>
3908#[derive(Clone, Debug, Default, PartialEq)]
3909#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3910pub struct DescribeSnapshotsMessage {
3911    /// <p>A user-supplied cluster identifier. If this parameter is specified, only snapshots associated with that specific cluster are described.</p>
3912    pub cache_cluster_id: Option<String>,
3913    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3914    pub marker: Option<String>,
3915    /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 50</p> <p>Constraints: minimum 20; maximum 50.</p>
3916    pub max_records: Option<i64>,
3917    /// <p>A user-supplied replication group identifier. If this parameter is specified, only snapshots associated with that specific replication group are described.</p>
3918    pub replication_group_id: Option<String>,
3919    /// <p>A Boolean value which if true, the node group (shard) configuration is included in the snapshot description.</p>
3920    pub show_node_group_config: Option<bool>,
3921    /// <p>A user-supplied name of the snapshot. If this parameter is specified, only this snapshot are described.</p>
3922    pub snapshot_name: Option<String>,
3923    /// <p>If set to <code>system</code>, the output shows snapshots that were automatically created by ElastiCache. If set to <code>user</code> the output shows snapshots that were manually created. If omitted, the output shows both automatically and manually created snapshots.</p>
3924    pub snapshot_source: Option<String>,
3925}
3926
3927/// Serialize `DescribeSnapshotsMessage` contents to a `SignedRequest`.
3928struct DescribeSnapshotsMessageSerializer;
3929impl DescribeSnapshotsMessageSerializer {
3930    fn serialize(params: &mut Params, name: &str, obj: &DescribeSnapshotsMessage) {
3931        let mut prefix = name.to_string();
3932        if prefix != "" {
3933            prefix.push_str(".");
3934        }
3935
3936        if let Some(ref field_value) = obj.cache_cluster_id {
3937            params.put(&format!("{}{}", prefix, "CacheClusterId"), &field_value);
3938        }
3939        if let Some(ref field_value) = obj.marker {
3940            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
3941        }
3942        if let Some(ref field_value) = obj.max_records {
3943            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
3944        }
3945        if let Some(ref field_value) = obj.replication_group_id {
3946            params.put(&format!("{}{}", prefix, "ReplicationGroupId"), &field_value);
3947        }
3948        if let Some(ref field_value) = obj.show_node_group_config {
3949            params.put(
3950                &format!("{}{}", prefix, "ShowNodeGroupConfig"),
3951                &field_value,
3952            );
3953        }
3954        if let Some(ref field_value) = obj.snapshot_name {
3955            params.put(&format!("{}{}", prefix, "SnapshotName"), &field_value);
3956        }
3957        if let Some(ref field_value) = obj.snapshot_source {
3958            params.put(&format!("{}{}", prefix, "SnapshotSource"), &field_value);
3959        }
3960    }
3961}
3962
3963#[derive(Clone, Debug, Default, PartialEq)]
3964#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
3965pub struct DescribeUpdateActionsMessage {
3966    /// <p>The cache cluster IDs</p>
3967    pub cache_cluster_ids: Option<Vec<String>>,
3968    /// <p>The Elasticache engine to which the update applies. Either Redis or Memcached </p>
3969    pub engine: Option<String>,
3970    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
3971    pub marker: Option<String>,
3972    /// <p>The maximum number of records to include in the response</p>
3973    pub max_records: Option<i64>,
3974    /// <p>The replication group IDs</p>
3975    pub replication_group_ids: Option<Vec<String>>,
3976    /// <p>The unique ID of the service update</p>
3977    pub service_update_name: Option<String>,
3978    /// <p>The status of the service update</p>
3979    pub service_update_status: Option<Vec<String>>,
3980    /// <p>The range of time specified to search for service updates that are in available status</p>
3981    pub service_update_time_range: Option<TimeRangeFilter>,
3982    /// <p>Dictates whether to include node level update status in the response </p>
3983    pub show_node_level_update_status: Option<bool>,
3984    /// <p>The status of the update action.</p>
3985    pub update_action_status: Option<Vec<String>>,
3986}
3987
3988/// Serialize `DescribeUpdateActionsMessage` contents to a `SignedRequest`.
3989struct DescribeUpdateActionsMessageSerializer;
3990impl DescribeUpdateActionsMessageSerializer {
3991    fn serialize(params: &mut Params, name: &str, obj: &DescribeUpdateActionsMessage) {
3992        let mut prefix = name.to_string();
3993        if prefix != "" {
3994            prefix.push_str(".");
3995        }
3996
3997        if let Some(ref field_value) = obj.cache_cluster_ids {
3998            CacheClusterIdListSerializer::serialize(
3999                params,
4000                &format!("{}{}", prefix, "CacheClusterIds"),
4001                field_value,
4002            );
4003        }
4004        if let Some(ref field_value) = obj.engine {
4005            params.put(&format!("{}{}", prefix, "Engine"), &field_value);
4006        }
4007        if let Some(ref field_value) = obj.marker {
4008            params.put(&format!("{}{}", prefix, "Marker"), &field_value);
4009        }
4010        if let Some(ref field_value) = obj.max_records {
4011            params.put(&format!("{}{}", prefix, "MaxRecords"), &field_value);
4012        }
4013        if let Some(ref field_value) = obj.replication_group_ids {
4014            ReplicationGroupIdListSerializer::serialize(
4015                params,
4016                &format!("{}{}", prefix, "ReplicationGroupIds"),
4017                field_value,
4018            );
4019        }
4020        if let Some(ref field_value) = obj.service_update_name {
4021            params.put(&format!("{}{}", prefix, "ServiceUpdateName"), &field_value);
4022        }
4023        if let Some(ref field_value) = obj.service_update_status {
4024            ServiceUpdateStatusListSerializer::serialize(
4025                params,
4026                &format!("{}{}", prefix, "ServiceUpdateStatus"),
4027                field_value,
4028            );
4029        }
4030        if let Some(ref field_value) = obj.service_update_time_range {
4031            TimeRangeFilterSerializer::serialize(
4032                params,
4033                &format!("{}{}", prefix, "ServiceUpdateTimeRange"),
4034                field_value,
4035            );
4036        }
4037        if let Some(ref field_value) = obj.show_node_level_update_status {
4038            params.put(
4039                &format!("{}{}", prefix, "ShowNodeLevelUpdateStatus"),
4040                &field_value,
4041            );
4042        }
4043        if let Some(ref field_value) = obj.update_action_status {
4044            UpdateActionStatusListSerializer::serialize(
4045                params,
4046                &format!("{}{}", prefix, "UpdateActionStatus"),
4047                field_value,
4048            );
4049        }
4050    }
4051}
4052
4053#[derive(Clone, Debug, Default, PartialEq)]
4054#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4055pub struct DisassociateGlobalReplicationGroupMessage {
4056    /// <p>The name of the Global Datastore</p>
4057    pub global_replication_group_id: String,
4058    /// <p>The name of the secondary cluster you wish to remove from the Global Datastore</p>
4059    pub replication_group_id: String,
4060    /// <p>The AWS region of secondary cluster you wish to remove from the Global Datastore</p>
4061    pub replication_group_region: String,
4062}
4063
4064/// Serialize `DisassociateGlobalReplicationGroupMessage` contents to a `SignedRequest`.
4065struct DisassociateGlobalReplicationGroupMessageSerializer;
4066impl DisassociateGlobalReplicationGroupMessageSerializer {
4067    fn serialize(params: &mut Params, name: &str, obj: &DisassociateGlobalReplicationGroupMessage) {
4068        let mut prefix = name.to_string();
4069        if prefix != "" {
4070            prefix.push_str(".");
4071        }
4072
4073        params.put(
4074            &format!("{}{}", prefix, "GlobalReplicationGroupId"),
4075            &obj.global_replication_group_id,
4076        );
4077        params.put(
4078            &format!("{}{}", prefix, "ReplicationGroupId"),
4079            &obj.replication_group_id,
4080        );
4081        params.put(
4082            &format!("{}{}", prefix, "ReplicationGroupRegion"),
4083            &obj.replication_group_region,
4084        );
4085    }
4086}
4087
4088#[derive(Clone, Debug, Default, PartialEq)]
4089#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4090pub struct DisassociateGlobalReplicationGroupResult {
4091    pub global_replication_group: Option<GlobalReplicationGroup>,
4092}
4093
4094#[allow(dead_code)]
4095struct DisassociateGlobalReplicationGroupResultDeserializer;
4096impl DisassociateGlobalReplicationGroupResultDeserializer {
4097    #[allow(dead_code, unused_variables)]
4098    fn deserialize<T: Peek + Next>(
4099        tag_name: &str,
4100        stack: &mut T,
4101    ) -> Result<DisassociateGlobalReplicationGroupResult, XmlParseError> {
4102        deserialize_elements::<_, DisassociateGlobalReplicationGroupResult, _>(
4103            tag_name,
4104            stack,
4105            |name, stack, obj| {
4106                match name {
4107                    "GlobalReplicationGroup" => {
4108                        obj.global_replication_group =
4109                            Some(GlobalReplicationGroupDeserializer::deserialize(
4110                                "GlobalReplicationGroup",
4111                                stack,
4112                            )?);
4113                    }
4114                    _ => skip_tree(stack),
4115                }
4116                Ok(())
4117            },
4118        )
4119    }
4120}
4121#[allow(dead_code)]
4122struct DoubleDeserializer;
4123impl DoubleDeserializer {
4124    #[allow(dead_code, unused_variables)]
4125    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
4126        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(f64::from_str(&s).unwrap()))
4127    }
4128}
4129/// <p>Provides ownership and status information for an Amazon EC2 security group.</p>
4130#[derive(Clone, Debug, Default, PartialEq)]
4131#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4132pub struct EC2SecurityGroup {
4133    /// <p>The name of the Amazon EC2 security group.</p>
4134    pub ec2_security_group_name: Option<String>,
4135    /// <p>The AWS account ID of the Amazon EC2 security group owner.</p>
4136    pub ec2_security_group_owner_id: Option<String>,
4137    /// <p>The status of the Amazon EC2 security group.</p>
4138    pub status: Option<String>,
4139}
4140
4141#[allow(dead_code)]
4142struct EC2SecurityGroupDeserializer;
4143impl EC2SecurityGroupDeserializer {
4144    #[allow(dead_code, unused_variables)]
4145    fn deserialize<T: Peek + Next>(
4146        tag_name: &str,
4147        stack: &mut T,
4148    ) -> Result<EC2SecurityGroup, XmlParseError> {
4149        deserialize_elements::<_, EC2SecurityGroup, _>(tag_name, stack, |name, stack, obj| {
4150            match name {
4151                "EC2SecurityGroupName" => {
4152                    obj.ec2_security_group_name = Some(StringDeserializer::deserialize(
4153                        "EC2SecurityGroupName",
4154                        stack,
4155                    )?);
4156                }
4157                "EC2SecurityGroupOwnerId" => {
4158                    obj.ec2_security_group_owner_id = Some(StringDeserializer::deserialize(
4159                        "EC2SecurityGroupOwnerId",
4160                        stack,
4161                    )?);
4162                }
4163                "Status" => {
4164                    obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
4165                }
4166                _ => skip_tree(stack),
4167            }
4168            Ok(())
4169        })
4170    }
4171}
4172#[allow(dead_code)]
4173struct EC2SecurityGroupListDeserializer;
4174impl EC2SecurityGroupListDeserializer {
4175    #[allow(dead_code, unused_variables)]
4176    fn deserialize<T: Peek + Next>(
4177        tag_name: &str,
4178        stack: &mut T,
4179    ) -> Result<Vec<EC2SecurityGroup>, XmlParseError> {
4180        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4181            if name == "EC2SecurityGroup" {
4182                obj.push(EC2SecurityGroupDeserializer::deserialize(
4183                    "EC2SecurityGroup",
4184                    stack,
4185                )?);
4186            } else {
4187                skip_tree(stack);
4188            }
4189            Ok(())
4190        })
4191    }
4192}
4193/// <p>Represents the information required for client programs to connect to a cache node.</p>
4194#[derive(Clone, Debug, Default, PartialEq)]
4195#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4196pub struct Endpoint {
4197    /// <p>The DNS hostname of the cache node.</p>
4198    pub address: Option<String>,
4199    /// <p>The port number that the cache engine is listening on.</p>
4200    pub port: Option<i64>,
4201}
4202
4203#[allow(dead_code)]
4204struct EndpointDeserializer;
4205impl EndpointDeserializer {
4206    #[allow(dead_code, unused_variables)]
4207    fn deserialize<T: Peek + Next>(
4208        tag_name: &str,
4209        stack: &mut T,
4210    ) -> Result<Endpoint, XmlParseError> {
4211        deserialize_elements::<_, Endpoint, _>(tag_name, stack, |name, stack, obj| {
4212            match name {
4213                "Address" => {
4214                    obj.address = Some(StringDeserializer::deserialize("Address", stack)?);
4215                }
4216                "Port" => {
4217                    obj.port = Some(IntegerDeserializer::deserialize("Port", stack)?);
4218                }
4219                _ => skip_tree(stack),
4220            }
4221            Ok(())
4222        })
4223    }
4224}
4225/// <p>Represents the output of a <code>DescribeEngineDefaultParameters</code> operation.</p>
4226#[derive(Clone, Debug, Default, PartialEq)]
4227#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4228pub struct EngineDefaults {
4229    /// <p>A list of parameters specific to a particular cache node type. Each element in the list contains detailed information about one parameter.</p>
4230    pub cache_node_type_specific_parameters: Option<Vec<CacheNodeTypeSpecificParameter>>,
4231    /// <p>Specifies the name of the cache parameter group family to which the engine default parameters apply.</p> <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | </p>
4232    pub cache_parameter_group_family: Option<String>,
4233    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
4234    pub marker: Option<String>,
4235    /// <p>Contains a list of engine default parameters.</p>
4236    pub parameters: Option<Vec<Parameter>>,
4237}
4238
4239#[allow(dead_code)]
4240struct EngineDefaultsDeserializer;
4241impl EngineDefaultsDeserializer {
4242    #[allow(dead_code, unused_variables)]
4243    fn deserialize<T: Peek + Next>(
4244        tag_name: &str,
4245        stack: &mut T,
4246    ) -> Result<EngineDefaults, XmlParseError> {
4247        deserialize_elements::<_, EngineDefaults, _>(tag_name, stack, |name, stack, obj| {
4248            match name {
4249                "CacheNodeTypeSpecificParameters" => {
4250                    obj.cache_node_type_specific_parameters
4251                        .get_or_insert(vec![])
4252                        .extend(
4253                            CacheNodeTypeSpecificParametersListDeserializer::deserialize(
4254                                "CacheNodeTypeSpecificParameters",
4255                                stack,
4256                            )?,
4257                        );
4258                }
4259                "CacheParameterGroupFamily" => {
4260                    obj.cache_parameter_group_family = Some(StringDeserializer::deserialize(
4261                        "CacheParameterGroupFamily",
4262                        stack,
4263                    )?);
4264                }
4265                "Marker" => {
4266                    obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
4267                }
4268                "Parameters" => {
4269                    obj.parameters.get_or_insert(vec![]).extend(
4270                        ParametersListDeserializer::deserialize("Parameters", stack)?,
4271                    );
4272                }
4273                _ => skip_tree(stack),
4274            }
4275            Ok(())
4276        })
4277    }
4278}
4279/// <p>Represents a single occurrence of something interesting within the system. Some examples of events are creating a cluster, adding or removing a cache node, or rebooting a node.</p>
4280#[derive(Clone, Debug, Default, PartialEq)]
4281#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4282pub struct Event {
4283    /// <p>The date and time when the event occurred.</p>
4284    pub date: Option<String>,
4285    /// <p>The text of the event.</p>
4286    pub message: Option<String>,
4287    /// <p>The identifier for the source of the event. For example, if the event occurred at the cluster level, the identifier would be the name of the cluster.</p>
4288    pub source_identifier: Option<String>,
4289    /// <p>Specifies the origin of this event - a cluster, a parameter group, a security group, etc.</p>
4290    pub source_type: Option<String>,
4291}
4292
4293#[allow(dead_code)]
4294struct EventDeserializer;
4295impl EventDeserializer {
4296    #[allow(dead_code, unused_variables)]
4297    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Event, XmlParseError> {
4298        deserialize_elements::<_, Event, _>(tag_name, stack, |name, stack, obj| {
4299            match name {
4300                "Date" => {
4301                    obj.date = Some(TStampDeserializer::deserialize("Date", stack)?);
4302                }
4303                "Message" => {
4304                    obj.message = Some(StringDeserializer::deserialize("Message", stack)?);
4305                }
4306                "SourceIdentifier" => {
4307                    obj.source_identifier =
4308                        Some(StringDeserializer::deserialize("SourceIdentifier", stack)?);
4309                }
4310                "SourceType" => {
4311                    obj.source_type =
4312                        Some(SourceTypeDeserializer::deserialize("SourceType", stack)?);
4313                }
4314                _ => skip_tree(stack),
4315            }
4316            Ok(())
4317        })
4318    }
4319}
4320#[allow(dead_code)]
4321struct EventListDeserializer;
4322impl EventListDeserializer {
4323    #[allow(dead_code, unused_variables)]
4324    fn deserialize<T: Peek + Next>(
4325        tag_name: &str,
4326        stack: &mut T,
4327    ) -> Result<Vec<Event>, XmlParseError> {
4328        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4329            if name == "Event" {
4330                obj.push(EventDeserializer::deserialize("Event", stack)?);
4331            } else {
4332                skip_tree(stack);
4333            }
4334            Ok(())
4335        })
4336    }
4337}
4338/// <p>Represents the output of a <code>DescribeEvents</code> operation.</p>
4339#[derive(Clone, Debug, Default, PartialEq)]
4340#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4341pub struct EventsMessage {
4342    /// <p>A list of events. Each element in the list contains detailed information about one event.</p>
4343    pub events: Option<Vec<Event>>,
4344    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
4345    pub marker: Option<String>,
4346}
4347
4348#[allow(dead_code)]
4349struct EventsMessageDeserializer;
4350impl EventsMessageDeserializer {
4351    #[allow(dead_code, unused_variables)]
4352    fn deserialize<T: Peek + Next>(
4353        tag_name: &str,
4354        stack: &mut T,
4355    ) -> Result<EventsMessage, XmlParseError> {
4356        deserialize_elements::<_, EventsMessage, _>(tag_name, stack, |name, stack, obj| {
4357            match name {
4358                "Events" => {
4359                    obj.events
4360                        .get_or_insert(vec![])
4361                        .extend(EventListDeserializer::deserialize("Events", stack)?);
4362                }
4363                "Marker" => {
4364                    obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
4365                }
4366                _ => skip_tree(stack),
4367            }
4368            Ok(())
4369        })
4370    }
4371}
4372#[derive(Clone, Debug, Default, PartialEq)]
4373#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4374pub struct FailoverGlobalReplicationGroupMessage {
4375    /// <p>The name of the Global Datastore</p>
4376    pub global_replication_group_id: String,
4377    /// <p>The AWS region of the primary cluster of the Global Datastore</p>
4378    pub primary_region: String,
4379    /// <p>The name of the primary replication group</p>
4380    pub primary_replication_group_id: String,
4381}
4382
4383/// Serialize `FailoverGlobalReplicationGroupMessage` contents to a `SignedRequest`.
4384struct FailoverGlobalReplicationGroupMessageSerializer;
4385impl FailoverGlobalReplicationGroupMessageSerializer {
4386    fn serialize(params: &mut Params, name: &str, obj: &FailoverGlobalReplicationGroupMessage) {
4387        let mut prefix = name.to_string();
4388        if prefix != "" {
4389            prefix.push_str(".");
4390        }
4391
4392        params.put(
4393            &format!("{}{}", prefix, "GlobalReplicationGroupId"),
4394            &obj.global_replication_group_id,
4395        );
4396        params.put(
4397            &format!("{}{}", prefix, "PrimaryRegion"),
4398            &obj.primary_region,
4399        );
4400        params.put(
4401            &format!("{}{}", prefix, "PrimaryReplicationGroupId"),
4402            &obj.primary_replication_group_id,
4403        );
4404    }
4405}
4406
4407#[derive(Clone, Debug, Default, PartialEq)]
4408#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4409pub struct FailoverGlobalReplicationGroupResult {
4410    pub global_replication_group: Option<GlobalReplicationGroup>,
4411}
4412
4413#[allow(dead_code)]
4414struct FailoverGlobalReplicationGroupResultDeserializer;
4415impl FailoverGlobalReplicationGroupResultDeserializer {
4416    #[allow(dead_code, unused_variables)]
4417    fn deserialize<T: Peek + Next>(
4418        tag_name: &str,
4419        stack: &mut T,
4420    ) -> Result<FailoverGlobalReplicationGroupResult, XmlParseError> {
4421        deserialize_elements::<_, FailoverGlobalReplicationGroupResult, _>(
4422            tag_name,
4423            stack,
4424            |name, stack, obj| {
4425                match name {
4426                    "GlobalReplicationGroup" => {
4427                        obj.global_replication_group =
4428                            Some(GlobalReplicationGroupDeserializer::deserialize(
4429                                "GlobalReplicationGroup",
4430                                stack,
4431                            )?);
4432                    }
4433                    _ => skip_tree(stack),
4434                }
4435                Ok(())
4436            },
4437        )
4438    }
4439}
4440/// <p>Indicates the slot configuration and global identifier for a slice group.</p>
4441#[derive(Clone, Debug, Default, PartialEq)]
4442#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4443pub struct GlobalNodeGroup {
4444    /// <p>The name of the global node group</p>
4445    pub global_node_group_id: Option<String>,
4446    /// <p>The keyspace for this node group</p>
4447    pub slots: Option<String>,
4448}
4449
4450#[allow(dead_code)]
4451struct GlobalNodeGroupDeserializer;
4452impl GlobalNodeGroupDeserializer {
4453    #[allow(dead_code, unused_variables)]
4454    fn deserialize<T: Peek + Next>(
4455        tag_name: &str,
4456        stack: &mut T,
4457    ) -> Result<GlobalNodeGroup, XmlParseError> {
4458        deserialize_elements::<_, GlobalNodeGroup, _>(tag_name, stack, |name, stack, obj| {
4459            match name {
4460                "GlobalNodeGroupId" => {
4461                    obj.global_node_group_id =
4462                        Some(StringDeserializer::deserialize("GlobalNodeGroupId", stack)?);
4463                }
4464                "Slots" => {
4465                    obj.slots = Some(StringDeserializer::deserialize("Slots", stack)?);
4466                }
4467                _ => skip_tree(stack),
4468            }
4469            Ok(())
4470        })
4471    }
4472}
4473
4474/// Serialize `GlobalNodeGroupIdList` contents to a `SignedRequest`.
4475struct GlobalNodeGroupIdListSerializer;
4476impl GlobalNodeGroupIdListSerializer {
4477    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
4478        for (index, obj) in obj.iter().enumerate() {
4479            let key = format!("{}.member.{}", name, index + 1);
4480            params.put(&key, &obj);
4481        }
4482    }
4483}
4484
4485#[allow(dead_code)]
4486struct GlobalNodeGroupListDeserializer;
4487impl GlobalNodeGroupListDeserializer {
4488    #[allow(dead_code, unused_variables)]
4489    fn deserialize<T: Peek + Next>(
4490        tag_name: &str,
4491        stack: &mut T,
4492    ) -> Result<Vec<GlobalNodeGroup>, XmlParseError> {
4493        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4494            if name == "GlobalNodeGroup" {
4495                obj.push(GlobalNodeGroupDeserializer::deserialize(
4496                    "GlobalNodeGroup",
4497                    stack,
4498                )?);
4499            } else {
4500                skip_tree(stack);
4501            }
4502            Ok(())
4503        })
4504    }
4505}
4506/// <p><p>Consists of a primary cluster that accepts writes and an associated secondary cluster that resides in a different AWS region. The secondary cluster accepts only reads. The primary cluster automatically replicates updates to the secondary cluster.</p> <ul> <li> <p>The <b>GlobalReplicationGroupIdSuffix</b> represents the name of the Global Datastore, which is what you use to associate a secondary cluster.</p> </li> </ul></p>
4507#[derive(Clone, Debug, Default, PartialEq)]
4508#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4509pub struct GlobalReplicationGroup {
4510    /// <p>The ARN (Amazon Resource Name) of the global replication group.</p>
4511    pub arn: Option<String>,
4512    /// <p>A flag that enables encryption at rest when set to <code>true</code>.</p> <p>You cannot modify the value of <code>AtRestEncryptionEnabled</code> after the replication group is created. To enable encryption at rest on a replication group you must set <code>AtRestEncryptionEnabled</code> to <code>true</code> when you create the replication group. </p> <p> <b>Required:</b> Only available when creating a replication group in an Amazon VPC using redis version <code>3.2.6</code>, <code>4.x</code> or later.</p>
4513    pub at_rest_encryption_enabled: Option<bool>,
4514    /// <p>A flag that enables using an <code>AuthToken</code> (password) when issuing Redis commands.</p> <p>Default: <code>false</code> </p>
4515    pub auth_token_enabled: Option<bool>,
4516    /// <p>The cache node type of the Global Datastore</p>
4517    pub cache_node_type: Option<String>,
4518    /// <p>A flag that indicates whether the Global Datastore is cluster enabled.</p>
4519    pub cluster_enabled: Option<bool>,
4520    /// <p>The Elasticache engine. For Redis only.</p>
4521    pub engine: Option<String>,
4522    /// <p>The Elasticache Redis engine version. For preview, it is Redis version 5.0.5 only.</p>
4523    pub engine_version: Option<String>,
4524    /// <p>Indicates the slot configuration and global identifier for each slice group.</p>
4525    pub global_node_groups: Option<Vec<GlobalNodeGroup>>,
4526    /// <p>The optional description of the Global Datastore</p>
4527    pub global_replication_group_description: Option<String>,
4528    /// <p>The name of the Global Datastore</p>
4529    pub global_replication_group_id: Option<String>,
4530    /// <p>The replication groups that comprise the Global Datastore.</p>
4531    pub members: Option<Vec<GlobalReplicationGroupMember>>,
4532    /// <p>The status of the Global Datastore</p>
4533    pub status: Option<String>,
4534    /// <p>A flag that enables in-transit encryption when set to true. You cannot modify the value of <code>TransitEncryptionEnabled</code> after the cluster is created. To enable in-transit encryption on a cluster you must set <code>TransitEncryptionEnabled</code> to true when you create a cluster. </p>
4535    pub transit_encryption_enabled: Option<bool>,
4536}
4537
4538#[allow(dead_code)]
4539struct GlobalReplicationGroupDeserializer;
4540impl GlobalReplicationGroupDeserializer {
4541    #[allow(dead_code, unused_variables)]
4542    fn deserialize<T: Peek + Next>(
4543        tag_name: &str,
4544        stack: &mut T,
4545    ) -> Result<GlobalReplicationGroup, XmlParseError> {
4546        deserialize_elements::<_, GlobalReplicationGroup, _>(tag_name, stack, |name, stack, obj| {
4547            match name {
4548                "ARN" => {
4549                    obj.arn = Some(StringDeserializer::deserialize("ARN", stack)?);
4550                }
4551                "AtRestEncryptionEnabled" => {
4552                    obj.at_rest_encryption_enabled = Some(
4553                        BooleanOptionalDeserializer::deserialize("AtRestEncryptionEnabled", stack)?,
4554                    );
4555                }
4556                "AuthTokenEnabled" => {
4557                    obj.auth_token_enabled = Some(BooleanOptionalDeserializer::deserialize(
4558                        "AuthTokenEnabled",
4559                        stack,
4560                    )?);
4561                }
4562                "CacheNodeType" => {
4563                    obj.cache_node_type =
4564                        Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
4565                }
4566                "ClusterEnabled" => {
4567                    obj.cluster_enabled = Some(BooleanOptionalDeserializer::deserialize(
4568                        "ClusterEnabled",
4569                        stack,
4570                    )?);
4571                }
4572                "Engine" => {
4573                    obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
4574                }
4575                "EngineVersion" => {
4576                    obj.engine_version =
4577                        Some(StringDeserializer::deserialize("EngineVersion", stack)?);
4578                }
4579                "GlobalNodeGroups" => {
4580                    obj.global_node_groups.get_or_insert(vec![]).extend(
4581                        GlobalNodeGroupListDeserializer::deserialize("GlobalNodeGroups", stack)?,
4582                    );
4583                }
4584                "GlobalReplicationGroupDescription" => {
4585                    obj.global_replication_group_description =
4586                        Some(StringDeserializer::deserialize(
4587                            "GlobalReplicationGroupDescription",
4588                            stack,
4589                        )?);
4590                }
4591                "GlobalReplicationGroupId" => {
4592                    obj.global_replication_group_id = Some(StringDeserializer::deserialize(
4593                        "GlobalReplicationGroupId",
4594                        stack,
4595                    )?);
4596                }
4597                "Members" => {
4598                    obj.members.get_or_insert(vec![]).extend(
4599                        GlobalReplicationGroupMemberListDeserializer::deserialize(
4600                            "Members", stack,
4601                        )?,
4602                    );
4603                }
4604                "Status" => {
4605                    obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
4606                }
4607                "TransitEncryptionEnabled" => {
4608                    obj.transit_encryption_enabled =
4609                        Some(BooleanOptionalDeserializer::deserialize(
4610                            "TransitEncryptionEnabled",
4611                            stack,
4612                        )?);
4613                }
4614                _ => skip_tree(stack),
4615            }
4616            Ok(())
4617        })
4618    }
4619}
4620/// <p>The name of the Global Datastore and role of this replication group in the Global Datastore.</p>
4621#[derive(Clone, Debug, Default, PartialEq)]
4622#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4623pub struct GlobalReplicationGroupInfo {
4624    /// <p>The name of the Global Datastore</p>
4625    pub global_replication_group_id: Option<String>,
4626    /// <p>The role of the replication group in a Global Datastore. Can be primary or secondary.</p>
4627    pub global_replication_group_member_role: Option<String>,
4628}
4629
4630#[allow(dead_code)]
4631struct GlobalReplicationGroupInfoDeserializer;
4632impl GlobalReplicationGroupInfoDeserializer {
4633    #[allow(dead_code, unused_variables)]
4634    fn deserialize<T: Peek + Next>(
4635        tag_name: &str,
4636        stack: &mut T,
4637    ) -> Result<GlobalReplicationGroupInfo, XmlParseError> {
4638        deserialize_elements::<_, GlobalReplicationGroupInfo, _>(
4639            tag_name,
4640            stack,
4641            |name, stack, obj| {
4642                match name {
4643                    "GlobalReplicationGroupId" => {
4644                        obj.global_replication_group_id = Some(StringDeserializer::deserialize(
4645                            "GlobalReplicationGroupId",
4646                            stack,
4647                        )?);
4648                    }
4649                    "GlobalReplicationGroupMemberRole" => {
4650                        obj.global_replication_group_member_role =
4651                            Some(StringDeserializer::deserialize(
4652                                "GlobalReplicationGroupMemberRole",
4653                                stack,
4654                            )?);
4655                    }
4656                    _ => skip_tree(stack),
4657                }
4658                Ok(())
4659            },
4660        )
4661    }
4662}
4663#[allow(dead_code)]
4664struct GlobalReplicationGroupListDeserializer;
4665impl GlobalReplicationGroupListDeserializer {
4666    #[allow(dead_code, unused_variables)]
4667    fn deserialize<T: Peek + Next>(
4668        tag_name: &str,
4669        stack: &mut T,
4670    ) -> Result<Vec<GlobalReplicationGroup>, XmlParseError> {
4671        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4672            if name == "GlobalReplicationGroup" {
4673                obj.push(GlobalReplicationGroupDeserializer::deserialize(
4674                    "GlobalReplicationGroup",
4675                    stack,
4676                )?);
4677            } else {
4678                skip_tree(stack);
4679            }
4680            Ok(())
4681        })
4682    }
4683}
4684/// <p>A member of a Global Datastore. It contains the Replication Group Id, the AWS region and the role of the replication group. </p>
4685#[derive(Clone, Debug, Default, PartialEq)]
4686#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4687pub struct GlobalReplicationGroupMember {
4688    /// <p>Indicates whether automatic failover is enabled for the replication group.</p>
4689    pub automatic_failover: Option<String>,
4690    /// <p>The replication group id of the Global Datastore member.</p>
4691    pub replication_group_id: Option<String>,
4692    /// <p>The AWS region of the Global Datastore member.</p>
4693    pub replication_group_region: Option<String>,
4694    /// <p>Indicates the role of the replication group, primary or secondary.</p>
4695    pub role: Option<String>,
4696    /// <p>The status of the membership of the replication group.</p>
4697    pub status: Option<String>,
4698}
4699
4700#[allow(dead_code)]
4701struct GlobalReplicationGroupMemberDeserializer;
4702impl GlobalReplicationGroupMemberDeserializer {
4703    #[allow(dead_code, unused_variables)]
4704    fn deserialize<T: Peek + Next>(
4705        tag_name: &str,
4706        stack: &mut T,
4707    ) -> Result<GlobalReplicationGroupMember, XmlParseError> {
4708        deserialize_elements::<_, GlobalReplicationGroupMember, _>(
4709            tag_name,
4710            stack,
4711            |name, stack, obj| {
4712                match name {
4713                    "AutomaticFailover" => {
4714                        obj.automatic_failover =
4715                            Some(AutomaticFailoverStatusDeserializer::deserialize(
4716                                "AutomaticFailover",
4717                                stack,
4718                            )?);
4719                    }
4720                    "ReplicationGroupId" => {
4721                        obj.replication_group_id = Some(StringDeserializer::deserialize(
4722                            "ReplicationGroupId",
4723                            stack,
4724                        )?);
4725                    }
4726                    "ReplicationGroupRegion" => {
4727                        obj.replication_group_region = Some(StringDeserializer::deserialize(
4728                            "ReplicationGroupRegion",
4729                            stack,
4730                        )?);
4731                    }
4732                    "Role" => {
4733                        obj.role = Some(StringDeserializer::deserialize("Role", stack)?);
4734                    }
4735                    "Status" => {
4736                        obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
4737                    }
4738                    _ => skip_tree(stack),
4739                }
4740                Ok(())
4741            },
4742        )
4743    }
4744}
4745#[allow(dead_code)]
4746struct GlobalReplicationGroupMemberListDeserializer;
4747impl GlobalReplicationGroupMemberListDeserializer {
4748    #[allow(dead_code, unused_variables)]
4749    fn deserialize<T: Peek + Next>(
4750        tag_name: &str,
4751        stack: &mut T,
4752    ) -> Result<Vec<GlobalReplicationGroupMember>, XmlParseError> {
4753        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
4754            if name == "GlobalReplicationGroupMember" {
4755                obj.push(GlobalReplicationGroupMemberDeserializer::deserialize(
4756                    "GlobalReplicationGroupMember",
4757                    stack,
4758                )?);
4759            } else {
4760                skip_tree(stack);
4761            }
4762            Ok(())
4763        })
4764    }
4765}
4766#[derive(Clone, Debug, Default, PartialEq)]
4767#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4768pub struct IncreaseNodeGroupsInGlobalReplicationGroupMessage {
4769    /// <p>Indicates that the process begins immediately. At present, the only permitted value for this parameter is true.</p>
4770    pub apply_immediately: bool,
4771    /// <p>The name of the Global Datastore</p>
4772    pub global_replication_group_id: String,
4773    /// <p>The number of node groups you wish to add</p>
4774    pub node_group_count: i64,
4775    /// <p>Describes the replication group IDs, the AWS regions where they are stored and the shard configuration for each that comprise the Global Datastore</p>
4776    pub regional_configurations: Option<Vec<RegionalConfiguration>>,
4777}
4778
4779/// Serialize `IncreaseNodeGroupsInGlobalReplicationGroupMessage` contents to a `SignedRequest`.
4780struct IncreaseNodeGroupsInGlobalReplicationGroupMessageSerializer;
4781impl IncreaseNodeGroupsInGlobalReplicationGroupMessageSerializer {
4782    fn serialize(
4783        params: &mut Params,
4784        name: &str,
4785        obj: &IncreaseNodeGroupsInGlobalReplicationGroupMessage,
4786    ) {
4787        let mut prefix = name.to_string();
4788        if prefix != "" {
4789            prefix.push_str(".");
4790        }
4791
4792        params.put(
4793            &format!("{}{}", prefix, "ApplyImmediately"),
4794            &obj.apply_immediately,
4795        );
4796        params.put(
4797            &format!("{}{}", prefix, "GlobalReplicationGroupId"),
4798            &obj.global_replication_group_id,
4799        );
4800        params.put(
4801            &format!("{}{}", prefix, "NodeGroupCount"),
4802            &obj.node_group_count,
4803        );
4804        if let Some(ref field_value) = obj.regional_configurations {
4805            RegionalConfigurationListSerializer::serialize(
4806                params,
4807                &format!("{}{}", prefix, "RegionalConfiguration"),
4808                field_value,
4809            );
4810        }
4811    }
4812}
4813
4814#[derive(Clone, Debug, Default, PartialEq)]
4815#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4816pub struct IncreaseNodeGroupsInGlobalReplicationGroupResult {
4817    pub global_replication_group: Option<GlobalReplicationGroup>,
4818}
4819
4820#[allow(dead_code)]
4821struct IncreaseNodeGroupsInGlobalReplicationGroupResultDeserializer;
4822impl IncreaseNodeGroupsInGlobalReplicationGroupResultDeserializer {
4823    #[allow(dead_code, unused_variables)]
4824    fn deserialize<T: Peek + Next>(
4825        tag_name: &str,
4826        stack: &mut T,
4827    ) -> Result<IncreaseNodeGroupsInGlobalReplicationGroupResult, XmlParseError> {
4828        deserialize_elements::<_, IncreaseNodeGroupsInGlobalReplicationGroupResult, _>(
4829            tag_name,
4830            stack,
4831            |name, stack, obj| {
4832                match name {
4833                    "GlobalReplicationGroup" => {
4834                        obj.global_replication_group =
4835                            Some(GlobalReplicationGroupDeserializer::deserialize(
4836                                "GlobalReplicationGroup",
4837                                stack,
4838                            )?);
4839                    }
4840                    _ => skip_tree(stack),
4841                }
4842                Ok(())
4843            },
4844        )
4845    }
4846}
4847#[derive(Clone, Debug, Default, PartialEq)]
4848#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4849pub struct IncreaseReplicaCountMessage {
4850    /// <p>If <code>True</code>, the number of replica nodes is increased immediately. <code>ApplyImmediately=False</code> is not currently supported.</p>
4851    pub apply_immediately: bool,
4852    /// <p>The number of read replica nodes you want at the completion of this operation. For Redis (cluster mode disabled) replication groups, this is the number of replica nodes in the replication group. For Redis (cluster mode enabled) replication groups, this is the number of replica nodes in each of the replication group's node groups.</p>
4853    pub new_replica_count: Option<i64>,
4854    /// <p>A list of <code>ConfigureShard</code> objects that can be used to configure each shard in a Redis (cluster mode enabled) replication group. The <code>ConfigureShard</code> has three members: <code>NewReplicaCount</code>, <code>NodeGroupId</code>, and <code>PreferredAvailabilityZones</code>.</p>
4855    pub replica_configuration: Option<Vec<ConfigureShard>>,
4856    /// <p>The id of the replication group to which you want to add replica nodes.</p>
4857    pub replication_group_id: String,
4858}
4859
4860/// Serialize `IncreaseReplicaCountMessage` contents to a `SignedRequest`.
4861struct IncreaseReplicaCountMessageSerializer;
4862impl IncreaseReplicaCountMessageSerializer {
4863    fn serialize(params: &mut Params, name: &str, obj: &IncreaseReplicaCountMessage) {
4864        let mut prefix = name.to_string();
4865        if prefix != "" {
4866            prefix.push_str(".");
4867        }
4868
4869        params.put(
4870            &format!("{}{}", prefix, "ApplyImmediately"),
4871            &obj.apply_immediately,
4872        );
4873        if let Some(ref field_value) = obj.new_replica_count {
4874            params.put(&format!("{}{}", prefix, "NewReplicaCount"), &field_value);
4875        }
4876        if let Some(ref field_value) = obj.replica_configuration {
4877            ReplicaConfigurationListSerializer::serialize(
4878                params,
4879                &format!("{}{}", prefix, "ConfigureShard"),
4880                field_value,
4881            );
4882        }
4883        params.put(
4884            &format!("{}{}", prefix, "ReplicationGroupId"),
4885            &obj.replication_group_id,
4886        );
4887    }
4888}
4889
4890#[derive(Clone, Debug, Default, PartialEq)]
4891#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
4892pub struct IncreaseReplicaCountResult {
4893    pub replication_group: Option<ReplicationGroup>,
4894}
4895
4896#[allow(dead_code)]
4897struct IncreaseReplicaCountResultDeserializer;
4898impl IncreaseReplicaCountResultDeserializer {
4899    #[allow(dead_code, unused_variables)]
4900    fn deserialize<T: Peek + Next>(
4901        tag_name: &str,
4902        stack: &mut T,
4903    ) -> Result<IncreaseReplicaCountResult, XmlParseError> {
4904        deserialize_elements::<_, IncreaseReplicaCountResult, _>(
4905            tag_name,
4906            stack,
4907            |name, stack, obj| {
4908                match name {
4909                    "ReplicationGroup" => {
4910                        obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
4911                            "ReplicationGroup",
4912                            stack,
4913                        )?);
4914                    }
4915                    _ => skip_tree(stack),
4916                }
4917                Ok(())
4918            },
4919        )
4920    }
4921}
4922#[allow(dead_code)]
4923struct IntegerDeserializer;
4924impl IntegerDeserializer {
4925    #[allow(dead_code, unused_variables)]
4926    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
4927        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
4928    }
4929}
4930#[allow(dead_code)]
4931struct IntegerOptionalDeserializer;
4932impl IntegerOptionalDeserializer {
4933    #[allow(dead_code, unused_variables)]
4934    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
4935        xml_util::deserialize_primitive(tag_name, stack, |s| Ok(i64::from_str(&s).unwrap()))
4936    }
4937}
4938
4939/// Serialize `KeyList` contents to a `SignedRequest`.
4940struct KeyListSerializer;
4941impl KeyListSerializer {
4942    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
4943        for (index, obj) in obj.iter().enumerate() {
4944            let key = format!("{}.member.{}", name, index + 1);
4945            params.put(&key, &obj);
4946        }
4947    }
4948}
4949
4950/// <p>The input parameters for the <code>ListAllowedNodeTypeModifications</code> operation.</p>
4951#[derive(Clone, Debug, Default, PartialEq)]
4952#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4953pub struct ListAllowedNodeTypeModificationsMessage {
4954    /// <p><p>The name of the cluster you want to scale up to a larger node instanced type. ElastiCache uses the cluster id to identify the current node type of this cluster and from that to create a list of node types you can scale up to.</p> <important> <p>You must provide a value for either the <code>CacheClusterId</code> or the <code>ReplicationGroupId</code>.</p> </important></p>
4955    pub cache_cluster_id: Option<String>,
4956    /// <p><p>The name of the replication group want to scale up to a larger node type. ElastiCache uses the replication group id to identify the current node type being used by this replication group, and from that to create a list of node types you can scale up to.</p> <important> <p>You must provide a value for either the <code>CacheClusterId</code> or the <code>ReplicationGroupId</code>.</p> </important></p>
4957    pub replication_group_id: Option<String>,
4958}
4959
4960/// Serialize `ListAllowedNodeTypeModificationsMessage` contents to a `SignedRequest`.
4961struct ListAllowedNodeTypeModificationsMessageSerializer;
4962impl ListAllowedNodeTypeModificationsMessageSerializer {
4963    fn serialize(params: &mut Params, name: &str, obj: &ListAllowedNodeTypeModificationsMessage) {
4964        let mut prefix = name.to_string();
4965        if prefix != "" {
4966            prefix.push_str(".");
4967        }
4968
4969        if let Some(ref field_value) = obj.cache_cluster_id {
4970            params.put(&format!("{}{}", prefix, "CacheClusterId"), &field_value);
4971        }
4972        if let Some(ref field_value) = obj.replication_group_id {
4973            params.put(&format!("{}{}", prefix, "ReplicationGroupId"), &field_value);
4974        }
4975    }
4976}
4977
4978/// <p>The input parameters for the <code>ListTagsForResource</code> operation.</p>
4979#[derive(Clone, Debug, Default, PartialEq)]
4980#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
4981pub struct ListTagsForResourceMessage {
4982    /// <p>The Amazon Resource Name (ARN) of the resource for which you want the list of tags, for example <code>arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster</code> or <code>arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot</code>.</p> <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>.</p>
4983    pub resource_name: String,
4984}
4985
4986/// Serialize `ListTagsForResourceMessage` contents to a `SignedRequest`.
4987struct ListTagsForResourceMessageSerializer;
4988impl ListTagsForResourceMessageSerializer {
4989    fn serialize(params: &mut Params, name: &str, obj: &ListTagsForResourceMessage) {
4990        let mut prefix = name.to_string();
4991        if prefix != "" {
4992            prefix.push_str(".");
4993        }
4994
4995        params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
4996    }
4997}
4998
4999/// <p>Represents the input of a <code>ModifyCacheCluster</code> operation.</p>
5000#[derive(Clone, Debug, Default, PartialEq)]
5001#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5002pub struct ModifyCacheClusterMessage {
5003    /// <p><p>Specifies whether the new nodes in this Memcached cluster are all created in a single Availability Zone or created across multiple Availability Zones.</p> <p>Valid values: <code>single-az</code> | <code>cross-az</code>.</p> <p>This option is only supported for Memcached clusters.</p> <note> <p>You cannot specify <code>single-az</code> if the Memcached cluster already has cache nodes in different Availability Zones. If <code>cross-az</code> is specified, existing Memcached nodes remain in their current Availability Zone.</p> <p>Only newly created nodes are located in different Availability Zones. </p> </note></p>
5004    pub az_mode: Option<String>,
5005    /// <p>If <code>true</code>, this parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible, regardless of the <code>PreferredMaintenanceWindow</code> setting for the cluster.</p> <p>If <code>false</code>, changes to the cluster are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first.</p> <important> <p>If you perform a <code>ModifyCacheCluster</code> before a pending modification is applied, the pending modification is replaced by the newer modification.</p> </important> <p>Valid values: <code>true</code> | <code>false</code> </p> <p>Default: <code>false</code> </p>
5006    pub apply_immediately: Option<bool>,
5007    /// <p>Reserved parameter. The password used to access a password protected server. This parameter must be specified with the <code>auth-token-update</code> parameter. Password constraints:</p> <ul> <li> <p>Must be only printable ASCII characters</p> </li> <li> <p>Must be at least 16 characters and no more than 128 characters in length</p> </li> <li> <p>Cannot contain any of the following characters: '/', '"', or '@', '%'</p> </li> </ul> <p> For more information, see AUTH password at <a href="http://redis.io/commands/AUTH">AUTH</a>.</p>
5008    pub auth_token: Option<String>,
5009    /// <p>Specifies the strategy to use to update the AUTH token. This parameter must be specified with the <code>auth-token</code> parameter. Possible values:</p> <ul> <li> <p>Rotate</p> </li> <li> <p>Set</p> </li> </ul> <p> For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html">Authenticating Users with Redis AUTH</a> </p>
5010    pub auth_token_update_strategy: Option<String>,
5011    /// <p>This parameter is currently disabled.</p>
5012    pub auto_minor_version_upgrade: Option<bool>,
5013    /// <p>The cluster identifier. This value is stored as a lowercase string.</p>
5014    pub cache_cluster_id: String,
5015    /// <p>A list of cache node IDs to be removed. A node ID is a numeric identifier (0001, 0002, etc.). This parameter is only valid when <code>NumCacheNodes</code> is less than the existing number of cache nodes. The number of cache node IDs supplied in this parameter must match the difference between the existing number of cache nodes in the cluster or pending cache nodes, whichever is greater, and the value of <code>NumCacheNodes</code> in the request.</p> <p>For example: If you have 3 active cache nodes, 7 pending cache nodes, and the number of cache nodes in this <code>ModifyCacheCluster</code> call is 5, you must list 2 (7 - 5) cache node IDs to remove.</p>
5016    pub cache_node_ids_to_remove: Option<Vec<String>>,
5017    /// <p>A valid cache node type that you want to scale this cluster up to.</p>
5018    pub cache_node_type: Option<String>,
5019    /// <p>The name of the cache parameter group to apply to this cluster. This change is asynchronously applied as soon as possible for parameters when the <code>ApplyImmediately</code> parameter is specified as <code>true</code> for this request.</p>
5020    pub cache_parameter_group_name: Option<String>,
5021    /// <p>A list of cache security group names to authorize on this cluster. This change is asynchronously applied as soon as possible.</p> <p>You can use this parameter only with clusters that are created outside of an Amazon Virtual Private Cloud (Amazon VPC).</p> <p>Constraints: Must contain no more than 255 alphanumeric characters. Must not be "Default".</p>
5022    pub cache_security_group_names: Option<Vec<String>>,
5023    /// <p>The upgraded version of the cache engine to be run on the cache nodes.</p> <p> <b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement">Selecting a Cache Engine and Version</a>), but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster and create it anew with the earlier engine version. </p>
5024    pub engine_version: Option<String>,
5025    /// <p><p>The list of Availability Zones where the new Memcached cache nodes are created.</p> <p>This parameter is only valid when <code>NumCacheNodes</code> in the request is greater than the sum of the number of active cache nodes and the number of cache nodes pending creation (which may be zero). The number of Availability Zones supplied in this list must match the cache nodes being added in this request.</p> <p>This option is only supported on Memcached clusters.</p> <p>Scenarios:</p> <ul> <li> <p> <b>Scenario 1:</b> You have 3 active nodes and wish to add 2 nodes. Specify <code>NumCacheNodes=5</code> (3 + 2) and optionally specify two Availability Zones for the two new nodes.</p> </li> <li> <p> <b>Scenario 2:</b> You have 3 active nodes and 2 nodes pending creation (from the scenario 1 call) and want to add 1 more node. Specify <code>NumCacheNodes=6</code> ((3 + 2) + 1) and optionally specify an Availability Zone for the new node.</p> </li> <li> <p> <b>Scenario 3:</b> You want to cancel all pending operations. Specify <code>NumCacheNodes=3</code> to cancel all pending operations.</p> </li> </ul> <p>The Availability Zone placement of nodes pending creation cannot be modified. If you wish to cancel any nodes pending creation, add 0 nodes by setting <code>NumCacheNodes</code> to the number of current nodes.</p> <p>If <code>cross-az</code> is specified, existing Memcached nodes remain in their current Availability Zone. Only newly created nodes can be located in different Availability Zones. For guidance on how to move existing Memcached nodes to different Availability Zones, see the <b>Availability Zone Considerations</b> section of <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNodes.SupportedTypes.html">Cache Node Considerations for Memcached</a>.</p> <p> <b>Impact of new add/remove requests upon pending requests</b> </p> <ul> <li> <p>Scenario-1</p> <ul> <li> <p>Pending Action: Delete</p> </li> <li> <p>New Request: Delete</p> </li> <li> <p>Result: The new delete, pending or immediate, replaces the pending delete.</p> </li> </ul> </li> <li> <p>Scenario-2</p> <ul> <li> <p>Pending Action: Delete</p> </li> <li> <p>New Request: Create</p> </li> <li> <p>Result: The new create, pending or immediate, replaces the pending delete.</p> </li> </ul> </li> <li> <p>Scenario-3</p> <ul> <li> <p>Pending Action: Create</p> </li> <li> <p>New Request: Delete</p> </li> <li> <p>Result: The new delete, pending or immediate, replaces the pending create.</p> </li> </ul> </li> <li> <p>Scenario-4</p> <ul> <li> <p>Pending Action: Create</p> </li> <li> <p>New Request: Create</p> </li> <li> <p>Result: The new create is added to the pending create.</p> <important> <p> <b>Important:</b> If the new create request is <b>Apply Immediately - Yes</b>, all creates are performed immediately. If the new create request is <b>Apply Immediately - No</b>, all creates are pending.</p> </important> </li> </ul> </li> </ul></p>
5026    pub new_availability_zones: Option<Vec<String>>,
5027    /// <p><p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications are sent.</p> <note> <p>The Amazon SNS topic owner must be same as the cluster owner.</p> </note></p>
5028    pub notification_topic_arn: Option<String>,
5029    /// <p>The status of the Amazon SNS notification topic. Notifications are sent only if the status is <code>active</code>.</p> <p>Valid values: <code>active</code> | <code>inactive</code> </p>
5030    pub notification_topic_status: Option<String>,
5031    /// <p><p>The number of cache nodes that the cluster should have. If the value for <code>NumCacheNodes</code> is greater than the sum of the number of current cache nodes and the number of cache nodes pending creation (which may be zero), more nodes are added. If the value is less than the number of existing cache nodes, nodes are removed. If the value is equal to the number of current cache nodes, any pending add or remove requests are canceled.</p> <p>If you are removing cache nodes, you must use the <code>CacheNodeIdsToRemove</code> parameter to provide the IDs of the specific cache nodes to remove.</p> <p>For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.</p> <note> <p>Adding or removing Memcached cache nodes can be applied immediately or as a pending operation (see <code>ApplyImmediately</code>).</p> <p>A pending operation to modify the number of cache nodes in a cluster during its maintenance window, whether by adding or removing nodes in accordance with the scale out architecture, is not queued. The customer&#39;s latest request to add or remove nodes to the cluster overrides any previous pending operations to modify the number of cache nodes in the cluster. For example, a request to remove 2 nodes would override a previous pending operation to remove 3 nodes. Similarly, a request to add 2 nodes would override a previous pending operation to remove 3 nodes and vice versa. As Memcached cache nodes may now be provisioned in different Availability Zones with flexible cache node placement, a request to add nodes does not automatically override a previous pending operation to add nodes. The customer can modify the previous pending operation to add more nodes or explicitly cancel the pending request and retry the new request. To cancel pending operations to modify the number of cache nodes in a cluster, use the <code>ModifyCacheCluster</code> request and set <code>NumCacheNodes</code> equal to the number of cache nodes currently in the cluster.</p> </note></p>
5032    pub num_cache_nodes: Option<i64>,
5033    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p> <p>Valid values for <code>ddd</code> are:</p> <ul> <li> <p> <code>sun</code> </p> </li> <li> <p> <code>mon</code> </p> </li> <li> <p> <code>tue</code> </p> </li> <li> <p> <code>wed</code> </p> </li> <li> <p> <code>thu</code> </p> </li> <li> <p> <code>fri</code> </p> </li> <li> <p> <code>sat</code> </p> </li> </ul> <p>Example: <code>sun:23:00-mon:01:30</code> </p>
5034    pub preferred_maintenance_window: Option<String>,
5035    /// <p>Specifies the VPC Security Groups associated with the cluster.</p> <p>This parameter can be used only with clusters that are created in an Amazon Virtual Private Cloud (Amazon VPC).</p>
5036    pub security_group_ids: Option<Vec<String>>,
5037    /// <p><p>The number of days for which ElastiCache retains automatic cluster snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p> <note> <p>If the value of <code>SnapshotRetentionLimit</code> is set to zero (0), backups are turned off.</p> </note></p>
5038    pub snapshot_retention_limit: Option<i64>,
5039    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your cluster. </p>
5040    pub snapshot_window: Option<String>,
5041}
5042
5043/// Serialize `ModifyCacheClusterMessage` contents to a `SignedRequest`.
5044struct ModifyCacheClusterMessageSerializer;
5045impl ModifyCacheClusterMessageSerializer {
5046    fn serialize(params: &mut Params, name: &str, obj: &ModifyCacheClusterMessage) {
5047        let mut prefix = name.to_string();
5048        if prefix != "" {
5049            prefix.push_str(".");
5050        }
5051
5052        if let Some(ref field_value) = obj.az_mode {
5053            params.put(&format!("{}{}", prefix, "AZMode"), &field_value);
5054        }
5055        if let Some(ref field_value) = obj.apply_immediately {
5056            params.put(&format!("{}{}", prefix, "ApplyImmediately"), &field_value);
5057        }
5058        if let Some(ref field_value) = obj.auth_token {
5059            params.put(&format!("{}{}", prefix, "AuthToken"), &field_value);
5060        }
5061        if let Some(ref field_value) = obj.auth_token_update_strategy {
5062            params.put(
5063                &format!("{}{}", prefix, "AuthTokenUpdateStrategy"),
5064                &field_value,
5065            );
5066        }
5067        if let Some(ref field_value) = obj.auto_minor_version_upgrade {
5068            params.put(
5069                &format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
5070                &field_value,
5071            );
5072        }
5073        params.put(
5074            &format!("{}{}", prefix, "CacheClusterId"),
5075            &obj.cache_cluster_id,
5076        );
5077        if let Some(ref field_value) = obj.cache_node_ids_to_remove {
5078            CacheNodeIdsListSerializer::serialize(
5079                params,
5080                &format!("{}{}", prefix, "CacheNodeId"),
5081                field_value,
5082            );
5083        }
5084        if let Some(ref field_value) = obj.cache_node_type {
5085            params.put(&format!("{}{}", prefix, "CacheNodeType"), &field_value);
5086        }
5087        if let Some(ref field_value) = obj.cache_parameter_group_name {
5088            params.put(
5089                &format!("{}{}", prefix, "CacheParameterGroupName"),
5090                &field_value,
5091            );
5092        }
5093        if let Some(ref field_value) = obj.cache_security_group_names {
5094            CacheSecurityGroupNameListSerializer::serialize(
5095                params,
5096                &format!("{}{}", prefix, "CacheSecurityGroupName"),
5097                field_value,
5098            );
5099        }
5100        if let Some(ref field_value) = obj.engine_version {
5101            params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
5102        }
5103        if let Some(ref field_value) = obj.new_availability_zones {
5104            PreferredAvailabilityZoneListSerializer::serialize(
5105                params,
5106                &format!("{}{}", prefix, "PreferredAvailabilityZone"),
5107                field_value,
5108            );
5109        }
5110        if let Some(ref field_value) = obj.notification_topic_arn {
5111            params.put(
5112                &format!("{}{}", prefix, "NotificationTopicArn"),
5113                &field_value,
5114            );
5115        }
5116        if let Some(ref field_value) = obj.notification_topic_status {
5117            params.put(
5118                &format!("{}{}", prefix, "NotificationTopicStatus"),
5119                &field_value,
5120            );
5121        }
5122        if let Some(ref field_value) = obj.num_cache_nodes {
5123            params.put(&format!("{}{}", prefix, "NumCacheNodes"), &field_value);
5124        }
5125        if let Some(ref field_value) = obj.preferred_maintenance_window {
5126            params.put(
5127                &format!("{}{}", prefix, "PreferredMaintenanceWindow"),
5128                &field_value,
5129            );
5130        }
5131        if let Some(ref field_value) = obj.security_group_ids {
5132            SecurityGroupIdsListSerializer::serialize(
5133                params,
5134                &format!("{}{}", prefix, "SecurityGroupId"),
5135                field_value,
5136            );
5137        }
5138        if let Some(ref field_value) = obj.snapshot_retention_limit {
5139            params.put(
5140                &format!("{}{}", prefix, "SnapshotRetentionLimit"),
5141                &field_value,
5142            );
5143        }
5144        if let Some(ref field_value) = obj.snapshot_window {
5145            params.put(&format!("{}{}", prefix, "SnapshotWindow"), &field_value);
5146        }
5147    }
5148}
5149
5150#[derive(Clone, Debug, Default, PartialEq)]
5151#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5152pub struct ModifyCacheClusterResult {
5153    pub cache_cluster: Option<CacheCluster>,
5154}
5155
5156#[allow(dead_code)]
5157struct ModifyCacheClusterResultDeserializer;
5158impl ModifyCacheClusterResultDeserializer {
5159    #[allow(dead_code, unused_variables)]
5160    fn deserialize<T: Peek + Next>(
5161        tag_name: &str,
5162        stack: &mut T,
5163    ) -> Result<ModifyCacheClusterResult, XmlParseError> {
5164        deserialize_elements::<_, ModifyCacheClusterResult, _>(
5165            tag_name,
5166            stack,
5167            |name, stack, obj| {
5168                match name {
5169                    "CacheCluster" => {
5170                        obj.cache_cluster = Some(CacheClusterDeserializer::deserialize(
5171                            "CacheCluster",
5172                            stack,
5173                        )?);
5174                    }
5175                    _ => skip_tree(stack),
5176                }
5177                Ok(())
5178            },
5179        )
5180    }
5181}
5182/// <p>Represents the input of a <code>ModifyCacheParameterGroup</code> operation.</p>
5183#[derive(Clone, Debug, Default, PartialEq)]
5184#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5185pub struct ModifyCacheParameterGroupMessage {
5186    /// <p>The name of the cache parameter group to modify.</p>
5187    pub cache_parameter_group_name: String,
5188    /// <p>An array of parameter names and values for the parameter update. You must supply at least one parameter name and value; subsequent arguments are optional. A maximum of 20 parameters may be modified per request.</p>
5189    pub parameter_name_values: Vec<ParameterNameValue>,
5190}
5191
5192/// Serialize `ModifyCacheParameterGroupMessage` contents to a `SignedRequest`.
5193struct ModifyCacheParameterGroupMessageSerializer;
5194impl ModifyCacheParameterGroupMessageSerializer {
5195    fn serialize(params: &mut Params, name: &str, obj: &ModifyCacheParameterGroupMessage) {
5196        let mut prefix = name.to_string();
5197        if prefix != "" {
5198            prefix.push_str(".");
5199        }
5200
5201        params.put(
5202            &format!("{}{}", prefix, "CacheParameterGroupName"),
5203            &obj.cache_parameter_group_name,
5204        );
5205        ParameterNameValueListSerializer::serialize(
5206            params,
5207            &format!("{}{}", prefix, "ParameterNameValue"),
5208            &obj.parameter_name_values,
5209        );
5210    }
5211}
5212
5213/// <p>Represents the input of a <code>ModifyCacheSubnetGroup</code> operation.</p>
5214#[derive(Clone, Debug, Default, PartialEq)]
5215#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5216pub struct ModifyCacheSubnetGroupMessage {
5217    /// <p>A description of the cache subnet group.</p>
5218    pub cache_subnet_group_description: Option<String>,
5219    /// <p>The name for the cache subnet group. This value is stored as a lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric characters or hyphens.</p> <p>Example: <code>mysubnetgroup</code> </p>
5220    pub cache_subnet_group_name: String,
5221    /// <p>The EC2 subnet IDs for the cache subnet group.</p>
5222    pub subnet_ids: Option<Vec<String>>,
5223}
5224
5225/// Serialize `ModifyCacheSubnetGroupMessage` contents to a `SignedRequest`.
5226struct ModifyCacheSubnetGroupMessageSerializer;
5227impl ModifyCacheSubnetGroupMessageSerializer {
5228    fn serialize(params: &mut Params, name: &str, obj: &ModifyCacheSubnetGroupMessage) {
5229        let mut prefix = name.to_string();
5230        if prefix != "" {
5231            prefix.push_str(".");
5232        }
5233
5234        if let Some(ref field_value) = obj.cache_subnet_group_description {
5235            params.put(
5236                &format!("{}{}", prefix, "CacheSubnetGroupDescription"),
5237                &field_value,
5238            );
5239        }
5240        params.put(
5241            &format!("{}{}", prefix, "CacheSubnetGroupName"),
5242            &obj.cache_subnet_group_name,
5243        );
5244        if let Some(ref field_value) = obj.subnet_ids {
5245            SubnetIdentifierListSerializer::serialize(
5246                params,
5247                &format!("{}{}", prefix, "SubnetIdentifier"),
5248                field_value,
5249            );
5250        }
5251    }
5252}
5253
5254#[derive(Clone, Debug, Default, PartialEq)]
5255#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5256pub struct ModifyCacheSubnetGroupResult {
5257    pub cache_subnet_group: Option<CacheSubnetGroup>,
5258}
5259
5260#[allow(dead_code)]
5261struct ModifyCacheSubnetGroupResultDeserializer;
5262impl ModifyCacheSubnetGroupResultDeserializer {
5263    #[allow(dead_code, unused_variables)]
5264    fn deserialize<T: Peek + Next>(
5265        tag_name: &str,
5266        stack: &mut T,
5267    ) -> Result<ModifyCacheSubnetGroupResult, XmlParseError> {
5268        deserialize_elements::<_, ModifyCacheSubnetGroupResult, _>(
5269            tag_name,
5270            stack,
5271            |name, stack, obj| {
5272                match name {
5273                    "CacheSubnetGroup" => {
5274                        obj.cache_subnet_group = Some(CacheSubnetGroupDeserializer::deserialize(
5275                            "CacheSubnetGroup",
5276                            stack,
5277                        )?);
5278                    }
5279                    _ => skip_tree(stack),
5280                }
5281                Ok(())
5282            },
5283        )
5284    }
5285}
5286#[derive(Clone, Debug, Default, PartialEq)]
5287#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5288pub struct ModifyGlobalReplicationGroupMessage {
5289    /// <p>This parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible. Modifications to Global Replication Groups cannot be requested to be applied in PreferredMaintenceWindow. </p>
5290    pub apply_immediately: bool,
5291    /// <p>Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure. </p>
5292    pub automatic_failover_enabled: Option<bool>,
5293    /// <p>A valid cache node type that you want to scale this Global Datastore to.</p>
5294    pub cache_node_type: Option<String>,
5295    /// <p>The upgraded version of the cache engine to be run on the clusters in the Global Datastore. </p>
5296    pub engine_version: Option<String>,
5297    /// <p>A description of the Global Datastore</p>
5298    pub global_replication_group_description: Option<String>,
5299    /// <p>The name of the Global Datastore</p>
5300    pub global_replication_group_id: String,
5301}
5302
5303/// Serialize `ModifyGlobalReplicationGroupMessage` contents to a `SignedRequest`.
5304struct ModifyGlobalReplicationGroupMessageSerializer;
5305impl ModifyGlobalReplicationGroupMessageSerializer {
5306    fn serialize(params: &mut Params, name: &str, obj: &ModifyGlobalReplicationGroupMessage) {
5307        let mut prefix = name.to_string();
5308        if prefix != "" {
5309            prefix.push_str(".");
5310        }
5311
5312        params.put(
5313            &format!("{}{}", prefix, "ApplyImmediately"),
5314            &obj.apply_immediately,
5315        );
5316        if let Some(ref field_value) = obj.automatic_failover_enabled {
5317            params.put(
5318                &format!("{}{}", prefix, "AutomaticFailoverEnabled"),
5319                &field_value,
5320            );
5321        }
5322        if let Some(ref field_value) = obj.cache_node_type {
5323            params.put(&format!("{}{}", prefix, "CacheNodeType"), &field_value);
5324        }
5325        if let Some(ref field_value) = obj.engine_version {
5326            params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
5327        }
5328        if let Some(ref field_value) = obj.global_replication_group_description {
5329            params.put(
5330                &format!("{}{}", prefix, "GlobalReplicationGroupDescription"),
5331                &field_value,
5332            );
5333        }
5334        params.put(
5335            &format!("{}{}", prefix, "GlobalReplicationGroupId"),
5336            &obj.global_replication_group_id,
5337        );
5338    }
5339}
5340
5341#[derive(Clone, Debug, Default, PartialEq)]
5342#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5343pub struct ModifyGlobalReplicationGroupResult {
5344    pub global_replication_group: Option<GlobalReplicationGroup>,
5345}
5346
5347#[allow(dead_code)]
5348struct ModifyGlobalReplicationGroupResultDeserializer;
5349impl ModifyGlobalReplicationGroupResultDeserializer {
5350    #[allow(dead_code, unused_variables)]
5351    fn deserialize<T: Peek + Next>(
5352        tag_name: &str,
5353        stack: &mut T,
5354    ) -> Result<ModifyGlobalReplicationGroupResult, XmlParseError> {
5355        deserialize_elements::<_, ModifyGlobalReplicationGroupResult, _>(
5356            tag_name,
5357            stack,
5358            |name, stack, obj| {
5359                match name {
5360                    "GlobalReplicationGroup" => {
5361                        obj.global_replication_group =
5362                            Some(GlobalReplicationGroupDeserializer::deserialize(
5363                                "GlobalReplicationGroup",
5364                                stack,
5365                            )?);
5366                    }
5367                    _ => skip_tree(stack),
5368                }
5369                Ok(())
5370            },
5371        )
5372    }
5373}
5374/// <p>Represents the input of a <code>ModifyReplicationGroups</code> operation.</p>
5375#[derive(Clone, Debug, Default, PartialEq)]
5376#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5377pub struct ModifyReplicationGroupMessage {
5378    /// <p>If <code>true</code>, this parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible, regardless of the <code>PreferredMaintenanceWindow</code> setting for the replication group.</p> <p>If <code>false</code>, changes to the nodes in the replication group are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first.</p> <p>Valid values: <code>true</code> | <code>false</code> </p> <p>Default: <code>false</code> </p>
5379    pub apply_immediately: Option<bool>,
5380    /// <p>Reserved parameter. The password used to access a password protected server. This parameter must be specified with the <code>auth-token-update-strategy </code> parameter. Password constraints:</p> <ul> <li> <p>Must be only printable ASCII characters</p> </li> <li> <p>Must be at least 16 characters and no more than 128 characters in length</p> </li> <li> <p>Cannot contain any of the following characters: '/', '"', or '@', '%'</p> </li> </ul> <p> For more information, see AUTH password at <a href="http://redis.io/commands/AUTH">AUTH</a>.</p>
5381    pub auth_token: Option<String>,
5382    /// <p>Specifies the strategy to use to update the AUTH token. This parameter must be specified with the <code>auth-token</code> parameter. Possible values:</p> <ul> <li> <p>Rotate</p> </li> <li> <p>Set</p> </li> </ul> <p> For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html">Authenticating Users with Redis AUTH</a> </p>
5383    pub auth_token_update_strategy: Option<String>,
5384    /// <p>This parameter is currently disabled.</p>
5385    pub auto_minor_version_upgrade: Option<bool>,
5386    /// <p>Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure.</p> <p>Valid values: <code>true</code> | <code>false</code> </p>
5387    pub automatic_failover_enabled: Option<bool>,
5388    /// <p>A valid cache node type that you want to scale this replication group to.</p>
5389    pub cache_node_type: Option<String>,
5390    /// <p>The name of the cache parameter group to apply to all of the clusters in this replication group. This change is asynchronously applied as soon as possible for parameters when the <code>ApplyImmediately</code> parameter is specified as <code>true</code> for this request.</p>
5391    pub cache_parameter_group_name: Option<String>,
5392    /// <p>A list of cache security group names to authorize for the clusters in this replication group. This change is asynchronously applied as soon as possible.</p> <p>This parameter can be used only with replication group containing clusters running outside of an Amazon Virtual Private Cloud (Amazon VPC).</p> <p>Constraints: Must contain no more than 255 alphanumeric characters. Must not be <code>Default</code>.</p>
5393    pub cache_security_group_names: Option<Vec<String>>,
5394    /// <p>The upgraded version of the cache engine to be run on the clusters in the replication group.</p> <p> <b>Important:</b> You can upgrade to a newer engine version (see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement">Selecting a Cache Engine and Version</a>), but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing replication group and create it anew with the earlier engine version. </p>
5395    pub engine_version: Option<String>,
5396    /// <p>A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html">Minimizing Downtime: Multi-AZ</a>.</p>
5397    pub multi_az_enabled: Option<bool>,
5398    /// <p><p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications are sent.</p> <note> <p>The Amazon SNS topic owner must be same as the replication group owner. </p> </note></p>
5399    pub notification_topic_arn: Option<String>,
5400    /// <p>The status of the Amazon SNS notification topic for the replication group. Notifications are sent only if the status is <code>active</code>.</p> <p>Valid values: <code>active</code> | <code>inactive</code> </p>
5401    pub notification_topic_status: Option<String>,
5402    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p> <p>Valid values for <code>ddd</code> are:</p> <ul> <li> <p> <code>sun</code> </p> </li> <li> <p> <code>mon</code> </p> </li> <li> <p> <code>tue</code> </p> </li> <li> <p> <code>wed</code> </p> </li> <li> <p> <code>thu</code> </p> </li> <li> <p> <code>fri</code> </p> </li> <li> <p> <code>sat</code> </p> </li> </ul> <p>Example: <code>sun:23:00-mon:01:30</code> </p>
5403    pub preferred_maintenance_window: Option<String>,
5404    /// <p>For replication groups with a single primary, if this parameter is specified, ElastiCache promotes the specified cluster in the specified replication group to the primary role. The nodes of all other clusters in the replication group are read replicas.</p>
5405    pub primary_cluster_id: Option<String>,
5406    /// <p>A description for the replication group. Maximum length is 255 characters.</p>
5407    pub replication_group_description: Option<String>,
5408    /// <p>The identifier of the replication group to modify.</p>
5409    pub replication_group_id: String,
5410    /// <p>Specifies the VPC Security Groups associated with the clusters in the replication group.</p> <p>This parameter can be used only with replication group containing clusters running in an Amazon Virtual Private Cloud (Amazon VPC).</p>
5411    pub security_group_ids: Option<Vec<String>>,
5412    /// <p>The number of days for which ElastiCache retains automatic node group (shard) snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p> <p> <b>Important</b> If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.</p>
5413    pub snapshot_retention_limit: Option<i64>,
5414    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of the node group (shard) specified by <code>SnapshottingClusterId</code>.</p> <p>Example: <code>05:00-09:00</code> </p> <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p>
5415    pub snapshot_window: Option<String>,
5416    /// <p>The cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Redis (cluster mode enabled) replication groups.</p>
5417    pub snapshotting_cluster_id: Option<String>,
5418}
5419
5420/// Serialize `ModifyReplicationGroupMessage` contents to a `SignedRequest`.
5421struct ModifyReplicationGroupMessageSerializer;
5422impl ModifyReplicationGroupMessageSerializer {
5423    fn serialize(params: &mut Params, name: &str, obj: &ModifyReplicationGroupMessage) {
5424        let mut prefix = name.to_string();
5425        if prefix != "" {
5426            prefix.push_str(".");
5427        }
5428
5429        if let Some(ref field_value) = obj.apply_immediately {
5430            params.put(&format!("{}{}", prefix, "ApplyImmediately"), &field_value);
5431        }
5432        if let Some(ref field_value) = obj.auth_token {
5433            params.put(&format!("{}{}", prefix, "AuthToken"), &field_value);
5434        }
5435        if let Some(ref field_value) = obj.auth_token_update_strategy {
5436            params.put(
5437                &format!("{}{}", prefix, "AuthTokenUpdateStrategy"),
5438                &field_value,
5439            );
5440        }
5441        if let Some(ref field_value) = obj.auto_minor_version_upgrade {
5442            params.put(
5443                &format!("{}{}", prefix, "AutoMinorVersionUpgrade"),
5444                &field_value,
5445            );
5446        }
5447        if let Some(ref field_value) = obj.automatic_failover_enabled {
5448            params.put(
5449                &format!("{}{}", prefix, "AutomaticFailoverEnabled"),
5450                &field_value,
5451            );
5452        }
5453        if let Some(ref field_value) = obj.cache_node_type {
5454            params.put(&format!("{}{}", prefix, "CacheNodeType"), &field_value);
5455        }
5456        if let Some(ref field_value) = obj.cache_parameter_group_name {
5457            params.put(
5458                &format!("{}{}", prefix, "CacheParameterGroupName"),
5459                &field_value,
5460            );
5461        }
5462        if let Some(ref field_value) = obj.cache_security_group_names {
5463            CacheSecurityGroupNameListSerializer::serialize(
5464                params,
5465                &format!("{}{}", prefix, "CacheSecurityGroupName"),
5466                field_value,
5467            );
5468        }
5469        if let Some(ref field_value) = obj.engine_version {
5470            params.put(&format!("{}{}", prefix, "EngineVersion"), &field_value);
5471        }
5472        if let Some(ref field_value) = obj.multi_az_enabled {
5473            params.put(&format!("{}{}", prefix, "MultiAZEnabled"), &field_value);
5474        }
5475
5476        if let Some(ref field_value) = obj.notification_topic_arn {
5477            params.put(
5478                &format!("{}{}", prefix, "NotificationTopicArn"),
5479                &field_value,
5480            );
5481        }
5482        if let Some(ref field_value) = obj.notification_topic_status {
5483            params.put(
5484                &format!("{}{}", prefix, "NotificationTopicStatus"),
5485                &field_value,
5486            );
5487        }
5488        if let Some(ref field_value) = obj.preferred_maintenance_window {
5489            params.put(
5490                &format!("{}{}", prefix, "PreferredMaintenanceWindow"),
5491                &field_value,
5492            );
5493        }
5494        if let Some(ref field_value) = obj.primary_cluster_id {
5495            params.put(&format!("{}{}", prefix, "PrimaryClusterId"), &field_value);
5496        }
5497        if let Some(ref field_value) = obj.replication_group_description {
5498            params.put(
5499                &format!("{}{}", prefix, "ReplicationGroupDescription"),
5500                &field_value,
5501            );
5502        }
5503        params.put(
5504            &format!("{}{}", prefix, "ReplicationGroupId"),
5505            &obj.replication_group_id,
5506        );
5507        if let Some(ref field_value) = obj.security_group_ids {
5508            SecurityGroupIdsListSerializer::serialize(
5509                params,
5510                &format!("{}{}", prefix, "SecurityGroupId"),
5511                field_value,
5512            );
5513        }
5514        if let Some(ref field_value) = obj.snapshot_retention_limit {
5515            params.put(
5516                &format!("{}{}", prefix, "SnapshotRetentionLimit"),
5517                &field_value,
5518            );
5519        }
5520        if let Some(ref field_value) = obj.snapshot_window {
5521            params.put(&format!("{}{}", prefix, "SnapshotWindow"), &field_value);
5522        }
5523        if let Some(ref field_value) = obj.snapshotting_cluster_id {
5524            params.put(
5525                &format!("{}{}", prefix, "SnapshottingClusterId"),
5526                &field_value,
5527            );
5528        }
5529    }
5530}
5531
5532#[derive(Clone, Debug, Default, PartialEq)]
5533#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5534pub struct ModifyReplicationGroupResult {
5535    pub replication_group: Option<ReplicationGroup>,
5536}
5537
5538#[allow(dead_code)]
5539struct ModifyReplicationGroupResultDeserializer;
5540impl ModifyReplicationGroupResultDeserializer {
5541    #[allow(dead_code, unused_variables)]
5542    fn deserialize<T: Peek + Next>(
5543        tag_name: &str,
5544        stack: &mut T,
5545    ) -> Result<ModifyReplicationGroupResult, XmlParseError> {
5546        deserialize_elements::<_, ModifyReplicationGroupResult, _>(
5547            tag_name,
5548            stack,
5549            |name, stack, obj| {
5550                match name {
5551                    "ReplicationGroup" => {
5552                        obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
5553                            "ReplicationGroup",
5554                            stack,
5555                        )?);
5556                    }
5557                    _ => skip_tree(stack),
5558                }
5559                Ok(())
5560            },
5561        )
5562    }
5563}
5564/// <p>Represents the input for a <code>ModifyReplicationGroupShardConfiguration</code> operation.</p>
5565#[derive(Clone, Debug, Default, PartialEq)]
5566#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5567pub struct ModifyReplicationGroupShardConfigurationMessage {
5568    /// <p>Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for this parameter is <code>true</code>.</p> <p>Value: true</p>
5569    pub apply_immediately: bool,
5570    /// <p>The number of node groups (shards) that results from the modification of the shard configuration.</p>
5571    pub node_group_count: i64,
5572    /// <p>If the value of <code>NodeGroupCount</code> is less than the current number of node groups (shards), then either <code>NodeGroupsToRemove</code> or <code>NodeGroupsToRetain</code> is required. <code>NodeGroupsToRemove</code> is a list of <code>NodeGroupId</code>s to remove from the cluster.</p> <p>ElastiCache for Redis will attempt to remove all node groups listed by <code>NodeGroupsToRemove</code> from the cluster.</p>
5573    pub node_groups_to_remove: Option<Vec<String>>,
5574    /// <p>If the value of <code>NodeGroupCount</code> is less than the current number of node groups (shards), then either <code>NodeGroupsToRemove</code> or <code>NodeGroupsToRetain</code> is required. <code>NodeGroupsToRetain</code> is a list of <code>NodeGroupId</code>s to retain in the cluster.</p> <p>ElastiCache for Redis will attempt to remove all node groups except those listed by <code>NodeGroupsToRetain</code> from the cluster.</p>
5575    pub node_groups_to_retain: Option<Vec<String>>,
5576    /// <p>The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be configured.</p>
5577    pub replication_group_id: String,
5578    /// <p>Specifies the preferred availability zones for each node group in the cluster. If the value of <code>NodeGroupCount</code> is greater than the current number of node groups (shards), you can use this parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter ElastiCache selects availability zones for you.</p> <p>You can specify this parameter only if the value of <code>NodeGroupCount</code> is greater than the current number of node groups (shards).</p>
5579    pub resharding_configuration: Option<Vec<ReshardingConfiguration>>,
5580}
5581
5582/// Serialize `ModifyReplicationGroupShardConfigurationMessage` contents to a `SignedRequest`.
5583struct ModifyReplicationGroupShardConfigurationMessageSerializer;
5584impl ModifyReplicationGroupShardConfigurationMessageSerializer {
5585    fn serialize(
5586        params: &mut Params,
5587        name: &str,
5588        obj: &ModifyReplicationGroupShardConfigurationMessage,
5589    ) {
5590        let mut prefix = name.to_string();
5591        if prefix != "" {
5592            prefix.push_str(".");
5593        }
5594
5595        params.put(
5596            &format!("{}{}", prefix, "ApplyImmediately"),
5597            &obj.apply_immediately,
5598        );
5599        params.put(
5600            &format!("{}{}", prefix, "NodeGroupCount"),
5601            &obj.node_group_count,
5602        );
5603        if let Some(ref field_value) = obj.node_groups_to_remove {
5604            NodeGroupsToRemoveListSerializer::serialize(
5605                params,
5606                &format!("{}{}", prefix, "NodeGroupToRemove"),
5607                field_value,
5608            );
5609        }
5610        if let Some(ref field_value) = obj.node_groups_to_retain {
5611            NodeGroupsToRetainListSerializer::serialize(
5612                params,
5613                &format!("{}{}", prefix, "NodeGroupToRetain"),
5614                field_value,
5615            );
5616        }
5617        params.put(
5618            &format!("{}{}", prefix, "ReplicationGroupId"),
5619            &obj.replication_group_id,
5620        );
5621        if let Some(ref field_value) = obj.resharding_configuration {
5622            ReshardingConfigurationListSerializer::serialize(
5623                params,
5624                &format!("{}{}", prefix, "ReshardingConfiguration"),
5625                field_value,
5626            );
5627        }
5628    }
5629}
5630
5631#[derive(Clone, Debug, Default, PartialEq)]
5632#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5633pub struct ModifyReplicationGroupShardConfigurationResult {
5634    pub replication_group: Option<ReplicationGroup>,
5635}
5636
5637#[allow(dead_code)]
5638struct ModifyReplicationGroupShardConfigurationResultDeserializer;
5639impl ModifyReplicationGroupShardConfigurationResultDeserializer {
5640    #[allow(dead_code, unused_variables)]
5641    fn deserialize<T: Peek + Next>(
5642        tag_name: &str,
5643        stack: &mut T,
5644    ) -> Result<ModifyReplicationGroupShardConfigurationResult, XmlParseError> {
5645        deserialize_elements::<_, ModifyReplicationGroupShardConfigurationResult, _>(
5646            tag_name,
5647            stack,
5648            |name, stack, obj| {
5649                match name {
5650                    "ReplicationGroup" => {
5651                        obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
5652                            "ReplicationGroup",
5653                            stack,
5654                        )?);
5655                    }
5656                    _ => skip_tree(stack),
5657                }
5658                Ok(())
5659            },
5660        )
5661    }
5662}
5663#[allow(dead_code)]
5664struct MultiAZStatusDeserializer;
5665impl MultiAZStatusDeserializer {
5666    #[allow(dead_code, unused_variables)]
5667    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
5668        xml_util::deserialize_primitive(tag_name, stack, Ok)
5669    }
5670}
5671/// <p>Represents a collection of cache nodes in a replication group. One node in the node group is the read/write primary node. All the other nodes are read-only Replica nodes.</p>
5672#[derive(Clone, Debug, Default, PartialEq)]
5673#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5674pub struct NodeGroup {
5675    /// <p>The identifier for the node group (shard). A Redis (cluster mode disabled) replication group contains only 1 node group; therefore, the node group ID is 0001. A Redis (cluster mode enabled) replication group contains 1 to 90 node groups numbered 0001 to 0090. Optionally, the user can provide the id for a node group. </p>
5676    pub node_group_id: Option<String>,
5677    /// <p>A list containing information about individual nodes within the node group (shard).</p>
5678    pub node_group_members: Option<Vec<NodeGroupMember>>,
5679    /// <p>The endpoint of the primary node in this node group (shard).</p>
5680    pub primary_endpoint: Option<Endpoint>,
5681    /// <p>The endpoint of the replica nodes in this node group (shard).</p>
5682    pub reader_endpoint: Option<Endpoint>,
5683    /// <p>The keyspace for this node group (shard).</p>
5684    pub slots: Option<String>,
5685    /// <p>The current state of this replication group - <code>creating</code>, <code>available</code>, <code>modifying</code>, <code>deleting</code>.</p>
5686    pub status: Option<String>,
5687}
5688
5689#[allow(dead_code)]
5690struct NodeGroupDeserializer;
5691impl NodeGroupDeserializer {
5692    #[allow(dead_code, unused_variables)]
5693    fn deserialize<T: Peek + Next>(
5694        tag_name: &str,
5695        stack: &mut T,
5696    ) -> Result<NodeGroup, XmlParseError> {
5697        deserialize_elements::<_, NodeGroup, _>(tag_name, stack, |name, stack, obj| {
5698            match name {
5699                "NodeGroupId" => {
5700                    obj.node_group_id =
5701                        Some(StringDeserializer::deserialize("NodeGroupId", stack)?);
5702                }
5703                "NodeGroupMembers" => {
5704                    obj.node_group_members.get_or_insert(vec![]).extend(
5705                        NodeGroupMemberListDeserializer::deserialize("NodeGroupMembers", stack)?,
5706                    );
5707                }
5708                "PrimaryEndpoint" => {
5709                    obj.primary_endpoint =
5710                        Some(EndpointDeserializer::deserialize("PrimaryEndpoint", stack)?);
5711                }
5712                "ReaderEndpoint" => {
5713                    obj.reader_endpoint =
5714                        Some(EndpointDeserializer::deserialize("ReaderEndpoint", stack)?);
5715                }
5716                "Slots" => {
5717                    obj.slots = Some(StringDeserializer::deserialize("Slots", stack)?);
5718                }
5719                "Status" => {
5720                    obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
5721                }
5722                _ => skip_tree(stack),
5723            }
5724            Ok(())
5725        })
5726    }
5727}
5728/// <p>Node group (shard) configuration options. Each node group (shard) configuration has the following: <code>Slots</code>, <code>PrimaryAvailabilityZone</code>, <code>ReplicaAvailabilityZones</code>, <code>ReplicaCount</code>.</p>
5729#[derive(Clone, Debug, Default, PartialEq)]
5730#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5731#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
5732pub struct NodeGroupConfiguration {
5733    /// <p>Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration values apply to.</p>
5734    pub node_group_id: Option<String>,
5735    /// <p>The Availability Zone where the primary node of this node group (shard) is launched.</p>
5736    pub primary_availability_zone: Option<String>,
5737    /// <p>A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must match the value of <code>ReplicaCount</code> or <code>ReplicasPerNodeGroup</code> if not specified.</p>
5738    pub replica_availability_zones: Option<Vec<String>>,
5739    /// <p>The number of read replica nodes in this node group (shard).</p>
5740    pub replica_count: Option<i64>,
5741    /// <p>A string that specifies the keyspace for a particular node group. Keyspaces range from 0 to 16,383. The string is in the format <code>startkey-endkey</code>.</p> <p>Example: <code>"0-3999"</code> </p>
5742    pub slots: Option<String>,
5743}
5744
5745#[allow(dead_code)]
5746struct NodeGroupConfigurationDeserializer;
5747impl NodeGroupConfigurationDeserializer {
5748    #[allow(dead_code, unused_variables)]
5749    fn deserialize<T: Peek + Next>(
5750        tag_name: &str,
5751        stack: &mut T,
5752    ) -> Result<NodeGroupConfiguration, XmlParseError> {
5753        deserialize_elements::<_, NodeGroupConfiguration, _>(tag_name, stack, |name, stack, obj| {
5754            match name {
5755                "NodeGroupId" => {
5756                    obj.node_group_id = Some(AllowedNodeGroupIdDeserializer::deserialize(
5757                        "NodeGroupId",
5758                        stack,
5759                    )?);
5760                }
5761                "PrimaryAvailabilityZone" => {
5762                    obj.primary_availability_zone = Some(StringDeserializer::deserialize(
5763                        "PrimaryAvailabilityZone",
5764                        stack,
5765                    )?);
5766                }
5767                "ReplicaAvailabilityZones" => {
5768                    obj.replica_availability_zones.get_or_insert(vec![]).extend(
5769                        AvailabilityZonesListDeserializer::deserialize(
5770                            "ReplicaAvailabilityZones",
5771                            stack,
5772                        )?,
5773                    );
5774                }
5775                "ReplicaCount" => {
5776                    obj.replica_count = Some(IntegerOptionalDeserializer::deserialize(
5777                        "ReplicaCount",
5778                        stack,
5779                    )?);
5780                }
5781                "Slots" => {
5782                    obj.slots = Some(StringDeserializer::deserialize("Slots", stack)?);
5783                }
5784                _ => skip_tree(stack),
5785            }
5786            Ok(())
5787        })
5788    }
5789}
5790
5791/// Serialize `NodeGroupConfiguration` contents to a `SignedRequest`.
5792struct NodeGroupConfigurationSerializer;
5793impl NodeGroupConfigurationSerializer {
5794    fn serialize(params: &mut Params, name: &str, obj: &NodeGroupConfiguration) {
5795        let mut prefix = name.to_string();
5796        if prefix != "" {
5797            prefix.push_str(".");
5798        }
5799
5800        if let Some(ref field_value) = obj.node_group_id {
5801            params.put(&format!("{}{}", prefix, "NodeGroupId"), &field_value);
5802        }
5803        if let Some(ref field_value) = obj.primary_availability_zone {
5804            params.put(
5805                &format!("{}{}", prefix, "PrimaryAvailabilityZone"),
5806                &field_value,
5807            );
5808        }
5809        if let Some(ref field_value) = obj.replica_availability_zones {
5810            AvailabilityZonesListSerializer::serialize(
5811                params,
5812                &format!("{}{}", prefix, "AvailabilityZone"),
5813                field_value,
5814            );
5815        }
5816        if let Some(ref field_value) = obj.replica_count {
5817            params.put(&format!("{}{}", prefix, "ReplicaCount"), &field_value);
5818        }
5819        if let Some(ref field_value) = obj.slots {
5820            params.put(&format!("{}{}", prefix, "Slots"), &field_value);
5821        }
5822    }
5823}
5824
5825/// Serialize `NodeGroupConfigurationList` contents to a `SignedRequest`.
5826struct NodeGroupConfigurationListSerializer;
5827impl NodeGroupConfigurationListSerializer {
5828    fn serialize(params: &mut Params, name: &str, obj: &Vec<NodeGroupConfiguration>) {
5829        for (index, obj) in obj.iter().enumerate() {
5830            let key = format!("{}.member.{}", name, index + 1);
5831            NodeGroupConfigurationSerializer::serialize(params, &key, obj);
5832        }
5833    }
5834}
5835
5836#[allow(dead_code)]
5837struct NodeGroupListDeserializer;
5838impl NodeGroupListDeserializer {
5839    #[allow(dead_code, unused_variables)]
5840    fn deserialize<T: Peek + Next>(
5841        tag_name: &str,
5842        stack: &mut T,
5843    ) -> Result<Vec<NodeGroup>, XmlParseError> {
5844        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5845            if name == "NodeGroup" {
5846                obj.push(NodeGroupDeserializer::deserialize("NodeGroup", stack)?);
5847            } else {
5848                skip_tree(stack);
5849            }
5850            Ok(())
5851        })
5852    }
5853}
5854/// <p>Represents a single node within a node group (shard).</p>
5855#[derive(Clone, Debug, Default, PartialEq)]
5856#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5857pub struct NodeGroupMember {
5858    /// <p>The ID of the cluster to which the node belongs.</p>
5859    pub cache_cluster_id: Option<String>,
5860    /// <p>The ID of the node within its cluster. A node ID is a numeric identifier (0001, 0002, etc.).</p>
5861    pub cache_node_id: Option<String>,
5862    /// <p>The role that is currently assigned to the node - <code>primary</code> or <code>replica</code>. This member is only applicable for Redis (cluster mode disabled) replication groups.</p>
5863    pub current_role: Option<String>,
5864    /// <p>The name of the Availability Zone in which the node is located.</p>
5865    pub preferred_availability_zone: Option<String>,
5866    /// <p>The information required for client programs to connect to a node for read operations. The read endpoint is only applicable on Redis (cluster mode disabled) clusters.</p>
5867    pub read_endpoint: Option<Endpoint>,
5868}
5869
5870#[allow(dead_code)]
5871struct NodeGroupMemberDeserializer;
5872impl NodeGroupMemberDeserializer {
5873    #[allow(dead_code, unused_variables)]
5874    fn deserialize<T: Peek + Next>(
5875        tag_name: &str,
5876        stack: &mut T,
5877    ) -> Result<NodeGroupMember, XmlParseError> {
5878        deserialize_elements::<_, NodeGroupMember, _>(tag_name, stack, |name, stack, obj| {
5879            match name {
5880                "CacheClusterId" => {
5881                    obj.cache_cluster_id =
5882                        Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
5883                }
5884                "CacheNodeId" => {
5885                    obj.cache_node_id =
5886                        Some(StringDeserializer::deserialize("CacheNodeId", stack)?);
5887                }
5888                "CurrentRole" => {
5889                    obj.current_role = Some(StringDeserializer::deserialize("CurrentRole", stack)?);
5890                }
5891                "PreferredAvailabilityZone" => {
5892                    obj.preferred_availability_zone = Some(StringDeserializer::deserialize(
5893                        "PreferredAvailabilityZone",
5894                        stack,
5895                    )?);
5896                }
5897                "ReadEndpoint" => {
5898                    obj.read_endpoint =
5899                        Some(EndpointDeserializer::deserialize("ReadEndpoint", stack)?);
5900                }
5901                _ => skip_tree(stack),
5902            }
5903            Ok(())
5904        })
5905    }
5906}
5907#[allow(dead_code)]
5908struct NodeGroupMemberListDeserializer;
5909impl NodeGroupMemberListDeserializer {
5910    #[allow(dead_code, unused_variables)]
5911    fn deserialize<T: Peek + Next>(
5912        tag_name: &str,
5913        stack: &mut T,
5914    ) -> Result<Vec<NodeGroupMember>, XmlParseError> {
5915        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
5916            if name == "NodeGroupMember" {
5917                obj.push(NodeGroupMemberDeserializer::deserialize(
5918                    "NodeGroupMember",
5919                    stack,
5920                )?);
5921            } else {
5922                skip_tree(stack);
5923            }
5924            Ok(())
5925        })
5926    }
5927}
5928/// <p>The status of the service update on the node group member </p>
5929#[derive(Clone, Debug, Default, PartialEq)]
5930#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
5931pub struct NodeGroupMemberUpdateStatus {
5932    /// <p>The cache cluster ID</p>
5933    pub cache_cluster_id: Option<String>,
5934    /// <p>The node ID of the cache cluster</p>
5935    pub cache_node_id: Option<String>,
5936    /// <p>The deletion date of the node</p>
5937    pub node_deletion_date: Option<String>,
5938    /// <p>The end date of the update for a node</p>
5939    pub node_update_end_date: Option<String>,
5940    /// <p>Reflects whether the update was initiated by the customer or automatically applied</p>
5941    pub node_update_initiated_by: Option<String>,
5942    /// <p>The date when the update is triggered</p>
5943    pub node_update_initiated_date: Option<String>,
5944    /// <p>The start date of the update for a node</p>
5945    pub node_update_start_date: Option<String>,
5946    /// <p>The update status of the node</p>
5947    pub node_update_status: Option<String>,
5948    /// <p>The date when the NodeUpdateStatus was last modified</p>
5949    pub node_update_status_modified_date: Option<String>,
5950}
5951
5952#[allow(dead_code)]
5953struct NodeGroupMemberUpdateStatusDeserializer;
5954impl NodeGroupMemberUpdateStatusDeserializer {
5955    #[allow(dead_code, unused_variables)]
5956    fn deserialize<T: Peek + Next>(
5957        tag_name: &str,
5958        stack: &mut T,
5959    ) -> Result<NodeGroupMemberUpdateStatus, XmlParseError> {
5960        deserialize_elements::<_, NodeGroupMemberUpdateStatus, _>(
5961            tag_name,
5962            stack,
5963            |name, stack, obj| {
5964                match name {
5965                    "CacheClusterId" => {
5966                        obj.cache_cluster_id =
5967                            Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
5968                    }
5969                    "CacheNodeId" => {
5970                        obj.cache_node_id =
5971                            Some(StringDeserializer::deserialize("CacheNodeId", stack)?);
5972                    }
5973                    "NodeDeletionDate" => {
5974                        obj.node_deletion_date =
5975                            Some(TStampDeserializer::deserialize("NodeDeletionDate", stack)?);
5976                    }
5977                    "NodeUpdateEndDate" => {
5978                        obj.node_update_end_date =
5979                            Some(TStampDeserializer::deserialize("NodeUpdateEndDate", stack)?);
5980                    }
5981                    "NodeUpdateInitiatedBy" => {
5982                        obj.node_update_initiated_by =
5983                            Some(NodeUpdateInitiatedByDeserializer::deserialize(
5984                                "NodeUpdateInitiatedBy",
5985                                stack,
5986                            )?);
5987                    }
5988                    "NodeUpdateInitiatedDate" => {
5989                        obj.node_update_initiated_date = Some(TStampDeserializer::deserialize(
5990                            "NodeUpdateInitiatedDate",
5991                            stack,
5992                        )?);
5993                    }
5994                    "NodeUpdateStartDate" => {
5995                        obj.node_update_start_date = Some(TStampDeserializer::deserialize(
5996                            "NodeUpdateStartDate",
5997                            stack,
5998                        )?);
5999                    }
6000                    "NodeUpdateStatus" => {
6001                        obj.node_update_status = Some(NodeUpdateStatusDeserializer::deserialize(
6002                            "NodeUpdateStatus",
6003                            stack,
6004                        )?);
6005                    }
6006                    "NodeUpdateStatusModifiedDate" => {
6007                        obj.node_update_status_modified_date = Some(
6008                            TStampDeserializer::deserialize("NodeUpdateStatusModifiedDate", stack)?,
6009                        );
6010                    }
6011                    _ => skip_tree(stack),
6012                }
6013                Ok(())
6014            },
6015        )
6016    }
6017}
6018#[allow(dead_code)]
6019struct NodeGroupMemberUpdateStatusListDeserializer;
6020impl NodeGroupMemberUpdateStatusListDeserializer {
6021    #[allow(dead_code, unused_variables)]
6022    fn deserialize<T: Peek + Next>(
6023        tag_name: &str,
6024        stack: &mut T,
6025    ) -> Result<Vec<NodeGroupMemberUpdateStatus>, XmlParseError> {
6026        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6027            if name == "NodeGroupMemberUpdateStatus" {
6028                obj.push(NodeGroupMemberUpdateStatusDeserializer::deserialize(
6029                    "NodeGroupMemberUpdateStatus",
6030                    stack,
6031                )?);
6032            } else {
6033                skip_tree(stack);
6034            }
6035            Ok(())
6036        })
6037    }
6038}
6039/// <p>The status of the service update on the node group </p>
6040#[derive(Clone, Debug, Default, PartialEq)]
6041#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6042pub struct NodeGroupUpdateStatus {
6043    /// <p>The ID of the node group</p>
6044    pub node_group_id: Option<String>,
6045    /// <p>The status of the service update on the node group member</p>
6046    pub node_group_member_update_status: Option<Vec<NodeGroupMemberUpdateStatus>>,
6047}
6048
6049#[allow(dead_code)]
6050struct NodeGroupUpdateStatusDeserializer;
6051impl NodeGroupUpdateStatusDeserializer {
6052    #[allow(dead_code, unused_variables)]
6053    fn deserialize<T: Peek + Next>(
6054        tag_name: &str,
6055        stack: &mut T,
6056    ) -> Result<NodeGroupUpdateStatus, XmlParseError> {
6057        deserialize_elements::<_, NodeGroupUpdateStatus, _>(tag_name, stack, |name, stack, obj| {
6058            match name {
6059                "NodeGroupId" => {
6060                    obj.node_group_id =
6061                        Some(StringDeserializer::deserialize("NodeGroupId", stack)?);
6062                }
6063                "NodeGroupMemberUpdateStatus" => {
6064                    obj.node_group_member_update_status
6065                        .get_or_insert(vec![])
6066                        .extend(NodeGroupMemberUpdateStatusListDeserializer::deserialize(
6067                            "NodeGroupMemberUpdateStatus",
6068                            stack,
6069                        )?);
6070                }
6071                _ => skip_tree(stack),
6072            }
6073            Ok(())
6074        })
6075    }
6076}
6077#[allow(dead_code)]
6078struct NodeGroupUpdateStatusListDeserializer;
6079impl NodeGroupUpdateStatusListDeserializer {
6080    #[allow(dead_code, unused_variables)]
6081    fn deserialize<T: Peek + Next>(
6082        tag_name: &str,
6083        stack: &mut T,
6084    ) -> Result<Vec<NodeGroupUpdateStatus>, XmlParseError> {
6085        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6086            if name == "NodeGroupUpdateStatus" {
6087                obj.push(NodeGroupUpdateStatusDeserializer::deserialize(
6088                    "NodeGroupUpdateStatus",
6089                    stack,
6090                )?);
6091            } else {
6092                skip_tree(stack);
6093            }
6094            Ok(())
6095        })
6096    }
6097}
6098
6099/// Serialize `NodeGroupsToRemoveList` contents to a `SignedRequest`.
6100struct NodeGroupsToRemoveListSerializer;
6101impl NodeGroupsToRemoveListSerializer {
6102    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
6103        for (index, obj) in obj.iter().enumerate() {
6104            let key = format!("{}.member.{}", name, index + 1);
6105            params.put(&key, &obj);
6106        }
6107    }
6108}
6109
6110/// Serialize `NodeGroupsToRetainList` contents to a `SignedRequest`.
6111struct NodeGroupsToRetainListSerializer;
6112impl NodeGroupsToRetainListSerializer {
6113    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
6114        for (index, obj) in obj.iter().enumerate() {
6115            let key = format!("{}.member.{}", name, index + 1);
6116            params.put(&key, &obj);
6117        }
6118    }
6119}
6120
6121/// <p>Represents an individual cache node in a snapshot of a cluster.</p>
6122#[derive(Clone, Debug, Default, PartialEq)]
6123#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6124pub struct NodeSnapshot {
6125    /// <p>A unique identifier for the source cluster.</p>
6126    pub cache_cluster_id: Option<String>,
6127    /// <p>The date and time when the cache node was created in the source cluster.</p>
6128    pub cache_node_create_time: Option<String>,
6129    /// <p>The cache node identifier for the node in the source cluster.</p>
6130    pub cache_node_id: Option<String>,
6131    /// <p>The size of the cache on the source cache node.</p>
6132    pub cache_size: Option<String>,
6133    /// <p>The configuration for the source node group (shard).</p>
6134    pub node_group_configuration: Option<NodeGroupConfiguration>,
6135    /// <p>A unique identifier for the source node group (shard).</p>
6136    pub node_group_id: Option<String>,
6137    /// <p>The date and time when the source node's metadata and cache data set was obtained for the snapshot.</p>
6138    pub snapshot_create_time: Option<String>,
6139}
6140
6141#[allow(dead_code)]
6142struct NodeSnapshotDeserializer;
6143impl NodeSnapshotDeserializer {
6144    #[allow(dead_code, unused_variables)]
6145    fn deserialize<T: Peek + Next>(
6146        tag_name: &str,
6147        stack: &mut T,
6148    ) -> Result<NodeSnapshot, XmlParseError> {
6149        deserialize_elements::<_, NodeSnapshot, _>(tag_name, stack, |name, stack, obj| {
6150            match name {
6151                "CacheClusterId" => {
6152                    obj.cache_cluster_id =
6153                        Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
6154                }
6155                "CacheNodeCreateTime" => {
6156                    obj.cache_node_create_time = Some(TStampDeserializer::deserialize(
6157                        "CacheNodeCreateTime",
6158                        stack,
6159                    )?);
6160                }
6161                "CacheNodeId" => {
6162                    obj.cache_node_id =
6163                        Some(StringDeserializer::deserialize("CacheNodeId", stack)?);
6164                }
6165                "CacheSize" => {
6166                    obj.cache_size = Some(StringDeserializer::deserialize("CacheSize", stack)?);
6167                }
6168                "NodeGroupConfiguration" => {
6169                    obj.node_group_configuration =
6170                        Some(NodeGroupConfigurationDeserializer::deserialize(
6171                            "NodeGroupConfiguration",
6172                            stack,
6173                        )?);
6174                }
6175                "NodeGroupId" => {
6176                    obj.node_group_id =
6177                        Some(StringDeserializer::deserialize("NodeGroupId", stack)?);
6178                }
6179                "SnapshotCreateTime" => {
6180                    obj.snapshot_create_time = Some(TStampDeserializer::deserialize(
6181                        "SnapshotCreateTime",
6182                        stack,
6183                    )?);
6184                }
6185                _ => skip_tree(stack),
6186            }
6187            Ok(())
6188        })
6189    }
6190}
6191#[allow(dead_code)]
6192struct NodeSnapshotListDeserializer;
6193impl NodeSnapshotListDeserializer {
6194    #[allow(dead_code, unused_variables)]
6195    fn deserialize<T: Peek + Next>(
6196        tag_name: &str,
6197        stack: &mut T,
6198    ) -> Result<Vec<NodeSnapshot>, XmlParseError> {
6199        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6200            if name == "NodeSnapshot" {
6201                obj.push(NodeSnapshotDeserializer::deserialize(
6202                    "NodeSnapshot",
6203                    stack,
6204                )?);
6205            } else {
6206                skip_tree(stack);
6207            }
6208            Ok(())
6209        })
6210    }
6211}
6212#[allow(dead_code)]
6213struct NodeTypeListDeserializer;
6214impl NodeTypeListDeserializer {
6215    #[allow(dead_code, unused_variables)]
6216    fn deserialize<T: Peek + Next>(
6217        tag_name: &str,
6218        stack: &mut T,
6219    ) -> Result<Vec<String>, XmlParseError> {
6220        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6221            if name == "member" {
6222                obj.push(StringDeserializer::deserialize("member", stack)?);
6223            } else {
6224                skip_tree(stack);
6225            }
6226            Ok(())
6227        })
6228    }
6229}
6230#[allow(dead_code)]
6231struct NodeUpdateInitiatedByDeserializer;
6232impl NodeUpdateInitiatedByDeserializer {
6233    #[allow(dead_code, unused_variables)]
6234    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6235        xml_util::deserialize_primitive(tag_name, stack, Ok)
6236    }
6237}
6238#[allow(dead_code)]
6239struct NodeUpdateStatusDeserializer;
6240impl NodeUpdateStatusDeserializer {
6241    #[allow(dead_code, unused_variables)]
6242    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6243        xml_util::deserialize_primitive(tag_name, stack, Ok)
6244    }
6245}
6246/// <p>Describes a notification topic and its status. Notification topics are used for publishing ElastiCache events to subscribers using Amazon Simple Notification Service (SNS).</p>
6247#[derive(Clone, Debug, Default, PartialEq)]
6248#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6249pub struct NotificationConfiguration {
6250    /// <p>The Amazon Resource Name (ARN) that identifies the topic.</p>
6251    pub topic_arn: Option<String>,
6252    /// <p>The current state of the topic.</p>
6253    pub topic_status: Option<String>,
6254}
6255
6256#[allow(dead_code)]
6257struct NotificationConfigurationDeserializer;
6258impl NotificationConfigurationDeserializer {
6259    #[allow(dead_code, unused_variables)]
6260    fn deserialize<T: Peek + Next>(
6261        tag_name: &str,
6262        stack: &mut T,
6263    ) -> Result<NotificationConfiguration, XmlParseError> {
6264        deserialize_elements::<_, NotificationConfiguration, _>(
6265            tag_name,
6266            stack,
6267            |name, stack, obj| {
6268                match name {
6269                    "TopicArn" => {
6270                        obj.topic_arn = Some(StringDeserializer::deserialize("TopicArn", stack)?);
6271                    }
6272                    "TopicStatus" => {
6273                        obj.topic_status =
6274                            Some(StringDeserializer::deserialize("TopicStatus", stack)?);
6275                    }
6276                    _ => skip_tree(stack),
6277                }
6278                Ok(())
6279            },
6280        )
6281    }
6282}
6283/// <p>Describes an individual setting that controls some aspect of ElastiCache behavior.</p>
6284#[derive(Clone, Debug, Default, PartialEq)]
6285#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6286pub struct Parameter {
6287    /// <p>The valid range of values for the parameter.</p>
6288    pub allowed_values: Option<String>,
6289    /// <p>Indicates whether a change to the parameter is applied immediately or requires a reboot for the change to be applied. You can force a reboot or wait until the next maintenance window's reboot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html">Rebooting a Cluster</a>.</p>
6290    pub change_type: Option<String>,
6291    /// <p>The valid data type for the parameter.</p>
6292    pub data_type: Option<String>,
6293    /// <p>A description of the parameter.</p>
6294    pub description: Option<String>,
6295    /// <p>Indicates whether (<code>true</code>) or not (<code>false</code>) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.</p>
6296    pub is_modifiable: Option<bool>,
6297    /// <p>The earliest cache engine version to which the parameter can apply.</p>
6298    pub minimum_engine_version: Option<String>,
6299    /// <p>The name of the parameter.</p>
6300    pub parameter_name: Option<String>,
6301    /// <p>The value of the parameter.</p>
6302    pub parameter_value: Option<String>,
6303    /// <p>The source of the parameter.</p>
6304    pub source: Option<String>,
6305}
6306
6307#[allow(dead_code)]
6308struct ParameterDeserializer;
6309impl ParameterDeserializer {
6310    #[allow(dead_code, unused_variables)]
6311    fn deserialize<T: Peek + Next>(
6312        tag_name: &str,
6313        stack: &mut T,
6314    ) -> Result<Parameter, XmlParseError> {
6315        deserialize_elements::<_, Parameter, _>(tag_name, stack, |name, stack, obj| {
6316            match name {
6317                "AllowedValues" => {
6318                    obj.allowed_values =
6319                        Some(StringDeserializer::deserialize("AllowedValues", stack)?);
6320                }
6321                "ChangeType" => {
6322                    obj.change_type =
6323                        Some(ChangeTypeDeserializer::deserialize("ChangeType", stack)?);
6324                }
6325                "DataType" => {
6326                    obj.data_type = Some(StringDeserializer::deserialize("DataType", stack)?);
6327                }
6328                "Description" => {
6329                    obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
6330                }
6331                "IsModifiable" => {
6332                    obj.is_modifiable =
6333                        Some(BooleanDeserializer::deserialize("IsModifiable", stack)?);
6334                }
6335                "MinimumEngineVersion" => {
6336                    obj.minimum_engine_version = Some(StringDeserializer::deserialize(
6337                        "MinimumEngineVersion",
6338                        stack,
6339                    )?);
6340                }
6341                "ParameterName" => {
6342                    obj.parameter_name =
6343                        Some(StringDeserializer::deserialize("ParameterName", stack)?);
6344                }
6345                "ParameterValue" => {
6346                    obj.parameter_value =
6347                        Some(StringDeserializer::deserialize("ParameterValue", stack)?);
6348                }
6349                "Source" => {
6350                    obj.source = Some(StringDeserializer::deserialize("Source", stack)?);
6351                }
6352                _ => skip_tree(stack),
6353            }
6354            Ok(())
6355        })
6356    }
6357}
6358/// <p>Describes a name-value pair that is used to update the value of a parameter.</p>
6359#[derive(Clone, Debug, Default, PartialEq)]
6360#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6361pub struct ParameterNameValue {
6362    /// <p>The name of the parameter.</p>
6363    pub parameter_name: Option<String>,
6364    /// <p>The value of the parameter.</p>
6365    pub parameter_value: Option<String>,
6366}
6367
6368/// Serialize `ParameterNameValue` contents to a `SignedRequest`.
6369struct ParameterNameValueSerializer;
6370impl ParameterNameValueSerializer {
6371    fn serialize(params: &mut Params, name: &str, obj: &ParameterNameValue) {
6372        let mut prefix = name.to_string();
6373        if prefix != "" {
6374            prefix.push_str(".");
6375        }
6376
6377        if let Some(ref field_value) = obj.parameter_name {
6378            params.put(&format!("{}{}", prefix, "ParameterName"), &field_value);
6379        }
6380        if let Some(ref field_value) = obj.parameter_value {
6381            params.put(&format!("{}{}", prefix, "ParameterValue"), &field_value);
6382        }
6383    }
6384}
6385
6386/// Serialize `ParameterNameValueList` contents to a `SignedRequest`.
6387struct ParameterNameValueListSerializer;
6388impl ParameterNameValueListSerializer {
6389    fn serialize(params: &mut Params, name: &str, obj: &Vec<ParameterNameValue>) {
6390        for (index, obj) in obj.iter().enumerate() {
6391            let key = format!("{}.member.{}", name, index + 1);
6392            ParameterNameValueSerializer::serialize(params, &key, obj);
6393        }
6394    }
6395}
6396
6397#[allow(dead_code)]
6398struct ParametersListDeserializer;
6399impl ParametersListDeserializer {
6400    #[allow(dead_code, unused_variables)]
6401    fn deserialize<T: Peek + Next>(
6402        tag_name: &str,
6403        stack: &mut T,
6404    ) -> Result<Vec<Parameter>, XmlParseError> {
6405        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6406            if name == "Parameter" {
6407                obj.push(ParameterDeserializer::deserialize("Parameter", stack)?);
6408            } else {
6409                skip_tree(stack);
6410            }
6411            Ok(())
6412        })
6413    }
6414}
6415#[allow(dead_code)]
6416struct PendingAutomaticFailoverStatusDeserializer;
6417impl PendingAutomaticFailoverStatusDeserializer {
6418    #[allow(dead_code, unused_variables)]
6419    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
6420        xml_util::deserialize_primitive(tag_name, stack, Ok)
6421    }
6422}
6423/// <p>A group of settings that are applied to the cluster in the future, or that are currently being applied.</p>
6424#[derive(Clone, Debug, Default, PartialEq)]
6425#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6426pub struct PendingModifiedValues {
6427    /// <p>The auth token status</p>
6428    pub auth_token_status: Option<String>,
6429    /// <p>A list of cache node IDs that are being removed (or will be removed) from the cluster. A node ID is a 4-digit numeric identifier (0001, 0002, etc.).</p>
6430    pub cache_node_ids_to_remove: Option<Vec<String>>,
6431    /// <p>The cache node type that this cluster or replication group is scaled to.</p>
6432    pub cache_node_type: Option<String>,
6433    /// <p>The new cache engine version that the cluster runs.</p>
6434    pub engine_version: Option<String>,
6435    /// <p>The new number of cache nodes for the cluster.</p> <p>For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.</p>
6436    pub num_cache_nodes: Option<i64>,
6437}
6438
6439#[allow(dead_code)]
6440struct PendingModifiedValuesDeserializer;
6441impl PendingModifiedValuesDeserializer {
6442    #[allow(dead_code, unused_variables)]
6443    fn deserialize<T: Peek + Next>(
6444        tag_name: &str,
6445        stack: &mut T,
6446    ) -> Result<PendingModifiedValues, XmlParseError> {
6447        deserialize_elements::<_, PendingModifiedValues, _>(tag_name, stack, |name, stack, obj| {
6448            match name {
6449                "AuthTokenStatus" => {
6450                    obj.auth_token_status = Some(AuthTokenUpdateStatusDeserializer::deserialize(
6451                        "AuthTokenStatus",
6452                        stack,
6453                    )?);
6454                }
6455                "CacheNodeIdsToRemove" => {
6456                    obj.cache_node_ids_to_remove.get_or_insert(vec![]).extend(
6457                        CacheNodeIdsListDeserializer::deserialize("CacheNodeIdsToRemove", stack)?,
6458                    );
6459                }
6460                "CacheNodeType" => {
6461                    obj.cache_node_type =
6462                        Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
6463                }
6464                "EngineVersion" => {
6465                    obj.engine_version =
6466                        Some(StringDeserializer::deserialize("EngineVersion", stack)?);
6467                }
6468                "NumCacheNodes" => {
6469                    obj.num_cache_nodes = Some(IntegerOptionalDeserializer::deserialize(
6470                        "NumCacheNodes",
6471                        stack,
6472                    )?);
6473                }
6474                _ => skip_tree(stack),
6475            }
6476            Ok(())
6477        })
6478    }
6479}
6480
6481/// Serialize `PreferredAvailabilityZoneList` contents to a `SignedRequest`.
6482struct PreferredAvailabilityZoneListSerializer;
6483impl PreferredAvailabilityZoneListSerializer {
6484    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
6485        for (index, obj) in obj.iter().enumerate() {
6486            let key = format!("{}.member.{}", name, index + 1);
6487            params.put(&key, &obj);
6488        }
6489    }
6490}
6491
6492/// <p>Update action that has been processed for the corresponding apply/stop request</p>
6493#[derive(Clone, Debug, Default, PartialEq)]
6494#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6495pub struct ProcessedUpdateAction {
6496    /// <p>The ID of the cache cluster</p>
6497    pub cache_cluster_id: Option<String>,
6498    /// <p>The ID of the replication group</p>
6499    pub replication_group_id: Option<String>,
6500    /// <p>The unique ID of the service update</p>
6501    pub service_update_name: Option<String>,
6502    /// <p>The status of the update action on the Redis cluster</p>
6503    pub update_action_status: Option<String>,
6504}
6505
6506#[allow(dead_code)]
6507struct ProcessedUpdateActionDeserializer;
6508impl ProcessedUpdateActionDeserializer {
6509    #[allow(dead_code, unused_variables)]
6510    fn deserialize<T: Peek + Next>(
6511        tag_name: &str,
6512        stack: &mut T,
6513    ) -> Result<ProcessedUpdateAction, XmlParseError> {
6514        deserialize_elements::<_, ProcessedUpdateAction, _>(tag_name, stack, |name, stack, obj| {
6515            match name {
6516                "CacheClusterId" => {
6517                    obj.cache_cluster_id =
6518                        Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
6519                }
6520                "ReplicationGroupId" => {
6521                    obj.replication_group_id = Some(StringDeserializer::deserialize(
6522                        "ReplicationGroupId",
6523                        stack,
6524                    )?);
6525                }
6526                "ServiceUpdateName" => {
6527                    obj.service_update_name =
6528                        Some(StringDeserializer::deserialize("ServiceUpdateName", stack)?);
6529                }
6530                "UpdateActionStatus" => {
6531                    obj.update_action_status = Some(UpdateActionStatusDeserializer::deserialize(
6532                        "UpdateActionStatus",
6533                        stack,
6534                    )?);
6535                }
6536                _ => skip_tree(stack),
6537            }
6538            Ok(())
6539        })
6540    }
6541}
6542#[allow(dead_code)]
6543struct ProcessedUpdateActionListDeserializer;
6544impl ProcessedUpdateActionListDeserializer {
6545    #[allow(dead_code, unused_variables)]
6546    fn deserialize<T: Peek + Next>(
6547        tag_name: &str,
6548        stack: &mut T,
6549    ) -> Result<Vec<ProcessedUpdateAction>, XmlParseError> {
6550        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6551            if name == "ProcessedUpdateAction" {
6552                obj.push(ProcessedUpdateActionDeserializer::deserialize(
6553                    "ProcessedUpdateAction",
6554                    stack,
6555                )?);
6556            } else {
6557                skip_tree(stack);
6558            }
6559            Ok(())
6560        })
6561    }
6562}
6563/// <p>Represents the input of a <code>PurchaseReservedCacheNodesOffering</code> operation.</p>
6564#[derive(Clone, Debug, Default, PartialEq)]
6565#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6566pub struct PurchaseReservedCacheNodesOfferingMessage {
6567    /// <p>The number of cache node instances to reserve.</p> <p>Default: <code>1</code> </p>
6568    pub cache_node_count: Option<i64>,
6569    /// <p>A customer-specified identifier to track this reservation.</p> <note> <p>The Reserved Cache Node ID is an unique customer-specified identifier to track this reservation. If this parameter is not specified, ElastiCache automatically generates an identifier for the reservation.</p> </note> <p>Example: myreservationID</p>
6570    pub reserved_cache_node_id: Option<String>,
6571    /// <p>The ID of the reserved cache node offering to purchase.</p> <p>Example: <code>438012d3-4052-4cc7-b2e3-8d3372e0e706</code> </p>
6572    pub reserved_cache_nodes_offering_id: String,
6573}
6574
6575/// Serialize `PurchaseReservedCacheNodesOfferingMessage` contents to a `SignedRequest`.
6576struct PurchaseReservedCacheNodesOfferingMessageSerializer;
6577impl PurchaseReservedCacheNodesOfferingMessageSerializer {
6578    fn serialize(params: &mut Params, name: &str, obj: &PurchaseReservedCacheNodesOfferingMessage) {
6579        let mut prefix = name.to_string();
6580        if prefix != "" {
6581            prefix.push_str(".");
6582        }
6583
6584        if let Some(ref field_value) = obj.cache_node_count {
6585            params.put(&format!("{}{}", prefix, "CacheNodeCount"), &field_value);
6586        }
6587        if let Some(ref field_value) = obj.reserved_cache_node_id {
6588            params.put(
6589                &format!("{}{}", prefix, "ReservedCacheNodeId"),
6590                &field_value,
6591            );
6592        }
6593        params.put(
6594            &format!("{}{}", prefix, "ReservedCacheNodesOfferingId"),
6595            &obj.reserved_cache_nodes_offering_id,
6596        );
6597    }
6598}
6599
6600#[derive(Clone, Debug, Default, PartialEq)]
6601#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6602pub struct PurchaseReservedCacheNodesOfferingResult {
6603    pub reserved_cache_node: Option<ReservedCacheNode>,
6604}
6605
6606#[allow(dead_code)]
6607struct PurchaseReservedCacheNodesOfferingResultDeserializer;
6608impl PurchaseReservedCacheNodesOfferingResultDeserializer {
6609    #[allow(dead_code, unused_variables)]
6610    fn deserialize<T: Peek + Next>(
6611        tag_name: &str,
6612        stack: &mut T,
6613    ) -> Result<PurchaseReservedCacheNodesOfferingResult, XmlParseError> {
6614        deserialize_elements::<_, PurchaseReservedCacheNodesOfferingResult, _>(
6615            tag_name,
6616            stack,
6617            |name, stack, obj| {
6618                match name {
6619                    "ReservedCacheNode" => {
6620                        obj.reserved_cache_node = Some(ReservedCacheNodeDeserializer::deserialize(
6621                            "ReservedCacheNode",
6622                            stack,
6623                        )?);
6624                    }
6625                    _ => skip_tree(stack),
6626                }
6627                Ok(())
6628            },
6629        )
6630    }
6631}
6632#[derive(Clone, Debug, Default, PartialEq)]
6633#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6634pub struct RebalanceSlotsInGlobalReplicationGroupMessage {
6635    /// <p>If <code>True</code>, redistribution is applied immediately.</p>
6636    pub apply_immediately: bool,
6637    /// <p>The name of the Global Datastore</p>
6638    pub global_replication_group_id: String,
6639}
6640
6641/// Serialize `RebalanceSlotsInGlobalReplicationGroupMessage` contents to a `SignedRequest`.
6642struct RebalanceSlotsInGlobalReplicationGroupMessageSerializer;
6643impl RebalanceSlotsInGlobalReplicationGroupMessageSerializer {
6644    fn serialize(
6645        params: &mut Params,
6646        name: &str,
6647        obj: &RebalanceSlotsInGlobalReplicationGroupMessage,
6648    ) {
6649        let mut prefix = name.to_string();
6650        if prefix != "" {
6651            prefix.push_str(".");
6652        }
6653
6654        params.put(
6655            &format!("{}{}", prefix, "ApplyImmediately"),
6656            &obj.apply_immediately,
6657        );
6658        params.put(
6659            &format!("{}{}", prefix, "GlobalReplicationGroupId"),
6660            &obj.global_replication_group_id,
6661        );
6662    }
6663}
6664
6665#[derive(Clone, Debug, Default, PartialEq)]
6666#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6667pub struct RebalanceSlotsInGlobalReplicationGroupResult {
6668    pub global_replication_group: Option<GlobalReplicationGroup>,
6669}
6670
6671#[allow(dead_code)]
6672struct RebalanceSlotsInGlobalReplicationGroupResultDeserializer;
6673impl RebalanceSlotsInGlobalReplicationGroupResultDeserializer {
6674    #[allow(dead_code, unused_variables)]
6675    fn deserialize<T: Peek + Next>(
6676        tag_name: &str,
6677        stack: &mut T,
6678    ) -> Result<RebalanceSlotsInGlobalReplicationGroupResult, XmlParseError> {
6679        deserialize_elements::<_, RebalanceSlotsInGlobalReplicationGroupResult, _>(
6680            tag_name,
6681            stack,
6682            |name, stack, obj| {
6683                match name {
6684                    "GlobalReplicationGroup" => {
6685                        obj.global_replication_group =
6686                            Some(GlobalReplicationGroupDeserializer::deserialize(
6687                                "GlobalReplicationGroup",
6688                                stack,
6689                            )?);
6690                    }
6691                    _ => skip_tree(stack),
6692                }
6693                Ok(())
6694            },
6695        )
6696    }
6697}
6698/// <p>Represents the input of a <code>RebootCacheCluster</code> operation.</p>
6699#[derive(Clone, Debug, Default, PartialEq)]
6700#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6701pub struct RebootCacheClusterMessage {
6702    /// <p>The cluster identifier. This parameter is stored as a lowercase string.</p>
6703    pub cache_cluster_id: String,
6704    /// <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, 0002, etc.). To reboot an entire cluster, specify all of the cache node IDs.</p>
6705    pub cache_node_ids_to_reboot: Vec<String>,
6706}
6707
6708/// Serialize `RebootCacheClusterMessage` contents to a `SignedRequest`.
6709struct RebootCacheClusterMessageSerializer;
6710impl RebootCacheClusterMessageSerializer {
6711    fn serialize(params: &mut Params, name: &str, obj: &RebootCacheClusterMessage) {
6712        let mut prefix = name.to_string();
6713        if prefix != "" {
6714            prefix.push_str(".");
6715        }
6716
6717        params.put(
6718            &format!("{}{}", prefix, "CacheClusterId"),
6719            &obj.cache_cluster_id,
6720        );
6721        CacheNodeIdsListSerializer::serialize(
6722            params,
6723            &format!("{}{}", prefix, "CacheNodeId"),
6724            &obj.cache_node_ids_to_reboot,
6725        );
6726    }
6727}
6728
6729#[derive(Clone, Debug, Default, PartialEq)]
6730#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6731pub struct RebootCacheClusterResult {
6732    pub cache_cluster: Option<CacheCluster>,
6733}
6734
6735#[allow(dead_code)]
6736struct RebootCacheClusterResultDeserializer;
6737impl RebootCacheClusterResultDeserializer {
6738    #[allow(dead_code, unused_variables)]
6739    fn deserialize<T: Peek + Next>(
6740        tag_name: &str,
6741        stack: &mut T,
6742    ) -> Result<RebootCacheClusterResult, XmlParseError> {
6743        deserialize_elements::<_, RebootCacheClusterResult, _>(
6744            tag_name,
6745            stack,
6746            |name, stack, obj| {
6747                match name {
6748                    "CacheCluster" => {
6749                        obj.cache_cluster = Some(CacheClusterDeserializer::deserialize(
6750                            "CacheCluster",
6751                            stack,
6752                        )?);
6753                    }
6754                    _ => skip_tree(stack),
6755                }
6756                Ok(())
6757            },
6758        )
6759    }
6760}
6761/// <p>Contains the specific price and frequency of a recurring charges for a reserved cache node, or for a reserved cache node offering.</p>
6762#[derive(Clone, Debug, Default, PartialEq)]
6763#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6764pub struct RecurringCharge {
6765    /// <p>The monetary amount of the recurring charge.</p>
6766    pub recurring_charge_amount: Option<f64>,
6767    /// <p>The frequency of the recurring charge.</p>
6768    pub recurring_charge_frequency: Option<String>,
6769}
6770
6771#[allow(dead_code)]
6772struct RecurringChargeDeserializer;
6773impl RecurringChargeDeserializer {
6774    #[allow(dead_code, unused_variables)]
6775    fn deserialize<T: Peek + Next>(
6776        tag_name: &str,
6777        stack: &mut T,
6778    ) -> Result<RecurringCharge, XmlParseError> {
6779        deserialize_elements::<_, RecurringCharge, _>(tag_name, stack, |name, stack, obj| {
6780            match name {
6781                "RecurringChargeAmount" => {
6782                    obj.recurring_charge_amount = Some(DoubleDeserializer::deserialize(
6783                        "RecurringChargeAmount",
6784                        stack,
6785                    )?);
6786                }
6787                "RecurringChargeFrequency" => {
6788                    obj.recurring_charge_frequency = Some(StringDeserializer::deserialize(
6789                        "RecurringChargeFrequency",
6790                        stack,
6791                    )?);
6792                }
6793                _ => skip_tree(stack),
6794            }
6795            Ok(())
6796        })
6797    }
6798}
6799#[allow(dead_code)]
6800struct RecurringChargeListDeserializer;
6801impl RecurringChargeListDeserializer {
6802    #[allow(dead_code, unused_variables)]
6803    fn deserialize<T: Peek + Next>(
6804        tag_name: &str,
6805        stack: &mut T,
6806    ) -> Result<Vec<RecurringCharge>, XmlParseError> {
6807        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
6808            if name == "RecurringCharge" {
6809                obj.push(RecurringChargeDeserializer::deserialize(
6810                    "RecurringCharge",
6811                    stack,
6812                )?);
6813            } else {
6814                skip_tree(stack);
6815            }
6816            Ok(())
6817        })
6818    }
6819}
6820/// <p>A list of the replication groups </p>
6821#[derive(Clone, Debug, Default, PartialEq)]
6822#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6823pub struct RegionalConfiguration {
6824    /// <p>The name of the secondary cluster</p>
6825    pub replication_group_id: String,
6826    /// <p>The AWS region where the cluster is stored</p>
6827    pub replication_group_region: String,
6828    /// <p>A list of <code>PreferredAvailabilityZones</code> objects that specifies the configuration of a node group in the resharded cluster. </p>
6829    pub resharding_configuration: Vec<ReshardingConfiguration>,
6830}
6831
6832/// Serialize `RegionalConfiguration` contents to a `SignedRequest`.
6833struct RegionalConfigurationSerializer;
6834impl RegionalConfigurationSerializer {
6835    fn serialize(params: &mut Params, name: &str, obj: &RegionalConfiguration) {
6836        let mut prefix = name.to_string();
6837        if prefix != "" {
6838            prefix.push_str(".");
6839        }
6840
6841        params.put(
6842            &format!("{}{}", prefix, "ReplicationGroupId"),
6843            &obj.replication_group_id,
6844        );
6845        params.put(
6846            &format!("{}{}", prefix, "ReplicationGroupRegion"),
6847            &obj.replication_group_region,
6848        );
6849        ReshardingConfigurationListSerializer::serialize(
6850            params,
6851            &format!("{}{}", prefix, "ReshardingConfiguration"),
6852            &obj.resharding_configuration,
6853        );
6854    }
6855}
6856
6857/// Serialize `RegionalConfigurationList` contents to a `SignedRequest`.
6858struct RegionalConfigurationListSerializer;
6859impl RegionalConfigurationListSerializer {
6860    fn serialize(params: &mut Params, name: &str, obj: &Vec<RegionalConfiguration>) {
6861        for (index, obj) in obj.iter().enumerate() {
6862            let key = format!("{}.member.{}", name, index + 1);
6863            RegionalConfigurationSerializer::serialize(params, &key, obj);
6864        }
6865    }
6866}
6867
6868/// Serialize `RemoveReplicasList` contents to a `SignedRequest`.
6869struct RemoveReplicasListSerializer;
6870impl RemoveReplicasListSerializer {
6871    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
6872        for (index, obj) in obj.iter().enumerate() {
6873            let key = format!("{}.member.{}", name, index + 1);
6874            params.put(&key, &obj);
6875        }
6876    }
6877}
6878
6879/// <p>Represents the input of a <code>RemoveTagsFromResource</code> operation.</p>
6880#[derive(Clone, Debug, Default, PartialEq)]
6881#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
6882pub struct RemoveTagsFromResourceMessage {
6883    /// <p>The Amazon Resource Name (ARN) of the resource from which you want the tags removed, for example <code>arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster</code> or <code>arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot</code>.</p> <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>.</p>
6884    pub resource_name: String,
6885    /// <p>A list of <code>TagKeys</code> identifying the tags you want removed from the named resource.</p>
6886    pub tag_keys: Vec<String>,
6887}
6888
6889/// Serialize `RemoveTagsFromResourceMessage` contents to a `SignedRequest`.
6890struct RemoveTagsFromResourceMessageSerializer;
6891impl RemoveTagsFromResourceMessageSerializer {
6892    fn serialize(params: &mut Params, name: &str, obj: &RemoveTagsFromResourceMessage) {
6893        let mut prefix = name.to_string();
6894        if prefix != "" {
6895            prefix.push_str(".");
6896        }
6897
6898        params.put(&format!("{}{}", prefix, "ResourceName"), &obj.resource_name);
6899        KeyListSerializer::serialize(params, &format!("{}{}", prefix, "TagKeys"), &obj.tag_keys);
6900    }
6901}
6902
6903/// Serialize `ReplicaConfigurationList` contents to a `SignedRequest`.
6904struct ReplicaConfigurationListSerializer;
6905impl ReplicaConfigurationListSerializer {
6906    fn serialize(params: &mut Params, name: &str, obj: &Vec<ConfigureShard>) {
6907        for (index, obj) in obj.iter().enumerate() {
6908            let key = format!("{}.member.{}", name, index + 1);
6909            ConfigureShardSerializer::serialize(params, &key, obj);
6910        }
6911    }
6912}
6913
6914/// <p>Contains all of the attributes of a specific Redis replication group.</p>
6915#[derive(Clone, Debug, Default, PartialEq)]
6916#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
6917pub struct ReplicationGroup {
6918    /// <p>The ARN (Amazon Resource Name) of the replication group.</p>
6919    pub arn: Option<String>,
6920    /// <p>A flag that enables encryption at-rest when set to <code>true</code>.</p> <p>You cannot modify the value of <code>AtRestEncryptionEnabled</code> after the cluster is created. To enable encryption at-rest on a cluster you must set <code>AtRestEncryptionEnabled</code> to <code>true</code> when you create a cluster.</p> <p> <b>Required:</b> Only available when creating a replication group in an Amazon VPC using redis version <code>3.2.6</code>, <code>4.x</code> or later.</p> <p>Default: <code>false</code> </p>
6921    pub at_rest_encryption_enabled: Option<bool>,
6922    /// <p>A flag that enables using an <code>AuthToken</code> (password) when issuing Redis commands.</p> <p>Default: <code>false</code> </p>
6923    pub auth_token_enabled: Option<bool>,
6924    /// <p>The date the auth token was last modified</p>
6925    pub auth_token_last_modified_date: Option<String>,
6926    /// <p>Indicates the status of automatic failover for this Redis replication group.</p>
6927    pub automatic_failover: Option<String>,
6928    /// <p>The name of the compute and memory capacity node type for each node in the replication group.</p>
6929    pub cache_node_type: Option<String>,
6930    /// <p>A flag indicating whether or not this replication group is cluster enabled; i.e., whether its data can be partitioned across multiple shards (API/CLI: node groups).</p> <p>Valid values: <code>true</code> | <code>false</code> </p>
6931    pub cluster_enabled: Option<bool>,
6932    /// <p>The configuration endpoint for this replication group. Use the configuration endpoint to connect to this replication group.</p>
6933    pub configuration_endpoint: Option<Endpoint>,
6934    /// <p>The user supplied description of the replication group.</p>
6935    pub description: Option<String>,
6936    /// <p>The name of the Global Datastore and role of this replication group in the Global Datastore.</p>
6937    pub global_replication_group_info: Option<GlobalReplicationGroupInfo>,
6938    /// <p>The ID of the KMS key used to encrypt the disk in the cluster.</p>
6939    pub kms_key_id: Option<String>,
6940    /// <p>The names of all the cache clusters that are part of this replication group.</p>
6941    pub member_clusters: Option<Vec<String>>,
6942    /// <p>A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html">Minimizing Downtime: Multi-AZ</a> </p>
6943    pub multi_az: Option<String>,
6944    /// <p>A list of node groups in this replication group. For Redis (cluster mode disabled) replication groups, this is a single-element list. For Redis (cluster mode enabled) replication groups, the list contains an entry for each node group (shard).</p>
6945    pub node_groups: Option<Vec<NodeGroup>>,
6946    /// <p>A group of settings to be applied to the replication group, either immediately or during the next maintenance window.</p>
6947    pub pending_modified_values: Option<ReplicationGroupPendingModifiedValues>,
6948    /// <p>The identifier for the replication group.</p>
6949    pub replication_group_id: Option<String>,
6950    /// <p><p>The number of days for which ElastiCache retains automatic cluster snapshots before deleting them. For example, if you set <code>SnapshotRetentionLimit</code> to 5, a snapshot that was taken today is retained for 5 days before being deleted.</p> <important> <p> If the value of <code>SnapshotRetentionLimit</code> is set to zero (0), backups are turned off.</p> </important></p>
6951    pub snapshot_retention_limit: Option<i64>,
6952    /// <p><p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).</p> <p>Example: <code>05:00-09:00</code> </p> <p>If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.</p> <note> <p>This parameter is only valid if the <code>Engine</code> parameter is <code>redis</code>.</p> </note></p>
6953    pub snapshot_window: Option<String>,
6954    /// <p>The cluster ID that is used as the daily snapshot source for the replication group.</p>
6955    pub snapshotting_cluster_id: Option<String>,
6956    /// <p>The current state of this replication group - <code>creating</code>, <code>available</code>, <code>modifying</code>, <code>deleting</code>, <code>create-failed</code>, <code>snapshotting</code>.</p>
6957    pub status: Option<String>,
6958    /// <p>A flag that enables in-transit encryption when set to <code>true</code>.</p> <p>You cannot modify the value of <code>TransitEncryptionEnabled</code> after the cluster is created. To enable in-transit encryption on a cluster you must set <code>TransitEncryptionEnabled</code> to <code>true</code> when you create a cluster.</p> <p> <b>Required:</b> Only available when creating a replication group in an Amazon VPC using redis version <code>3.2.6</code>, <code>4.x</code> or later.</p> <p>Default: <code>false</code> </p>
6959    pub transit_encryption_enabled: Option<bool>,
6960}
6961
6962#[allow(dead_code)]
6963struct ReplicationGroupDeserializer;
6964impl ReplicationGroupDeserializer {
6965    #[allow(dead_code, unused_variables)]
6966    fn deserialize<T: Peek + Next>(
6967        tag_name: &str,
6968        stack: &mut T,
6969    ) -> Result<ReplicationGroup, XmlParseError> {
6970        deserialize_elements::<_, ReplicationGroup, _>(tag_name, stack, |name, stack, obj| {
6971            match name {
6972                "ARN" => {
6973                    obj.arn = Some(StringDeserializer::deserialize("ARN", stack)?);
6974                }
6975                "AtRestEncryptionEnabled" => {
6976                    obj.at_rest_encryption_enabled = Some(
6977                        BooleanOptionalDeserializer::deserialize("AtRestEncryptionEnabled", stack)?,
6978                    );
6979                }
6980                "AuthTokenEnabled" => {
6981                    obj.auth_token_enabled = Some(BooleanOptionalDeserializer::deserialize(
6982                        "AuthTokenEnabled",
6983                        stack,
6984                    )?);
6985                }
6986                "AuthTokenLastModifiedDate" => {
6987                    obj.auth_token_last_modified_date = Some(TStampDeserializer::deserialize(
6988                        "AuthTokenLastModifiedDate",
6989                        stack,
6990                    )?);
6991                }
6992                "AutomaticFailover" => {
6993                    obj.automatic_failover =
6994                        Some(AutomaticFailoverStatusDeserializer::deserialize(
6995                            "AutomaticFailover",
6996                            stack,
6997                        )?);
6998                }
6999                "CacheNodeType" => {
7000                    obj.cache_node_type =
7001                        Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
7002                }
7003                "ClusterEnabled" => {
7004                    obj.cluster_enabled = Some(BooleanOptionalDeserializer::deserialize(
7005                        "ClusterEnabled",
7006                        stack,
7007                    )?);
7008                }
7009                "ConfigurationEndpoint" => {
7010                    obj.configuration_endpoint = Some(EndpointDeserializer::deserialize(
7011                        "ConfigurationEndpoint",
7012                        stack,
7013                    )?);
7014                }
7015                "Description" => {
7016                    obj.description = Some(StringDeserializer::deserialize("Description", stack)?);
7017                }
7018                "GlobalReplicationGroupInfo" => {
7019                    obj.global_replication_group_info =
7020                        Some(GlobalReplicationGroupInfoDeserializer::deserialize(
7021                            "GlobalReplicationGroupInfo",
7022                            stack,
7023                        )?);
7024                }
7025                "KmsKeyId" => {
7026                    obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
7027                }
7028                "MemberClusters" => {
7029                    obj.member_clusters.get_or_insert(vec![]).extend(
7030                        ClusterIdListDeserializer::deserialize("MemberClusters", stack)?,
7031                    );
7032                }
7033                "MultiAZ" => {
7034                    obj.multi_az = Some(MultiAZStatusDeserializer::deserialize("MultiAZ", stack)?);
7035                }
7036                "NodeGroups" => {
7037                    obj.node_groups
7038                        .get_or_insert(vec![])
7039                        .extend(NodeGroupListDeserializer::deserialize("NodeGroups", stack)?);
7040                }
7041                "PendingModifiedValues" => {
7042                    obj.pending_modified_values = Some(
7043                        ReplicationGroupPendingModifiedValuesDeserializer::deserialize(
7044                            "PendingModifiedValues",
7045                            stack,
7046                        )?,
7047                    );
7048                }
7049                "ReplicationGroupId" => {
7050                    obj.replication_group_id = Some(StringDeserializer::deserialize(
7051                        "ReplicationGroupId",
7052                        stack,
7053                    )?);
7054                }
7055                "SnapshotRetentionLimit" => {
7056                    obj.snapshot_retention_limit = Some(IntegerOptionalDeserializer::deserialize(
7057                        "SnapshotRetentionLimit",
7058                        stack,
7059                    )?);
7060                }
7061                "SnapshotWindow" => {
7062                    obj.snapshot_window =
7063                        Some(StringDeserializer::deserialize("SnapshotWindow", stack)?);
7064                }
7065                "SnapshottingClusterId" => {
7066                    obj.snapshotting_cluster_id = Some(StringDeserializer::deserialize(
7067                        "SnapshottingClusterId",
7068                        stack,
7069                    )?);
7070                }
7071                "Status" => {
7072                    obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
7073                }
7074                "TransitEncryptionEnabled" => {
7075                    obj.transit_encryption_enabled =
7076                        Some(BooleanOptionalDeserializer::deserialize(
7077                            "TransitEncryptionEnabled",
7078                            stack,
7079                        )?);
7080                }
7081                _ => skip_tree(stack),
7082            }
7083            Ok(())
7084        })
7085    }
7086}
7087
7088/// Serialize `ReplicationGroupIdList` contents to a `SignedRequest`.
7089struct ReplicationGroupIdListSerializer;
7090impl ReplicationGroupIdListSerializer {
7091    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
7092        for (index, obj) in obj.iter().enumerate() {
7093            let key = format!("{}.member.{}", name, index + 1);
7094            params.put(&key, &obj);
7095        }
7096    }
7097}
7098
7099#[allow(dead_code)]
7100struct ReplicationGroupListDeserializer;
7101impl ReplicationGroupListDeserializer {
7102    #[allow(dead_code, unused_variables)]
7103    fn deserialize<T: Peek + Next>(
7104        tag_name: &str,
7105        stack: &mut T,
7106    ) -> Result<Vec<ReplicationGroup>, XmlParseError> {
7107        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
7108            if name == "ReplicationGroup" {
7109                obj.push(ReplicationGroupDeserializer::deserialize(
7110                    "ReplicationGroup",
7111                    stack,
7112                )?);
7113            } else {
7114                skip_tree(stack);
7115            }
7116            Ok(())
7117        })
7118    }
7119}
7120/// <p>Represents the output of a <code>DescribeReplicationGroups</code> operation.</p>
7121#[derive(Clone, Debug, Default, PartialEq)]
7122#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7123pub struct ReplicationGroupMessage {
7124    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
7125    pub marker: Option<String>,
7126    /// <p>A list of replication groups. Each item in the list contains detailed information about one replication group.</p>
7127    pub replication_groups: Option<Vec<ReplicationGroup>>,
7128}
7129
7130#[allow(dead_code)]
7131struct ReplicationGroupMessageDeserializer;
7132impl ReplicationGroupMessageDeserializer {
7133    #[allow(dead_code, unused_variables)]
7134    fn deserialize<T: Peek + Next>(
7135        tag_name: &str,
7136        stack: &mut T,
7137    ) -> Result<ReplicationGroupMessage, XmlParseError> {
7138        deserialize_elements::<_, ReplicationGroupMessage, _>(
7139            tag_name,
7140            stack,
7141            |name, stack, obj| {
7142                match name {
7143                    "Marker" => {
7144                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
7145                    }
7146                    "ReplicationGroups" => {
7147                        obj.replication_groups.get_or_insert(vec![]).extend(
7148                            ReplicationGroupListDeserializer::deserialize(
7149                                "ReplicationGroups",
7150                                stack,
7151                            )?,
7152                        );
7153                    }
7154                    _ => skip_tree(stack),
7155                }
7156                Ok(())
7157            },
7158        )
7159    }
7160}
7161/// <p>The settings to be applied to the Redis replication group, either immediately or during the next maintenance window.</p>
7162#[derive(Clone, Debug, Default, PartialEq)]
7163#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7164pub struct ReplicationGroupPendingModifiedValues {
7165    /// <p>The auth token status</p>
7166    pub auth_token_status: Option<String>,
7167    /// <p>Indicates the status of automatic failover for this Redis replication group.</p>
7168    pub automatic_failover_status: Option<String>,
7169    /// <p>The primary cluster ID that is applied immediately (if <code>--apply-immediately</code> was specified), or during the next maintenance window.</p>
7170    pub primary_cluster_id: Option<String>,
7171    /// <p>The status of an online resharding operation.</p>
7172    pub resharding: Option<ReshardingStatus>,
7173}
7174
7175#[allow(dead_code)]
7176struct ReplicationGroupPendingModifiedValuesDeserializer;
7177impl ReplicationGroupPendingModifiedValuesDeserializer {
7178    #[allow(dead_code, unused_variables)]
7179    fn deserialize<T: Peek + Next>(
7180        tag_name: &str,
7181        stack: &mut T,
7182    ) -> Result<ReplicationGroupPendingModifiedValues, XmlParseError> {
7183        deserialize_elements::<_, ReplicationGroupPendingModifiedValues, _>(
7184            tag_name,
7185            stack,
7186            |name, stack, obj| {
7187                match name {
7188                    "AuthTokenStatus" => {
7189                        obj.auth_token_status =
7190                            Some(AuthTokenUpdateStatusDeserializer::deserialize(
7191                                "AuthTokenStatus",
7192                                stack,
7193                            )?);
7194                    }
7195                    "AutomaticFailoverStatus" => {
7196                        obj.automatic_failover_status =
7197                            Some(PendingAutomaticFailoverStatusDeserializer::deserialize(
7198                                "AutomaticFailoverStatus",
7199                                stack,
7200                            )?);
7201                    }
7202                    "PrimaryClusterId" => {
7203                        obj.primary_cluster_id =
7204                            Some(StringDeserializer::deserialize("PrimaryClusterId", stack)?);
7205                    }
7206                    "Resharding" => {
7207                        obj.resharding = Some(ReshardingStatusDeserializer::deserialize(
7208                            "Resharding",
7209                            stack,
7210                        )?);
7211                    }
7212                    _ => skip_tree(stack),
7213                }
7214                Ok(())
7215            },
7216        )
7217    }
7218}
7219/// <p>Represents the output of a <code>PurchaseReservedCacheNodesOffering</code> operation.</p>
7220#[derive(Clone, Debug, Default, PartialEq)]
7221#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7222pub struct ReservedCacheNode {
7223    /// <p>The number of cache nodes that have been reserved.</p>
7224    pub cache_node_count: Option<i64>,
7225    /// <p><p>The cache node type for the reserved cache nodes.</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
7226    pub cache_node_type: Option<String>,
7227    /// <p>The duration of the reservation in seconds.</p>
7228    pub duration: Option<i64>,
7229    /// <p>The fixed price charged for this reserved cache node.</p>
7230    pub fixed_price: Option<f64>,
7231    /// <p>The offering type of this reserved cache node.</p>
7232    pub offering_type: Option<String>,
7233    /// <p>The description of the reserved cache node.</p>
7234    pub product_description: Option<String>,
7235    /// <p>The recurring price charged to run this reserved cache node.</p>
7236    pub recurring_charges: Option<Vec<RecurringCharge>>,
7237    /// <p>The Amazon Resource Name (ARN) of the reserved cache node.</p> <p>Example: <code>arn:aws:elasticache:us-east-1:123456789012:reserved-instance:ri-2017-03-27-08-33-25-582</code> </p>
7238    pub reservation_arn: Option<String>,
7239    /// <p>The unique identifier for the reservation.</p>
7240    pub reserved_cache_node_id: Option<String>,
7241    /// <p>The offering identifier.</p>
7242    pub reserved_cache_nodes_offering_id: Option<String>,
7243    /// <p>The time the reservation started.</p>
7244    pub start_time: Option<String>,
7245    /// <p>The state of the reserved cache node.</p>
7246    pub state: Option<String>,
7247    /// <p>The hourly price charged for this reserved cache node.</p>
7248    pub usage_price: Option<f64>,
7249}
7250
7251#[allow(dead_code)]
7252struct ReservedCacheNodeDeserializer;
7253impl ReservedCacheNodeDeserializer {
7254    #[allow(dead_code, unused_variables)]
7255    fn deserialize<T: Peek + Next>(
7256        tag_name: &str,
7257        stack: &mut T,
7258    ) -> Result<ReservedCacheNode, XmlParseError> {
7259        deserialize_elements::<_, ReservedCacheNode, _>(tag_name, stack, |name, stack, obj| {
7260            match name {
7261                "CacheNodeCount" => {
7262                    obj.cache_node_count =
7263                        Some(IntegerDeserializer::deserialize("CacheNodeCount", stack)?);
7264                }
7265                "CacheNodeType" => {
7266                    obj.cache_node_type =
7267                        Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
7268                }
7269                "Duration" => {
7270                    obj.duration = Some(IntegerDeserializer::deserialize("Duration", stack)?);
7271                }
7272                "FixedPrice" => {
7273                    obj.fixed_price = Some(DoubleDeserializer::deserialize("FixedPrice", stack)?);
7274                }
7275                "OfferingType" => {
7276                    obj.offering_type =
7277                        Some(StringDeserializer::deserialize("OfferingType", stack)?);
7278                }
7279                "ProductDescription" => {
7280                    obj.product_description = Some(StringDeserializer::deserialize(
7281                        "ProductDescription",
7282                        stack,
7283                    )?);
7284                }
7285                "RecurringCharges" => {
7286                    obj.recurring_charges.get_or_insert(vec![]).extend(
7287                        RecurringChargeListDeserializer::deserialize("RecurringCharges", stack)?,
7288                    );
7289                }
7290                "ReservationARN" => {
7291                    obj.reservation_arn =
7292                        Some(StringDeserializer::deserialize("ReservationARN", stack)?);
7293                }
7294                "ReservedCacheNodeId" => {
7295                    obj.reserved_cache_node_id = Some(StringDeserializer::deserialize(
7296                        "ReservedCacheNodeId",
7297                        stack,
7298                    )?);
7299                }
7300                "ReservedCacheNodesOfferingId" => {
7301                    obj.reserved_cache_nodes_offering_id = Some(StringDeserializer::deserialize(
7302                        "ReservedCacheNodesOfferingId",
7303                        stack,
7304                    )?);
7305                }
7306                "StartTime" => {
7307                    obj.start_time = Some(TStampDeserializer::deserialize("StartTime", stack)?);
7308                }
7309                "State" => {
7310                    obj.state = Some(StringDeserializer::deserialize("State", stack)?);
7311                }
7312                "UsagePrice" => {
7313                    obj.usage_price = Some(DoubleDeserializer::deserialize("UsagePrice", stack)?);
7314                }
7315                _ => skip_tree(stack),
7316            }
7317            Ok(())
7318        })
7319    }
7320}
7321#[allow(dead_code)]
7322struct ReservedCacheNodeListDeserializer;
7323impl ReservedCacheNodeListDeserializer {
7324    #[allow(dead_code, unused_variables)]
7325    fn deserialize<T: Peek + Next>(
7326        tag_name: &str,
7327        stack: &mut T,
7328    ) -> Result<Vec<ReservedCacheNode>, XmlParseError> {
7329        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
7330            if name == "ReservedCacheNode" {
7331                obj.push(ReservedCacheNodeDeserializer::deserialize(
7332                    "ReservedCacheNode",
7333                    stack,
7334                )?);
7335            } else {
7336                skip_tree(stack);
7337            }
7338            Ok(())
7339        })
7340    }
7341}
7342/// <p>Represents the output of a <code>DescribeReservedCacheNodes</code> operation.</p>
7343#[derive(Clone, Debug, Default, PartialEq)]
7344#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7345pub struct ReservedCacheNodeMessage {
7346    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
7347    pub marker: Option<String>,
7348    /// <p>A list of reserved cache nodes. Each element in the list contains detailed information about one node.</p>
7349    pub reserved_cache_nodes: Option<Vec<ReservedCacheNode>>,
7350}
7351
7352#[allow(dead_code)]
7353struct ReservedCacheNodeMessageDeserializer;
7354impl ReservedCacheNodeMessageDeserializer {
7355    #[allow(dead_code, unused_variables)]
7356    fn deserialize<T: Peek + Next>(
7357        tag_name: &str,
7358        stack: &mut T,
7359    ) -> Result<ReservedCacheNodeMessage, XmlParseError> {
7360        deserialize_elements::<_, ReservedCacheNodeMessage, _>(
7361            tag_name,
7362            stack,
7363            |name, stack, obj| {
7364                match name {
7365                    "Marker" => {
7366                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
7367                    }
7368                    "ReservedCacheNodes" => {
7369                        obj.reserved_cache_nodes.get_or_insert(vec![]).extend(
7370                            ReservedCacheNodeListDeserializer::deserialize(
7371                                "ReservedCacheNodes",
7372                                stack,
7373                            )?,
7374                        );
7375                    }
7376                    _ => skip_tree(stack),
7377                }
7378                Ok(())
7379            },
7380        )
7381    }
7382}
7383/// <p>Describes all of the attributes of a reserved cache node offering.</p>
7384#[derive(Clone, Debug, Default, PartialEq)]
7385#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7386pub struct ReservedCacheNodesOffering {
7387    /// <p><p>The cache node type for the reserved cache node.</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
7388    pub cache_node_type: Option<String>,
7389    /// <p>The duration of the offering. in seconds.</p>
7390    pub duration: Option<i64>,
7391    /// <p>The fixed price charged for this offering.</p>
7392    pub fixed_price: Option<f64>,
7393    /// <p>The offering type.</p>
7394    pub offering_type: Option<String>,
7395    /// <p>The cache engine used by the offering.</p>
7396    pub product_description: Option<String>,
7397    /// <p>The recurring price charged to run this reserved cache node.</p>
7398    pub recurring_charges: Option<Vec<RecurringCharge>>,
7399    /// <p>A unique identifier for the reserved cache node offering.</p>
7400    pub reserved_cache_nodes_offering_id: Option<String>,
7401    /// <p>The hourly price charged for this offering.</p>
7402    pub usage_price: Option<f64>,
7403}
7404
7405#[allow(dead_code)]
7406struct ReservedCacheNodesOfferingDeserializer;
7407impl ReservedCacheNodesOfferingDeserializer {
7408    #[allow(dead_code, unused_variables)]
7409    fn deserialize<T: Peek + Next>(
7410        tag_name: &str,
7411        stack: &mut T,
7412    ) -> Result<ReservedCacheNodesOffering, XmlParseError> {
7413        deserialize_elements::<_, ReservedCacheNodesOffering, _>(
7414            tag_name,
7415            stack,
7416            |name, stack, obj| {
7417                match name {
7418                    "CacheNodeType" => {
7419                        obj.cache_node_type =
7420                            Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
7421                    }
7422                    "Duration" => {
7423                        obj.duration = Some(IntegerDeserializer::deserialize("Duration", stack)?);
7424                    }
7425                    "FixedPrice" => {
7426                        obj.fixed_price =
7427                            Some(DoubleDeserializer::deserialize("FixedPrice", stack)?);
7428                    }
7429                    "OfferingType" => {
7430                        obj.offering_type =
7431                            Some(StringDeserializer::deserialize("OfferingType", stack)?);
7432                    }
7433                    "ProductDescription" => {
7434                        obj.product_description = Some(StringDeserializer::deserialize(
7435                            "ProductDescription",
7436                            stack,
7437                        )?);
7438                    }
7439                    "RecurringCharges" => {
7440                        obj.recurring_charges.get_or_insert(vec![]).extend(
7441                            RecurringChargeListDeserializer::deserialize(
7442                                "RecurringCharges",
7443                                stack,
7444                            )?,
7445                        );
7446                    }
7447                    "ReservedCacheNodesOfferingId" => {
7448                        obj.reserved_cache_nodes_offering_id = Some(
7449                            StringDeserializer::deserialize("ReservedCacheNodesOfferingId", stack)?,
7450                        );
7451                    }
7452                    "UsagePrice" => {
7453                        obj.usage_price =
7454                            Some(DoubleDeserializer::deserialize("UsagePrice", stack)?);
7455                    }
7456                    _ => skip_tree(stack),
7457                }
7458                Ok(())
7459            },
7460        )
7461    }
7462}
7463#[allow(dead_code)]
7464struct ReservedCacheNodesOfferingListDeserializer;
7465impl ReservedCacheNodesOfferingListDeserializer {
7466    #[allow(dead_code, unused_variables)]
7467    fn deserialize<T: Peek + Next>(
7468        tag_name: &str,
7469        stack: &mut T,
7470    ) -> Result<Vec<ReservedCacheNodesOffering>, XmlParseError> {
7471        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
7472            if name == "ReservedCacheNodesOffering" {
7473                obj.push(ReservedCacheNodesOfferingDeserializer::deserialize(
7474                    "ReservedCacheNodesOffering",
7475                    stack,
7476                )?);
7477            } else {
7478                skip_tree(stack);
7479            }
7480            Ok(())
7481        })
7482    }
7483}
7484/// <p>Represents the output of a <code>DescribeReservedCacheNodesOfferings</code> operation.</p>
7485#[derive(Clone, Debug, Default, PartialEq)]
7486#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7487pub struct ReservedCacheNodesOfferingMessage {
7488    /// <p>Provides an identifier to allow retrieval of paginated results.</p>
7489    pub marker: Option<String>,
7490    /// <p>A list of reserved cache node offerings. Each element in the list contains detailed information about one offering.</p>
7491    pub reserved_cache_nodes_offerings: Option<Vec<ReservedCacheNodesOffering>>,
7492}
7493
7494#[allow(dead_code)]
7495struct ReservedCacheNodesOfferingMessageDeserializer;
7496impl ReservedCacheNodesOfferingMessageDeserializer {
7497    #[allow(dead_code, unused_variables)]
7498    fn deserialize<T: Peek + Next>(
7499        tag_name: &str,
7500        stack: &mut T,
7501    ) -> Result<ReservedCacheNodesOfferingMessage, XmlParseError> {
7502        deserialize_elements::<_, ReservedCacheNodesOfferingMessage, _>(
7503            tag_name,
7504            stack,
7505            |name, stack, obj| {
7506                match name {
7507                    "Marker" => {
7508                        obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
7509                    }
7510                    "ReservedCacheNodesOfferings" => {
7511                        obj.reserved_cache_nodes_offerings
7512                            .get_or_insert(vec![])
7513                            .extend(ReservedCacheNodesOfferingListDeserializer::deserialize(
7514                                "ReservedCacheNodesOfferings",
7515                                stack,
7516                            )?);
7517                    }
7518                    _ => skip_tree(stack),
7519                }
7520                Ok(())
7521            },
7522        )
7523    }
7524}
7525/// <p>Represents the input of a <code>ResetCacheParameterGroup</code> operation.</p>
7526#[derive(Clone, Debug, Default, PartialEq)]
7527#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7528pub struct ResetCacheParameterGroupMessage {
7529    /// <p>The name of the cache parameter group to reset.</p>
7530    pub cache_parameter_group_name: String,
7531    /// <p>An array of parameter names to reset to their default values. If <code>ResetAllParameters</code> is <code>true</code>, do not use <code>ParameterNameValues</code>. If <code>ResetAllParameters</code> is <code>false</code>, you must specify the name of at least one parameter to reset.</p>
7532    pub parameter_name_values: Option<Vec<ParameterNameValue>>,
7533    /// <p>If <code>true</code>, all parameters in the cache parameter group are reset to their default values. If <code>false</code>, only the parameters listed by <code>ParameterNameValues</code> are reset to their default values.</p> <p>Valid values: <code>true</code> | <code>false</code> </p>
7534    pub reset_all_parameters: Option<bool>,
7535}
7536
7537/// Serialize `ResetCacheParameterGroupMessage` contents to a `SignedRequest`.
7538struct ResetCacheParameterGroupMessageSerializer;
7539impl ResetCacheParameterGroupMessageSerializer {
7540    fn serialize(params: &mut Params, name: &str, obj: &ResetCacheParameterGroupMessage) {
7541        let mut prefix = name.to_string();
7542        if prefix != "" {
7543            prefix.push_str(".");
7544        }
7545
7546        params.put(
7547            &format!("{}{}", prefix, "CacheParameterGroupName"),
7548            &obj.cache_parameter_group_name,
7549        );
7550        if let Some(ref field_value) = obj.parameter_name_values {
7551            ParameterNameValueListSerializer::serialize(
7552                params,
7553                &format!("{}{}", prefix, "ParameterNameValue"),
7554                field_value,
7555            );
7556        }
7557        if let Some(ref field_value) = obj.reset_all_parameters {
7558            params.put(&format!("{}{}", prefix, "ResetAllParameters"), &field_value);
7559        }
7560    }
7561}
7562
7563/// <p>A list of <code>PreferredAvailabilityZones</code> objects that specifies the configuration of a node group in the resharded cluster.</p>
7564#[derive(Clone, Debug, Default, PartialEq)]
7565#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7566pub struct ReshardingConfiguration {
7567    /// <p>Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration values apply to.</p>
7568    pub node_group_id: Option<String>,
7569    /// <p>A list of preferred availability zones for the nodes in this cluster.</p>
7570    pub preferred_availability_zones: Option<Vec<String>>,
7571}
7572
7573/// Serialize `ReshardingConfiguration` contents to a `SignedRequest`.
7574struct ReshardingConfigurationSerializer;
7575impl ReshardingConfigurationSerializer {
7576    fn serialize(params: &mut Params, name: &str, obj: &ReshardingConfiguration) {
7577        let mut prefix = name.to_string();
7578        if prefix != "" {
7579            prefix.push_str(".");
7580        }
7581
7582        if let Some(ref field_value) = obj.node_group_id {
7583            params.put(&format!("{}{}", prefix, "NodeGroupId"), &field_value);
7584        }
7585        if let Some(ref field_value) = obj.preferred_availability_zones {
7586            AvailabilityZonesListSerializer::serialize(
7587                params,
7588                &format!("{}{}", prefix, "AvailabilityZone"),
7589                field_value,
7590            );
7591        }
7592    }
7593}
7594
7595/// Serialize `ReshardingConfigurationList` contents to a `SignedRequest`.
7596struct ReshardingConfigurationListSerializer;
7597impl ReshardingConfigurationListSerializer {
7598    fn serialize(params: &mut Params, name: &str, obj: &Vec<ReshardingConfiguration>) {
7599        for (index, obj) in obj.iter().enumerate() {
7600            let key = format!("{}.member.{}", name, index + 1);
7601            ReshardingConfigurationSerializer::serialize(params, &key, obj);
7602        }
7603    }
7604}
7605
7606/// <p>The status of an online resharding operation.</p>
7607#[derive(Clone, Debug, Default, PartialEq)]
7608#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7609pub struct ReshardingStatus {
7610    /// <p>Represents the progress of an online resharding operation.</p>
7611    pub slot_migration: Option<SlotMigration>,
7612}
7613
7614#[allow(dead_code)]
7615struct ReshardingStatusDeserializer;
7616impl ReshardingStatusDeserializer {
7617    #[allow(dead_code, unused_variables)]
7618    fn deserialize<T: Peek + Next>(
7619        tag_name: &str,
7620        stack: &mut T,
7621    ) -> Result<ReshardingStatus, XmlParseError> {
7622        deserialize_elements::<_, ReshardingStatus, _>(tag_name, stack, |name, stack, obj| {
7623            match name {
7624                "SlotMigration" => {
7625                    obj.slot_migration = Some(SlotMigrationDeserializer::deserialize(
7626                        "SlotMigration",
7627                        stack,
7628                    )?);
7629                }
7630                _ => skip_tree(stack),
7631            }
7632            Ok(())
7633        })
7634    }
7635}
7636/// <p>Represents the input of a <code>RevokeCacheSecurityGroupIngress</code> operation.</p>
7637#[derive(Clone, Debug, Default, PartialEq)]
7638#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
7639pub struct RevokeCacheSecurityGroupIngressMessage {
7640    /// <p>The name of the cache security group to revoke ingress from.</p>
7641    pub cache_security_group_name: String,
7642    /// <p>The name of the Amazon EC2 security group to revoke access from.</p>
7643    pub ec2_security_group_name: String,
7644    /// <p>The AWS account number of the Amazon EC2 security group owner. Note that this is not the same thing as an AWS access key ID - you must provide a valid AWS account number for this parameter.</p>
7645    pub ec2_security_group_owner_id: String,
7646}
7647
7648/// Serialize `RevokeCacheSecurityGroupIngressMessage` contents to a `SignedRequest`.
7649struct RevokeCacheSecurityGroupIngressMessageSerializer;
7650impl RevokeCacheSecurityGroupIngressMessageSerializer {
7651    fn serialize(params: &mut Params, name: &str, obj: &RevokeCacheSecurityGroupIngressMessage) {
7652        let mut prefix = name.to_string();
7653        if prefix != "" {
7654            prefix.push_str(".");
7655        }
7656
7657        params.put(
7658            &format!("{}{}", prefix, "CacheSecurityGroupName"),
7659            &obj.cache_security_group_name,
7660        );
7661        params.put(
7662            &format!("{}{}", prefix, "EC2SecurityGroupName"),
7663            &obj.ec2_security_group_name,
7664        );
7665        params.put(
7666            &format!("{}{}", prefix, "EC2SecurityGroupOwnerId"),
7667            &obj.ec2_security_group_owner_id,
7668        );
7669    }
7670}
7671
7672#[derive(Clone, Debug, Default, PartialEq)]
7673#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7674pub struct RevokeCacheSecurityGroupIngressResult {
7675    pub cache_security_group: Option<CacheSecurityGroup>,
7676}
7677
7678#[allow(dead_code)]
7679struct RevokeCacheSecurityGroupIngressResultDeserializer;
7680impl RevokeCacheSecurityGroupIngressResultDeserializer {
7681    #[allow(dead_code, unused_variables)]
7682    fn deserialize<T: Peek + Next>(
7683        tag_name: &str,
7684        stack: &mut T,
7685    ) -> Result<RevokeCacheSecurityGroupIngressResult, XmlParseError> {
7686        deserialize_elements::<_, RevokeCacheSecurityGroupIngressResult, _>(
7687            tag_name,
7688            stack,
7689            |name, stack, obj| {
7690                match name {
7691                    "CacheSecurityGroup" => {
7692                        obj.cache_security_group =
7693                            Some(CacheSecurityGroupDeserializer::deserialize(
7694                                "CacheSecurityGroup",
7695                                stack,
7696                            )?);
7697                    }
7698                    _ => skip_tree(stack),
7699                }
7700                Ok(())
7701            },
7702        )
7703    }
7704}
7705
7706/// Serialize `SecurityGroupIdsList` contents to a `SignedRequest`.
7707struct SecurityGroupIdsListSerializer;
7708impl SecurityGroupIdsListSerializer {
7709    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
7710        for (index, obj) in obj.iter().enumerate() {
7711            let key = format!("{}.member.{}", name, index + 1);
7712            params.put(&key, &obj);
7713        }
7714    }
7715}
7716
7717/// <p>Represents a single cache security group and its status.</p>
7718#[derive(Clone, Debug, Default, PartialEq)]
7719#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7720pub struct SecurityGroupMembership {
7721    /// <p>The identifier of the cache security group.</p>
7722    pub security_group_id: Option<String>,
7723    /// <p>The status of the cache security group membership. The status changes whenever a cache security group is modified, or when the cache security groups assigned to a cluster are modified.</p>
7724    pub status: Option<String>,
7725}
7726
7727#[allow(dead_code)]
7728struct SecurityGroupMembershipDeserializer;
7729impl SecurityGroupMembershipDeserializer {
7730    #[allow(dead_code, unused_variables)]
7731    fn deserialize<T: Peek + Next>(
7732        tag_name: &str,
7733        stack: &mut T,
7734    ) -> Result<SecurityGroupMembership, XmlParseError> {
7735        deserialize_elements::<_, SecurityGroupMembership, _>(
7736            tag_name,
7737            stack,
7738            |name, stack, obj| {
7739                match name {
7740                    "SecurityGroupId" => {
7741                        obj.security_group_id =
7742                            Some(StringDeserializer::deserialize("SecurityGroupId", stack)?);
7743                    }
7744                    "Status" => {
7745                        obj.status = Some(StringDeserializer::deserialize("Status", stack)?);
7746                    }
7747                    _ => skip_tree(stack),
7748                }
7749                Ok(())
7750            },
7751        )
7752    }
7753}
7754#[allow(dead_code)]
7755struct SecurityGroupMembershipListDeserializer;
7756impl SecurityGroupMembershipListDeserializer {
7757    #[allow(dead_code, unused_variables)]
7758    fn deserialize<T: Peek + Next>(
7759        tag_name: &str,
7760        stack: &mut T,
7761    ) -> Result<Vec<SecurityGroupMembership>, XmlParseError> {
7762        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
7763            if name == "member" {
7764                obj.push(SecurityGroupMembershipDeserializer::deserialize(
7765                    "member", stack,
7766                )?);
7767            } else {
7768                skip_tree(stack);
7769            }
7770            Ok(())
7771        })
7772    }
7773}
7774/// <p>An update that you can apply to your Redis clusters.</p>
7775#[derive(Clone, Debug, Default, PartialEq)]
7776#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7777pub struct ServiceUpdate {
7778    /// <p>Indicates whether the service update will be automatically applied once the recommended apply-by date has expired. </p>
7779    pub auto_update_after_recommended_apply_by_date: Option<bool>,
7780    /// <p>The Elasticache engine to which the update applies. Either Redis or Memcached</p>
7781    pub engine: Option<String>,
7782    /// <p>The Elasticache engine version to which the update applies. Either Redis or Memcached engine version</p>
7783    pub engine_version: Option<String>,
7784    /// <p>The estimated length of time the service update will take</p>
7785    pub estimated_update_time: Option<String>,
7786    /// <p>Provides details of the service update</p>
7787    pub service_update_description: Option<String>,
7788    /// <p>The date after which the service update is no longer available</p>
7789    pub service_update_end_date: Option<String>,
7790    /// <p>The unique ID of the service update</p>
7791    pub service_update_name: Option<String>,
7792    /// <p>The recommendend date to apply the service update in order to ensure compliance. For information on compliance, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/elasticache-compliance.html#elasticache-compliance-self-service">Self-Service Security Updates for Compliance</a>.</p>
7793    pub service_update_recommended_apply_by_date: Option<String>,
7794    /// <p>The date when the service update is initially available</p>
7795    pub service_update_release_date: Option<String>,
7796    /// <p>The severity of the service update</p>
7797    pub service_update_severity: Option<String>,
7798    /// <p>The status of the service update</p>
7799    pub service_update_status: Option<String>,
7800    /// <p>Reflects the nature of the service update</p>
7801    pub service_update_type: Option<String>,
7802}
7803
7804#[allow(dead_code)]
7805struct ServiceUpdateDeserializer;
7806impl ServiceUpdateDeserializer {
7807    #[allow(dead_code, unused_variables)]
7808    fn deserialize<T: Peek + Next>(
7809        tag_name: &str,
7810        stack: &mut T,
7811    ) -> Result<ServiceUpdate, XmlParseError> {
7812        deserialize_elements::<_, ServiceUpdate, _>(tag_name, stack, |name, stack, obj| {
7813            match name {
7814                "AutoUpdateAfterRecommendedApplyByDate" => {
7815                    obj.auto_update_after_recommended_apply_by_date =
7816                        Some(BooleanOptionalDeserializer::deserialize(
7817                            "AutoUpdateAfterRecommendedApplyByDate",
7818                            stack,
7819                        )?);
7820                }
7821                "Engine" => {
7822                    obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
7823                }
7824                "EngineVersion" => {
7825                    obj.engine_version =
7826                        Some(StringDeserializer::deserialize("EngineVersion", stack)?);
7827                }
7828                "EstimatedUpdateTime" => {
7829                    obj.estimated_update_time = Some(StringDeserializer::deserialize(
7830                        "EstimatedUpdateTime",
7831                        stack,
7832                    )?);
7833                }
7834                "ServiceUpdateDescription" => {
7835                    obj.service_update_description = Some(StringDeserializer::deserialize(
7836                        "ServiceUpdateDescription",
7837                        stack,
7838                    )?);
7839                }
7840                "ServiceUpdateEndDate" => {
7841                    obj.service_update_end_date = Some(TStampDeserializer::deserialize(
7842                        "ServiceUpdateEndDate",
7843                        stack,
7844                    )?);
7845                }
7846                "ServiceUpdateName" => {
7847                    obj.service_update_name =
7848                        Some(StringDeserializer::deserialize("ServiceUpdateName", stack)?);
7849                }
7850                "ServiceUpdateRecommendedApplyByDate" => {
7851                    obj.service_update_recommended_apply_by_date =
7852                        Some(TStampDeserializer::deserialize(
7853                            "ServiceUpdateRecommendedApplyByDate",
7854                            stack,
7855                        )?);
7856                }
7857                "ServiceUpdateReleaseDate" => {
7858                    obj.service_update_release_date = Some(TStampDeserializer::deserialize(
7859                        "ServiceUpdateReleaseDate",
7860                        stack,
7861                    )?);
7862                }
7863                "ServiceUpdateSeverity" => {
7864                    obj.service_update_severity =
7865                        Some(ServiceUpdateSeverityDeserializer::deserialize(
7866                            "ServiceUpdateSeverity",
7867                            stack,
7868                        )?);
7869                }
7870                "ServiceUpdateStatus" => {
7871                    obj.service_update_status = Some(ServiceUpdateStatusDeserializer::deserialize(
7872                        "ServiceUpdateStatus",
7873                        stack,
7874                    )?);
7875                }
7876                "ServiceUpdateType" => {
7877                    obj.service_update_type = Some(ServiceUpdateTypeDeserializer::deserialize(
7878                        "ServiceUpdateType",
7879                        stack,
7880                    )?);
7881                }
7882                _ => skip_tree(stack),
7883            }
7884            Ok(())
7885        })
7886    }
7887}
7888#[allow(dead_code)]
7889struct ServiceUpdateListDeserializer;
7890impl ServiceUpdateListDeserializer {
7891    #[allow(dead_code, unused_variables)]
7892    fn deserialize<T: Peek + Next>(
7893        tag_name: &str,
7894        stack: &mut T,
7895    ) -> Result<Vec<ServiceUpdate>, XmlParseError> {
7896        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
7897            if name == "ServiceUpdate" {
7898                obj.push(ServiceUpdateDeserializer::deserialize(
7899                    "ServiceUpdate",
7900                    stack,
7901                )?);
7902            } else {
7903                skip_tree(stack);
7904            }
7905            Ok(())
7906        })
7907    }
7908}
7909#[allow(dead_code)]
7910struct ServiceUpdateSeverityDeserializer;
7911impl ServiceUpdateSeverityDeserializer {
7912    #[allow(dead_code, unused_variables)]
7913    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
7914        xml_util::deserialize_primitive(tag_name, stack, Ok)
7915    }
7916}
7917#[allow(dead_code)]
7918struct ServiceUpdateStatusDeserializer;
7919impl ServiceUpdateStatusDeserializer {
7920    #[allow(dead_code, unused_variables)]
7921    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
7922        xml_util::deserialize_primitive(tag_name, stack, Ok)
7923    }
7924}
7925
7926/// Serialize `ServiceUpdateStatusList` contents to a `SignedRequest`.
7927struct ServiceUpdateStatusListSerializer;
7928impl ServiceUpdateStatusListSerializer {
7929    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
7930        for (index, obj) in obj.iter().enumerate() {
7931            let key = format!("{}.member.{}", name, index + 1);
7932            params.put(&key, &obj);
7933        }
7934    }
7935}
7936
7937#[allow(dead_code)]
7938struct ServiceUpdateTypeDeserializer;
7939impl ServiceUpdateTypeDeserializer {
7940    #[allow(dead_code, unused_variables)]
7941    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
7942        xml_util::deserialize_primitive(tag_name, stack, Ok)
7943    }
7944}
7945#[derive(Clone, Debug, Default, PartialEq)]
7946#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7947pub struct ServiceUpdatesMessage {
7948    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
7949    pub marker: Option<String>,
7950    /// <p>A list of service updates</p>
7951    pub service_updates: Option<Vec<ServiceUpdate>>,
7952}
7953
7954#[allow(dead_code)]
7955struct ServiceUpdatesMessageDeserializer;
7956impl ServiceUpdatesMessageDeserializer {
7957    #[allow(dead_code, unused_variables)]
7958    fn deserialize<T: Peek + Next>(
7959        tag_name: &str,
7960        stack: &mut T,
7961    ) -> Result<ServiceUpdatesMessage, XmlParseError> {
7962        deserialize_elements::<_, ServiceUpdatesMessage, _>(tag_name, stack, |name, stack, obj| {
7963            match name {
7964                "Marker" => {
7965                    obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
7966                }
7967                "ServiceUpdates" => {
7968                    obj.service_updates.get_or_insert(vec![]).extend(
7969                        ServiceUpdateListDeserializer::deserialize("ServiceUpdates", stack)?,
7970                    );
7971                }
7972                _ => skip_tree(stack),
7973            }
7974            Ok(())
7975        })
7976    }
7977}
7978#[allow(dead_code)]
7979struct SlaMetDeserializer;
7980impl SlaMetDeserializer {
7981    #[allow(dead_code, unused_variables)]
7982    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
7983        xml_util::deserialize_primitive(tag_name, stack, Ok)
7984    }
7985}
7986/// <p>Represents the progress of an online resharding operation.</p>
7987#[derive(Clone, Debug, Default, PartialEq)]
7988#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
7989pub struct SlotMigration {
7990    /// <p>The percentage of the slot migration that is complete.</p>
7991    pub progress_percentage: Option<f64>,
7992}
7993
7994#[allow(dead_code)]
7995struct SlotMigrationDeserializer;
7996impl SlotMigrationDeserializer {
7997    #[allow(dead_code, unused_variables)]
7998    fn deserialize<T: Peek + Next>(
7999        tag_name: &str,
8000        stack: &mut T,
8001    ) -> Result<SlotMigration, XmlParseError> {
8002        deserialize_elements::<_, SlotMigration, _>(tag_name, stack, |name, stack, obj| {
8003            match name {
8004                "ProgressPercentage" => {
8005                    obj.progress_percentage = Some(DoubleDeserializer::deserialize(
8006                        "ProgressPercentage",
8007                        stack,
8008                    )?);
8009                }
8010                _ => skip_tree(stack),
8011            }
8012            Ok(())
8013        })
8014    }
8015}
8016/// <p>Represents a copy of an entire Redis cluster as of the time when the snapshot was taken.</p>
8017#[derive(Clone, Debug, Default, PartialEq)]
8018#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8019pub struct Snapshot {
8020    /// <p>The ARN (Amazon Resource Name) of the snapshot.</p>
8021    pub arn: Option<String>,
8022    /// <p>This parameter is currently disabled.</p>
8023    pub auto_minor_version_upgrade: Option<bool>,
8024    /// <p>Indicates the status of automatic failover for the source Redis replication group.</p>
8025    pub automatic_failover: Option<String>,
8026    /// <p>The date and time when the source cluster was created.</p>
8027    pub cache_cluster_create_time: Option<String>,
8028    /// <p>The user-supplied identifier of the source cluster.</p>
8029    pub cache_cluster_id: Option<String>,
8030    /// <p><p>The name of the compute and memory capacity node type for the source cluster.</p> <p>The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts.</p> <ul> <li> <p>General purpose:</p> <ul> <li> <p>Current generation: </p> <p> <b>M5 node types:</b> <code>cache.m5.large</code>, <code>cache.m5.xlarge</code>, <code>cache.m5.2xlarge</code>, <code>cache.m5.4xlarge</code>, <code>cache.m5.12xlarge</code>, <code>cache.m5.24xlarge</code> </p> <p> <b>M4 node types:</b> <code>cache.m4.large</code>, <code>cache.m4.xlarge</code>, <code>cache.m4.2xlarge</code>, <code>cache.m4.4xlarge</code>, <code>cache.m4.10xlarge</code> </p> <p> <b>T3 node types:</b> <code>cache.t3.micro</code>, <code>cache.t3.small</code>, <code>cache.t3.medium</code> </p> <p> <b>T2 node types:</b> <code>cache.t2.micro</code>, <code>cache.t2.small</code>, <code>cache.t2.medium</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>T1 node types:</b> <code>cache.t1.micro</code> </p> <p> <b>M1 node types:</b> <code>cache.m1.small</code>, <code>cache.m1.medium</code>, <code>cache.m1.large</code>, <code>cache.m1.xlarge</code> </p> <p> <b>M3 node types:</b> <code>cache.m3.medium</code>, <code>cache.m3.large</code>, <code>cache.m3.xlarge</code>, <code>cache.m3.2xlarge</code> </p> </li> </ul> </li> <li> <p>Compute optimized:</p> <ul> <li> <p>Previous generation: (not recommended)</p> <p> <b>C1 node types:</b> <code>cache.c1.xlarge</code> </p> </li> </ul> </li> <li> <p>Memory optimized:</p> <ul> <li> <p>Current generation: </p> <p> <b>R5 node types:</b> <code>cache.r5.large</code>, <code>cache.r5.xlarge</code>, <code>cache.r5.2xlarge</code>, <code>cache.r5.4xlarge</code>, <code>cache.r5.12xlarge</code>, <code>cache.r5.24xlarge</code> </p> <p> <b>R4 node types:</b> <code>cache.r4.large</code>, <code>cache.r4.xlarge</code>, <code>cache.r4.2xlarge</code>, <code>cache.r4.4xlarge</code>, <code>cache.r4.8xlarge</code>, <code>cache.r4.16xlarge</code> </p> </li> <li> <p>Previous generation: (not recommended)</p> <p> <b>M2 node types:</b> <code>cache.m2.xlarge</code>, <code>cache.m2.2xlarge</code>, <code>cache.m2.4xlarge</code> </p> <p> <b>R3 node types:</b> <code>cache.r3.large</code>, <code>cache.r3.xlarge</code>, <code>cache.r3.2xlarge</code>, <code>cache.r3.4xlarge</code>, <code>cache.r3.8xlarge</code> </p> </li> </ul> </li> </ul> <p> <b>Additional node type info</b> </p> <ul> <li> <p>All current generation instance types are created in Amazon VPC by default.</p> </li> <li> <p>Redis append-only files (AOF) are not supported for T1 or T2 instances.</p> </li> <li> <p>Redis Multi-AZ with automatic failover is not supported on T1 instances.</p> </li> <li> <p>Redis configuration variables <code>appendonly</code> and <code>appendfsync</code> are not supported on Redis version 2.8.22 and later.</p> </li> </ul></p>
8031    pub cache_node_type: Option<String>,
8032    /// <p>The cache parameter group that is associated with the source cluster.</p>
8033    pub cache_parameter_group_name: Option<String>,
8034    /// <p>The name of the cache subnet group associated with the source cluster.</p>
8035    pub cache_subnet_group_name: Option<String>,
8036    /// <p>The name of the cache engine (<code>memcached</code> or <code>redis</code>) used by the source cluster.</p>
8037    pub engine: Option<String>,
8038    /// <p>The version of the cache engine version that is used by the source cluster.</p>
8039    pub engine_version: Option<String>,
8040    /// <p>The ID of the KMS key used to encrypt the snapshot.</p>
8041    pub kms_key_id: Option<String>,
8042    /// <p>A list of the cache nodes in the source cluster.</p>
8043    pub node_snapshots: Option<Vec<NodeSnapshot>>,
8044    /// <p>The number of cache nodes in the source cluster.</p> <p>For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.</p>
8045    pub num_cache_nodes: Option<i64>,
8046    /// <p>The number of node groups (shards) in this snapshot. When restoring from a snapshot, the number of node groups (shards) in the snapshot and in the restored replication group must be the same.</p>
8047    pub num_node_groups: Option<i64>,
8048    /// <p>The port number used by each cache nodes in the source cluster.</p>
8049    pub port: Option<i64>,
8050    /// <p>The name of the Availability Zone in which the source cluster is located.</p>
8051    pub preferred_availability_zone: Option<String>,
8052    /// <p>Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.</p> <p>Valid values for <code>ddd</code> are:</p> <ul> <li> <p> <code>sun</code> </p> </li> <li> <p> <code>mon</code> </p> </li> <li> <p> <code>tue</code> </p> </li> <li> <p> <code>wed</code> </p> </li> <li> <p> <code>thu</code> </p> </li> <li> <p> <code>fri</code> </p> </li> <li> <p> <code>sat</code> </p> </li> </ul> <p>Example: <code>sun:23:00-mon:01:30</code> </p>
8053    pub preferred_maintenance_window: Option<String>,
8054    /// <p>A description of the source replication group.</p>
8055    pub replication_group_description: Option<String>,
8056    /// <p>The unique identifier of the source replication group.</p>
8057    pub replication_group_id: Option<String>,
8058    /// <p>The name of a snapshot. For an automatic snapshot, the name is system-generated. For a manual snapshot, this is the user-provided name.</p>
8059    pub snapshot_name: Option<String>,
8060    /// <p>For an automatic snapshot, the number of days for which ElastiCache retains the snapshot before deleting it.</p> <p>For manual snapshots, this field reflects the <code>SnapshotRetentionLimit</code> for the source cluster when the snapshot was created. This field is otherwise ignored: Manual snapshots do not expire, and can only be deleted using the <code>DeleteSnapshot</code> operation. </p> <p> <b>Important</b> If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.</p>
8061    pub snapshot_retention_limit: Option<i64>,
8062    /// <p>Indicates whether the snapshot is from an automatic backup (<code>automated</code>) or was created manually (<code>manual</code>).</p>
8063    pub snapshot_source: Option<String>,
8064    /// <p>The status of the snapshot. Valid values: <code>creating</code> | <code>available</code> | <code>restoring</code> | <code>copying</code> | <code>deleting</code>.</p>
8065    pub snapshot_status: Option<String>,
8066    /// <p>The daily time range during which ElastiCache takes daily snapshots of the source cluster.</p>
8067    pub snapshot_window: Option<String>,
8068    /// <p>The Amazon Resource Name (ARN) for the topic used by the source cluster for publishing notifications.</p>
8069    pub topic_arn: Option<String>,
8070    /// <p>The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cluster.</p>
8071    pub vpc_id: Option<String>,
8072}
8073
8074#[allow(dead_code)]
8075struct SnapshotDeserializer;
8076impl SnapshotDeserializer {
8077    #[allow(dead_code, unused_variables)]
8078    fn deserialize<T: Peek + Next>(
8079        tag_name: &str,
8080        stack: &mut T,
8081    ) -> Result<Snapshot, XmlParseError> {
8082        deserialize_elements::<_, Snapshot, _>(tag_name, stack, |name, stack, obj| {
8083            match name {
8084                "ARN" => {
8085                    obj.arn = Some(StringDeserializer::deserialize("ARN", stack)?);
8086                }
8087                "AutoMinorVersionUpgrade" => {
8088                    obj.auto_minor_version_upgrade = Some(BooleanDeserializer::deserialize(
8089                        "AutoMinorVersionUpgrade",
8090                        stack,
8091                    )?);
8092                }
8093                "AutomaticFailover" => {
8094                    obj.automatic_failover =
8095                        Some(AutomaticFailoverStatusDeserializer::deserialize(
8096                            "AutomaticFailover",
8097                            stack,
8098                        )?);
8099                }
8100                "CacheClusterCreateTime" => {
8101                    obj.cache_cluster_create_time = Some(TStampDeserializer::deserialize(
8102                        "CacheClusterCreateTime",
8103                        stack,
8104                    )?);
8105                }
8106                "CacheClusterId" => {
8107                    obj.cache_cluster_id =
8108                        Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
8109                }
8110                "CacheNodeType" => {
8111                    obj.cache_node_type =
8112                        Some(StringDeserializer::deserialize("CacheNodeType", stack)?);
8113                }
8114                "CacheParameterGroupName" => {
8115                    obj.cache_parameter_group_name = Some(StringDeserializer::deserialize(
8116                        "CacheParameterGroupName",
8117                        stack,
8118                    )?);
8119                }
8120                "CacheSubnetGroupName" => {
8121                    obj.cache_subnet_group_name = Some(StringDeserializer::deserialize(
8122                        "CacheSubnetGroupName",
8123                        stack,
8124                    )?);
8125                }
8126                "Engine" => {
8127                    obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
8128                }
8129                "EngineVersion" => {
8130                    obj.engine_version =
8131                        Some(StringDeserializer::deserialize("EngineVersion", stack)?);
8132                }
8133                "KmsKeyId" => {
8134                    obj.kms_key_id = Some(StringDeserializer::deserialize("KmsKeyId", stack)?);
8135                }
8136                "NodeSnapshots" => {
8137                    obj.node_snapshots.get_or_insert(vec![]).extend(
8138                        NodeSnapshotListDeserializer::deserialize("NodeSnapshots", stack)?,
8139                    );
8140                }
8141                "NumCacheNodes" => {
8142                    obj.num_cache_nodes = Some(IntegerOptionalDeserializer::deserialize(
8143                        "NumCacheNodes",
8144                        stack,
8145                    )?);
8146                }
8147                "NumNodeGroups" => {
8148                    obj.num_node_groups = Some(IntegerOptionalDeserializer::deserialize(
8149                        "NumNodeGroups",
8150                        stack,
8151                    )?);
8152                }
8153                "Port" => {
8154                    obj.port = Some(IntegerOptionalDeserializer::deserialize("Port", stack)?);
8155                }
8156                "PreferredAvailabilityZone" => {
8157                    obj.preferred_availability_zone = Some(StringDeserializer::deserialize(
8158                        "PreferredAvailabilityZone",
8159                        stack,
8160                    )?);
8161                }
8162                "PreferredMaintenanceWindow" => {
8163                    obj.preferred_maintenance_window = Some(StringDeserializer::deserialize(
8164                        "PreferredMaintenanceWindow",
8165                        stack,
8166                    )?);
8167                }
8168                "ReplicationGroupDescription" => {
8169                    obj.replication_group_description = Some(StringDeserializer::deserialize(
8170                        "ReplicationGroupDescription",
8171                        stack,
8172                    )?);
8173                }
8174                "ReplicationGroupId" => {
8175                    obj.replication_group_id = Some(StringDeserializer::deserialize(
8176                        "ReplicationGroupId",
8177                        stack,
8178                    )?);
8179                }
8180                "SnapshotName" => {
8181                    obj.snapshot_name =
8182                        Some(StringDeserializer::deserialize("SnapshotName", stack)?);
8183                }
8184                "SnapshotRetentionLimit" => {
8185                    obj.snapshot_retention_limit = Some(IntegerOptionalDeserializer::deserialize(
8186                        "SnapshotRetentionLimit",
8187                        stack,
8188                    )?);
8189                }
8190                "SnapshotSource" => {
8191                    obj.snapshot_source =
8192                        Some(StringDeserializer::deserialize("SnapshotSource", stack)?);
8193                }
8194                "SnapshotStatus" => {
8195                    obj.snapshot_status =
8196                        Some(StringDeserializer::deserialize("SnapshotStatus", stack)?);
8197                }
8198                "SnapshotWindow" => {
8199                    obj.snapshot_window =
8200                        Some(StringDeserializer::deserialize("SnapshotWindow", stack)?);
8201                }
8202                "TopicArn" => {
8203                    obj.topic_arn = Some(StringDeserializer::deserialize("TopicArn", stack)?);
8204                }
8205                "VpcId" => {
8206                    obj.vpc_id = Some(StringDeserializer::deserialize("VpcId", stack)?);
8207                }
8208                _ => skip_tree(stack),
8209            }
8210            Ok(())
8211        })
8212    }
8213}
8214
8215/// Serialize `SnapshotArnsList` contents to a `SignedRequest`.
8216struct SnapshotArnsListSerializer;
8217impl SnapshotArnsListSerializer {
8218    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
8219        for (index, obj) in obj.iter().enumerate() {
8220            let key = format!("{}.member.{}", name, index + 1);
8221            params.put(&key, &obj);
8222        }
8223    }
8224}
8225
8226#[allow(dead_code)]
8227struct SnapshotListDeserializer;
8228impl SnapshotListDeserializer {
8229    #[allow(dead_code, unused_variables)]
8230    fn deserialize<T: Peek + Next>(
8231        tag_name: &str,
8232        stack: &mut T,
8233    ) -> Result<Vec<Snapshot>, XmlParseError> {
8234        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
8235            if name == "Snapshot" {
8236                obj.push(SnapshotDeserializer::deserialize("Snapshot", stack)?);
8237            } else {
8238                skip_tree(stack);
8239            }
8240            Ok(())
8241        })
8242    }
8243}
8244#[allow(dead_code)]
8245struct SourceTypeDeserializer;
8246impl SourceTypeDeserializer {
8247    #[allow(dead_code, unused_variables)]
8248    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8249        xml_util::deserialize_primitive(tag_name, stack, Ok)
8250    }
8251}
8252#[derive(Clone, Debug, Default, PartialEq)]
8253#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8254pub struct StartMigrationMessage {
8255    /// <p>List of endpoints from which data should be migrated. For Redis (cluster mode disabled), list should have only one element.</p>
8256    pub customer_node_endpoint_list: Vec<CustomerNodeEndpoint>,
8257    /// <p>The ID of the replication group to which data should be migrated.</p>
8258    pub replication_group_id: String,
8259}
8260
8261/// Serialize `StartMigrationMessage` contents to a `SignedRequest`.
8262struct StartMigrationMessageSerializer;
8263impl StartMigrationMessageSerializer {
8264    fn serialize(params: &mut Params, name: &str, obj: &StartMigrationMessage) {
8265        let mut prefix = name.to_string();
8266        if prefix != "" {
8267            prefix.push_str(".");
8268        }
8269
8270        CustomerNodeEndpointListSerializer::serialize(
8271            params,
8272            &format!("{}{}", prefix, "CustomerNodeEndpointList"),
8273            &obj.customer_node_endpoint_list,
8274        );
8275        params.put(
8276            &format!("{}{}", prefix, "ReplicationGroupId"),
8277            &obj.replication_group_id,
8278        );
8279    }
8280}
8281
8282#[derive(Clone, Debug, Default, PartialEq)]
8283#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8284pub struct StartMigrationResponse {
8285    pub replication_group: Option<ReplicationGroup>,
8286}
8287
8288#[allow(dead_code)]
8289struct StartMigrationResponseDeserializer;
8290impl StartMigrationResponseDeserializer {
8291    #[allow(dead_code, unused_variables)]
8292    fn deserialize<T: Peek + Next>(
8293        tag_name: &str,
8294        stack: &mut T,
8295    ) -> Result<StartMigrationResponse, XmlParseError> {
8296        deserialize_elements::<_, StartMigrationResponse, _>(tag_name, stack, |name, stack, obj| {
8297            match name {
8298                "ReplicationGroup" => {
8299                    obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
8300                        "ReplicationGroup",
8301                        stack,
8302                    )?);
8303                }
8304                _ => skip_tree(stack),
8305            }
8306            Ok(())
8307        })
8308    }
8309}
8310#[allow(dead_code)]
8311struct StringDeserializer;
8312impl StringDeserializer {
8313    #[allow(dead_code, unused_variables)]
8314    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8315        xml_util::deserialize_primitive(tag_name, stack, Ok)
8316    }
8317}
8318/// <p>Represents the subnet associated with a cluster. This parameter refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with ElastiCache.</p>
8319#[derive(Clone, Debug, Default, PartialEq)]
8320#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8321pub struct Subnet {
8322    /// <p>The Availability Zone associated with the subnet.</p>
8323    pub subnet_availability_zone: Option<AvailabilityZone>,
8324    /// <p>The unique identifier for the subnet.</p>
8325    pub subnet_identifier: Option<String>,
8326}
8327
8328#[allow(dead_code)]
8329struct SubnetDeserializer;
8330impl SubnetDeserializer {
8331    #[allow(dead_code, unused_variables)]
8332    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Subnet, XmlParseError> {
8333        deserialize_elements::<_, Subnet, _>(tag_name, stack, |name, stack, obj| {
8334            match name {
8335                "SubnetAvailabilityZone" => {
8336                    obj.subnet_availability_zone = Some(AvailabilityZoneDeserializer::deserialize(
8337                        "SubnetAvailabilityZone",
8338                        stack,
8339                    )?);
8340                }
8341                "SubnetIdentifier" => {
8342                    obj.subnet_identifier =
8343                        Some(StringDeserializer::deserialize("SubnetIdentifier", stack)?);
8344                }
8345                _ => skip_tree(stack),
8346            }
8347            Ok(())
8348        })
8349    }
8350}
8351
8352/// Serialize `SubnetIdentifierList` contents to a `SignedRequest`.
8353struct SubnetIdentifierListSerializer;
8354impl SubnetIdentifierListSerializer {
8355    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
8356        for (index, obj) in obj.iter().enumerate() {
8357            let key = format!("{}.member.{}", name, index + 1);
8358            params.put(&key, &obj);
8359        }
8360    }
8361}
8362
8363#[allow(dead_code)]
8364struct SubnetListDeserializer;
8365impl SubnetListDeserializer {
8366    #[allow(dead_code, unused_variables)]
8367    fn deserialize<T: Peek + Next>(
8368        tag_name: &str,
8369        stack: &mut T,
8370    ) -> Result<Vec<Subnet>, XmlParseError> {
8371        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
8372            if name == "Subnet" {
8373                obj.push(SubnetDeserializer::deserialize("Subnet", stack)?);
8374            } else {
8375                skip_tree(stack);
8376            }
8377            Ok(())
8378        })
8379    }
8380}
8381#[allow(dead_code)]
8382struct TStampDeserializer;
8383impl TStampDeserializer {
8384    #[allow(dead_code, unused_variables)]
8385    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8386        xml_util::deserialize_primitive(tag_name, stack, Ok)
8387    }
8388}
8389/// <p>A cost allocation Tag that can be added to an ElastiCache cluster or replication group. Tags are composed of a Key/Value pair. A tag with a null Value is permitted.</p>
8390#[derive(Clone, Debug, Default, PartialEq)]
8391#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8392#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8393pub struct Tag {
8394    /// <p>The key for the tag. May not be null.</p>
8395    pub key: Option<String>,
8396    /// <p>The tag's value. May be null.</p>
8397    pub value: Option<String>,
8398}
8399
8400#[allow(dead_code)]
8401struct TagDeserializer;
8402impl TagDeserializer {
8403    #[allow(dead_code, unused_variables)]
8404    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
8405        deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
8406            match name {
8407                "Key" => {
8408                    obj.key = Some(StringDeserializer::deserialize("Key", stack)?);
8409                }
8410                "Value" => {
8411                    obj.value = Some(StringDeserializer::deserialize("Value", stack)?);
8412                }
8413                _ => skip_tree(stack),
8414            }
8415            Ok(())
8416        })
8417    }
8418}
8419
8420/// Serialize `Tag` contents to a `SignedRequest`.
8421struct TagSerializer;
8422impl TagSerializer {
8423    fn serialize(params: &mut Params, name: &str, obj: &Tag) {
8424        let mut prefix = name.to_string();
8425        if prefix != "" {
8426            prefix.push_str(".");
8427        }
8428
8429        if let Some(ref field_value) = obj.key {
8430            params.put(&format!("{}{}", prefix, "Key"), &field_value);
8431        }
8432        if let Some(ref field_value) = obj.value {
8433            params.put(&format!("{}{}", prefix, "Value"), &field_value);
8434        }
8435    }
8436}
8437
8438#[allow(dead_code)]
8439struct TagListDeserializer;
8440impl TagListDeserializer {
8441    #[allow(dead_code, unused_variables)]
8442    fn deserialize<T: Peek + Next>(
8443        tag_name: &str,
8444        stack: &mut T,
8445    ) -> Result<Vec<Tag>, XmlParseError> {
8446        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
8447            if name == "Tag" {
8448                obj.push(TagDeserializer::deserialize("Tag", stack)?);
8449            } else {
8450                skip_tree(stack);
8451            }
8452            Ok(())
8453        })
8454    }
8455}
8456
8457/// Serialize `TagList` contents to a `SignedRequest`.
8458struct TagListSerializer;
8459impl TagListSerializer {
8460    fn serialize(params: &mut Params, name: &str, obj: &Vec<Tag>) {
8461        for (index, obj) in obj.iter().enumerate() {
8462            let key = format!("{}.member.{}", name, index + 1);
8463            TagSerializer::serialize(params, &key, obj);
8464        }
8465    }
8466}
8467
8468/// <p>Represents the output from the <code>AddTagsToResource</code>, <code>ListTagsForResource</code>, and <code>RemoveTagsFromResource</code> operations.</p>
8469#[derive(Clone, Debug, Default, PartialEq)]
8470#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8471pub struct TagListMessage {
8472    /// <p>A list of cost allocation tags as key-value pairs.</p>
8473    pub tag_list: Option<Vec<Tag>>,
8474}
8475
8476#[allow(dead_code)]
8477struct TagListMessageDeserializer;
8478impl TagListMessageDeserializer {
8479    #[allow(dead_code, unused_variables)]
8480    fn deserialize<T: Peek + Next>(
8481        tag_name: &str,
8482        stack: &mut T,
8483    ) -> Result<TagListMessage, XmlParseError> {
8484        deserialize_elements::<_, TagListMessage, _>(tag_name, stack, |name, stack, obj| {
8485            match name {
8486                "TagList" => {
8487                    obj.tag_list
8488                        .get_or_insert(vec![])
8489                        .extend(TagListDeserializer::deserialize("TagList", stack)?);
8490                }
8491                _ => skip_tree(stack),
8492            }
8493            Ok(())
8494        })
8495    }
8496}
8497#[derive(Clone, Debug, Default, PartialEq)]
8498#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8499pub struct TestFailoverMessage {
8500    /// <p>The name of the node group (called shard in the console) in this replication group on which automatic failover is to be tested. You may test automatic failover on up to 5 node groups in any rolling 24-hour period.</p>
8501    pub node_group_id: String,
8502    /// <p>The name of the replication group (console: cluster) whose automatic failover is being tested by this operation.</p>
8503    pub replication_group_id: String,
8504}
8505
8506/// Serialize `TestFailoverMessage` contents to a `SignedRequest`.
8507struct TestFailoverMessageSerializer;
8508impl TestFailoverMessageSerializer {
8509    fn serialize(params: &mut Params, name: &str, obj: &TestFailoverMessage) {
8510        let mut prefix = name.to_string();
8511        if prefix != "" {
8512            prefix.push_str(".");
8513        }
8514
8515        params.put(&format!("{}{}", prefix, "NodeGroupId"), &obj.node_group_id);
8516        params.put(
8517            &format!("{}{}", prefix, "ReplicationGroupId"),
8518            &obj.replication_group_id,
8519        );
8520    }
8521}
8522
8523#[derive(Clone, Debug, Default, PartialEq)]
8524#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8525pub struct TestFailoverResult {
8526    pub replication_group: Option<ReplicationGroup>,
8527}
8528
8529#[allow(dead_code)]
8530struct TestFailoverResultDeserializer;
8531impl TestFailoverResultDeserializer {
8532    #[allow(dead_code, unused_variables)]
8533    fn deserialize<T: Peek + Next>(
8534        tag_name: &str,
8535        stack: &mut T,
8536    ) -> Result<TestFailoverResult, XmlParseError> {
8537        deserialize_elements::<_, TestFailoverResult, _>(tag_name, stack, |name, stack, obj| {
8538            match name {
8539                "ReplicationGroup" => {
8540                    obj.replication_group = Some(ReplicationGroupDeserializer::deserialize(
8541                        "ReplicationGroup",
8542                        stack,
8543                    )?);
8544                }
8545                _ => skip_tree(stack),
8546            }
8547            Ok(())
8548        })
8549    }
8550}
8551/// <p>Filters update actions from the service updates that are in available status during the time range.</p>
8552#[derive(Clone, Debug, Default, PartialEq)]
8553#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
8554pub struct TimeRangeFilter {
8555    /// <p>The end time of the time range filter</p>
8556    pub end_time: Option<String>,
8557    /// <p>The start time of the time range filter</p>
8558    pub start_time: Option<String>,
8559}
8560
8561/// Serialize `TimeRangeFilter` contents to a `SignedRequest`.
8562struct TimeRangeFilterSerializer;
8563impl TimeRangeFilterSerializer {
8564    fn serialize(params: &mut Params, name: &str, obj: &TimeRangeFilter) {
8565        let mut prefix = name.to_string();
8566        if prefix != "" {
8567            prefix.push_str(".");
8568        }
8569
8570        if let Some(ref field_value) = obj.end_time {
8571            params.put(&format!("{}{}", prefix, "EndTime"), &field_value);
8572        }
8573        if let Some(ref field_value) = obj.start_time {
8574            params.put(&format!("{}{}", prefix, "StartTime"), &field_value);
8575        }
8576    }
8577}
8578
8579/// <p>Update action that has failed to be processed for the corresponding apply/stop request</p>
8580#[derive(Clone, Debug, Default, PartialEq)]
8581#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8582pub struct UnprocessedUpdateAction {
8583    /// <p>The ID of the cache cluster</p>
8584    pub cache_cluster_id: Option<String>,
8585    /// <p>The error message that describes the reason the request was not processed</p>
8586    pub error_message: Option<String>,
8587    /// <p>The error type for requests that are not processed</p>
8588    pub error_type: Option<String>,
8589    /// <p>The replication group ID</p>
8590    pub replication_group_id: Option<String>,
8591    /// <p>The unique ID of the service update</p>
8592    pub service_update_name: Option<String>,
8593}
8594
8595#[allow(dead_code)]
8596struct UnprocessedUpdateActionDeserializer;
8597impl UnprocessedUpdateActionDeserializer {
8598    #[allow(dead_code, unused_variables)]
8599    fn deserialize<T: Peek + Next>(
8600        tag_name: &str,
8601        stack: &mut T,
8602    ) -> Result<UnprocessedUpdateAction, XmlParseError> {
8603        deserialize_elements::<_, UnprocessedUpdateAction, _>(
8604            tag_name,
8605            stack,
8606            |name, stack, obj| {
8607                match name {
8608                    "CacheClusterId" => {
8609                        obj.cache_cluster_id =
8610                            Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
8611                    }
8612                    "ErrorMessage" => {
8613                        obj.error_message =
8614                            Some(StringDeserializer::deserialize("ErrorMessage", stack)?);
8615                    }
8616                    "ErrorType" => {
8617                        obj.error_type = Some(StringDeserializer::deserialize("ErrorType", stack)?);
8618                    }
8619                    "ReplicationGroupId" => {
8620                        obj.replication_group_id = Some(StringDeserializer::deserialize(
8621                            "ReplicationGroupId",
8622                            stack,
8623                        )?);
8624                    }
8625                    "ServiceUpdateName" => {
8626                        obj.service_update_name =
8627                            Some(StringDeserializer::deserialize("ServiceUpdateName", stack)?);
8628                    }
8629                    _ => skip_tree(stack),
8630                }
8631                Ok(())
8632            },
8633        )
8634    }
8635}
8636#[allow(dead_code)]
8637struct UnprocessedUpdateActionListDeserializer;
8638impl UnprocessedUpdateActionListDeserializer {
8639    #[allow(dead_code, unused_variables)]
8640    fn deserialize<T: Peek + Next>(
8641        tag_name: &str,
8642        stack: &mut T,
8643    ) -> Result<Vec<UnprocessedUpdateAction>, XmlParseError> {
8644        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
8645            if name == "UnprocessedUpdateAction" {
8646                obj.push(UnprocessedUpdateActionDeserializer::deserialize(
8647                    "UnprocessedUpdateAction",
8648                    stack,
8649                )?);
8650            } else {
8651                skip_tree(stack);
8652            }
8653            Ok(())
8654        })
8655    }
8656}
8657/// <p>The status of the service update for a specific replication group</p>
8658#[derive(Clone, Debug, Default, PartialEq)]
8659#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8660pub struct UpdateAction {
8661    /// <p>The ID of the cache cluster</p>
8662    pub cache_cluster_id: Option<String>,
8663    /// <p>The status of the service update on the cache node</p>
8664    pub cache_node_update_status: Option<Vec<CacheNodeUpdateStatus>>,
8665    /// <p>The Elasticache engine to which the update applies. Either Redis or Memcached</p>
8666    pub engine: Option<String>,
8667    /// <p>The estimated length of time for the update to complete</p>
8668    pub estimated_update_time: Option<String>,
8669    /// <p>The status of the service update on the node group</p>
8670    pub node_group_update_status: Option<Vec<NodeGroupUpdateStatus>>,
8671    /// <p>The progress of the service update on the replication group</p>
8672    pub nodes_updated: Option<String>,
8673    /// <p>The ID of the replication group</p>
8674    pub replication_group_id: Option<String>,
8675    /// <p>The unique ID of the service update</p>
8676    pub service_update_name: Option<String>,
8677    /// <p>The recommended date to apply the service update to ensure compliance. For information on compliance, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/elasticache-compliance.html#elasticache-compliance-self-service">Self-Service Security Updates for Compliance</a>.</p>
8678    pub service_update_recommended_apply_by_date: Option<String>,
8679    /// <p>The date the update is first available</p>
8680    pub service_update_release_date: Option<String>,
8681    /// <p>The severity of the service update</p>
8682    pub service_update_severity: Option<String>,
8683    /// <p>The status of the service update</p>
8684    pub service_update_status: Option<String>,
8685    /// <p>Reflects the nature of the service update </p>
8686    pub service_update_type: Option<String>,
8687    /// <p>If yes, all nodes in the replication group have been updated by the recommended apply-by date. If no, at least one node in the replication group have not been updated by the recommended apply-by date. If N/A, the replication group was created after the recommended apply-by date.</p>
8688    pub sla_met: Option<String>,
8689    /// <p>The date that the service update is available to a replication group</p>
8690    pub update_action_available_date: Option<String>,
8691    /// <p>The status of the update action</p>
8692    pub update_action_status: Option<String>,
8693    /// <p>The date when the UpdateActionStatus was last modified</p>
8694    pub update_action_status_modified_date: Option<String>,
8695}
8696
8697#[allow(dead_code)]
8698struct UpdateActionDeserializer;
8699impl UpdateActionDeserializer {
8700    #[allow(dead_code, unused_variables)]
8701    fn deserialize<T: Peek + Next>(
8702        tag_name: &str,
8703        stack: &mut T,
8704    ) -> Result<UpdateAction, XmlParseError> {
8705        deserialize_elements::<_, UpdateAction, _>(tag_name, stack, |name, stack, obj| {
8706            match name {
8707                "CacheClusterId" => {
8708                    obj.cache_cluster_id =
8709                        Some(StringDeserializer::deserialize("CacheClusterId", stack)?);
8710                }
8711                "CacheNodeUpdateStatus" => {
8712                    obj.cache_node_update_status.get_or_insert(vec![]).extend(
8713                        CacheNodeUpdateStatusListDeserializer::deserialize(
8714                            "CacheNodeUpdateStatus",
8715                            stack,
8716                        )?,
8717                    );
8718                }
8719                "Engine" => {
8720                    obj.engine = Some(StringDeserializer::deserialize("Engine", stack)?);
8721                }
8722                "EstimatedUpdateTime" => {
8723                    obj.estimated_update_time = Some(StringDeserializer::deserialize(
8724                        "EstimatedUpdateTime",
8725                        stack,
8726                    )?);
8727                }
8728                "NodeGroupUpdateStatus" => {
8729                    obj.node_group_update_status.get_or_insert(vec![]).extend(
8730                        NodeGroupUpdateStatusListDeserializer::deserialize(
8731                            "NodeGroupUpdateStatus",
8732                            stack,
8733                        )?,
8734                    );
8735                }
8736                "NodesUpdated" => {
8737                    obj.nodes_updated =
8738                        Some(StringDeserializer::deserialize("NodesUpdated", stack)?);
8739                }
8740                "ReplicationGroupId" => {
8741                    obj.replication_group_id = Some(StringDeserializer::deserialize(
8742                        "ReplicationGroupId",
8743                        stack,
8744                    )?);
8745                }
8746                "ServiceUpdateName" => {
8747                    obj.service_update_name =
8748                        Some(StringDeserializer::deserialize("ServiceUpdateName", stack)?);
8749                }
8750                "ServiceUpdateRecommendedApplyByDate" => {
8751                    obj.service_update_recommended_apply_by_date =
8752                        Some(TStampDeserializer::deserialize(
8753                            "ServiceUpdateRecommendedApplyByDate",
8754                            stack,
8755                        )?);
8756                }
8757                "ServiceUpdateReleaseDate" => {
8758                    obj.service_update_release_date = Some(TStampDeserializer::deserialize(
8759                        "ServiceUpdateReleaseDate",
8760                        stack,
8761                    )?);
8762                }
8763                "ServiceUpdateSeverity" => {
8764                    obj.service_update_severity =
8765                        Some(ServiceUpdateSeverityDeserializer::deserialize(
8766                            "ServiceUpdateSeverity",
8767                            stack,
8768                        )?);
8769                }
8770                "ServiceUpdateStatus" => {
8771                    obj.service_update_status = Some(ServiceUpdateStatusDeserializer::deserialize(
8772                        "ServiceUpdateStatus",
8773                        stack,
8774                    )?);
8775                }
8776                "ServiceUpdateType" => {
8777                    obj.service_update_type = Some(ServiceUpdateTypeDeserializer::deserialize(
8778                        "ServiceUpdateType",
8779                        stack,
8780                    )?);
8781                }
8782                "SlaMet" => {
8783                    obj.sla_met = Some(SlaMetDeserializer::deserialize("SlaMet", stack)?);
8784                }
8785                "UpdateActionAvailableDate" => {
8786                    obj.update_action_available_date = Some(TStampDeserializer::deserialize(
8787                        "UpdateActionAvailableDate",
8788                        stack,
8789                    )?);
8790                }
8791                "UpdateActionStatus" => {
8792                    obj.update_action_status = Some(UpdateActionStatusDeserializer::deserialize(
8793                        "UpdateActionStatus",
8794                        stack,
8795                    )?);
8796                }
8797                "UpdateActionStatusModifiedDate" => {
8798                    obj.update_action_status_modified_date = Some(TStampDeserializer::deserialize(
8799                        "UpdateActionStatusModifiedDate",
8800                        stack,
8801                    )?);
8802                }
8803                _ => skip_tree(stack),
8804            }
8805            Ok(())
8806        })
8807    }
8808}
8809#[allow(dead_code)]
8810struct UpdateActionListDeserializer;
8811impl UpdateActionListDeserializer {
8812    #[allow(dead_code, unused_variables)]
8813    fn deserialize<T: Peek + Next>(
8814        tag_name: &str,
8815        stack: &mut T,
8816    ) -> Result<Vec<UpdateAction>, XmlParseError> {
8817        deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
8818            if name == "UpdateAction" {
8819                obj.push(UpdateActionDeserializer::deserialize(
8820                    "UpdateAction",
8821                    stack,
8822                )?);
8823            } else {
8824                skip_tree(stack);
8825            }
8826            Ok(())
8827        })
8828    }
8829}
8830#[derive(Clone, Debug, Default, PartialEq)]
8831#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8832pub struct UpdateActionResultsMessage {
8833    /// <p>Update actions that have been processed successfully</p>
8834    pub processed_update_actions: Option<Vec<ProcessedUpdateAction>>,
8835    /// <p>Update actions that haven't been processed successfully</p>
8836    pub unprocessed_update_actions: Option<Vec<UnprocessedUpdateAction>>,
8837}
8838
8839#[allow(dead_code)]
8840struct UpdateActionResultsMessageDeserializer;
8841impl UpdateActionResultsMessageDeserializer {
8842    #[allow(dead_code, unused_variables)]
8843    fn deserialize<T: Peek + Next>(
8844        tag_name: &str,
8845        stack: &mut T,
8846    ) -> Result<UpdateActionResultsMessage, XmlParseError> {
8847        deserialize_elements::<_, UpdateActionResultsMessage, _>(
8848            tag_name,
8849            stack,
8850            |name, stack, obj| {
8851                match name {
8852                    "ProcessedUpdateActions" => {
8853                        obj.processed_update_actions.get_or_insert(vec![]).extend(
8854                            ProcessedUpdateActionListDeserializer::deserialize(
8855                                "ProcessedUpdateActions",
8856                                stack,
8857                            )?,
8858                        );
8859                    }
8860                    "UnprocessedUpdateActions" => {
8861                        obj.unprocessed_update_actions.get_or_insert(vec![]).extend(
8862                            UnprocessedUpdateActionListDeserializer::deserialize(
8863                                "UnprocessedUpdateActions",
8864                                stack,
8865                            )?,
8866                        );
8867                    }
8868                    _ => skip_tree(stack),
8869                }
8870                Ok(())
8871            },
8872        )
8873    }
8874}
8875#[allow(dead_code)]
8876struct UpdateActionStatusDeserializer;
8877impl UpdateActionStatusDeserializer {
8878    #[allow(dead_code, unused_variables)]
8879    fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
8880        xml_util::deserialize_primitive(tag_name, stack, Ok)
8881    }
8882}
8883
8884/// Serialize `UpdateActionStatusList` contents to a `SignedRequest`.
8885struct UpdateActionStatusListSerializer;
8886impl UpdateActionStatusListSerializer {
8887    fn serialize(params: &mut Params, name: &str, obj: &Vec<String>) {
8888        for (index, obj) in obj.iter().enumerate() {
8889            let key = format!("{}.member.{}", name, index + 1);
8890            params.put(&key, &obj);
8891        }
8892    }
8893}
8894
8895#[derive(Clone, Debug, Default, PartialEq)]
8896#[cfg_attr(feature = "serialize_structs", derive(Serialize))]
8897pub struct UpdateActionsMessage {
8898    /// <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
8899    pub marker: Option<String>,
8900    /// <p>Returns a list of update actions</p>
8901    pub update_actions: Option<Vec<UpdateAction>>,
8902}
8903
8904#[allow(dead_code)]
8905struct UpdateActionsMessageDeserializer;
8906impl UpdateActionsMessageDeserializer {
8907    #[allow(dead_code, unused_variables)]
8908    fn deserialize<T: Peek + Next>(
8909        tag_name: &str,
8910        stack: &mut T,
8911    ) -> Result<UpdateActionsMessage, XmlParseError> {
8912        deserialize_elements::<_, UpdateActionsMessage, _>(tag_name, stack, |name, stack, obj| {
8913            match name {
8914                "Marker" => {
8915                    obj.marker = Some(StringDeserializer::deserialize("Marker", stack)?);
8916                }
8917                "UpdateActions" => {
8918                    obj.update_actions.get_or_insert(vec![]).extend(
8919                        UpdateActionListDeserializer::deserialize("UpdateActions", stack)?,
8920                    );
8921                }
8922                _ => skip_tree(stack),
8923            }
8924            Ok(())
8925        })
8926    }
8927}
8928/// Errors returned by AddTagsToResource
8929#[derive(Debug, PartialEq)]
8930pub enum AddTagsToResourceError {
8931    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
8932    CacheClusterNotFoundFault(String),
8933    /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
8934    InvalidARNFault(String),
8935    /// <p>The requested snapshot name does not refer to an existing snapshot.</p>
8936    SnapshotNotFoundFault(String),
8937    /// <p>The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50.</p>
8938    TagQuotaPerResourceExceeded(String),
8939}
8940
8941impl AddTagsToResourceError {
8942    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToResourceError> {
8943        {
8944            let reader = EventReader::new(res.body.as_ref());
8945            let mut stack = XmlResponse::new(reader.into_iter().peekable());
8946            find_start_element(&mut stack);
8947            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
8948                match &parsed_error.code[..] {
8949                    "CacheClusterNotFound" => {
8950                        return RusotoError::Service(
8951                            AddTagsToResourceError::CacheClusterNotFoundFault(parsed_error.message),
8952                        )
8953                    }
8954                    "InvalidARN" => {
8955                        return RusotoError::Service(AddTagsToResourceError::InvalidARNFault(
8956                            parsed_error.message,
8957                        ))
8958                    }
8959                    "SnapshotNotFoundFault" => {
8960                        return RusotoError::Service(AddTagsToResourceError::SnapshotNotFoundFault(
8961                            parsed_error.message,
8962                        ))
8963                    }
8964                    "TagQuotaPerResourceExceeded" => {
8965                        return RusotoError::Service(
8966                            AddTagsToResourceError::TagQuotaPerResourceExceeded(
8967                                parsed_error.message,
8968                            ),
8969                        )
8970                    }
8971                    _ => {}
8972                }
8973            }
8974        }
8975        RusotoError::Unknown(res)
8976    }
8977
8978    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
8979    where
8980        T: Peek + Next,
8981    {
8982        xml_util::start_element("ErrorResponse", stack)?;
8983        XmlErrorDeserializer::deserialize("Error", stack)
8984    }
8985}
8986impl fmt::Display for AddTagsToResourceError {
8987    #[allow(unused_variables)]
8988    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8989        match *self {
8990            AddTagsToResourceError::CacheClusterNotFoundFault(ref cause) => write!(f, "{}", cause),
8991            AddTagsToResourceError::InvalidARNFault(ref cause) => write!(f, "{}", cause),
8992            AddTagsToResourceError::SnapshotNotFoundFault(ref cause) => write!(f, "{}", cause),
8993            AddTagsToResourceError::TagQuotaPerResourceExceeded(ref cause) => {
8994                write!(f, "{}", cause)
8995            }
8996        }
8997    }
8998}
8999impl Error for AddTagsToResourceError {}
9000/// Errors returned by AuthorizeCacheSecurityGroupIngress
9001#[derive(Debug, PartialEq)]
9002pub enum AuthorizeCacheSecurityGroupIngressError {
9003    /// <p>The specified Amazon EC2 security group is already authorized for the specified cache security group.</p>
9004    AuthorizationAlreadyExistsFault(String),
9005    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
9006    CacheSecurityGroupNotFoundFault(String),
9007    /// <p>The current state of the cache security group does not allow deletion.</p>
9008    InvalidCacheSecurityGroupStateFault(String),
9009    /// <p>Two or more incompatible parameters were specified.</p>
9010    InvalidParameterCombination(String),
9011    /// <p>The value for a parameter is invalid.</p>
9012    InvalidParameterValue(String),
9013}
9014
9015impl AuthorizeCacheSecurityGroupIngressError {
9016    pub fn from_response(
9017        res: BufferedHttpResponse,
9018    ) -> RusotoError<AuthorizeCacheSecurityGroupIngressError> {
9019        {
9020            let reader = EventReader::new(res.body.as_ref());
9021            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9022            find_start_element(&mut stack);
9023            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9024                match &parsed_error.code[..] {
9025                                    "AuthorizationAlreadyExists" => return RusotoError::Service(AuthorizeCacheSecurityGroupIngressError::AuthorizationAlreadyExistsFault(parsed_error.message)),"CacheSecurityGroupNotFound" => return RusotoError::Service(AuthorizeCacheSecurityGroupIngressError::CacheSecurityGroupNotFoundFault(parsed_error.message)),"InvalidCacheSecurityGroupState" => return RusotoError::Service(AuthorizeCacheSecurityGroupIngressError::InvalidCacheSecurityGroupStateFault(parsed_error.message)),"InvalidParameterCombination" => return RusotoError::Service(AuthorizeCacheSecurityGroupIngressError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(AuthorizeCacheSecurityGroupIngressError::InvalidParameterValue(parsed_error.message)),_ => {}
9026                                }
9027            }
9028        }
9029        RusotoError::Unknown(res)
9030    }
9031
9032    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9033    where
9034        T: Peek + Next,
9035    {
9036        xml_util::start_element("ErrorResponse", stack)?;
9037        XmlErrorDeserializer::deserialize("Error", stack)
9038    }
9039}
9040impl fmt::Display for AuthorizeCacheSecurityGroupIngressError {
9041    #[allow(unused_variables)]
9042    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9043        match *self {
9044            AuthorizeCacheSecurityGroupIngressError::AuthorizationAlreadyExistsFault(ref cause) => {
9045                write!(f, "{}", cause)
9046            }
9047            AuthorizeCacheSecurityGroupIngressError::CacheSecurityGroupNotFoundFault(ref cause) => {
9048                write!(f, "{}", cause)
9049            }
9050            AuthorizeCacheSecurityGroupIngressError::InvalidCacheSecurityGroupStateFault(
9051                ref cause,
9052            ) => write!(f, "{}", cause),
9053            AuthorizeCacheSecurityGroupIngressError::InvalidParameterCombination(ref cause) => {
9054                write!(f, "{}", cause)
9055            }
9056            AuthorizeCacheSecurityGroupIngressError::InvalidParameterValue(ref cause) => {
9057                write!(f, "{}", cause)
9058            }
9059        }
9060    }
9061}
9062impl Error for AuthorizeCacheSecurityGroupIngressError {}
9063/// Errors returned by BatchApplyUpdateAction
9064#[derive(Debug, PartialEq)]
9065pub enum BatchApplyUpdateActionError {
9066    /// <p>The value for a parameter is invalid.</p>
9067    InvalidParameterValue(String),
9068    /// <p>The service update doesn't exist</p>
9069    ServiceUpdateNotFoundFault(String),
9070}
9071
9072impl BatchApplyUpdateActionError {
9073    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchApplyUpdateActionError> {
9074        {
9075            let reader = EventReader::new(res.body.as_ref());
9076            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9077            find_start_element(&mut stack);
9078            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9079                match &parsed_error.code[..] {
9080                    "InvalidParameterValue" => {
9081                        return RusotoError::Service(
9082                            BatchApplyUpdateActionError::InvalidParameterValue(
9083                                parsed_error.message,
9084                            ),
9085                        )
9086                    }
9087                    "ServiceUpdateNotFoundFault" => {
9088                        return RusotoError::Service(
9089                            BatchApplyUpdateActionError::ServiceUpdateNotFoundFault(
9090                                parsed_error.message,
9091                            ),
9092                        )
9093                    }
9094                    _ => {}
9095                }
9096            }
9097        }
9098        RusotoError::Unknown(res)
9099    }
9100
9101    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9102    where
9103        T: Peek + Next,
9104    {
9105        xml_util::start_element("ErrorResponse", stack)?;
9106        XmlErrorDeserializer::deserialize("Error", stack)
9107    }
9108}
9109impl fmt::Display for BatchApplyUpdateActionError {
9110    #[allow(unused_variables)]
9111    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9112        match *self {
9113            BatchApplyUpdateActionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
9114            BatchApplyUpdateActionError::ServiceUpdateNotFoundFault(ref cause) => {
9115                write!(f, "{}", cause)
9116            }
9117        }
9118    }
9119}
9120impl Error for BatchApplyUpdateActionError {}
9121/// Errors returned by BatchStopUpdateAction
9122#[derive(Debug, PartialEq)]
9123pub enum BatchStopUpdateActionError {
9124    /// <p>The value for a parameter is invalid.</p>
9125    InvalidParameterValue(String),
9126    /// <p>The service update doesn't exist</p>
9127    ServiceUpdateNotFoundFault(String),
9128}
9129
9130impl BatchStopUpdateActionError {
9131    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchStopUpdateActionError> {
9132        {
9133            let reader = EventReader::new(res.body.as_ref());
9134            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9135            find_start_element(&mut stack);
9136            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9137                match &parsed_error.code[..] {
9138                    "InvalidParameterValue" => {
9139                        return RusotoError::Service(
9140                            BatchStopUpdateActionError::InvalidParameterValue(parsed_error.message),
9141                        )
9142                    }
9143                    "ServiceUpdateNotFoundFault" => {
9144                        return RusotoError::Service(
9145                            BatchStopUpdateActionError::ServiceUpdateNotFoundFault(
9146                                parsed_error.message,
9147                            ),
9148                        )
9149                    }
9150                    _ => {}
9151                }
9152            }
9153        }
9154        RusotoError::Unknown(res)
9155    }
9156
9157    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9158    where
9159        T: Peek + Next,
9160    {
9161        xml_util::start_element("ErrorResponse", stack)?;
9162        XmlErrorDeserializer::deserialize("Error", stack)
9163    }
9164}
9165impl fmt::Display for BatchStopUpdateActionError {
9166    #[allow(unused_variables)]
9167    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9168        match *self {
9169            BatchStopUpdateActionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
9170            BatchStopUpdateActionError::ServiceUpdateNotFoundFault(ref cause) => {
9171                write!(f, "{}", cause)
9172            }
9173        }
9174    }
9175}
9176impl Error for BatchStopUpdateActionError {}
9177/// Errors returned by CompleteMigration
9178#[derive(Debug, PartialEq)]
9179pub enum CompleteMigrationError {
9180    /// <p>The requested replication group is not in the <code>available</code> state.</p>
9181    InvalidReplicationGroupStateFault(String),
9182    /// <p>The specified replication group does not exist.</p>
9183    ReplicationGroupNotFoundFault(String),
9184    /// <p>The designated replication group is not available for data migration.</p>
9185    ReplicationGroupNotUnderMigrationFault(String),
9186}
9187
9188impl CompleteMigrationError {
9189    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CompleteMigrationError> {
9190        {
9191            let reader = EventReader::new(res.body.as_ref());
9192            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9193            find_start_element(&mut stack);
9194            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9195                match &parsed_error.code[..] {
9196                    "InvalidReplicationGroupState" => {
9197                        return RusotoError::Service(
9198                            CompleteMigrationError::InvalidReplicationGroupStateFault(
9199                                parsed_error.message,
9200                            ),
9201                        )
9202                    }
9203                    "ReplicationGroupNotFoundFault" => {
9204                        return RusotoError::Service(
9205                            CompleteMigrationError::ReplicationGroupNotFoundFault(
9206                                parsed_error.message,
9207                            ),
9208                        )
9209                    }
9210                    "ReplicationGroupNotUnderMigrationFault" => {
9211                        return RusotoError::Service(
9212                            CompleteMigrationError::ReplicationGroupNotUnderMigrationFault(
9213                                parsed_error.message,
9214                            ),
9215                        )
9216                    }
9217                    _ => {}
9218                }
9219            }
9220        }
9221        RusotoError::Unknown(res)
9222    }
9223
9224    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9225    where
9226        T: Peek + Next,
9227    {
9228        xml_util::start_element("ErrorResponse", stack)?;
9229        XmlErrorDeserializer::deserialize("Error", stack)
9230    }
9231}
9232impl fmt::Display for CompleteMigrationError {
9233    #[allow(unused_variables)]
9234    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9235        match *self {
9236            CompleteMigrationError::InvalidReplicationGroupStateFault(ref cause) => {
9237                write!(f, "{}", cause)
9238            }
9239            CompleteMigrationError::ReplicationGroupNotFoundFault(ref cause) => {
9240                write!(f, "{}", cause)
9241            }
9242            CompleteMigrationError::ReplicationGroupNotUnderMigrationFault(ref cause) => {
9243                write!(f, "{}", cause)
9244            }
9245        }
9246    }
9247}
9248impl Error for CompleteMigrationError {}
9249/// Errors returned by CopySnapshot
9250#[derive(Debug, PartialEq)]
9251pub enum CopySnapshotError {
9252    /// <p>Two or more incompatible parameters were specified.</p>
9253    InvalidParameterCombination(String),
9254    /// <p>The value for a parameter is invalid.</p>
9255    InvalidParameterValue(String),
9256    /// <p>The current state of the snapshot does not allow the requested operation to occur.</p>
9257    InvalidSnapshotStateFault(String),
9258    /// <p>You already have a snapshot with the given name.</p>
9259    SnapshotAlreadyExistsFault(String),
9260    /// <p>The requested snapshot name does not refer to an existing snapshot.</p>
9261    SnapshotNotFoundFault(String),
9262    /// <p>The request cannot be processed because it would exceed the maximum number of snapshots.</p>
9263    SnapshotQuotaExceededFault(String),
9264}
9265
9266impl CopySnapshotError {
9267    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopySnapshotError> {
9268        {
9269            let reader = EventReader::new(res.body.as_ref());
9270            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9271            find_start_element(&mut stack);
9272            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9273                match &parsed_error.code[..] {
9274                    "InvalidParameterCombination" => {
9275                        return RusotoError::Service(
9276                            CopySnapshotError::InvalidParameterCombination(parsed_error.message),
9277                        )
9278                    }
9279                    "InvalidParameterValue" => {
9280                        return RusotoError::Service(CopySnapshotError::InvalidParameterValue(
9281                            parsed_error.message,
9282                        ))
9283                    }
9284                    "InvalidSnapshotState" => {
9285                        return RusotoError::Service(CopySnapshotError::InvalidSnapshotStateFault(
9286                            parsed_error.message,
9287                        ))
9288                    }
9289                    "SnapshotAlreadyExistsFault" => {
9290                        return RusotoError::Service(CopySnapshotError::SnapshotAlreadyExistsFault(
9291                            parsed_error.message,
9292                        ))
9293                    }
9294                    "SnapshotNotFoundFault" => {
9295                        return RusotoError::Service(CopySnapshotError::SnapshotNotFoundFault(
9296                            parsed_error.message,
9297                        ))
9298                    }
9299                    "SnapshotQuotaExceededFault" => {
9300                        return RusotoError::Service(CopySnapshotError::SnapshotQuotaExceededFault(
9301                            parsed_error.message,
9302                        ))
9303                    }
9304                    _ => {}
9305                }
9306            }
9307        }
9308        RusotoError::Unknown(res)
9309    }
9310
9311    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9312    where
9313        T: Peek + Next,
9314    {
9315        xml_util::start_element("ErrorResponse", stack)?;
9316        XmlErrorDeserializer::deserialize("Error", stack)
9317    }
9318}
9319impl fmt::Display for CopySnapshotError {
9320    #[allow(unused_variables)]
9321    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9322        match *self {
9323            CopySnapshotError::InvalidParameterCombination(ref cause) => write!(f, "{}", cause),
9324            CopySnapshotError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
9325            CopySnapshotError::InvalidSnapshotStateFault(ref cause) => write!(f, "{}", cause),
9326            CopySnapshotError::SnapshotAlreadyExistsFault(ref cause) => write!(f, "{}", cause),
9327            CopySnapshotError::SnapshotNotFoundFault(ref cause) => write!(f, "{}", cause),
9328            CopySnapshotError::SnapshotQuotaExceededFault(ref cause) => write!(f, "{}", cause),
9329        }
9330    }
9331}
9332impl Error for CopySnapshotError {}
9333/// Errors returned by CreateCacheCluster
9334#[derive(Debug, PartialEq)]
9335pub enum CreateCacheClusterError {
9336    /// <p>You already have a cluster with the given identifier.</p>
9337    CacheClusterAlreadyExistsFault(String),
9338    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
9339    CacheParameterGroupNotFoundFault(String),
9340    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
9341    CacheSecurityGroupNotFoundFault(String),
9342    /// <p>The requested cache subnet group name does not refer to an existing cache subnet group.</p>
9343    CacheSubnetGroupNotFoundFault(String),
9344    /// <p>The request cannot be processed because it would exceed the allowed number of clusters per customer.</p>
9345    ClusterQuotaForCustomerExceededFault(String),
9346    /// <p>The requested cache node type is not available in the specified Availability Zone. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY">InsufficientCacheClusterCapacity</a> in the ElastiCache User Guide.</p>
9347    InsufficientCacheClusterCapacityFault(String),
9348    /// <p>Two or more incompatible parameters were specified.</p>
9349    InvalidParameterCombination(String),
9350    /// <p>The value for a parameter is invalid.</p>
9351    InvalidParameterValue(String),
9352    /// <p>The requested replication group is not in the <code>available</code> state.</p>
9353    InvalidReplicationGroupStateFault(String),
9354    /// <p>The VPC network is in an invalid state.</p>
9355    InvalidVPCNetworkStateFault(String),
9356    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes in a single cluster.</p>
9357    NodeQuotaForClusterExceededFault(String),
9358    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes per customer.</p>
9359    NodeQuotaForCustomerExceededFault(String),
9360    /// <p>The specified replication group does not exist.</p>
9361    ReplicationGroupNotFoundFault(String),
9362    /// <p>The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50.</p>
9363    TagQuotaPerResourceExceeded(String),
9364}
9365
9366impl CreateCacheClusterError {
9367    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCacheClusterError> {
9368        {
9369            let reader = EventReader::new(res.body.as_ref());
9370            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9371            find_start_element(&mut stack);
9372            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9373                match &parsed_error.code[..] {
9374                    "CacheClusterAlreadyExists" => {
9375                        return RusotoError::Service(
9376                            CreateCacheClusterError::CacheClusterAlreadyExistsFault(
9377                                parsed_error.message,
9378                            ),
9379                        )
9380                    }
9381                    "CacheParameterGroupNotFound" => {
9382                        return RusotoError::Service(
9383                            CreateCacheClusterError::CacheParameterGroupNotFoundFault(
9384                                parsed_error.message,
9385                            ),
9386                        )
9387                    }
9388                    "CacheSecurityGroupNotFound" => {
9389                        return RusotoError::Service(
9390                            CreateCacheClusterError::CacheSecurityGroupNotFoundFault(
9391                                parsed_error.message,
9392                            ),
9393                        )
9394                    }
9395                    "CacheSubnetGroupNotFoundFault" => {
9396                        return RusotoError::Service(
9397                            CreateCacheClusterError::CacheSubnetGroupNotFoundFault(
9398                                parsed_error.message,
9399                            ),
9400                        )
9401                    }
9402                    "ClusterQuotaForCustomerExceeded" => {
9403                        return RusotoError::Service(
9404                            CreateCacheClusterError::ClusterQuotaForCustomerExceededFault(
9405                                parsed_error.message,
9406                            ),
9407                        )
9408                    }
9409                    "InsufficientCacheClusterCapacity" => {
9410                        return RusotoError::Service(
9411                            CreateCacheClusterError::InsufficientCacheClusterCapacityFault(
9412                                parsed_error.message,
9413                            ),
9414                        )
9415                    }
9416                    "InvalidParameterCombination" => {
9417                        return RusotoError::Service(
9418                            CreateCacheClusterError::InvalidParameterCombination(
9419                                parsed_error.message,
9420                            ),
9421                        )
9422                    }
9423                    "InvalidParameterValue" => {
9424                        return RusotoError::Service(
9425                            CreateCacheClusterError::InvalidParameterValue(parsed_error.message),
9426                        )
9427                    }
9428                    "InvalidReplicationGroupState" => {
9429                        return RusotoError::Service(
9430                            CreateCacheClusterError::InvalidReplicationGroupStateFault(
9431                                parsed_error.message,
9432                            ),
9433                        )
9434                    }
9435                    "InvalidVPCNetworkStateFault" => {
9436                        return RusotoError::Service(
9437                            CreateCacheClusterError::InvalidVPCNetworkStateFault(
9438                                parsed_error.message,
9439                            ),
9440                        )
9441                    }
9442                    "NodeQuotaForClusterExceeded" => {
9443                        return RusotoError::Service(
9444                            CreateCacheClusterError::NodeQuotaForClusterExceededFault(
9445                                parsed_error.message,
9446                            ),
9447                        )
9448                    }
9449                    "NodeQuotaForCustomerExceeded" => {
9450                        return RusotoError::Service(
9451                            CreateCacheClusterError::NodeQuotaForCustomerExceededFault(
9452                                parsed_error.message,
9453                            ),
9454                        )
9455                    }
9456                    "ReplicationGroupNotFoundFault" => {
9457                        return RusotoError::Service(
9458                            CreateCacheClusterError::ReplicationGroupNotFoundFault(
9459                                parsed_error.message,
9460                            ),
9461                        )
9462                    }
9463                    "TagQuotaPerResourceExceeded" => {
9464                        return RusotoError::Service(
9465                            CreateCacheClusterError::TagQuotaPerResourceExceeded(
9466                                parsed_error.message,
9467                            ),
9468                        )
9469                    }
9470                    _ => {}
9471                }
9472            }
9473        }
9474        RusotoError::Unknown(res)
9475    }
9476
9477    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9478    where
9479        T: Peek + Next,
9480    {
9481        xml_util::start_element("ErrorResponse", stack)?;
9482        XmlErrorDeserializer::deserialize("Error", stack)
9483    }
9484}
9485impl fmt::Display for CreateCacheClusterError {
9486    #[allow(unused_variables)]
9487    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9488        match *self {
9489            CreateCacheClusterError::CacheClusterAlreadyExistsFault(ref cause) => {
9490                write!(f, "{}", cause)
9491            }
9492            CreateCacheClusterError::CacheParameterGroupNotFoundFault(ref cause) => {
9493                write!(f, "{}", cause)
9494            }
9495            CreateCacheClusterError::CacheSecurityGroupNotFoundFault(ref cause) => {
9496                write!(f, "{}", cause)
9497            }
9498            CreateCacheClusterError::CacheSubnetGroupNotFoundFault(ref cause) => {
9499                write!(f, "{}", cause)
9500            }
9501            CreateCacheClusterError::ClusterQuotaForCustomerExceededFault(ref cause) => {
9502                write!(f, "{}", cause)
9503            }
9504            CreateCacheClusterError::InsufficientCacheClusterCapacityFault(ref cause) => {
9505                write!(f, "{}", cause)
9506            }
9507            CreateCacheClusterError::InvalidParameterCombination(ref cause) => {
9508                write!(f, "{}", cause)
9509            }
9510            CreateCacheClusterError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
9511            CreateCacheClusterError::InvalidReplicationGroupStateFault(ref cause) => {
9512                write!(f, "{}", cause)
9513            }
9514            CreateCacheClusterError::InvalidVPCNetworkStateFault(ref cause) => {
9515                write!(f, "{}", cause)
9516            }
9517            CreateCacheClusterError::NodeQuotaForClusterExceededFault(ref cause) => {
9518                write!(f, "{}", cause)
9519            }
9520            CreateCacheClusterError::NodeQuotaForCustomerExceededFault(ref cause) => {
9521                write!(f, "{}", cause)
9522            }
9523            CreateCacheClusterError::ReplicationGroupNotFoundFault(ref cause) => {
9524                write!(f, "{}", cause)
9525            }
9526            CreateCacheClusterError::TagQuotaPerResourceExceeded(ref cause) => {
9527                write!(f, "{}", cause)
9528            }
9529        }
9530    }
9531}
9532impl Error for CreateCacheClusterError {}
9533/// Errors returned by CreateCacheParameterGroup
9534#[derive(Debug, PartialEq)]
9535pub enum CreateCacheParameterGroupError {
9536    /// <p>A cache parameter group with the requested name already exists.</p>
9537    CacheParameterGroupAlreadyExistsFault(String),
9538    /// <p>The request cannot be processed because it would exceed the maximum number of cache security groups.</p>
9539    CacheParameterGroupQuotaExceededFault(String),
9540    /// <p>The current state of the cache parameter group does not allow the requested operation to occur.</p>
9541    InvalidCacheParameterGroupStateFault(String),
9542    /// <p>Two or more incompatible parameters were specified.</p>
9543    InvalidParameterCombination(String),
9544    /// <p>The value for a parameter is invalid.</p>
9545    InvalidParameterValue(String),
9546}
9547
9548impl CreateCacheParameterGroupError {
9549    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCacheParameterGroupError> {
9550        {
9551            let reader = EventReader::new(res.body.as_ref());
9552            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9553            find_start_element(&mut stack);
9554            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9555                match &parsed_error.code[..] {
9556                    "CacheParameterGroupAlreadyExists" => {
9557                        return RusotoError::Service(
9558                            CreateCacheParameterGroupError::CacheParameterGroupAlreadyExistsFault(
9559                                parsed_error.message,
9560                            ),
9561                        )
9562                    }
9563                    "CacheParameterGroupQuotaExceeded" => {
9564                        return RusotoError::Service(
9565                            CreateCacheParameterGroupError::CacheParameterGroupQuotaExceededFault(
9566                                parsed_error.message,
9567                            ),
9568                        )
9569                    }
9570                    "InvalidCacheParameterGroupState" => {
9571                        return RusotoError::Service(
9572                            CreateCacheParameterGroupError::InvalidCacheParameterGroupStateFault(
9573                                parsed_error.message,
9574                            ),
9575                        )
9576                    }
9577                    "InvalidParameterCombination" => {
9578                        return RusotoError::Service(
9579                            CreateCacheParameterGroupError::InvalidParameterCombination(
9580                                parsed_error.message,
9581                            ),
9582                        )
9583                    }
9584                    "InvalidParameterValue" => {
9585                        return RusotoError::Service(
9586                            CreateCacheParameterGroupError::InvalidParameterValue(
9587                                parsed_error.message,
9588                            ),
9589                        )
9590                    }
9591                    _ => {}
9592                }
9593            }
9594        }
9595        RusotoError::Unknown(res)
9596    }
9597
9598    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9599    where
9600        T: Peek + Next,
9601    {
9602        xml_util::start_element("ErrorResponse", stack)?;
9603        XmlErrorDeserializer::deserialize("Error", stack)
9604    }
9605}
9606impl fmt::Display for CreateCacheParameterGroupError {
9607    #[allow(unused_variables)]
9608    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9609        match *self {
9610            CreateCacheParameterGroupError::CacheParameterGroupAlreadyExistsFault(ref cause) => {
9611                write!(f, "{}", cause)
9612            }
9613            CreateCacheParameterGroupError::CacheParameterGroupQuotaExceededFault(ref cause) => {
9614                write!(f, "{}", cause)
9615            }
9616            CreateCacheParameterGroupError::InvalidCacheParameterGroupStateFault(ref cause) => {
9617                write!(f, "{}", cause)
9618            }
9619            CreateCacheParameterGroupError::InvalidParameterCombination(ref cause) => {
9620                write!(f, "{}", cause)
9621            }
9622            CreateCacheParameterGroupError::InvalidParameterValue(ref cause) => {
9623                write!(f, "{}", cause)
9624            }
9625        }
9626    }
9627}
9628impl Error for CreateCacheParameterGroupError {}
9629/// Errors returned by CreateCacheSecurityGroup
9630#[derive(Debug, PartialEq)]
9631pub enum CreateCacheSecurityGroupError {
9632    /// <p>A cache security group with the specified name already exists.</p>
9633    CacheSecurityGroupAlreadyExistsFault(String),
9634    /// <p>The request cannot be processed because it would exceed the allowed number of cache security groups.</p>
9635    CacheSecurityGroupQuotaExceededFault(String),
9636    /// <p>Two or more incompatible parameters were specified.</p>
9637    InvalidParameterCombination(String),
9638    /// <p>The value for a parameter is invalid.</p>
9639    InvalidParameterValue(String),
9640}
9641
9642impl CreateCacheSecurityGroupError {
9643    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCacheSecurityGroupError> {
9644        {
9645            let reader = EventReader::new(res.body.as_ref());
9646            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9647            find_start_element(&mut stack);
9648            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9649                match &parsed_error.code[..] {
9650                    "CacheSecurityGroupAlreadyExists" => {
9651                        return RusotoError::Service(
9652                            CreateCacheSecurityGroupError::CacheSecurityGroupAlreadyExistsFault(
9653                                parsed_error.message,
9654                            ),
9655                        )
9656                    }
9657                    "QuotaExceeded.CacheSecurityGroup" => {
9658                        return RusotoError::Service(
9659                            CreateCacheSecurityGroupError::CacheSecurityGroupQuotaExceededFault(
9660                                parsed_error.message,
9661                            ),
9662                        )
9663                    }
9664                    "InvalidParameterCombination" => {
9665                        return RusotoError::Service(
9666                            CreateCacheSecurityGroupError::InvalidParameterCombination(
9667                                parsed_error.message,
9668                            ),
9669                        )
9670                    }
9671                    "InvalidParameterValue" => {
9672                        return RusotoError::Service(
9673                            CreateCacheSecurityGroupError::InvalidParameterValue(
9674                                parsed_error.message,
9675                            ),
9676                        )
9677                    }
9678                    _ => {}
9679                }
9680            }
9681        }
9682        RusotoError::Unknown(res)
9683    }
9684
9685    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9686    where
9687        T: Peek + Next,
9688    {
9689        xml_util::start_element("ErrorResponse", stack)?;
9690        XmlErrorDeserializer::deserialize("Error", stack)
9691    }
9692}
9693impl fmt::Display for CreateCacheSecurityGroupError {
9694    #[allow(unused_variables)]
9695    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9696        match *self {
9697            CreateCacheSecurityGroupError::CacheSecurityGroupAlreadyExistsFault(ref cause) => {
9698                write!(f, "{}", cause)
9699            }
9700            CreateCacheSecurityGroupError::CacheSecurityGroupQuotaExceededFault(ref cause) => {
9701                write!(f, "{}", cause)
9702            }
9703            CreateCacheSecurityGroupError::InvalidParameterCombination(ref cause) => {
9704                write!(f, "{}", cause)
9705            }
9706            CreateCacheSecurityGroupError::InvalidParameterValue(ref cause) => {
9707                write!(f, "{}", cause)
9708            }
9709        }
9710    }
9711}
9712impl Error for CreateCacheSecurityGroupError {}
9713/// Errors returned by CreateCacheSubnetGroup
9714#[derive(Debug, PartialEq)]
9715pub enum CreateCacheSubnetGroupError {
9716    /// <p>The requested cache subnet group name is already in use by an existing cache subnet group.</p>
9717    CacheSubnetGroupAlreadyExistsFault(String),
9718    /// <p>The request cannot be processed because it would exceed the allowed number of cache subnet groups.</p>
9719    CacheSubnetGroupQuotaExceededFault(String),
9720    /// <p>The request cannot be processed because it would exceed the allowed number of subnets in a cache subnet group.</p>
9721    CacheSubnetQuotaExceededFault(String),
9722    /// <p>An invalid subnet identifier was specified.</p>
9723    InvalidSubnet(String),
9724}
9725
9726impl CreateCacheSubnetGroupError {
9727    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCacheSubnetGroupError> {
9728        {
9729            let reader = EventReader::new(res.body.as_ref());
9730            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9731            find_start_element(&mut stack);
9732            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9733                match &parsed_error.code[..] {
9734                    "CacheSubnetGroupAlreadyExists" => {
9735                        return RusotoError::Service(
9736                            CreateCacheSubnetGroupError::CacheSubnetGroupAlreadyExistsFault(
9737                                parsed_error.message,
9738                            ),
9739                        )
9740                    }
9741                    "CacheSubnetGroupQuotaExceeded" => {
9742                        return RusotoError::Service(
9743                            CreateCacheSubnetGroupError::CacheSubnetGroupQuotaExceededFault(
9744                                parsed_error.message,
9745                            ),
9746                        )
9747                    }
9748                    "CacheSubnetQuotaExceededFault" => {
9749                        return RusotoError::Service(
9750                            CreateCacheSubnetGroupError::CacheSubnetQuotaExceededFault(
9751                                parsed_error.message,
9752                            ),
9753                        )
9754                    }
9755                    "InvalidSubnet" => {
9756                        return RusotoError::Service(CreateCacheSubnetGroupError::InvalidSubnet(
9757                            parsed_error.message,
9758                        ))
9759                    }
9760                    _ => {}
9761                }
9762            }
9763        }
9764        RusotoError::Unknown(res)
9765    }
9766
9767    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9768    where
9769        T: Peek + Next,
9770    {
9771        xml_util::start_element("ErrorResponse", stack)?;
9772        XmlErrorDeserializer::deserialize("Error", stack)
9773    }
9774}
9775impl fmt::Display for CreateCacheSubnetGroupError {
9776    #[allow(unused_variables)]
9777    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9778        match *self {
9779            CreateCacheSubnetGroupError::CacheSubnetGroupAlreadyExistsFault(ref cause) => {
9780                write!(f, "{}", cause)
9781            }
9782            CreateCacheSubnetGroupError::CacheSubnetGroupQuotaExceededFault(ref cause) => {
9783                write!(f, "{}", cause)
9784            }
9785            CreateCacheSubnetGroupError::CacheSubnetQuotaExceededFault(ref cause) => {
9786                write!(f, "{}", cause)
9787            }
9788            CreateCacheSubnetGroupError::InvalidSubnet(ref cause) => write!(f, "{}", cause),
9789        }
9790    }
9791}
9792impl Error for CreateCacheSubnetGroupError {}
9793/// Errors returned by CreateGlobalReplicationGroup
9794#[derive(Debug, PartialEq)]
9795pub enum CreateGlobalReplicationGroupError {
9796    /// <p>The Global Datastore name already exists.</p>
9797    GlobalReplicationGroupAlreadyExistsFault(String),
9798    /// <p>The value for a parameter is invalid.</p>
9799    InvalidParameterValue(String),
9800    /// <p>The requested replication group is not in the <code>available</code> state.</p>
9801    InvalidReplicationGroupStateFault(String),
9802    /// <p>The specified replication group does not exist.</p>
9803    ReplicationGroupNotFoundFault(String),
9804    /// <p>The specified service linked role (SLR) was not found.</p>
9805    ServiceLinkedRoleNotFoundFault(String),
9806}
9807
9808impl CreateGlobalReplicationGroupError {
9809    pub fn from_response(
9810        res: BufferedHttpResponse,
9811    ) -> RusotoError<CreateGlobalReplicationGroupError> {
9812        {
9813            let reader = EventReader::new(res.body.as_ref());
9814            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9815            find_start_element(&mut stack);
9816            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9817                match &parsed_error.code[..] {
9818                    "GlobalReplicationGroupAlreadyExistsFault" => return RusotoError::Service(
9819                        CreateGlobalReplicationGroupError::GlobalReplicationGroupAlreadyExistsFault(
9820                            parsed_error.message,
9821                        ),
9822                    ),
9823                    "InvalidParameterValue" => {
9824                        return RusotoError::Service(
9825                            CreateGlobalReplicationGroupError::InvalidParameterValue(
9826                                parsed_error.message,
9827                            ),
9828                        )
9829                    }
9830                    "InvalidReplicationGroupState" => {
9831                        return RusotoError::Service(
9832                            CreateGlobalReplicationGroupError::InvalidReplicationGroupStateFault(
9833                                parsed_error.message,
9834                            ),
9835                        )
9836                    }
9837                    "ReplicationGroupNotFoundFault" => {
9838                        return RusotoError::Service(
9839                            CreateGlobalReplicationGroupError::ReplicationGroupNotFoundFault(
9840                                parsed_error.message,
9841                            ),
9842                        )
9843                    }
9844                    "ServiceLinkedRoleNotFoundFault" => {
9845                        return RusotoError::Service(
9846                            CreateGlobalReplicationGroupError::ServiceLinkedRoleNotFoundFault(
9847                                parsed_error.message,
9848                            ),
9849                        )
9850                    }
9851                    _ => {}
9852                }
9853            }
9854        }
9855        RusotoError::Unknown(res)
9856    }
9857
9858    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9859    where
9860        T: Peek + Next,
9861    {
9862        xml_util::start_element("ErrorResponse", stack)?;
9863        XmlErrorDeserializer::deserialize("Error", stack)
9864    }
9865}
9866impl fmt::Display for CreateGlobalReplicationGroupError {
9867    #[allow(unused_variables)]
9868    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9869        match *self {
9870            CreateGlobalReplicationGroupError::GlobalReplicationGroupAlreadyExistsFault(
9871                ref cause,
9872            ) => write!(f, "{}", cause),
9873            CreateGlobalReplicationGroupError::InvalidParameterValue(ref cause) => {
9874                write!(f, "{}", cause)
9875            }
9876            CreateGlobalReplicationGroupError::InvalidReplicationGroupStateFault(ref cause) => {
9877                write!(f, "{}", cause)
9878            }
9879            CreateGlobalReplicationGroupError::ReplicationGroupNotFoundFault(ref cause) => {
9880                write!(f, "{}", cause)
9881            }
9882            CreateGlobalReplicationGroupError::ServiceLinkedRoleNotFoundFault(ref cause) => {
9883                write!(f, "{}", cause)
9884            }
9885        }
9886    }
9887}
9888impl Error for CreateGlobalReplicationGroupError {}
9889/// Errors returned by CreateReplicationGroup
9890#[derive(Debug, PartialEq)]
9891pub enum CreateReplicationGroupError {
9892    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
9893    CacheClusterNotFoundFault(String),
9894    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
9895    CacheParameterGroupNotFoundFault(String),
9896    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
9897    CacheSecurityGroupNotFoundFault(String),
9898    /// <p>The requested cache subnet group name does not refer to an existing cache subnet group.</p>
9899    CacheSubnetGroupNotFoundFault(String),
9900    /// <p>The request cannot be processed because it would exceed the allowed number of clusters per customer.</p>
9901    ClusterQuotaForCustomerExceededFault(String),
9902    /// <p>The Global Datastore does not exist</p>
9903    GlobalReplicationGroupNotFoundFault(String),
9904    /// <p>The requested cache node type is not available in the specified Availability Zone. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY">InsufficientCacheClusterCapacity</a> in the ElastiCache User Guide.</p>
9905    InsufficientCacheClusterCapacityFault(String),
9906    /// <p>The requested cluster is not in the <code>available</code> state.</p>
9907    InvalidCacheClusterStateFault(String),
9908    /// <p>The Global Datastore is not available or in primary-only state.</p>
9909    InvalidGlobalReplicationGroupStateFault(String),
9910    /// <p>Two or more incompatible parameters were specified.</p>
9911    InvalidParameterCombination(String),
9912    /// <p>The value for a parameter is invalid.</p>
9913    InvalidParameterValue(String),
9914    /// <p>The VPC network is in an invalid state.</p>
9915    InvalidVPCNetworkStateFault(String),
9916    /// <p>The request cannot be processed because it would exceed the maximum allowed number of node groups (shards) in a single replication group. The default maximum is 90</p>
9917    NodeGroupsPerReplicationGroupQuotaExceededFault(String),
9918    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes in a single cluster.</p>
9919    NodeQuotaForClusterExceededFault(String),
9920    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes per customer.</p>
9921    NodeQuotaForCustomerExceededFault(String),
9922    /// <p>The specified replication group already exists.</p>
9923    ReplicationGroupAlreadyExistsFault(String),
9924    /// <p>The request cannot be processed because it would cause the resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource is 50.</p>
9925    TagQuotaPerResourceExceeded(String),
9926}
9927
9928impl CreateReplicationGroupError {
9929    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateReplicationGroupError> {
9930        {
9931            let reader = EventReader::new(res.body.as_ref());
9932            let mut stack = XmlResponse::new(reader.into_iter().peekable());
9933            find_start_element(&mut stack);
9934            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
9935                match &parsed_error.code[..] {
9936                                    "CacheClusterNotFound" => return RusotoError::Service(CreateReplicationGroupError::CacheClusterNotFoundFault(parsed_error.message)),"CacheParameterGroupNotFound" => return RusotoError::Service(CreateReplicationGroupError::CacheParameterGroupNotFoundFault(parsed_error.message)),"CacheSecurityGroupNotFound" => return RusotoError::Service(CreateReplicationGroupError::CacheSecurityGroupNotFoundFault(parsed_error.message)),"CacheSubnetGroupNotFoundFault" => return RusotoError::Service(CreateReplicationGroupError::CacheSubnetGroupNotFoundFault(parsed_error.message)),"ClusterQuotaForCustomerExceeded" => return RusotoError::Service(CreateReplicationGroupError::ClusterQuotaForCustomerExceededFault(parsed_error.message)),"GlobalReplicationGroupNotFoundFault" => return RusotoError::Service(CreateReplicationGroupError::GlobalReplicationGroupNotFoundFault(parsed_error.message)),"InsufficientCacheClusterCapacity" => return RusotoError::Service(CreateReplicationGroupError::InsufficientCacheClusterCapacityFault(parsed_error.message)),"InvalidCacheClusterState" => return RusotoError::Service(CreateReplicationGroupError::InvalidCacheClusterStateFault(parsed_error.message)),"InvalidGlobalReplicationGroupState" => return RusotoError::Service(CreateReplicationGroupError::InvalidGlobalReplicationGroupStateFault(parsed_error.message)),"InvalidParameterCombination" => return RusotoError::Service(CreateReplicationGroupError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(CreateReplicationGroupError::InvalidParameterValue(parsed_error.message)),"InvalidVPCNetworkStateFault" => return RusotoError::Service(CreateReplicationGroupError::InvalidVPCNetworkStateFault(parsed_error.message)),"NodeGroupsPerReplicationGroupQuotaExceeded" => return RusotoError::Service(CreateReplicationGroupError::NodeGroupsPerReplicationGroupQuotaExceededFault(parsed_error.message)),"NodeQuotaForClusterExceeded" => return RusotoError::Service(CreateReplicationGroupError::NodeQuotaForClusterExceededFault(parsed_error.message)),"NodeQuotaForCustomerExceeded" => return RusotoError::Service(CreateReplicationGroupError::NodeQuotaForCustomerExceededFault(parsed_error.message)),"ReplicationGroupAlreadyExists" => return RusotoError::Service(CreateReplicationGroupError::ReplicationGroupAlreadyExistsFault(parsed_error.message)),"TagQuotaPerResourceExceeded" => return RusotoError::Service(CreateReplicationGroupError::TagQuotaPerResourceExceeded(parsed_error.message)),_ => {}
9937                                }
9938            }
9939        }
9940        RusotoError::Unknown(res)
9941    }
9942
9943    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
9944    where
9945        T: Peek + Next,
9946    {
9947        xml_util::start_element("ErrorResponse", stack)?;
9948        XmlErrorDeserializer::deserialize("Error", stack)
9949    }
9950}
9951impl fmt::Display for CreateReplicationGroupError {
9952    #[allow(unused_variables)]
9953    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9954        match *self {
9955            CreateReplicationGroupError::CacheClusterNotFoundFault(ref cause) => {
9956                write!(f, "{}", cause)
9957            }
9958            CreateReplicationGroupError::CacheParameterGroupNotFoundFault(ref cause) => {
9959                write!(f, "{}", cause)
9960            }
9961            CreateReplicationGroupError::CacheSecurityGroupNotFoundFault(ref cause) => {
9962                write!(f, "{}", cause)
9963            }
9964            CreateReplicationGroupError::CacheSubnetGroupNotFoundFault(ref cause) => {
9965                write!(f, "{}", cause)
9966            }
9967            CreateReplicationGroupError::ClusterQuotaForCustomerExceededFault(ref cause) => {
9968                write!(f, "{}", cause)
9969            }
9970            CreateReplicationGroupError::GlobalReplicationGroupNotFoundFault(ref cause) => {
9971                write!(f, "{}", cause)
9972            }
9973            CreateReplicationGroupError::InsufficientCacheClusterCapacityFault(ref cause) => {
9974                write!(f, "{}", cause)
9975            }
9976            CreateReplicationGroupError::InvalidCacheClusterStateFault(ref cause) => {
9977                write!(f, "{}", cause)
9978            }
9979            CreateReplicationGroupError::InvalidGlobalReplicationGroupStateFault(ref cause) => {
9980                write!(f, "{}", cause)
9981            }
9982            CreateReplicationGroupError::InvalidParameterCombination(ref cause) => {
9983                write!(f, "{}", cause)
9984            }
9985            CreateReplicationGroupError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
9986            CreateReplicationGroupError::InvalidVPCNetworkStateFault(ref cause) => {
9987                write!(f, "{}", cause)
9988            }
9989            CreateReplicationGroupError::NodeGroupsPerReplicationGroupQuotaExceededFault(
9990                ref cause,
9991            ) => write!(f, "{}", cause),
9992            CreateReplicationGroupError::NodeQuotaForClusterExceededFault(ref cause) => {
9993                write!(f, "{}", cause)
9994            }
9995            CreateReplicationGroupError::NodeQuotaForCustomerExceededFault(ref cause) => {
9996                write!(f, "{}", cause)
9997            }
9998            CreateReplicationGroupError::ReplicationGroupAlreadyExistsFault(ref cause) => {
9999                write!(f, "{}", cause)
10000            }
10001            CreateReplicationGroupError::TagQuotaPerResourceExceeded(ref cause) => {
10002                write!(f, "{}", cause)
10003            }
10004        }
10005    }
10006}
10007impl Error for CreateReplicationGroupError {}
10008/// Errors returned by CreateSnapshot
10009#[derive(Debug, PartialEq)]
10010pub enum CreateSnapshotError {
10011    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
10012    CacheClusterNotFoundFault(String),
10013    /// <p>The requested cluster is not in the <code>available</code> state.</p>
10014    InvalidCacheClusterStateFault(String),
10015    /// <p>Two or more incompatible parameters were specified.</p>
10016    InvalidParameterCombination(String),
10017    /// <p>The value for a parameter is invalid.</p>
10018    InvalidParameterValue(String),
10019    /// <p>The requested replication group is not in the <code>available</code> state.</p>
10020    InvalidReplicationGroupStateFault(String),
10021    /// <p>The specified replication group does not exist.</p>
10022    ReplicationGroupNotFoundFault(String),
10023    /// <p>You already have a snapshot with the given name.</p>
10024    SnapshotAlreadyExistsFault(String),
10025    /// <p>You attempted one of the following operations:</p> <ul> <li> <p>Creating a snapshot of a Redis cluster running on a <code>cache.t1.micro</code> cache node.</p> </li> <li> <p>Creating a snapshot of a cluster that is running Memcached rather than Redis.</p> </li> </ul> <p>Neither of these are supported by ElastiCache.</p>
10026    SnapshotFeatureNotSupportedFault(String),
10027    /// <p>The request cannot be processed because it would exceed the maximum number of snapshots.</p>
10028    SnapshotQuotaExceededFault(String),
10029}
10030
10031impl CreateSnapshotError {
10032    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSnapshotError> {
10033        {
10034            let reader = EventReader::new(res.body.as_ref());
10035            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10036            find_start_element(&mut stack);
10037            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10038                match &parsed_error.code[..] {
10039                    "CacheClusterNotFound" => {
10040                        return RusotoError::Service(
10041                            CreateSnapshotError::CacheClusterNotFoundFault(parsed_error.message),
10042                        )
10043                    }
10044                    "InvalidCacheClusterState" => {
10045                        return RusotoError::Service(
10046                            CreateSnapshotError::InvalidCacheClusterStateFault(
10047                                parsed_error.message,
10048                            ),
10049                        )
10050                    }
10051                    "InvalidParameterCombination" => {
10052                        return RusotoError::Service(
10053                            CreateSnapshotError::InvalidParameterCombination(parsed_error.message),
10054                        )
10055                    }
10056                    "InvalidParameterValue" => {
10057                        return RusotoError::Service(CreateSnapshotError::InvalidParameterValue(
10058                            parsed_error.message,
10059                        ))
10060                    }
10061                    "InvalidReplicationGroupState" => {
10062                        return RusotoError::Service(
10063                            CreateSnapshotError::InvalidReplicationGroupStateFault(
10064                                parsed_error.message,
10065                            ),
10066                        )
10067                    }
10068                    "ReplicationGroupNotFoundFault" => {
10069                        return RusotoError::Service(
10070                            CreateSnapshotError::ReplicationGroupNotFoundFault(
10071                                parsed_error.message,
10072                            ),
10073                        )
10074                    }
10075                    "SnapshotAlreadyExistsFault" => {
10076                        return RusotoError::Service(
10077                            CreateSnapshotError::SnapshotAlreadyExistsFault(parsed_error.message),
10078                        )
10079                    }
10080                    "SnapshotFeatureNotSupportedFault" => {
10081                        return RusotoError::Service(
10082                            CreateSnapshotError::SnapshotFeatureNotSupportedFault(
10083                                parsed_error.message,
10084                            ),
10085                        )
10086                    }
10087                    "SnapshotQuotaExceededFault" => {
10088                        return RusotoError::Service(
10089                            CreateSnapshotError::SnapshotQuotaExceededFault(parsed_error.message),
10090                        )
10091                    }
10092                    _ => {}
10093                }
10094            }
10095        }
10096        RusotoError::Unknown(res)
10097    }
10098
10099    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10100    where
10101        T: Peek + Next,
10102    {
10103        xml_util::start_element("ErrorResponse", stack)?;
10104        XmlErrorDeserializer::deserialize("Error", stack)
10105    }
10106}
10107impl fmt::Display for CreateSnapshotError {
10108    #[allow(unused_variables)]
10109    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10110        match *self {
10111            CreateSnapshotError::CacheClusterNotFoundFault(ref cause) => write!(f, "{}", cause),
10112            CreateSnapshotError::InvalidCacheClusterStateFault(ref cause) => write!(f, "{}", cause),
10113            CreateSnapshotError::InvalidParameterCombination(ref cause) => write!(f, "{}", cause),
10114            CreateSnapshotError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
10115            CreateSnapshotError::InvalidReplicationGroupStateFault(ref cause) => {
10116                write!(f, "{}", cause)
10117            }
10118            CreateSnapshotError::ReplicationGroupNotFoundFault(ref cause) => write!(f, "{}", cause),
10119            CreateSnapshotError::SnapshotAlreadyExistsFault(ref cause) => write!(f, "{}", cause),
10120            CreateSnapshotError::SnapshotFeatureNotSupportedFault(ref cause) => {
10121                write!(f, "{}", cause)
10122            }
10123            CreateSnapshotError::SnapshotQuotaExceededFault(ref cause) => write!(f, "{}", cause),
10124        }
10125    }
10126}
10127impl Error for CreateSnapshotError {}
10128/// Errors returned by DecreaseNodeGroupsInGlobalReplicationGroup
10129#[derive(Debug, PartialEq)]
10130pub enum DecreaseNodeGroupsInGlobalReplicationGroupError {
10131    /// <p>The Global Datastore does not exist</p>
10132    GlobalReplicationGroupNotFoundFault(String),
10133    /// <p>The Global Datastore is not available or in primary-only state.</p>
10134    InvalidGlobalReplicationGroupStateFault(String),
10135    /// <p>Two or more incompatible parameters were specified.</p>
10136    InvalidParameterCombination(String),
10137    /// <p>The value for a parameter is invalid.</p>
10138    InvalidParameterValue(String),
10139}
10140
10141impl DecreaseNodeGroupsInGlobalReplicationGroupError {
10142    pub fn from_response(
10143        res: BufferedHttpResponse,
10144    ) -> RusotoError<DecreaseNodeGroupsInGlobalReplicationGroupError> {
10145        {
10146            let reader = EventReader::new(res.body.as_ref());
10147            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10148            find_start_element(&mut stack);
10149            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10150                match &parsed_error.code[..] {
10151                                    "GlobalReplicationGroupNotFoundFault" => return RusotoError::Service(DecreaseNodeGroupsInGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(parsed_error.message)),"InvalidGlobalReplicationGroupState" => return RusotoError::Service(DecreaseNodeGroupsInGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(parsed_error.message)),"InvalidParameterCombination" => return RusotoError::Service(DecreaseNodeGroupsInGlobalReplicationGroupError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(DecreaseNodeGroupsInGlobalReplicationGroupError::InvalidParameterValue(parsed_error.message)),_ => {}
10152                                }
10153            }
10154        }
10155        RusotoError::Unknown(res)
10156    }
10157
10158    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10159    where
10160        T: Peek + Next,
10161    {
10162        xml_util::start_element("ErrorResponse", stack)?;
10163        XmlErrorDeserializer::deserialize("Error", stack)
10164    }
10165}
10166impl fmt::Display for DecreaseNodeGroupsInGlobalReplicationGroupError {
10167    #[allow(unused_variables)]
10168    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10169        match *self {
10170                            DecreaseNodeGroupsInGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(ref cause) => write!(f, "{}", cause),
10171DecreaseNodeGroupsInGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(ref cause) => write!(f, "{}", cause),
10172DecreaseNodeGroupsInGlobalReplicationGroupError::InvalidParameterCombination(ref cause) => write!(f, "{}", cause),
10173DecreaseNodeGroupsInGlobalReplicationGroupError::InvalidParameterValue(ref cause) => write!(f, "{}", cause)
10174                        }
10175    }
10176}
10177impl Error for DecreaseNodeGroupsInGlobalReplicationGroupError {}
10178/// Errors returned by DecreaseReplicaCount
10179#[derive(Debug, PartialEq)]
10180pub enum DecreaseReplicaCountError {
10181    /// <p>The request cannot be processed because it would exceed the allowed number of clusters per customer.</p>
10182    ClusterQuotaForCustomerExceededFault(String),
10183    /// <p>The requested cache node type is not available in the specified Availability Zone. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY">InsufficientCacheClusterCapacity</a> in the ElastiCache User Guide.</p>
10184    InsufficientCacheClusterCapacityFault(String),
10185    /// <p>The requested cluster is not in the <code>available</code> state.</p>
10186    InvalidCacheClusterStateFault(String),
10187    /// <p>Two or more incompatible parameters were specified.</p>
10188    InvalidParameterCombination(String),
10189    /// <p>The value for a parameter is invalid.</p>
10190    InvalidParameterValue(String),
10191    /// <p>The requested replication group is not in the <code>available</code> state.</p>
10192    InvalidReplicationGroupStateFault(String),
10193    /// <p>The VPC network is in an invalid state.</p>
10194    InvalidVPCNetworkStateFault(String),
10195    /// <p>The operation was not performed because no changes were required.</p>
10196    NoOperationFault(String),
10197    /// <p>The request cannot be processed because it would exceed the maximum allowed number of node groups (shards) in a single replication group. The default maximum is 90</p>
10198    NodeGroupsPerReplicationGroupQuotaExceededFault(String),
10199    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes per customer.</p>
10200    NodeQuotaForCustomerExceededFault(String),
10201    /// <p>The specified replication group does not exist.</p>
10202    ReplicationGroupNotFoundFault(String),
10203    /// <p>The specified service linked role (SLR) was not found.</p>
10204    ServiceLinkedRoleNotFoundFault(String),
10205}
10206
10207impl DecreaseReplicaCountError {
10208    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DecreaseReplicaCountError> {
10209        {
10210            let reader = EventReader::new(res.body.as_ref());
10211            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10212            find_start_element(&mut stack);
10213            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10214                match &parsed_error.code[..] {
10215                    "ClusterQuotaForCustomerExceeded" => {
10216                        return RusotoError::Service(
10217                            DecreaseReplicaCountError::ClusterQuotaForCustomerExceededFault(
10218                                parsed_error.message,
10219                            ),
10220                        )
10221                    }
10222                    "InsufficientCacheClusterCapacity" => {
10223                        return RusotoError::Service(
10224                            DecreaseReplicaCountError::InsufficientCacheClusterCapacityFault(
10225                                parsed_error.message,
10226                            ),
10227                        )
10228                    }
10229                    "InvalidCacheClusterState" => {
10230                        return RusotoError::Service(
10231                            DecreaseReplicaCountError::InvalidCacheClusterStateFault(
10232                                parsed_error.message,
10233                            ),
10234                        )
10235                    }
10236                    "InvalidParameterCombination" => {
10237                        return RusotoError::Service(
10238                            DecreaseReplicaCountError::InvalidParameterCombination(
10239                                parsed_error.message,
10240                            ),
10241                        )
10242                    }
10243                    "InvalidParameterValue" => {
10244                        return RusotoError::Service(
10245                            DecreaseReplicaCountError::InvalidParameterValue(parsed_error.message),
10246                        )
10247                    }
10248                    "InvalidReplicationGroupState" => {
10249                        return RusotoError::Service(
10250                            DecreaseReplicaCountError::InvalidReplicationGroupStateFault(
10251                                parsed_error.message,
10252                            ),
10253                        )
10254                    }
10255                    "InvalidVPCNetworkStateFault" => {
10256                        return RusotoError::Service(
10257                            DecreaseReplicaCountError::InvalidVPCNetworkStateFault(
10258                                parsed_error.message,
10259                            ),
10260                        )
10261                    }
10262                    "NoOperationFault" => {
10263                        return RusotoError::Service(DecreaseReplicaCountError::NoOperationFault(
10264                            parsed_error.message,
10265                        ))
10266                    }
10267                    "NodeGroupsPerReplicationGroupQuotaExceeded" => return RusotoError::Service(
10268                        DecreaseReplicaCountError::NodeGroupsPerReplicationGroupQuotaExceededFault(
10269                            parsed_error.message,
10270                        ),
10271                    ),
10272                    "NodeQuotaForCustomerExceeded" => {
10273                        return RusotoError::Service(
10274                            DecreaseReplicaCountError::NodeQuotaForCustomerExceededFault(
10275                                parsed_error.message,
10276                            ),
10277                        )
10278                    }
10279                    "ReplicationGroupNotFoundFault" => {
10280                        return RusotoError::Service(
10281                            DecreaseReplicaCountError::ReplicationGroupNotFoundFault(
10282                                parsed_error.message,
10283                            ),
10284                        )
10285                    }
10286                    "ServiceLinkedRoleNotFoundFault" => {
10287                        return RusotoError::Service(
10288                            DecreaseReplicaCountError::ServiceLinkedRoleNotFoundFault(
10289                                parsed_error.message,
10290                            ),
10291                        )
10292                    }
10293                    _ => {}
10294                }
10295            }
10296        }
10297        RusotoError::Unknown(res)
10298    }
10299
10300    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10301    where
10302        T: Peek + Next,
10303    {
10304        xml_util::start_element("ErrorResponse", stack)?;
10305        XmlErrorDeserializer::deserialize("Error", stack)
10306    }
10307}
10308impl fmt::Display for DecreaseReplicaCountError {
10309    #[allow(unused_variables)]
10310    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10311        match *self {
10312            DecreaseReplicaCountError::ClusterQuotaForCustomerExceededFault(ref cause) => {
10313                write!(f, "{}", cause)
10314            }
10315            DecreaseReplicaCountError::InsufficientCacheClusterCapacityFault(ref cause) => {
10316                write!(f, "{}", cause)
10317            }
10318            DecreaseReplicaCountError::InvalidCacheClusterStateFault(ref cause) => {
10319                write!(f, "{}", cause)
10320            }
10321            DecreaseReplicaCountError::InvalidParameterCombination(ref cause) => {
10322                write!(f, "{}", cause)
10323            }
10324            DecreaseReplicaCountError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
10325            DecreaseReplicaCountError::InvalidReplicationGroupStateFault(ref cause) => {
10326                write!(f, "{}", cause)
10327            }
10328            DecreaseReplicaCountError::InvalidVPCNetworkStateFault(ref cause) => {
10329                write!(f, "{}", cause)
10330            }
10331            DecreaseReplicaCountError::NoOperationFault(ref cause) => write!(f, "{}", cause),
10332            DecreaseReplicaCountError::NodeGroupsPerReplicationGroupQuotaExceededFault(
10333                ref cause,
10334            ) => write!(f, "{}", cause),
10335            DecreaseReplicaCountError::NodeQuotaForCustomerExceededFault(ref cause) => {
10336                write!(f, "{}", cause)
10337            }
10338            DecreaseReplicaCountError::ReplicationGroupNotFoundFault(ref cause) => {
10339                write!(f, "{}", cause)
10340            }
10341            DecreaseReplicaCountError::ServiceLinkedRoleNotFoundFault(ref cause) => {
10342                write!(f, "{}", cause)
10343            }
10344        }
10345    }
10346}
10347impl Error for DecreaseReplicaCountError {}
10348/// Errors returned by DeleteCacheCluster
10349#[derive(Debug, PartialEq)]
10350pub enum DeleteCacheClusterError {
10351    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
10352    CacheClusterNotFoundFault(String),
10353    /// <p>The requested cluster is not in the <code>available</code> state.</p>
10354    InvalidCacheClusterStateFault(String),
10355    /// <p>Two or more incompatible parameters were specified.</p>
10356    InvalidParameterCombination(String),
10357    /// <p>The value for a parameter is invalid.</p>
10358    InvalidParameterValue(String),
10359    /// <p>You already have a snapshot with the given name.</p>
10360    SnapshotAlreadyExistsFault(String),
10361    /// <p>You attempted one of the following operations:</p> <ul> <li> <p>Creating a snapshot of a Redis cluster running on a <code>cache.t1.micro</code> cache node.</p> </li> <li> <p>Creating a snapshot of a cluster that is running Memcached rather than Redis.</p> </li> </ul> <p>Neither of these are supported by ElastiCache.</p>
10362    SnapshotFeatureNotSupportedFault(String),
10363    /// <p>The request cannot be processed because it would exceed the maximum number of snapshots.</p>
10364    SnapshotQuotaExceededFault(String),
10365}
10366
10367impl DeleteCacheClusterError {
10368    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCacheClusterError> {
10369        {
10370            let reader = EventReader::new(res.body.as_ref());
10371            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10372            find_start_element(&mut stack);
10373            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10374                match &parsed_error.code[..] {
10375                    "CacheClusterNotFound" => {
10376                        return RusotoError::Service(
10377                            DeleteCacheClusterError::CacheClusterNotFoundFault(
10378                                parsed_error.message,
10379                            ),
10380                        )
10381                    }
10382                    "InvalidCacheClusterState" => {
10383                        return RusotoError::Service(
10384                            DeleteCacheClusterError::InvalidCacheClusterStateFault(
10385                                parsed_error.message,
10386                            ),
10387                        )
10388                    }
10389                    "InvalidParameterCombination" => {
10390                        return RusotoError::Service(
10391                            DeleteCacheClusterError::InvalidParameterCombination(
10392                                parsed_error.message,
10393                            ),
10394                        )
10395                    }
10396                    "InvalidParameterValue" => {
10397                        return RusotoError::Service(
10398                            DeleteCacheClusterError::InvalidParameterValue(parsed_error.message),
10399                        )
10400                    }
10401                    "SnapshotAlreadyExistsFault" => {
10402                        return RusotoError::Service(
10403                            DeleteCacheClusterError::SnapshotAlreadyExistsFault(
10404                                parsed_error.message,
10405                            ),
10406                        )
10407                    }
10408                    "SnapshotFeatureNotSupportedFault" => {
10409                        return RusotoError::Service(
10410                            DeleteCacheClusterError::SnapshotFeatureNotSupportedFault(
10411                                parsed_error.message,
10412                            ),
10413                        )
10414                    }
10415                    "SnapshotQuotaExceededFault" => {
10416                        return RusotoError::Service(
10417                            DeleteCacheClusterError::SnapshotQuotaExceededFault(
10418                                parsed_error.message,
10419                            ),
10420                        )
10421                    }
10422                    _ => {}
10423                }
10424            }
10425        }
10426        RusotoError::Unknown(res)
10427    }
10428
10429    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10430    where
10431        T: Peek + Next,
10432    {
10433        xml_util::start_element("ErrorResponse", stack)?;
10434        XmlErrorDeserializer::deserialize("Error", stack)
10435    }
10436}
10437impl fmt::Display for DeleteCacheClusterError {
10438    #[allow(unused_variables)]
10439    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10440        match *self {
10441            DeleteCacheClusterError::CacheClusterNotFoundFault(ref cause) => write!(f, "{}", cause),
10442            DeleteCacheClusterError::InvalidCacheClusterStateFault(ref cause) => {
10443                write!(f, "{}", cause)
10444            }
10445            DeleteCacheClusterError::InvalidParameterCombination(ref cause) => {
10446                write!(f, "{}", cause)
10447            }
10448            DeleteCacheClusterError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
10449            DeleteCacheClusterError::SnapshotAlreadyExistsFault(ref cause) => {
10450                write!(f, "{}", cause)
10451            }
10452            DeleteCacheClusterError::SnapshotFeatureNotSupportedFault(ref cause) => {
10453                write!(f, "{}", cause)
10454            }
10455            DeleteCacheClusterError::SnapshotQuotaExceededFault(ref cause) => {
10456                write!(f, "{}", cause)
10457            }
10458        }
10459    }
10460}
10461impl Error for DeleteCacheClusterError {}
10462/// Errors returned by DeleteCacheParameterGroup
10463#[derive(Debug, PartialEq)]
10464pub enum DeleteCacheParameterGroupError {
10465    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
10466    CacheParameterGroupNotFoundFault(String),
10467    /// <p>The current state of the cache parameter group does not allow the requested operation to occur.</p>
10468    InvalidCacheParameterGroupStateFault(String),
10469    /// <p>Two or more incompatible parameters were specified.</p>
10470    InvalidParameterCombination(String),
10471    /// <p>The value for a parameter is invalid.</p>
10472    InvalidParameterValue(String),
10473}
10474
10475impl DeleteCacheParameterGroupError {
10476    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCacheParameterGroupError> {
10477        {
10478            let reader = EventReader::new(res.body.as_ref());
10479            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10480            find_start_element(&mut stack);
10481            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10482                match &parsed_error.code[..] {
10483                    "CacheParameterGroupNotFound" => {
10484                        return RusotoError::Service(
10485                            DeleteCacheParameterGroupError::CacheParameterGroupNotFoundFault(
10486                                parsed_error.message,
10487                            ),
10488                        )
10489                    }
10490                    "InvalidCacheParameterGroupState" => {
10491                        return RusotoError::Service(
10492                            DeleteCacheParameterGroupError::InvalidCacheParameterGroupStateFault(
10493                                parsed_error.message,
10494                            ),
10495                        )
10496                    }
10497                    "InvalidParameterCombination" => {
10498                        return RusotoError::Service(
10499                            DeleteCacheParameterGroupError::InvalidParameterCombination(
10500                                parsed_error.message,
10501                            ),
10502                        )
10503                    }
10504                    "InvalidParameterValue" => {
10505                        return RusotoError::Service(
10506                            DeleteCacheParameterGroupError::InvalidParameterValue(
10507                                parsed_error.message,
10508                            ),
10509                        )
10510                    }
10511                    _ => {}
10512                }
10513            }
10514        }
10515        RusotoError::Unknown(res)
10516    }
10517
10518    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10519    where
10520        T: Peek + Next,
10521    {
10522        xml_util::start_element("ErrorResponse", stack)?;
10523        XmlErrorDeserializer::deserialize("Error", stack)
10524    }
10525}
10526impl fmt::Display for DeleteCacheParameterGroupError {
10527    #[allow(unused_variables)]
10528    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10529        match *self {
10530            DeleteCacheParameterGroupError::CacheParameterGroupNotFoundFault(ref cause) => {
10531                write!(f, "{}", cause)
10532            }
10533            DeleteCacheParameterGroupError::InvalidCacheParameterGroupStateFault(ref cause) => {
10534                write!(f, "{}", cause)
10535            }
10536            DeleteCacheParameterGroupError::InvalidParameterCombination(ref cause) => {
10537                write!(f, "{}", cause)
10538            }
10539            DeleteCacheParameterGroupError::InvalidParameterValue(ref cause) => {
10540                write!(f, "{}", cause)
10541            }
10542        }
10543    }
10544}
10545impl Error for DeleteCacheParameterGroupError {}
10546/// Errors returned by DeleteCacheSecurityGroup
10547#[derive(Debug, PartialEq)]
10548pub enum DeleteCacheSecurityGroupError {
10549    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
10550    CacheSecurityGroupNotFoundFault(String),
10551    /// <p>The current state of the cache security group does not allow deletion.</p>
10552    InvalidCacheSecurityGroupStateFault(String),
10553    /// <p>Two or more incompatible parameters were specified.</p>
10554    InvalidParameterCombination(String),
10555    /// <p>The value for a parameter is invalid.</p>
10556    InvalidParameterValue(String),
10557}
10558
10559impl DeleteCacheSecurityGroupError {
10560    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCacheSecurityGroupError> {
10561        {
10562            let reader = EventReader::new(res.body.as_ref());
10563            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10564            find_start_element(&mut stack);
10565            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10566                match &parsed_error.code[..] {
10567                    "CacheSecurityGroupNotFound" => {
10568                        return RusotoError::Service(
10569                            DeleteCacheSecurityGroupError::CacheSecurityGroupNotFoundFault(
10570                                parsed_error.message,
10571                            ),
10572                        )
10573                    }
10574                    "InvalidCacheSecurityGroupState" => {
10575                        return RusotoError::Service(
10576                            DeleteCacheSecurityGroupError::InvalidCacheSecurityGroupStateFault(
10577                                parsed_error.message,
10578                            ),
10579                        )
10580                    }
10581                    "InvalidParameterCombination" => {
10582                        return RusotoError::Service(
10583                            DeleteCacheSecurityGroupError::InvalidParameterCombination(
10584                                parsed_error.message,
10585                            ),
10586                        )
10587                    }
10588                    "InvalidParameterValue" => {
10589                        return RusotoError::Service(
10590                            DeleteCacheSecurityGroupError::InvalidParameterValue(
10591                                parsed_error.message,
10592                            ),
10593                        )
10594                    }
10595                    _ => {}
10596                }
10597            }
10598        }
10599        RusotoError::Unknown(res)
10600    }
10601
10602    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10603    where
10604        T: Peek + Next,
10605    {
10606        xml_util::start_element("ErrorResponse", stack)?;
10607        XmlErrorDeserializer::deserialize("Error", stack)
10608    }
10609}
10610impl fmt::Display for DeleteCacheSecurityGroupError {
10611    #[allow(unused_variables)]
10612    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10613        match *self {
10614            DeleteCacheSecurityGroupError::CacheSecurityGroupNotFoundFault(ref cause) => {
10615                write!(f, "{}", cause)
10616            }
10617            DeleteCacheSecurityGroupError::InvalidCacheSecurityGroupStateFault(ref cause) => {
10618                write!(f, "{}", cause)
10619            }
10620            DeleteCacheSecurityGroupError::InvalidParameterCombination(ref cause) => {
10621                write!(f, "{}", cause)
10622            }
10623            DeleteCacheSecurityGroupError::InvalidParameterValue(ref cause) => {
10624                write!(f, "{}", cause)
10625            }
10626        }
10627    }
10628}
10629impl Error for DeleteCacheSecurityGroupError {}
10630/// Errors returned by DeleteCacheSubnetGroup
10631#[derive(Debug, PartialEq)]
10632pub enum DeleteCacheSubnetGroupError {
10633    /// <p>The requested cache subnet group is currently in use.</p>
10634    CacheSubnetGroupInUse(String),
10635    /// <p>The requested cache subnet group name does not refer to an existing cache subnet group.</p>
10636    CacheSubnetGroupNotFoundFault(String),
10637}
10638
10639impl DeleteCacheSubnetGroupError {
10640    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCacheSubnetGroupError> {
10641        {
10642            let reader = EventReader::new(res.body.as_ref());
10643            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10644            find_start_element(&mut stack);
10645            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10646                match &parsed_error.code[..] {
10647                    "CacheSubnetGroupInUse" => {
10648                        return RusotoError::Service(
10649                            DeleteCacheSubnetGroupError::CacheSubnetGroupInUse(
10650                                parsed_error.message,
10651                            ),
10652                        )
10653                    }
10654                    "CacheSubnetGroupNotFoundFault" => {
10655                        return RusotoError::Service(
10656                            DeleteCacheSubnetGroupError::CacheSubnetGroupNotFoundFault(
10657                                parsed_error.message,
10658                            ),
10659                        )
10660                    }
10661                    _ => {}
10662                }
10663            }
10664        }
10665        RusotoError::Unknown(res)
10666    }
10667
10668    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10669    where
10670        T: Peek + Next,
10671    {
10672        xml_util::start_element("ErrorResponse", stack)?;
10673        XmlErrorDeserializer::deserialize("Error", stack)
10674    }
10675}
10676impl fmt::Display for DeleteCacheSubnetGroupError {
10677    #[allow(unused_variables)]
10678    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10679        match *self {
10680            DeleteCacheSubnetGroupError::CacheSubnetGroupInUse(ref cause) => write!(f, "{}", cause),
10681            DeleteCacheSubnetGroupError::CacheSubnetGroupNotFoundFault(ref cause) => {
10682                write!(f, "{}", cause)
10683            }
10684        }
10685    }
10686}
10687impl Error for DeleteCacheSubnetGroupError {}
10688/// Errors returned by DeleteGlobalReplicationGroup
10689#[derive(Debug, PartialEq)]
10690pub enum DeleteGlobalReplicationGroupError {
10691    /// <p>The Global Datastore does not exist</p>
10692    GlobalReplicationGroupNotFoundFault(String),
10693    /// <p>The Global Datastore is not available or in primary-only state.</p>
10694    InvalidGlobalReplicationGroupStateFault(String),
10695    /// <p>The value for a parameter is invalid.</p>
10696    InvalidParameterValue(String),
10697}
10698
10699impl DeleteGlobalReplicationGroupError {
10700    pub fn from_response(
10701        res: BufferedHttpResponse,
10702    ) -> RusotoError<DeleteGlobalReplicationGroupError> {
10703        {
10704            let reader = EventReader::new(res.body.as_ref());
10705            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10706            find_start_element(&mut stack);
10707            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10708                match &parsed_error.code[..] {
10709                    "GlobalReplicationGroupNotFoundFault" => {
10710                        return RusotoError::Service(
10711                            DeleteGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(
10712                                parsed_error.message,
10713                            ),
10714                        )
10715                    }
10716                    "InvalidGlobalReplicationGroupState" => return RusotoError::Service(
10717                        DeleteGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(
10718                            parsed_error.message,
10719                        ),
10720                    ),
10721                    "InvalidParameterValue" => {
10722                        return RusotoError::Service(
10723                            DeleteGlobalReplicationGroupError::InvalidParameterValue(
10724                                parsed_error.message,
10725                            ),
10726                        )
10727                    }
10728                    _ => {}
10729                }
10730            }
10731        }
10732        RusotoError::Unknown(res)
10733    }
10734
10735    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10736    where
10737        T: Peek + Next,
10738    {
10739        xml_util::start_element("ErrorResponse", stack)?;
10740        XmlErrorDeserializer::deserialize("Error", stack)
10741    }
10742}
10743impl fmt::Display for DeleteGlobalReplicationGroupError {
10744    #[allow(unused_variables)]
10745    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10746        match *self {
10747            DeleteGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(ref cause) => {
10748                write!(f, "{}", cause)
10749            }
10750            DeleteGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(
10751                ref cause,
10752            ) => write!(f, "{}", cause),
10753            DeleteGlobalReplicationGroupError::InvalidParameterValue(ref cause) => {
10754                write!(f, "{}", cause)
10755            }
10756        }
10757    }
10758}
10759impl Error for DeleteGlobalReplicationGroupError {}
10760/// Errors returned by DeleteReplicationGroup
10761#[derive(Debug, PartialEq)]
10762pub enum DeleteReplicationGroupError {
10763    /// <p>Two or more incompatible parameters were specified.</p>
10764    InvalidParameterCombination(String),
10765    /// <p>The value for a parameter is invalid.</p>
10766    InvalidParameterValue(String),
10767    /// <p>The requested replication group is not in the <code>available</code> state.</p>
10768    InvalidReplicationGroupStateFault(String),
10769    /// <p>The specified replication group does not exist.</p>
10770    ReplicationGroupNotFoundFault(String),
10771    /// <p>You already have a snapshot with the given name.</p>
10772    SnapshotAlreadyExistsFault(String),
10773    /// <p>You attempted one of the following operations:</p> <ul> <li> <p>Creating a snapshot of a Redis cluster running on a <code>cache.t1.micro</code> cache node.</p> </li> <li> <p>Creating a snapshot of a cluster that is running Memcached rather than Redis.</p> </li> </ul> <p>Neither of these are supported by ElastiCache.</p>
10774    SnapshotFeatureNotSupportedFault(String),
10775    /// <p>The request cannot be processed because it would exceed the maximum number of snapshots.</p>
10776    SnapshotQuotaExceededFault(String),
10777}
10778
10779impl DeleteReplicationGroupError {
10780    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReplicationGroupError> {
10781        {
10782            let reader = EventReader::new(res.body.as_ref());
10783            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10784            find_start_element(&mut stack);
10785            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10786                match &parsed_error.code[..] {
10787                    "InvalidParameterCombination" => {
10788                        return RusotoError::Service(
10789                            DeleteReplicationGroupError::InvalidParameterCombination(
10790                                parsed_error.message,
10791                            ),
10792                        )
10793                    }
10794                    "InvalidParameterValue" => {
10795                        return RusotoError::Service(
10796                            DeleteReplicationGroupError::InvalidParameterValue(
10797                                parsed_error.message,
10798                            ),
10799                        )
10800                    }
10801                    "InvalidReplicationGroupState" => {
10802                        return RusotoError::Service(
10803                            DeleteReplicationGroupError::InvalidReplicationGroupStateFault(
10804                                parsed_error.message,
10805                            ),
10806                        )
10807                    }
10808                    "ReplicationGroupNotFoundFault" => {
10809                        return RusotoError::Service(
10810                            DeleteReplicationGroupError::ReplicationGroupNotFoundFault(
10811                                parsed_error.message,
10812                            ),
10813                        )
10814                    }
10815                    "SnapshotAlreadyExistsFault" => {
10816                        return RusotoError::Service(
10817                            DeleteReplicationGroupError::SnapshotAlreadyExistsFault(
10818                                parsed_error.message,
10819                            ),
10820                        )
10821                    }
10822                    "SnapshotFeatureNotSupportedFault" => {
10823                        return RusotoError::Service(
10824                            DeleteReplicationGroupError::SnapshotFeatureNotSupportedFault(
10825                                parsed_error.message,
10826                            ),
10827                        )
10828                    }
10829                    "SnapshotQuotaExceededFault" => {
10830                        return RusotoError::Service(
10831                            DeleteReplicationGroupError::SnapshotQuotaExceededFault(
10832                                parsed_error.message,
10833                            ),
10834                        )
10835                    }
10836                    _ => {}
10837                }
10838            }
10839        }
10840        RusotoError::Unknown(res)
10841    }
10842
10843    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10844    where
10845        T: Peek + Next,
10846    {
10847        xml_util::start_element("ErrorResponse", stack)?;
10848        XmlErrorDeserializer::deserialize("Error", stack)
10849    }
10850}
10851impl fmt::Display for DeleteReplicationGroupError {
10852    #[allow(unused_variables)]
10853    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10854        match *self {
10855            DeleteReplicationGroupError::InvalidParameterCombination(ref cause) => {
10856                write!(f, "{}", cause)
10857            }
10858            DeleteReplicationGroupError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
10859            DeleteReplicationGroupError::InvalidReplicationGroupStateFault(ref cause) => {
10860                write!(f, "{}", cause)
10861            }
10862            DeleteReplicationGroupError::ReplicationGroupNotFoundFault(ref cause) => {
10863                write!(f, "{}", cause)
10864            }
10865            DeleteReplicationGroupError::SnapshotAlreadyExistsFault(ref cause) => {
10866                write!(f, "{}", cause)
10867            }
10868            DeleteReplicationGroupError::SnapshotFeatureNotSupportedFault(ref cause) => {
10869                write!(f, "{}", cause)
10870            }
10871            DeleteReplicationGroupError::SnapshotQuotaExceededFault(ref cause) => {
10872                write!(f, "{}", cause)
10873            }
10874        }
10875    }
10876}
10877impl Error for DeleteReplicationGroupError {}
10878/// Errors returned by DeleteSnapshot
10879#[derive(Debug, PartialEq)]
10880pub enum DeleteSnapshotError {
10881    /// <p>Two or more incompatible parameters were specified.</p>
10882    InvalidParameterCombination(String),
10883    /// <p>The value for a parameter is invalid.</p>
10884    InvalidParameterValue(String),
10885    /// <p>The current state of the snapshot does not allow the requested operation to occur.</p>
10886    InvalidSnapshotStateFault(String),
10887    /// <p>The requested snapshot name does not refer to an existing snapshot.</p>
10888    SnapshotNotFoundFault(String),
10889}
10890
10891impl DeleteSnapshotError {
10892    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSnapshotError> {
10893        {
10894            let reader = EventReader::new(res.body.as_ref());
10895            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10896            find_start_element(&mut stack);
10897            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10898                match &parsed_error.code[..] {
10899                    "InvalidParameterCombination" => {
10900                        return RusotoError::Service(
10901                            DeleteSnapshotError::InvalidParameterCombination(parsed_error.message),
10902                        )
10903                    }
10904                    "InvalidParameterValue" => {
10905                        return RusotoError::Service(DeleteSnapshotError::InvalidParameterValue(
10906                            parsed_error.message,
10907                        ))
10908                    }
10909                    "InvalidSnapshotState" => {
10910                        return RusotoError::Service(
10911                            DeleteSnapshotError::InvalidSnapshotStateFault(parsed_error.message),
10912                        )
10913                    }
10914                    "SnapshotNotFoundFault" => {
10915                        return RusotoError::Service(DeleteSnapshotError::SnapshotNotFoundFault(
10916                            parsed_error.message,
10917                        ))
10918                    }
10919                    _ => {}
10920                }
10921            }
10922        }
10923        RusotoError::Unknown(res)
10924    }
10925
10926    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10927    where
10928        T: Peek + Next,
10929    {
10930        xml_util::start_element("ErrorResponse", stack)?;
10931        XmlErrorDeserializer::deserialize("Error", stack)
10932    }
10933}
10934impl fmt::Display for DeleteSnapshotError {
10935    #[allow(unused_variables)]
10936    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10937        match *self {
10938            DeleteSnapshotError::InvalidParameterCombination(ref cause) => write!(f, "{}", cause),
10939            DeleteSnapshotError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
10940            DeleteSnapshotError::InvalidSnapshotStateFault(ref cause) => write!(f, "{}", cause),
10941            DeleteSnapshotError::SnapshotNotFoundFault(ref cause) => write!(f, "{}", cause),
10942        }
10943    }
10944}
10945impl Error for DeleteSnapshotError {}
10946/// Errors returned by DescribeCacheClusters
10947#[derive(Debug, PartialEq)]
10948pub enum DescribeCacheClustersError {
10949    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
10950    CacheClusterNotFoundFault(String),
10951    /// <p>Two or more incompatible parameters were specified.</p>
10952    InvalidParameterCombination(String),
10953    /// <p>The value for a parameter is invalid.</p>
10954    InvalidParameterValue(String),
10955}
10956
10957impl DescribeCacheClustersError {
10958    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCacheClustersError> {
10959        {
10960            let reader = EventReader::new(res.body.as_ref());
10961            let mut stack = XmlResponse::new(reader.into_iter().peekable());
10962            find_start_element(&mut stack);
10963            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
10964                match &parsed_error.code[..] {
10965                    "CacheClusterNotFound" => {
10966                        return RusotoError::Service(
10967                            DescribeCacheClustersError::CacheClusterNotFoundFault(
10968                                parsed_error.message,
10969                            ),
10970                        )
10971                    }
10972                    "InvalidParameterCombination" => {
10973                        return RusotoError::Service(
10974                            DescribeCacheClustersError::InvalidParameterCombination(
10975                                parsed_error.message,
10976                            ),
10977                        )
10978                    }
10979                    "InvalidParameterValue" => {
10980                        return RusotoError::Service(
10981                            DescribeCacheClustersError::InvalidParameterValue(parsed_error.message),
10982                        )
10983                    }
10984                    _ => {}
10985                }
10986            }
10987        }
10988        RusotoError::Unknown(res)
10989    }
10990
10991    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
10992    where
10993        T: Peek + Next,
10994    {
10995        xml_util::start_element("ErrorResponse", stack)?;
10996        XmlErrorDeserializer::deserialize("Error", stack)
10997    }
10998}
10999impl fmt::Display for DescribeCacheClustersError {
11000    #[allow(unused_variables)]
11001    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11002        match *self {
11003            DescribeCacheClustersError::CacheClusterNotFoundFault(ref cause) => {
11004                write!(f, "{}", cause)
11005            }
11006            DescribeCacheClustersError::InvalidParameterCombination(ref cause) => {
11007                write!(f, "{}", cause)
11008            }
11009            DescribeCacheClustersError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
11010        }
11011    }
11012}
11013impl Error for DescribeCacheClustersError {}
11014/// Errors returned by DescribeCacheEngineVersions
11015#[derive(Debug, PartialEq)]
11016pub enum DescribeCacheEngineVersionsError {}
11017
11018impl DescribeCacheEngineVersionsError {
11019    pub fn from_response(
11020        res: BufferedHttpResponse,
11021    ) -> RusotoError<DescribeCacheEngineVersionsError> {
11022        {
11023            let reader = EventReader::new(res.body.as_ref());
11024            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11025            find_start_element(&mut stack);
11026            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11027                match &parsed_error.code[..] {
11028                    _ => {}
11029                }
11030            }
11031        }
11032        RusotoError::Unknown(res)
11033    }
11034
11035    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11036    where
11037        T: Peek + Next,
11038    {
11039        xml_util::start_element("ErrorResponse", stack)?;
11040        XmlErrorDeserializer::deserialize("Error", stack)
11041    }
11042}
11043impl fmt::Display for DescribeCacheEngineVersionsError {
11044    #[allow(unused_variables)]
11045    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11046        match *self {}
11047    }
11048}
11049impl Error for DescribeCacheEngineVersionsError {}
11050/// Errors returned by DescribeCacheParameterGroups
11051#[derive(Debug, PartialEq)]
11052pub enum DescribeCacheParameterGroupsError {
11053    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
11054    CacheParameterGroupNotFoundFault(String),
11055    /// <p>Two or more incompatible parameters were specified.</p>
11056    InvalidParameterCombination(String),
11057    /// <p>The value for a parameter is invalid.</p>
11058    InvalidParameterValue(String),
11059}
11060
11061impl DescribeCacheParameterGroupsError {
11062    pub fn from_response(
11063        res: BufferedHttpResponse,
11064    ) -> RusotoError<DescribeCacheParameterGroupsError> {
11065        {
11066            let reader = EventReader::new(res.body.as_ref());
11067            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11068            find_start_element(&mut stack);
11069            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11070                match &parsed_error.code[..] {
11071                    "CacheParameterGroupNotFound" => {
11072                        return RusotoError::Service(
11073                            DescribeCacheParameterGroupsError::CacheParameterGroupNotFoundFault(
11074                                parsed_error.message,
11075                            ),
11076                        )
11077                    }
11078                    "InvalidParameterCombination" => {
11079                        return RusotoError::Service(
11080                            DescribeCacheParameterGroupsError::InvalidParameterCombination(
11081                                parsed_error.message,
11082                            ),
11083                        )
11084                    }
11085                    "InvalidParameterValue" => {
11086                        return RusotoError::Service(
11087                            DescribeCacheParameterGroupsError::InvalidParameterValue(
11088                                parsed_error.message,
11089                            ),
11090                        )
11091                    }
11092                    _ => {}
11093                }
11094            }
11095        }
11096        RusotoError::Unknown(res)
11097    }
11098
11099    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11100    where
11101        T: Peek + Next,
11102    {
11103        xml_util::start_element("ErrorResponse", stack)?;
11104        XmlErrorDeserializer::deserialize("Error", stack)
11105    }
11106}
11107impl fmt::Display for DescribeCacheParameterGroupsError {
11108    #[allow(unused_variables)]
11109    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11110        match *self {
11111            DescribeCacheParameterGroupsError::CacheParameterGroupNotFoundFault(ref cause) => {
11112                write!(f, "{}", cause)
11113            }
11114            DescribeCacheParameterGroupsError::InvalidParameterCombination(ref cause) => {
11115                write!(f, "{}", cause)
11116            }
11117            DescribeCacheParameterGroupsError::InvalidParameterValue(ref cause) => {
11118                write!(f, "{}", cause)
11119            }
11120        }
11121    }
11122}
11123impl Error for DescribeCacheParameterGroupsError {}
11124/// Errors returned by DescribeCacheParameters
11125#[derive(Debug, PartialEq)]
11126pub enum DescribeCacheParametersError {
11127    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
11128    CacheParameterGroupNotFoundFault(String),
11129    /// <p>Two or more incompatible parameters were specified.</p>
11130    InvalidParameterCombination(String),
11131    /// <p>The value for a parameter is invalid.</p>
11132    InvalidParameterValue(String),
11133}
11134
11135impl DescribeCacheParametersError {
11136    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCacheParametersError> {
11137        {
11138            let reader = EventReader::new(res.body.as_ref());
11139            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11140            find_start_element(&mut stack);
11141            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11142                match &parsed_error.code[..] {
11143                    "CacheParameterGroupNotFound" => {
11144                        return RusotoError::Service(
11145                            DescribeCacheParametersError::CacheParameterGroupNotFoundFault(
11146                                parsed_error.message,
11147                            ),
11148                        )
11149                    }
11150                    "InvalidParameterCombination" => {
11151                        return RusotoError::Service(
11152                            DescribeCacheParametersError::InvalidParameterCombination(
11153                                parsed_error.message,
11154                            ),
11155                        )
11156                    }
11157                    "InvalidParameterValue" => {
11158                        return RusotoError::Service(
11159                            DescribeCacheParametersError::InvalidParameterValue(
11160                                parsed_error.message,
11161                            ),
11162                        )
11163                    }
11164                    _ => {}
11165                }
11166            }
11167        }
11168        RusotoError::Unknown(res)
11169    }
11170
11171    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11172    where
11173        T: Peek + Next,
11174    {
11175        xml_util::start_element("ErrorResponse", stack)?;
11176        XmlErrorDeserializer::deserialize("Error", stack)
11177    }
11178}
11179impl fmt::Display for DescribeCacheParametersError {
11180    #[allow(unused_variables)]
11181    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11182        match *self {
11183            DescribeCacheParametersError::CacheParameterGroupNotFoundFault(ref cause) => {
11184                write!(f, "{}", cause)
11185            }
11186            DescribeCacheParametersError::InvalidParameterCombination(ref cause) => {
11187                write!(f, "{}", cause)
11188            }
11189            DescribeCacheParametersError::InvalidParameterValue(ref cause) => {
11190                write!(f, "{}", cause)
11191            }
11192        }
11193    }
11194}
11195impl Error for DescribeCacheParametersError {}
11196/// Errors returned by DescribeCacheSecurityGroups
11197#[derive(Debug, PartialEq)]
11198pub enum DescribeCacheSecurityGroupsError {
11199    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
11200    CacheSecurityGroupNotFoundFault(String),
11201    /// <p>Two or more incompatible parameters were specified.</p>
11202    InvalidParameterCombination(String),
11203    /// <p>The value for a parameter is invalid.</p>
11204    InvalidParameterValue(String),
11205}
11206
11207impl DescribeCacheSecurityGroupsError {
11208    pub fn from_response(
11209        res: BufferedHttpResponse,
11210    ) -> RusotoError<DescribeCacheSecurityGroupsError> {
11211        {
11212            let reader = EventReader::new(res.body.as_ref());
11213            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11214            find_start_element(&mut stack);
11215            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11216                match &parsed_error.code[..] {
11217                    "CacheSecurityGroupNotFound" => {
11218                        return RusotoError::Service(
11219                            DescribeCacheSecurityGroupsError::CacheSecurityGroupNotFoundFault(
11220                                parsed_error.message,
11221                            ),
11222                        )
11223                    }
11224                    "InvalidParameterCombination" => {
11225                        return RusotoError::Service(
11226                            DescribeCacheSecurityGroupsError::InvalidParameterCombination(
11227                                parsed_error.message,
11228                            ),
11229                        )
11230                    }
11231                    "InvalidParameterValue" => {
11232                        return RusotoError::Service(
11233                            DescribeCacheSecurityGroupsError::InvalidParameterValue(
11234                                parsed_error.message,
11235                            ),
11236                        )
11237                    }
11238                    _ => {}
11239                }
11240            }
11241        }
11242        RusotoError::Unknown(res)
11243    }
11244
11245    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11246    where
11247        T: Peek + Next,
11248    {
11249        xml_util::start_element("ErrorResponse", stack)?;
11250        XmlErrorDeserializer::deserialize("Error", stack)
11251    }
11252}
11253impl fmt::Display for DescribeCacheSecurityGroupsError {
11254    #[allow(unused_variables)]
11255    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11256        match *self {
11257            DescribeCacheSecurityGroupsError::CacheSecurityGroupNotFoundFault(ref cause) => {
11258                write!(f, "{}", cause)
11259            }
11260            DescribeCacheSecurityGroupsError::InvalidParameterCombination(ref cause) => {
11261                write!(f, "{}", cause)
11262            }
11263            DescribeCacheSecurityGroupsError::InvalidParameterValue(ref cause) => {
11264                write!(f, "{}", cause)
11265            }
11266        }
11267    }
11268}
11269impl Error for DescribeCacheSecurityGroupsError {}
11270/// Errors returned by DescribeCacheSubnetGroups
11271#[derive(Debug, PartialEq)]
11272pub enum DescribeCacheSubnetGroupsError {
11273    /// <p>The requested cache subnet group name does not refer to an existing cache subnet group.</p>
11274    CacheSubnetGroupNotFoundFault(String),
11275}
11276
11277impl DescribeCacheSubnetGroupsError {
11278    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCacheSubnetGroupsError> {
11279        {
11280            let reader = EventReader::new(res.body.as_ref());
11281            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11282            find_start_element(&mut stack);
11283            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11284                match &parsed_error.code[..] {
11285                    "CacheSubnetGroupNotFoundFault" => {
11286                        return RusotoError::Service(
11287                            DescribeCacheSubnetGroupsError::CacheSubnetGroupNotFoundFault(
11288                                parsed_error.message,
11289                            ),
11290                        )
11291                    }
11292                    _ => {}
11293                }
11294            }
11295        }
11296        RusotoError::Unknown(res)
11297    }
11298
11299    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11300    where
11301        T: Peek + Next,
11302    {
11303        xml_util::start_element("ErrorResponse", stack)?;
11304        XmlErrorDeserializer::deserialize("Error", stack)
11305    }
11306}
11307impl fmt::Display for DescribeCacheSubnetGroupsError {
11308    #[allow(unused_variables)]
11309    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11310        match *self {
11311            DescribeCacheSubnetGroupsError::CacheSubnetGroupNotFoundFault(ref cause) => {
11312                write!(f, "{}", cause)
11313            }
11314        }
11315    }
11316}
11317impl Error for DescribeCacheSubnetGroupsError {}
11318/// Errors returned by DescribeEngineDefaultParameters
11319#[derive(Debug, PartialEq)]
11320pub enum DescribeEngineDefaultParametersError {
11321    /// <p>Two or more incompatible parameters were specified.</p>
11322    InvalidParameterCombination(String),
11323    /// <p>The value for a parameter is invalid.</p>
11324    InvalidParameterValue(String),
11325}
11326
11327impl DescribeEngineDefaultParametersError {
11328    pub fn from_response(
11329        res: BufferedHttpResponse,
11330    ) -> RusotoError<DescribeEngineDefaultParametersError> {
11331        {
11332            let reader = EventReader::new(res.body.as_ref());
11333            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11334            find_start_element(&mut stack);
11335            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11336                match &parsed_error.code[..] {
11337                    "InvalidParameterCombination" => {
11338                        return RusotoError::Service(
11339                            DescribeEngineDefaultParametersError::InvalidParameterCombination(
11340                                parsed_error.message,
11341                            ),
11342                        )
11343                    }
11344                    "InvalidParameterValue" => {
11345                        return RusotoError::Service(
11346                            DescribeEngineDefaultParametersError::InvalidParameterValue(
11347                                parsed_error.message,
11348                            ),
11349                        )
11350                    }
11351                    _ => {}
11352                }
11353            }
11354        }
11355        RusotoError::Unknown(res)
11356    }
11357
11358    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11359    where
11360        T: Peek + Next,
11361    {
11362        xml_util::start_element("ErrorResponse", stack)?;
11363        XmlErrorDeserializer::deserialize("Error", stack)
11364    }
11365}
11366impl fmt::Display for DescribeEngineDefaultParametersError {
11367    #[allow(unused_variables)]
11368    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11369        match *self {
11370            DescribeEngineDefaultParametersError::InvalidParameterCombination(ref cause) => {
11371                write!(f, "{}", cause)
11372            }
11373            DescribeEngineDefaultParametersError::InvalidParameterValue(ref cause) => {
11374                write!(f, "{}", cause)
11375            }
11376        }
11377    }
11378}
11379impl Error for DescribeEngineDefaultParametersError {}
11380/// Errors returned by DescribeEvents
11381#[derive(Debug, PartialEq)]
11382pub enum DescribeEventsError {
11383    /// <p>Two or more incompatible parameters were specified.</p>
11384    InvalidParameterCombination(String),
11385    /// <p>The value for a parameter is invalid.</p>
11386    InvalidParameterValue(String),
11387}
11388
11389impl DescribeEventsError {
11390    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEventsError> {
11391        {
11392            let reader = EventReader::new(res.body.as_ref());
11393            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11394            find_start_element(&mut stack);
11395            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11396                match &parsed_error.code[..] {
11397                    "InvalidParameterCombination" => {
11398                        return RusotoError::Service(
11399                            DescribeEventsError::InvalidParameterCombination(parsed_error.message),
11400                        )
11401                    }
11402                    "InvalidParameterValue" => {
11403                        return RusotoError::Service(DescribeEventsError::InvalidParameterValue(
11404                            parsed_error.message,
11405                        ))
11406                    }
11407                    _ => {}
11408                }
11409            }
11410        }
11411        RusotoError::Unknown(res)
11412    }
11413
11414    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11415    where
11416        T: Peek + Next,
11417    {
11418        xml_util::start_element("ErrorResponse", stack)?;
11419        XmlErrorDeserializer::deserialize("Error", stack)
11420    }
11421}
11422impl fmt::Display for DescribeEventsError {
11423    #[allow(unused_variables)]
11424    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11425        match *self {
11426            DescribeEventsError::InvalidParameterCombination(ref cause) => write!(f, "{}", cause),
11427            DescribeEventsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
11428        }
11429    }
11430}
11431impl Error for DescribeEventsError {}
11432/// Errors returned by DescribeGlobalReplicationGroups
11433#[derive(Debug, PartialEq)]
11434pub enum DescribeGlobalReplicationGroupsError {
11435    /// <p>The Global Datastore does not exist</p>
11436    GlobalReplicationGroupNotFoundFault(String),
11437    /// <p>Two or more incompatible parameters were specified.</p>
11438    InvalidParameterCombination(String),
11439    /// <p>The value for a parameter is invalid.</p>
11440    InvalidParameterValue(String),
11441}
11442
11443impl DescribeGlobalReplicationGroupsError {
11444    pub fn from_response(
11445        res: BufferedHttpResponse,
11446    ) -> RusotoError<DescribeGlobalReplicationGroupsError> {
11447        {
11448            let reader = EventReader::new(res.body.as_ref());
11449            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11450            find_start_element(&mut stack);
11451            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11452                match &parsed_error.code[..] {
11453                    "GlobalReplicationGroupNotFoundFault" => return RusotoError::Service(
11454                        DescribeGlobalReplicationGroupsError::GlobalReplicationGroupNotFoundFault(
11455                            parsed_error.message,
11456                        ),
11457                    ),
11458                    "InvalidParameterCombination" => {
11459                        return RusotoError::Service(
11460                            DescribeGlobalReplicationGroupsError::InvalidParameterCombination(
11461                                parsed_error.message,
11462                            ),
11463                        )
11464                    }
11465                    "InvalidParameterValue" => {
11466                        return RusotoError::Service(
11467                            DescribeGlobalReplicationGroupsError::InvalidParameterValue(
11468                                parsed_error.message,
11469                            ),
11470                        )
11471                    }
11472                    _ => {}
11473                }
11474            }
11475        }
11476        RusotoError::Unknown(res)
11477    }
11478
11479    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11480    where
11481        T: Peek + Next,
11482    {
11483        xml_util::start_element("ErrorResponse", stack)?;
11484        XmlErrorDeserializer::deserialize("Error", stack)
11485    }
11486}
11487impl fmt::Display for DescribeGlobalReplicationGroupsError {
11488    #[allow(unused_variables)]
11489    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11490        match *self {
11491            DescribeGlobalReplicationGroupsError::GlobalReplicationGroupNotFoundFault(
11492                ref cause,
11493            ) => write!(f, "{}", cause),
11494            DescribeGlobalReplicationGroupsError::InvalidParameterCombination(ref cause) => {
11495                write!(f, "{}", cause)
11496            }
11497            DescribeGlobalReplicationGroupsError::InvalidParameterValue(ref cause) => {
11498                write!(f, "{}", cause)
11499            }
11500        }
11501    }
11502}
11503impl Error for DescribeGlobalReplicationGroupsError {}
11504/// Errors returned by DescribeReplicationGroups
11505#[derive(Debug, PartialEq)]
11506pub enum DescribeReplicationGroupsError {
11507    /// <p>Two or more incompatible parameters were specified.</p>
11508    InvalidParameterCombination(String),
11509    /// <p>The value for a parameter is invalid.</p>
11510    InvalidParameterValue(String),
11511    /// <p>The specified replication group does not exist.</p>
11512    ReplicationGroupNotFoundFault(String),
11513}
11514
11515impl DescribeReplicationGroupsError {
11516    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeReplicationGroupsError> {
11517        {
11518            let reader = EventReader::new(res.body.as_ref());
11519            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11520            find_start_element(&mut stack);
11521            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11522                match &parsed_error.code[..] {
11523                    "InvalidParameterCombination" => {
11524                        return RusotoError::Service(
11525                            DescribeReplicationGroupsError::InvalidParameterCombination(
11526                                parsed_error.message,
11527                            ),
11528                        )
11529                    }
11530                    "InvalidParameterValue" => {
11531                        return RusotoError::Service(
11532                            DescribeReplicationGroupsError::InvalidParameterValue(
11533                                parsed_error.message,
11534                            ),
11535                        )
11536                    }
11537                    "ReplicationGroupNotFoundFault" => {
11538                        return RusotoError::Service(
11539                            DescribeReplicationGroupsError::ReplicationGroupNotFoundFault(
11540                                parsed_error.message,
11541                            ),
11542                        )
11543                    }
11544                    _ => {}
11545                }
11546            }
11547        }
11548        RusotoError::Unknown(res)
11549    }
11550
11551    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11552    where
11553        T: Peek + Next,
11554    {
11555        xml_util::start_element("ErrorResponse", stack)?;
11556        XmlErrorDeserializer::deserialize("Error", stack)
11557    }
11558}
11559impl fmt::Display for DescribeReplicationGroupsError {
11560    #[allow(unused_variables)]
11561    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11562        match *self {
11563            DescribeReplicationGroupsError::InvalidParameterCombination(ref cause) => {
11564                write!(f, "{}", cause)
11565            }
11566            DescribeReplicationGroupsError::InvalidParameterValue(ref cause) => {
11567                write!(f, "{}", cause)
11568            }
11569            DescribeReplicationGroupsError::ReplicationGroupNotFoundFault(ref cause) => {
11570                write!(f, "{}", cause)
11571            }
11572        }
11573    }
11574}
11575impl Error for DescribeReplicationGroupsError {}
11576/// Errors returned by DescribeReservedCacheNodes
11577#[derive(Debug, PartialEq)]
11578pub enum DescribeReservedCacheNodesError {
11579    /// <p>Two or more incompatible parameters were specified.</p>
11580    InvalidParameterCombination(String),
11581    /// <p>The value for a parameter is invalid.</p>
11582    InvalidParameterValue(String),
11583    /// <p>The requested reserved cache node was not found.</p>
11584    ReservedCacheNodeNotFoundFault(String),
11585}
11586
11587impl DescribeReservedCacheNodesError {
11588    pub fn from_response(
11589        res: BufferedHttpResponse,
11590    ) -> RusotoError<DescribeReservedCacheNodesError> {
11591        {
11592            let reader = EventReader::new(res.body.as_ref());
11593            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11594            find_start_element(&mut stack);
11595            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11596                match &parsed_error.code[..] {
11597                    "InvalidParameterCombination" => {
11598                        return RusotoError::Service(
11599                            DescribeReservedCacheNodesError::InvalidParameterCombination(
11600                                parsed_error.message,
11601                            ),
11602                        )
11603                    }
11604                    "InvalidParameterValue" => {
11605                        return RusotoError::Service(
11606                            DescribeReservedCacheNodesError::InvalidParameterValue(
11607                                parsed_error.message,
11608                            ),
11609                        )
11610                    }
11611                    "ReservedCacheNodeNotFound" => {
11612                        return RusotoError::Service(
11613                            DescribeReservedCacheNodesError::ReservedCacheNodeNotFoundFault(
11614                                parsed_error.message,
11615                            ),
11616                        )
11617                    }
11618                    _ => {}
11619                }
11620            }
11621        }
11622        RusotoError::Unknown(res)
11623    }
11624
11625    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11626    where
11627        T: Peek + Next,
11628    {
11629        xml_util::start_element("ErrorResponse", stack)?;
11630        XmlErrorDeserializer::deserialize("Error", stack)
11631    }
11632}
11633impl fmt::Display for DescribeReservedCacheNodesError {
11634    #[allow(unused_variables)]
11635    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11636        match *self {
11637            DescribeReservedCacheNodesError::InvalidParameterCombination(ref cause) => {
11638                write!(f, "{}", cause)
11639            }
11640            DescribeReservedCacheNodesError::InvalidParameterValue(ref cause) => {
11641                write!(f, "{}", cause)
11642            }
11643            DescribeReservedCacheNodesError::ReservedCacheNodeNotFoundFault(ref cause) => {
11644                write!(f, "{}", cause)
11645            }
11646        }
11647    }
11648}
11649impl Error for DescribeReservedCacheNodesError {}
11650/// Errors returned by DescribeReservedCacheNodesOfferings
11651#[derive(Debug, PartialEq)]
11652pub enum DescribeReservedCacheNodesOfferingsError {
11653    /// <p>Two or more incompatible parameters were specified.</p>
11654    InvalidParameterCombination(String),
11655    /// <p>The value for a parameter is invalid.</p>
11656    InvalidParameterValue(String),
11657    /// <p>The requested cache node offering does not exist.</p>
11658    ReservedCacheNodesOfferingNotFoundFault(String),
11659}
11660
11661impl DescribeReservedCacheNodesOfferingsError {
11662    pub fn from_response(
11663        res: BufferedHttpResponse,
11664    ) -> RusotoError<DescribeReservedCacheNodesOfferingsError> {
11665        {
11666            let reader = EventReader::new(res.body.as_ref());
11667            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11668            find_start_element(&mut stack);
11669            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11670                match &parsed_error.code[..] {
11671                                    "InvalidParameterCombination" => return RusotoError::Service(DescribeReservedCacheNodesOfferingsError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(DescribeReservedCacheNodesOfferingsError::InvalidParameterValue(parsed_error.message)),"ReservedCacheNodesOfferingNotFound" => return RusotoError::Service(DescribeReservedCacheNodesOfferingsError::ReservedCacheNodesOfferingNotFoundFault(parsed_error.message)),_ => {}
11672                                }
11673            }
11674        }
11675        RusotoError::Unknown(res)
11676    }
11677
11678    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11679    where
11680        T: Peek + Next,
11681    {
11682        xml_util::start_element("ErrorResponse", stack)?;
11683        XmlErrorDeserializer::deserialize("Error", stack)
11684    }
11685}
11686impl fmt::Display for DescribeReservedCacheNodesOfferingsError {
11687    #[allow(unused_variables)]
11688    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11689        match *self {
11690            DescribeReservedCacheNodesOfferingsError::InvalidParameterCombination(ref cause) => {
11691                write!(f, "{}", cause)
11692            }
11693            DescribeReservedCacheNodesOfferingsError::InvalidParameterValue(ref cause) => {
11694                write!(f, "{}", cause)
11695            }
11696            DescribeReservedCacheNodesOfferingsError::ReservedCacheNodesOfferingNotFoundFault(
11697                ref cause,
11698            ) => write!(f, "{}", cause),
11699        }
11700    }
11701}
11702impl Error for DescribeReservedCacheNodesOfferingsError {}
11703/// Errors returned by DescribeServiceUpdates
11704#[derive(Debug, PartialEq)]
11705pub enum DescribeServiceUpdatesError {
11706    /// <p>Two or more incompatible parameters were specified.</p>
11707    InvalidParameterCombination(String),
11708    /// <p>The value for a parameter is invalid.</p>
11709    InvalidParameterValue(String),
11710    /// <p>The service update doesn't exist</p>
11711    ServiceUpdateNotFoundFault(String),
11712}
11713
11714impl DescribeServiceUpdatesError {
11715    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeServiceUpdatesError> {
11716        {
11717            let reader = EventReader::new(res.body.as_ref());
11718            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11719            find_start_element(&mut stack);
11720            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11721                match &parsed_error.code[..] {
11722                    "InvalidParameterCombination" => {
11723                        return RusotoError::Service(
11724                            DescribeServiceUpdatesError::InvalidParameterCombination(
11725                                parsed_error.message,
11726                            ),
11727                        )
11728                    }
11729                    "InvalidParameterValue" => {
11730                        return RusotoError::Service(
11731                            DescribeServiceUpdatesError::InvalidParameterValue(
11732                                parsed_error.message,
11733                            ),
11734                        )
11735                    }
11736                    "ServiceUpdateNotFoundFault" => {
11737                        return RusotoError::Service(
11738                            DescribeServiceUpdatesError::ServiceUpdateNotFoundFault(
11739                                parsed_error.message,
11740                            ),
11741                        )
11742                    }
11743                    _ => {}
11744                }
11745            }
11746        }
11747        RusotoError::Unknown(res)
11748    }
11749
11750    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11751    where
11752        T: Peek + Next,
11753    {
11754        xml_util::start_element("ErrorResponse", stack)?;
11755        XmlErrorDeserializer::deserialize("Error", stack)
11756    }
11757}
11758impl fmt::Display for DescribeServiceUpdatesError {
11759    #[allow(unused_variables)]
11760    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11761        match *self {
11762            DescribeServiceUpdatesError::InvalidParameterCombination(ref cause) => {
11763                write!(f, "{}", cause)
11764            }
11765            DescribeServiceUpdatesError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
11766            DescribeServiceUpdatesError::ServiceUpdateNotFoundFault(ref cause) => {
11767                write!(f, "{}", cause)
11768            }
11769        }
11770    }
11771}
11772impl Error for DescribeServiceUpdatesError {}
11773/// Errors returned by DescribeSnapshots
11774#[derive(Debug, PartialEq)]
11775pub enum DescribeSnapshotsError {
11776    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
11777    CacheClusterNotFoundFault(String),
11778    /// <p>Two or more incompatible parameters were specified.</p>
11779    InvalidParameterCombination(String),
11780    /// <p>The value for a parameter is invalid.</p>
11781    InvalidParameterValue(String),
11782    /// <p>The requested snapshot name does not refer to an existing snapshot.</p>
11783    SnapshotNotFoundFault(String),
11784}
11785
11786impl DescribeSnapshotsError {
11787    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSnapshotsError> {
11788        {
11789            let reader = EventReader::new(res.body.as_ref());
11790            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11791            find_start_element(&mut stack);
11792            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11793                match &parsed_error.code[..] {
11794                    "CacheClusterNotFound" => {
11795                        return RusotoError::Service(
11796                            DescribeSnapshotsError::CacheClusterNotFoundFault(parsed_error.message),
11797                        )
11798                    }
11799                    "InvalidParameterCombination" => {
11800                        return RusotoError::Service(
11801                            DescribeSnapshotsError::InvalidParameterCombination(
11802                                parsed_error.message,
11803                            ),
11804                        )
11805                    }
11806                    "InvalidParameterValue" => {
11807                        return RusotoError::Service(DescribeSnapshotsError::InvalidParameterValue(
11808                            parsed_error.message,
11809                        ))
11810                    }
11811                    "SnapshotNotFoundFault" => {
11812                        return RusotoError::Service(DescribeSnapshotsError::SnapshotNotFoundFault(
11813                            parsed_error.message,
11814                        ))
11815                    }
11816                    _ => {}
11817                }
11818            }
11819        }
11820        RusotoError::Unknown(res)
11821    }
11822
11823    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11824    where
11825        T: Peek + Next,
11826    {
11827        xml_util::start_element("ErrorResponse", stack)?;
11828        XmlErrorDeserializer::deserialize("Error", stack)
11829    }
11830}
11831impl fmt::Display for DescribeSnapshotsError {
11832    #[allow(unused_variables)]
11833    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11834        match *self {
11835            DescribeSnapshotsError::CacheClusterNotFoundFault(ref cause) => write!(f, "{}", cause),
11836            DescribeSnapshotsError::InvalidParameterCombination(ref cause) => {
11837                write!(f, "{}", cause)
11838            }
11839            DescribeSnapshotsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
11840            DescribeSnapshotsError::SnapshotNotFoundFault(ref cause) => write!(f, "{}", cause),
11841        }
11842    }
11843}
11844impl Error for DescribeSnapshotsError {}
11845/// Errors returned by DescribeUpdateActions
11846#[derive(Debug, PartialEq)]
11847pub enum DescribeUpdateActionsError {
11848    /// <p>Two or more incompatible parameters were specified.</p>
11849    InvalidParameterCombination(String),
11850    /// <p>The value for a parameter is invalid.</p>
11851    InvalidParameterValue(String),
11852}
11853
11854impl DescribeUpdateActionsError {
11855    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUpdateActionsError> {
11856        {
11857            let reader = EventReader::new(res.body.as_ref());
11858            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11859            find_start_element(&mut stack);
11860            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11861                match &parsed_error.code[..] {
11862                    "InvalidParameterCombination" => {
11863                        return RusotoError::Service(
11864                            DescribeUpdateActionsError::InvalidParameterCombination(
11865                                parsed_error.message,
11866                            ),
11867                        )
11868                    }
11869                    "InvalidParameterValue" => {
11870                        return RusotoError::Service(
11871                            DescribeUpdateActionsError::InvalidParameterValue(parsed_error.message),
11872                        )
11873                    }
11874                    _ => {}
11875                }
11876            }
11877        }
11878        RusotoError::Unknown(res)
11879    }
11880
11881    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11882    where
11883        T: Peek + Next,
11884    {
11885        xml_util::start_element("ErrorResponse", stack)?;
11886        XmlErrorDeserializer::deserialize("Error", stack)
11887    }
11888}
11889impl fmt::Display for DescribeUpdateActionsError {
11890    #[allow(unused_variables)]
11891    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11892        match *self {
11893            DescribeUpdateActionsError::InvalidParameterCombination(ref cause) => {
11894                write!(f, "{}", cause)
11895            }
11896            DescribeUpdateActionsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
11897        }
11898    }
11899}
11900impl Error for DescribeUpdateActionsError {}
11901/// Errors returned by DisassociateGlobalReplicationGroup
11902#[derive(Debug, PartialEq)]
11903pub enum DisassociateGlobalReplicationGroupError {
11904    /// <p>The Global Datastore does not exist</p>
11905    GlobalReplicationGroupNotFoundFault(String),
11906    /// <p>The Global Datastore is not available or in primary-only state.</p>
11907    InvalidGlobalReplicationGroupStateFault(String),
11908    /// <p>Two or more incompatible parameters were specified.</p>
11909    InvalidParameterCombination(String),
11910    /// <p>The value for a parameter is invalid.</p>
11911    InvalidParameterValue(String),
11912}
11913
11914impl DisassociateGlobalReplicationGroupError {
11915    pub fn from_response(
11916        res: BufferedHttpResponse,
11917    ) -> RusotoError<DisassociateGlobalReplicationGroupError> {
11918        {
11919            let reader = EventReader::new(res.body.as_ref());
11920            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11921            find_start_element(&mut stack);
11922            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11923                match &parsed_error.code[..] {
11924                                    "GlobalReplicationGroupNotFoundFault" => return RusotoError::Service(DisassociateGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(parsed_error.message)),"InvalidGlobalReplicationGroupState" => return RusotoError::Service(DisassociateGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(parsed_error.message)),"InvalidParameterCombination" => return RusotoError::Service(DisassociateGlobalReplicationGroupError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(DisassociateGlobalReplicationGroupError::InvalidParameterValue(parsed_error.message)),_ => {}
11925                                }
11926            }
11927        }
11928        RusotoError::Unknown(res)
11929    }
11930
11931    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11932    where
11933        T: Peek + Next,
11934    {
11935        xml_util::start_element("ErrorResponse", stack)?;
11936        XmlErrorDeserializer::deserialize("Error", stack)
11937    }
11938}
11939impl fmt::Display for DisassociateGlobalReplicationGroupError {
11940    #[allow(unused_variables)]
11941    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
11942        match *self {
11943            DisassociateGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(
11944                ref cause,
11945            ) => write!(f, "{}", cause),
11946            DisassociateGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(
11947                ref cause,
11948            ) => write!(f, "{}", cause),
11949            DisassociateGlobalReplicationGroupError::InvalidParameterCombination(ref cause) => {
11950                write!(f, "{}", cause)
11951            }
11952            DisassociateGlobalReplicationGroupError::InvalidParameterValue(ref cause) => {
11953                write!(f, "{}", cause)
11954            }
11955        }
11956    }
11957}
11958impl Error for DisassociateGlobalReplicationGroupError {}
11959/// Errors returned by FailoverGlobalReplicationGroup
11960#[derive(Debug, PartialEq)]
11961pub enum FailoverGlobalReplicationGroupError {
11962    /// <p>The Global Datastore does not exist</p>
11963    GlobalReplicationGroupNotFoundFault(String),
11964    /// <p>The Global Datastore is not available or in primary-only state.</p>
11965    InvalidGlobalReplicationGroupStateFault(String),
11966    /// <p>Two or more incompatible parameters were specified.</p>
11967    InvalidParameterCombination(String),
11968    /// <p>The value for a parameter is invalid.</p>
11969    InvalidParameterValue(String),
11970}
11971
11972impl FailoverGlobalReplicationGroupError {
11973    pub fn from_response(
11974        res: BufferedHttpResponse,
11975    ) -> RusotoError<FailoverGlobalReplicationGroupError> {
11976        {
11977            let reader = EventReader::new(res.body.as_ref());
11978            let mut stack = XmlResponse::new(reader.into_iter().peekable());
11979            find_start_element(&mut stack);
11980            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
11981                match &parsed_error.code[..] {
11982                                    "GlobalReplicationGroupNotFoundFault" => return RusotoError::Service(FailoverGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(parsed_error.message)),"InvalidGlobalReplicationGroupState" => return RusotoError::Service(FailoverGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(parsed_error.message)),"InvalidParameterCombination" => return RusotoError::Service(FailoverGlobalReplicationGroupError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(FailoverGlobalReplicationGroupError::InvalidParameterValue(parsed_error.message)),_ => {}
11983                                }
11984            }
11985        }
11986        RusotoError::Unknown(res)
11987    }
11988
11989    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
11990    where
11991        T: Peek + Next,
11992    {
11993        xml_util::start_element("ErrorResponse", stack)?;
11994        XmlErrorDeserializer::deserialize("Error", stack)
11995    }
11996}
11997impl fmt::Display for FailoverGlobalReplicationGroupError {
11998    #[allow(unused_variables)]
11999    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12000        match *self {
12001            FailoverGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(ref cause) => {
12002                write!(f, "{}", cause)
12003            }
12004            FailoverGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(
12005                ref cause,
12006            ) => write!(f, "{}", cause),
12007            FailoverGlobalReplicationGroupError::InvalidParameterCombination(ref cause) => {
12008                write!(f, "{}", cause)
12009            }
12010            FailoverGlobalReplicationGroupError::InvalidParameterValue(ref cause) => {
12011                write!(f, "{}", cause)
12012            }
12013        }
12014    }
12015}
12016impl Error for FailoverGlobalReplicationGroupError {}
12017/// Errors returned by IncreaseNodeGroupsInGlobalReplicationGroup
12018#[derive(Debug, PartialEq)]
12019pub enum IncreaseNodeGroupsInGlobalReplicationGroupError {
12020    /// <p>The Global Datastore does not exist</p>
12021    GlobalReplicationGroupNotFoundFault(String),
12022    /// <p>The Global Datastore is not available or in primary-only state.</p>
12023    InvalidGlobalReplicationGroupStateFault(String),
12024    /// <p>The value for a parameter is invalid.</p>
12025    InvalidParameterValue(String),
12026}
12027
12028impl IncreaseNodeGroupsInGlobalReplicationGroupError {
12029    pub fn from_response(
12030        res: BufferedHttpResponse,
12031    ) -> RusotoError<IncreaseNodeGroupsInGlobalReplicationGroupError> {
12032        {
12033            let reader = EventReader::new(res.body.as_ref());
12034            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12035            find_start_element(&mut stack);
12036            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12037                match &parsed_error.code[..] {
12038                                    "GlobalReplicationGroupNotFoundFault" => return RusotoError::Service(IncreaseNodeGroupsInGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(parsed_error.message)),"InvalidGlobalReplicationGroupState" => return RusotoError::Service(IncreaseNodeGroupsInGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(IncreaseNodeGroupsInGlobalReplicationGroupError::InvalidParameterValue(parsed_error.message)),_ => {}
12039                                }
12040            }
12041        }
12042        RusotoError::Unknown(res)
12043    }
12044
12045    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12046    where
12047        T: Peek + Next,
12048    {
12049        xml_util::start_element("ErrorResponse", stack)?;
12050        XmlErrorDeserializer::deserialize("Error", stack)
12051    }
12052}
12053impl fmt::Display for IncreaseNodeGroupsInGlobalReplicationGroupError {
12054    #[allow(unused_variables)]
12055    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12056        match *self {
12057                            IncreaseNodeGroupsInGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(ref cause) => write!(f, "{}", cause),
12058IncreaseNodeGroupsInGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(ref cause) => write!(f, "{}", cause),
12059IncreaseNodeGroupsInGlobalReplicationGroupError::InvalidParameterValue(ref cause) => write!(f, "{}", cause)
12060                        }
12061    }
12062}
12063impl Error for IncreaseNodeGroupsInGlobalReplicationGroupError {}
12064/// Errors returned by IncreaseReplicaCount
12065#[derive(Debug, PartialEq)]
12066pub enum IncreaseReplicaCountError {
12067    /// <p>The request cannot be processed because it would exceed the allowed number of clusters per customer.</p>
12068    ClusterQuotaForCustomerExceededFault(String),
12069    /// <p>The requested cache node type is not available in the specified Availability Zone. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY">InsufficientCacheClusterCapacity</a> in the ElastiCache User Guide.</p>
12070    InsufficientCacheClusterCapacityFault(String),
12071    /// <p>The requested cluster is not in the <code>available</code> state.</p>
12072    InvalidCacheClusterStateFault(String),
12073    /// <p>The KMS key supplied is not valid.</p>
12074    InvalidKMSKeyFault(String),
12075    /// <p>Two or more incompatible parameters were specified.</p>
12076    InvalidParameterCombination(String),
12077    /// <p>The value for a parameter is invalid.</p>
12078    InvalidParameterValue(String),
12079    /// <p>The requested replication group is not in the <code>available</code> state.</p>
12080    InvalidReplicationGroupStateFault(String),
12081    /// <p>The VPC network is in an invalid state.</p>
12082    InvalidVPCNetworkStateFault(String),
12083    /// <p>The operation was not performed because no changes were required.</p>
12084    NoOperationFault(String),
12085    /// <p>The request cannot be processed because it would exceed the maximum allowed number of node groups (shards) in a single replication group. The default maximum is 90</p>
12086    NodeGroupsPerReplicationGroupQuotaExceededFault(String),
12087    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes per customer.</p>
12088    NodeQuotaForCustomerExceededFault(String),
12089    /// <p>The specified replication group does not exist.</p>
12090    ReplicationGroupNotFoundFault(String),
12091}
12092
12093impl IncreaseReplicaCountError {
12094    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<IncreaseReplicaCountError> {
12095        {
12096            let reader = EventReader::new(res.body.as_ref());
12097            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12098            find_start_element(&mut stack);
12099            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12100                match &parsed_error.code[..] {
12101                    "ClusterQuotaForCustomerExceeded" => {
12102                        return RusotoError::Service(
12103                            IncreaseReplicaCountError::ClusterQuotaForCustomerExceededFault(
12104                                parsed_error.message,
12105                            ),
12106                        )
12107                    }
12108                    "InsufficientCacheClusterCapacity" => {
12109                        return RusotoError::Service(
12110                            IncreaseReplicaCountError::InsufficientCacheClusterCapacityFault(
12111                                parsed_error.message,
12112                            ),
12113                        )
12114                    }
12115                    "InvalidCacheClusterState" => {
12116                        return RusotoError::Service(
12117                            IncreaseReplicaCountError::InvalidCacheClusterStateFault(
12118                                parsed_error.message,
12119                            ),
12120                        )
12121                    }
12122                    "InvalidKMSKeyFault" => {
12123                        return RusotoError::Service(IncreaseReplicaCountError::InvalidKMSKeyFault(
12124                            parsed_error.message,
12125                        ))
12126                    }
12127                    "InvalidParameterCombination" => {
12128                        return RusotoError::Service(
12129                            IncreaseReplicaCountError::InvalidParameterCombination(
12130                                parsed_error.message,
12131                            ),
12132                        )
12133                    }
12134                    "InvalidParameterValue" => {
12135                        return RusotoError::Service(
12136                            IncreaseReplicaCountError::InvalidParameterValue(parsed_error.message),
12137                        )
12138                    }
12139                    "InvalidReplicationGroupState" => {
12140                        return RusotoError::Service(
12141                            IncreaseReplicaCountError::InvalidReplicationGroupStateFault(
12142                                parsed_error.message,
12143                            ),
12144                        )
12145                    }
12146                    "InvalidVPCNetworkStateFault" => {
12147                        return RusotoError::Service(
12148                            IncreaseReplicaCountError::InvalidVPCNetworkStateFault(
12149                                parsed_error.message,
12150                            ),
12151                        )
12152                    }
12153                    "NoOperationFault" => {
12154                        return RusotoError::Service(IncreaseReplicaCountError::NoOperationFault(
12155                            parsed_error.message,
12156                        ))
12157                    }
12158                    "NodeGroupsPerReplicationGroupQuotaExceeded" => return RusotoError::Service(
12159                        IncreaseReplicaCountError::NodeGroupsPerReplicationGroupQuotaExceededFault(
12160                            parsed_error.message,
12161                        ),
12162                    ),
12163                    "NodeQuotaForCustomerExceeded" => {
12164                        return RusotoError::Service(
12165                            IncreaseReplicaCountError::NodeQuotaForCustomerExceededFault(
12166                                parsed_error.message,
12167                            ),
12168                        )
12169                    }
12170                    "ReplicationGroupNotFoundFault" => {
12171                        return RusotoError::Service(
12172                            IncreaseReplicaCountError::ReplicationGroupNotFoundFault(
12173                                parsed_error.message,
12174                            ),
12175                        )
12176                    }
12177                    _ => {}
12178                }
12179            }
12180        }
12181        RusotoError::Unknown(res)
12182    }
12183
12184    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12185    where
12186        T: Peek + Next,
12187    {
12188        xml_util::start_element("ErrorResponse", stack)?;
12189        XmlErrorDeserializer::deserialize("Error", stack)
12190    }
12191}
12192impl fmt::Display for IncreaseReplicaCountError {
12193    #[allow(unused_variables)]
12194    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12195        match *self {
12196            IncreaseReplicaCountError::ClusterQuotaForCustomerExceededFault(ref cause) => {
12197                write!(f, "{}", cause)
12198            }
12199            IncreaseReplicaCountError::InsufficientCacheClusterCapacityFault(ref cause) => {
12200                write!(f, "{}", cause)
12201            }
12202            IncreaseReplicaCountError::InvalidCacheClusterStateFault(ref cause) => {
12203                write!(f, "{}", cause)
12204            }
12205            IncreaseReplicaCountError::InvalidKMSKeyFault(ref cause) => write!(f, "{}", cause),
12206            IncreaseReplicaCountError::InvalidParameterCombination(ref cause) => {
12207                write!(f, "{}", cause)
12208            }
12209            IncreaseReplicaCountError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
12210            IncreaseReplicaCountError::InvalidReplicationGroupStateFault(ref cause) => {
12211                write!(f, "{}", cause)
12212            }
12213            IncreaseReplicaCountError::InvalidVPCNetworkStateFault(ref cause) => {
12214                write!(f, "{}", cause)
12215            }
12216            IncreaseReplicaCountError::NoOperationFault(ref cause) => write!(f, "{}", cause),
12217            IncreaseReplicaCountError::NodeGroupsPerReplicationGroupQuotaExceededFault(
12218                ref cause,
12219            ) => write!(f, "{}", cause),
12220            IncreaseReplicaCountError::NodeQuotaForCustomerExceededFault(ref cause) => {
12221                write!(f, "{}", cause)
12222            }
12223            IncreaseReplicaCountError::ReplicationGroupNotFoundFault(ref cause) => {
12224                write!(f, "{}", cause)
12225            }
12226        }
12227    }
12228}
12229impl Error for IncreaseReplicaCountError {}
12230/// Errors returned by ListAllowedNodeTypeModifications
12231#[derive(Debug, PartialEq)]
12232pub enum ListAllowedNodeTypeModificationsError {
12233    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
12234    CacheClusterNotFoundFault(String),
12235    /// <p>Two or more incompatible parameters were specified.</p>
12236    InvalidParameterCombination(String),
12237    /// <p>The value for a parameter is invalid.</p>
12238    InvalidParameterValue(String),
12239    /// <p>The specified replication group does not exist.</p>
12240    ReplicationGroupNotFoundFault(String),
12241}
12242
12243impl ListAllowedNodeTypeModificationsError {
12244    pub fn from_response(
12245        res: BufferedHttpResponse,
12246    ) -> RusotoError<ListAllowedNodeTypeModificationsError> {
12247        {
12248            let reader = EventReader::new(res.body.as_ref());
12249            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12250            find_start_element(&mut stack);
12251            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12252                match &parsed_error.code[..] {
12253                    "CacheClusterNotFound" => {
12254                        return RusotoError::Service(
12255                            ListAllowedNodeTypeModificationsError::CacheClusterNotFoundFault(
12256                                parsed_error.message,
12257                            ),
12258                        )
12259                    }
12260                    "InvalidParameterCombination" => {
12261                        return RusotoError::Service(
12262                            ListAllowedNodeTypeModificationsError::InvalidParameterCombination(
12263                                parsed_error.message,
12264                            ),
12265                        )
12266                    }
12267                    "InvalidParameterValue" => {
12268                        return RusotoError::Service(
12269                            ListAllowedNodeTypeModificationsError::InvalidParameterValue(
12270                                parsed_error.message,
12271                            ),
12272                        )
12273                    }
12274                    "ReplicationGroupNotFoundFault" => {
12275                        return RusotoError::Service(
12276                            ListAllowedNodeTypeModificationsError::ReplicationGroupNotFoundFault(
12277                                parsed_error.message,
12278                            ),
12279                        )
12280                    }
12281                    _ => {}
12282                }
12283            }
12284        }
12285        RusotoError::Unknown(res)
12286    }
12287
12288    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12289    where
12290        T: Peek + Next,
12291    {
12292        xml_util::start_element("ErrorResponse", stack)?;
12293        XmlErrorDeserializer::deserialize("Error", stack)
12294    }
12295}
12296impl fmt::Display for ListAllowedNodeTypeModificationsError {
12297    #[allow(unused_variables)]
12298    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12299        match *self {
12300            ListAllowedNodeTypeModificationsError::CacheClusterNotFoundFault(ref cause) => {
12301                write!(f, "{}", cause)
12302            }
12303            ListAllowedNodeTypeModificationsError::InvalidParameterCombination(ref cause) => {
12304                write!(f, "{}", cause)
12305            }
12306            ListAllowedNodeTypeModificationsError::InvalidParameterValue(ref cause) => {
12307                write!(f, "{}", cause)
12308            }
12309            ListAllowedNodeTypeModificationsError::ReplicationGroupNotFoundFault(ref cause) => {
12310                write!(f, "{}", cause)
12311            }
12312        }
12313    }
12314}
12315impl Error for ListAllowedNodeTypeModificationsError {}
12316/// Errors returned by ListTagsForResource
12317#[derive(Debug, PartialEq)]
12318pub enum ListTagsForResourceError {
12319    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
12320    CacheClusterNotFoundFault(String),
12321    /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
12322    InvalidARNFault(String),
12323    /// <p>The requested snapshot name does not refer to an existing snapshot.</p>
12324    SnapshotNotFoundFault(String),
12325}
12326
12327impl ListTagsForResourceError {
12328    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
12329        {
12330            let reader = EventReader::new(res.body.as_ref());
12331            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12332            find_start_element(&mut stack);
12333            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12334                match &parsed_error.code[..] {
12335                    "CacheClusterNotFound" => {
12336                        return RusotoError::Service(
12337                            ListTagsForResourceError::CacheClusterNotFoundFault(
12338                                parsed_error.message,
12339                            ),
12340                        )
12341                    }
12342                    "InvalidARN" => {
12343                        return RusotoError::Service(ListTagsForResourceError::InvalidARNFault(
12344                            parsed_error.message,
12345                        ))
12346                    }
12347                    "SnapshotNotFoundFault" => {
12348                        return RusotoError::Service(
12349                            ListTagsForResourceError::SnapshotNotFoundFault(parsed_error.message),
12350                        )
12351                    }
12352                    _ => {}
12353                }
12354            }
12355        }
12356        RusotoError::Unknown(res)
12357    }
12358
12359    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12360    where
12361        T: Peek + Next,
12362    {
12363        xml_util::start_element("ErrorResponse", stack)?;
12364        XmlErrorDeserializer::deserialize("Error", stack)
12365    }
12366}
12367impl fmt::Display for ListTagsForResourceError {
12368    #[allow(unused_variables)]
12369    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12370        match *self {
12371            ListTagsForResourceError::CacheClusterNotFoundFault(ref cause) => {
12372                write!(f, "{}", cause)
12373            }
12374            ListTagsForResourceError::InvalidARNFault(ref cause) => write!(f, "{}", cause),
12375            ListTagsForResourceError::SnapshotNotFoundFault(ref cause) => write!(f, "{}", cause),
12376        }
12377    }
12378}
12379impl Error for ListTagsForResourceError {}
12380/// Errors returned by ModifyCacheCluster
12381#[derive(Debug, PartialEq)]
12382pub enum ModifyCacheClusterError {
12383    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
12384    CacheClusterNotFoundFault(String),
12385    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
12386    CacheParameterGroupNotFoundFault(String),
12387    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
12388    CacheSecurityGroupNotFoundFault(String),
12389    /// <p>The requested cache node type is not available in the specified Availability Zone. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY">InsufficientCacheClusterCapacity</a> in the ElastiCache User Guide.</p>
12390    InsufficientCacheClusterCapacityFault(String),
12391    /// <p>The requested cluster is not in the <code>available</code> state.</p>
12392    InvalidCacheClusterStateFault(String),
12393    /// <p>The current state of the cache security group does not allow deletion.</p>
12394    InvalidCacheSecurityGroupStateFault(String),
12395    /// <p>Two or more incompatible parameters were specified.</p>
12396    InvalidParameterCombination(String),
12397    /// <p>The value for a parameter is invalid.</p>
12398    InvalidParameterValue(String),
12399    /// <p>The VPC network is in an invalid state.</p>
12400    InvalidVPCNetworkStateFault(String),
12401    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes in a single cluster.</p>
12402    NodeQuotaForClusterExceededFault(String),
12403    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes per customer.</p>
12404    NodeQuotaForCustomerExceededFault(String),
12405}
12406
12407impl ModifyCacheClusterError {
12408    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyCacheClusterError> {
12409        {
12410            let reader = EventReader::new(res.body.as_ref());
12411            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12412            find_start_element(&mut stack);
12413            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12414                match &parsed_error.code[..] {
12415                    "CacheClusterNotFound" => {
12416                        return RusotoError::Service(
12417                            ModifyCacheClusterError::CacheClusterNotFoundFault(
12418                                parsed_error.message,
12419                            ),
12420                        )
12421                    }
12422                    "CacheParameterGroupNotFound" => {
12423                        return RusotoError::Service(
12424                            ModifyCacheClusterError::CacheParameterGroupNotFoundFault(
12425                                parsed_error.message,
12426                            ),
12427                        )
12428                    }
12429                    "CacheSecurityGroupNotFound" => {
12430                        return RusotoError::Service(
12431                            ModifyCacheClusterError::CacheSecurityGroupNotFoundFault(
12432                                parsed_error.message,
12433                            ),
12434                        )
12435                    }
12436                    "InsufficientCacheClusterCapacity" => {
12437                        return RusotoError::Service(
12438                            ModifyCacheClusterError::InsufficientCacheClusterCapacityFault(
12439                                parsed_error.message,
12440                            ),
12441                        )
12442                    }
12443                    "InvalidCacheClusterState" => {
12444                        return RusotoError::Service(
12445                            ModifyCacheClusterError::InvalidCacheClusterStateFault(
12446                                parsed_error.message,
12447                            ),
12448                        )
12449                    }
12450                    "InvalidCacheSecurityGroupState" => {
12451                        return RusotoError::Service(
12452                            ModifyCacheClusterError::InvalidCacheSecurityGroupStateFault(
12453                                parsed_error.message,
12454                            ),
12455                        )
12456                    }
12457                    "InvalidParameterCombination" => {
12458                        return RusotoError::Service(
12459                            ModifyCacheClusterError::InvalidParameterCombination(
12460                                parsed_error.message,
12461                            ),
12462                        )
12463                    }
12464                    "InvalidParameterValue" => {
12465                        return RusotoError::Service(
12466                            ModifyCacheClusterError::InvalidParameterValue(parsed_error.message),
12467                        )
12468                    }
12469                    "InvalidVPCNetworkStateFault" => {
12470                        return RusotoError::Service(
12471                            ModifyCacheClusterError::InvalidVPCNetworkStateFault(
12472                                parsed_error.message,
12473                            ),
12474                        )
12475                    }
12476                    "NodeQuotaForClusterExceeded" => {
12477                        return RusotoError::Service(
12478                            ModifyCacheClusterError::NodeQuotaForClusterExceededFault(
12479                                parsed_error.message,
12480                            ),
12481                        )
12482                    }
12483                    "NodeQuotaForCustomerExceeded" => {
12484                        return RusotoError::Service(
12485                            ModifyCacheClusterError::NodeQuotaForCustomerExceededFault(
12486                                parsed_error.message,
12487                            ),
12488                        )
12489                    }
12490                    _ => {}
12491                }
12492            }
12493        }
12494        RusotoError::Unknown(res)
12495    }
12496
12497    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12498    where
12499        T: Peek + Next,
12500    {
12501        xml_util::start_element("ErrorResponse", stack)?;
12502        XmlErrorDeserializer::deserialize("Error", stack)
12503    }
12504}
12505impl fmt::Display for ModifyCacheClusterError {
12506    #[allow(unused_variables)]
12507    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12508        match *self {
12509            ModifyCacheClusterError::CacheClusterNotFoundFault(ref cause) => write!(f, "{}", cause),
12510            ModifyCacheClusterError::CacheParameterGroupNotFoundFault(ref cause) => {
12511                write!(f, "{}", cause)
12512            }
12513            ModifyCacheClusterError::CacheSecurityGroupNotFoundFault(ref cause) => {
12514                write!(f, "{}", cause)
12515            }
12516            ModifyCacheClusterError::InsufficientCacheClusterCapacityFault(ref cause) => {
12517                write!(f, "{}", cause)
12518            }
12519            ModifyCacheClusterError::InvalidCacheClusterStateFault(ref cause) => {
12520                write!(f, "{}", cause)
12521            }
12522            ModifyCacheClusterError::InvalidCacheSecurityGroupStateFault(ref cause) => {
12523                write!(f, "{}", cause)
12524            }
12525            ModifyCacheClusterError::InvalidParameterCombination(ref cause) => {
12526                write!(f, "{}", cause)
12527            }
12528            ModifyCacheClusterError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
12529            ModifyCacheClusterError::InvalidVPCNetworkStateFault(ref cause) => {
12530                write!(f, "{}", cause)
12531            }
12532            ModifyCacheClusterError::NodeQuotaForClusterExceededFault(ref cause) => {
12533                write!(f, "{}", cause)
12534            }
12535            ModifyCacheClusterError::NodeQuotaForCustomerExceededFault(ref cause) => {
12536                write!(f, "{}", cause)
12537            }
12538        }
12539    }
12540}
12541impl Error for ModifyCacheClusterError {}
12542/// Errors returned by ModifyCacheParameterGroup
12543#[derive(Debug, PartialEq)]
12544pub enum ModifyCacheParameterGroupError {
12545    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
12546    CacheParameterGroupNotFoundFault(String),
12547    /// <p>The current state of the cache parameter group does not allow the requested operation to occur.</p>
12548    InvalidCacheParameterGroupStateFault(String),
12549    /// <p>The Global Datastore is not available or in primary-only state.</p>
12550    InvalidGlobalReplicationGroupStateFault(String),
12551    /// <p>Two or more incompatible parameters were specified.</p>
12552    InvalidParameterCombination(String),
12553    /// <p>The value for a parameter is invalid.</p>
12554    InvalidParameterValue(String),
12555}
12556
12557impl ModifyCacheParameterGroupError {
12558    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyCacheParameterGroupError> {
12559        {
12560            let reader = EventReader::new(res.body.as_ref());
12561            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12562            find_start_element(&mut stack);
12563            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12564                match &parsed_error.code[..] {
12565                    "CacheParameterGroupNotFound" => {
12566                        return RusotoError::Service(
12567                            ModifyCacheParameterGroupError::CacheParameterGroupNotFoundFault(
12568                                parsed_error.message,
12569                            ),
12570                        )
12571                    }
12572                    "InvalidCacheParameterGroupState" => {
12573                        return RusotoError::Service(
12574                            ModifyCacheParameterGroupError::InvalidCacheParameterGroupStateFault(
12575                                parsed_error.message,
12576                            ),
12577                        )
12578                    }
12579                    "InvalidGlobalReplicationGroupState" => {
12580                        return RusotoError::Service(
12581                            ModifyCacheParameterGroupError::InvalidGlobalReplicationGroupStateFault(
12582                                parsed_error.message,
12583                            ),
12584                        )
12585                    }
12586                    "InvalidParameterCombination" => {
12587                        return RusotoError::Service(
12588                            ModifyCacheParameterGroupError::InvalidParameterCombination(
12589                                parsed_error.message,
12590                            ),
12591                        )
12592                    }
12593                    "InvalidParameterValue" => {
12594                        return RusotoError::Service(
12595                            ModifyCacheParameterGroupError::InvalidParameterValue(
12596                                parsed_error.message,
12597                            ),
12598                        )
12599                    }
12600                    _ => {}
12601                }
12602            }
12603        }
12604        RusotoError::Unknown(res)
12605    }
12606
12607    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12608    where
12609        T: Peek + Next,
12610    {
12611        xml_util::start_element("ErrorResponse", stack)?;
12612        XmlErrorDeserializer::deserialize("Error", stack)
12613    }
12614}
12615impl fmt::Display for ModifyCacheParameterGroupError {
12616    #[allow(unused_variables)]
12617    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12618        match *self {
12619            ModifyCacheParameterGroupError::CacheParameterGroupNotFoundFault(ref cause) => {
12620                write!(f, "{}", cause)
12621            }
12622            ModifyCacheParameterGroupError::InvalidCacheParameterGroupStateFault(ref cause) => {
12623                write!(f, "{}", cause)
12624            }
12625            ModifyCacheParameterGroupError::InvalidGlobalReplicationGroupStateFault(ref cause) => {
12626                write!(f, "{}", cause)
12627            }
12628            ModifyCacheParameterGroupError::InvalidParameterCombination(ref cause) => {
12629                write!(f, "{}", cause)
12630            }
12631            ModifyCacheParameterGroupError::InvalidParameterValue(ref cause) => {
12632                write!(f, "{}", cause)
12633            }
12634        }
12635    }
12636}
12637impl Error for ModifyCacheParameterGroupError {}
12638/// Errors returned by ModifyCacheSubnetGroup
12639#[derive(Debug, PartialEq)]
12640pub enum ModifyCacheSubnetGroupError {
12641    /// <p>The requested cache subnet group name does not refer to an existing cache subnet group.</p>
12642    CacheSubnetGroupNotFoundFault(String),
12643    /// <p>The request cannot be processed because it would exceed the allowed number of subnets in a cache subnet group.</p>
12644    CacheSubnetQuotaExceededFault(String),
12645    /// <p>An invalid subnet identifier was specified.</p>
12646    InvalidSubnet(String),
12647    /// <p>The requested subnet is being used by another cache subnet group.</p>
12648    SubnetInUse(String),
12649}
12650
12651impl ModifyCacheSubnetGroupError {
12652    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyCacheSubnetGroupError> {
12653        {
12654            let reader = EventReader::new(res.body.as_ref());
12655            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12656            find_start_element(&mut stack);
12657            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12658                match &parsed_error.code[..] {
12659                    "CacheSubnetGroupNotFoundFault" => {
12660                        return RusotoError::Service(
12661                            ModifyCacheSubnetGroupError::CacheSubnetGroupNotFoundFault(
12662                                parsed_error.message,
12663                            ),
12664                        )
12665                    }
12666                    "CacheSubnetQuotaExceededFault" => {
12667                        return RusotoError::Service(
12668                            ModifyCacheSubnetGroupError::CacheSubnetQuotaExceededFault(
12669                                parsed_error.message,
12670                            ),
12671                        )
12672                    }
12673                    "InvalidSubnet" => {
12674                        return RusotoError::Service(ModifyCacheSubnetGroupError::InvalidSubnet(
12675                            parsed_error.message,
12676                        ))
12677                    }
12678                    "SubnetInUse" => {
12679                        return RusotoError::Service(ModifyCacheSubnetGroupError::SubnetInUse(
12680                            parsed_error.message,
12681                        ))
12682                    }
12683                    _ => {}
12684                }
12685            }
12686        }
12687        RusotoError::Unknown(res)
12688    }
12689
12690    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12691    where
12692        T: Peek + Next,
12693    {
12694        xml_util::start_element("ErrorResponse", stack)?;
12695        XmlErrorDeserializer::deserialize("Error", stack)
12696    }
12697}
12698impl fmt::Display for ModifyCacheSubnetGroupError {
12699    #[allow(unused_variables)]
12700    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12701        match *self {
12702            ModifyCacheSubnetGroupError::CacheSubnetGroupNotFoundFault(ref cause) => {
12703                write!(f, "{}", cause)
12704            }
12705            ModifyCacheSubnetGroupError::CacheSubnetQuotaExceededFault(ref cause) => {
12706                write!(f, "{}", cause)
12707            }
12708            ModifyCacheSubnetGroupError::InvalidSubnet(ref cause) => write!(f, "{}", cause),
12709            ModifyCacheSubnetGroupError::SubnetInUse(ref cause) => write!(f, "{}", cause),
12710        }
12711    }
12712}
12713impl Error for ModifyCacheSubnetGroupError {}
12714/// Errors returned by ModifyGlobalReplicationGroup
12715#[derive(Debug, PartialEq)]
12716pub enum ModifyGlobalReplicationGroupError {
12717    /// <p>The Global Datastore does not exist</p>
12718    GlobalReplicationGroupNotFoundFault(String),
12719    /// <p>The Global Datastore is not available or in primary-only state.</p>
12720    InvalidGlobalReplicationGroupStateFault(String),
12721    /// <p>The value for a parameter is invalid.</p>
12722    InvalidParameterValue(String),
12723}
12724
12725impl ModifyGlobalReplicationGroupError {
12726    pub fn from_response(
12727        res: BufferedHttpResponse,
12728    ) -> RusotoError<ModifyGlobalReplicationGroupError> {
12729        {
12730            let reader = EventReader::new(res.body.as_ref());
12731            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12732            find_start_element(&mut stack);
12733            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12734                match &parsed_error.code[..] {
12735                    "GlobalReplicationGroupNotFoundFault" => {
12736                        return RusotoError::Service(
12737                            ModifyGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(
12738                                parsed_error.message,
12739                            ),
12740                        )
12741                    }
12742                    "InvalidGlobalReplicationGroupState" => return RusotoError::Service(
12743                        ModifyGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(
12744                            parsed_error.message,
12745                        ),
12746                    ),
12747                    "InvalidParameterValue" => {
12748                        return RusotoError::Service(
12749                            ModifyGlobalReplicationGroupError::InvalidParameterValue(
12750                                parsed_error.message,
12751                            ),
12752                        )
12753                    }
12754                    _ => {}
12755                }
12756            }
12757        }
12758        RusotoError::Unknown(res)
12759    }
12760
12761    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12762    where
12763        T: Peek + Next,
12764    {
12765        xml_util::start_element("ErrorResponse", stack)?;
12766        XmlErrorDeserializer::deserialize("Error", stack)
12767    }
12768}
12769impl fmt::Display for ModifyGlobalReplicationGroupError {
12770    #[allow(unused_variables)]
12771    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12772        match *self {
12773            ModifyGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(ref cause) => {
12774                write!(f, "{}", cause)
12775            }
12776            ModifyGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(
12777                ref cause,
12778            ) => write!(f, "{}", cause),
12779            ModifyGlobalReplicationGroupError::InvalidParameterValue(ref cause) => {
12780                write!(f, "{}", cause)
12781            }
12782        }
12783    }
12784}
12785impl Error for ModifyGlobalReplicationGroupError {}
12786/// Errors returned by ModifyReplicationGroup
12787#[derive(Debug, PartialEq)]
12788pub enum ModifyReplicationGroupError {
12789    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
12790    CacheClusterNotFoundFault(String),
12791    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
12792    CacheParameterGroupNotFoundFault(String),
12793    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
12794    CacheSecurityGroupNotFoundFault(String),
12795    /// <p>The requested cache node type is not available in the specified Availability Zone. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY">InsufficientCacheClusterCapacity</a> in the ElastiCache User Guide.</p>
12796    InsufficientCacheClusterCapacityFault(String),
12797    /// <p>The requested cluster is not in the <code>available</code> state.</p>
12798    InvalidCacheClusterStateFault(String),
12799    /// <p>The current state of the cache security group does not allow deletion.</p>
12800    InvalidCacheSecurityGroupStateFault(String),
12801    /// <p>The KMS key supplied is not valid.</p>
12802    InvalidKMSKeyFault(String),
12803    /// <p>Two or more incompatible parameters were specified.</p>
12804    InvalidParameterCombination(String),
12805    /// <p>The value for a parameter is invalid.</p>
12806    InvalidParameterValue(String),
12807    /// <p>The requested replication group is not in the <code>available</code> state.</p>
12808    InvalidReplicationGroupStateFault(String),
12809    /// <p>The VPC network is in an invalid state.</p>
12810    InvalidVPCNetworkStateFault(String),
12811    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes in a single cluster.</p>
12812    NodeQuotaForClusterExceededFault(String),
12813    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes per customer.</p>
12814    NodeQuotaForCustomerExceededFault(String),
12815    /// <p>The specified replication group does not exist.</p>
12816    ReplicationGroupNotFoundFault(String),
12817}
12818
12819impl ModifyReplicationGroupError {
12820    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyReplicationGroupError> {
12821        {
12822            let reader = EventReader::new(res.body.as_ref());
12823            let mut stack = XmlResponse::new(reader.into_iter().peekable());
12824            find_start_element(&mut stack);
12825            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
12826                match &parsed_error.code[..] {
12827                    "CacheClusterNotFound" => {
12828                        return RusotoError::Service(
12829                            ModifyReplicationGroupError::CacheClusterNotFoundFault(
12830                                parsed_error.message,
12831                            ),
12832                        )
12833                    }
12834                    "CacheParameterGroupNotFound" => {
12835                        return RusotoError::Service(
12836                            ModifyReplicationGroupError::CacheParameterGroupNotFoundFault(
12837                                parsed_error.message,
12838                            ),
12839                        )
12840                    }
12841                    "CacheSecurityGroupNotFound" => {
12842                        return RusotoError::Service(
12843                            ModifyReplicationGroupError::CacheSecurityGroupNotFoundFault(
12844                                parsed_error.message,
12845                            ),
12846                        )
12847                    }
12848                    "InsufficientCacheClusterCapacity" => {
12849                        return RusotoError::Service(
12850                            ModifyReplicationGroupError::InsufficientCacheClusterCapacityFault(
12851                                parsed_error.message,
12852                            ),
12853                        )
12854                    }
12855                    "InvalidCacheClusterState" => {
12856                        return RusotoError::Service(
12857                            ModifyReplicationGroupError::InvalidCacheClusterStateFault(
12858                                parsed_error.message,
12859                            ),
12860                        )
12861                    }
12862                    "InvalidCacheSecurityGroupState" => {
12863                        return RusotoError::Service(
12864                            ModifyReplicationGroupError::InvalidCacheSecurityGroupStateFault(
12865                                parsed_error.message,
12866                            ),
12867                        )
12868                    }
12869                    "InvalidKMSKeyFault" => {
12870                        return RusotoError::Service(
12871                            ModifyReplicationGroupError::InvalidKMSKeyFault(parsed_error.message),
12872                        )
12873                    }
12874                    "InvalidParameterCombination" => {
12875                        return RusotoError::Service(
12876                            ModifyReplicationGroupError::InvalidParameterCombination(
12877                                parsed_error.message,
12878                            ),
12879                        )
12880                    }
12881                    "InvalidParameterValue" => {
12882                        return RusotoError::Service(
12883                            ModifyReplicationGroupError::InvalidParameterValue(
12884                                parsed_error.message,
12885                            ),
12886                        )
12887                    }
12888                    "InvalidReplicationGroupState" => {
12889                        return RusotoError::Service(
12890                            ModifyReplicationGroupError::InvalidReplicationGroupStateFault(
12891                                parsed_error.message,
12892                            ),
12893                        )
12894                    }
12895                    "InvalidVPCNetworkStateFault" => {
12896                        return RusotoError::Service(
12897                            ModifyReplicationGroupError::InvalidVPCNetworkStateFault(
12898                                parsed_error.message,
12899                            ),
12900                        )
12901                    }
12902                    "NodeQuotaForClusterExceeded" => {
12903                        return RusotoError::Service(
12904                            ModifyReplicationGroupError::NodeQuotaForClusterExceededFault(
12905                                parsed_error.message,
12906                            ),
12907                        )
12908                    }
12909                    "NodeQuotaForCustomerExceeded" => {
12910                        return RusotoError::Service(
12911                            ModifyReplicationGroupError::NodeQuotaForCustomerExceededFault(
12912                                parsed_error.message,
12913                            ),
12914                        )
12915                    }
12916                    "ReplicationGroupNotFoundFault" => {
12917                        return RusotoError::Service(
12918                            ModifyReplicationGroupError::ReplicationGroupNotFoundFault(
12919                                parsed_error.message,
12920                            ),
12921                        )
12922                    }
12923                    _ => {}
12924                }
12925            }
12926        }
12927        RusotoError::Unknown(res)
12928    }
12929
12930    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
12931    where
12932        T: Peek + Next,
12933    {
12934        xml_util::start_element("ErrorResponse", stack)?;
12935        XmlErrorDeserializer::deserialize("Error", stack)
12936    }
12937}
12938impl fmt::Display for ModifyReplicationGroupError {
12939    #[allow(unused_variables)]
12940    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
12941        match *self {
12942            ModifyReplicationGroupError::CacheClusterNotFoundFault(ref cause) => {
12943                write!(f, "{}", cause)
12944            }
12945            ModifyReplicationGroupError::CacheParameterGroupNotFoundFault(ref cause) => {
12946                write!(f, "{}", cause)
12947            }
12948            ModifyReplicationGroupError::CacheSecurityGroupNotFoundFault(ref cause) => {
12949                write!(f, "{}", cause)
12950            }
12951            ModifyReplicationGroupError::InsufficientCacheClusterCapacityFault(ref cause) => {
12952                write!(f, "{}", cause)
12953            }
12954            ModifyReplicationGroupError::InvalidCacheClusterStateFault(ref cause) => {
12955                write!(f, "{}", cause)
12956            }
12957            ModifyReplicationGroupError::InvalidCacheSecurityGroupStateFault(ref cause) => {
12958                write!(f, "{}", cause)
12959            }
12960            ModifyReplicationGroupError::InvalidKMSKeyFault(ref cause) => write!(f, "{}", cause),
12961            ModifyReplicationGroupError::InvalidParameterCombination(ref cause) => {
12962                write!(f, "{}", cause)
12963            }
12964            ModifyReplicationGroupError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
12965            ModifyReplicationGroupError::InvalidReplicationGroupStateFault(ref cause) => {
12966                write!(f, "{}", cause)
12967            }
12968            ModifyReplicationGroupError::InvalidVPCNetworkStateFault(ref cause) => {
12969                write!(f, "{}", cause)
12970            }
12971            ModifyReplicationGroupError::NodeQuotaForClusterExceededFault(ref cause) => {
12972                write!(f, "{}", cause)
12973            }
12974            ModifyReplicationGroupError::NodeQuotaForCustomerExceededFault(ref cause) => {
12975                write!(f, "{}", cause)
12976            }
12977            ModifyReplicationGroupError::ReplicationGroupNotFoundFault(ref cause) => {
12978                write!(f, "{}", cause)
12979            }
12980        }
12981    }
12982}
12983impl Error for ModifyReplicationGroupError {}
12984/// Errors returned by ModifyReplicationGroupShardConfiguration
12985#[derive(Debug, PartialEq)]
12986pub enum ModifyReplicationGroupShardConfigurationError {
12987    /// <p>The requested cache node type is not available in the specified Availability Zone. For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ErrorMessages.html#ErrorMessages.INSUFFICIENT_CACHE_CLUSTER_CAPACITY">InsufficientCacheClusterCapacity</a> in the ElastiCache User Guide.</p>
12988    InsufficientCacheClusterCapacityFault(String),
12989    /// <p>The requested cluster is not in the <code>available</code> state.</p>
12990    InvalidCacheClusterStateFault(String),
12991    /// <p>The KMS key supplied is not valid.</p>
12992    InvalidKMSKeyFault(String),
12993    /// <p>Two or more incompatible parameters were specified.</p>
12994    InvalidParameterCombination(String),
12995    /// <p>The value for a parameter is invalid.</p>
12996    InvalidParameterValue(String),
12997    /// <p>The requested replication group is not in the <code>available</code> state.</p>
12998    InvalidReplicationGroupStateFault(String),
12999    /// <p>The VPC network is in an invalid state.</p>
13000    InvalidVPCNetworkStateFault(String),
13001    /// <p>The request cannot be processed because it would exceed the maximum allowed number of node groups (shards) in a single replication group. The default maximum is 90</p>
13002    NodeGroupsPerReplicationGroupQuotaExceededFault(String),
13003    /// <p>The request cannot be processed because it would exceed the allowed number of cache nodes per customer.</p>
13004    NodeQuotaForCustomerExceededFault(String),
13005    /// <p>The specified replication group does not exist.</p>
13006    ReplicationGroupNotFoundFault(String),
13007}
13008
13009impl ModifyReplicationGroupShardConfigurationError {
13010    pub fn from_response(
13011        res: BufferedHttpResponse,
13012    ) -> RusotoError<ModifyReplicationGroupShardConfigurationError> {
13013        {
13014            let reader = EventReader::new(res.body.as_ref());
13015            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13016            find_start_element(&mut stack);
13017            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13018                match &parsed_error.code[..] {
13019                                    "InsufficientCacheClusterCapacity" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::InsufficientCacheClusterCapacityFault(parsed_error.message)),"InvalidCacheClusterState" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::InvalidCacheClusterStateFault(parsed_error.message)),"InvalidKMSKeyFault" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::InvalidKMSKeyFault(parsed_error.message)),"InvalidParameterCombination" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::InvalidParameterValue(parsed_error.message)),"InvalidReplicationGroupState" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::InvalidReplicationGroupStateFault(parsed_error.message)),"InvalidVPCNetworkStateFault" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::InvalidVPCNetworkStateFault(parsed_error.message)),"NodeGroupsPerReplicationGroupQuotaExceeded" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::NodeGroupsPerReplicationGroupQuotaExceededFault(parsed_error.message)),"NodeQuotaForCustomerExceeded" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::NodeQuotaForCustomerExceededFault(parsed_error.message)),"ReplicationGroupNotFoundFault" => return RusotoError::Service(ModifyReplicationGroupShardConfigurationError::ReplicationGroupNotFoundFault(parsed_error.message)),_ => {}
13020                                }
13021            }
13022        }
13023        RusotoError::Unknown(res)
13024    }
13025
13026    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13027    where
13028        T: Peek + Next,
13029    {
13030        xml_util::start_element("ErrorResponse", stack)?;
13031        XmlErrorDeserializer::deserialize("Error", stack)
13032    }
13033}
13034impl fmt::Display for ModifyReplicationGroupShardConfigurationError {
13035    #[allow(unused_variables)]
13036    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13037        match *self {
13038                            ModifyReplicationGroupShardConfigurationError::InsufficientCacheClusterCapacityFault(ref cause) => write!(f, "{}", cause),
13039ModifyReplicationGroupShardConfigurationError::InvalidCacheClusterStateFault(ref cause) => write!(f, "{}", cause),
13040ModifyReplicationGroupShardConfigurationError::InvalidKMSKeyFault(ref cause) => write!(f, "{}", cause),
13041ModifyReplicationGroupShardConfigurationError::InvalidParameterCombination(ref cause) => write!(f, "{}", cause),
13042ModifyReplicationGroupShardConfigurationError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
13043ModifyReplicationGroupShardConfigurationError::InvalidReplicationGroupStateFault(ref cause) => write!(f, "{}", cause),
13044ModifyReplicationGroupShardConfigurationError::InvalidVPCNetworkStateFault(ref cause) => write!(f, "{}", cause),
13045ModifyReplicationGroupShardConfigurationError::NodeGroupsPerReplicationGroupQuotaExceededFault(ref cause) => write!(f, "{}", cause),
13046ModifyReplicationGroupShardConfigurationError::NodeQuotaForCustomerExceededFault(ref cause) => write!(f, "{}", cause),
13047ModifyReplicationGroupShardConfigurationError::ReplicationGroupNotFoundFault(ref cause) => write!(f, "{}", cause)
13048                        }
13049    }
13050}
13051impl Error for ModifyReplicationGroupShardConfigurationError {}
13052/// Errors returned by PurchaseReservedCacheNodesOffering
13053#[derive(Debug, PartialEq)]
13054pub enum PurchaseReservedCacheNodesOfferingError {
13055    /// <p>Two or more incompatible parameters were specified.</p>
13056    InvalidParameterCombination(String),
13057    /// <p>The value for a parameter is invalid.</p>
13058    InvalidParameterValue(String),
13059    /// <p>You already have a reservation with the given identifier.</p>
13060    ReservedCacheNodeAlreadyExistsFault(String),
13061    /// <p>The request cannot be processed because it would exceed the user's cache node quota.</p>
13062    ReservedCacheNodeQuotaExceededFault(String),
13063    /// <p>The requested cache node offering does not exist.</p>
13064    ReservedCacheNodesOfferingNotFoundFault(String),
13065}
13066
13067impl PurchaseReservedCacheNodesOfferingError {
13068    pub fn from_response(
13069        res: BufferedHttpResponse,
13070    ) -> RusotoError<PurchaseReservedCacheNodesOfferingError> {
13071        {
13072            let reader = EventReader::new(res.body.as_ref());
13073            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13074            find_start_element(&mut stack);
13075            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13076                match &parsed_error.code[..] {
13077                                    "InvalidParameterCombination" => return RusotoError::Service(PurchaseReservedCacheNodesOfferingError::InvalidParameterCombination(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(PurchaseReservedCacheNodesOfferingError::InvalidParameterValue(parsed_error.message)),"ReservedCacheNodeAlreadyExists" => return RusotoError::Service(PurchaseReservedCacheNodesOfferingError::ReservedCacheNodeAlreadyExistsFault(parsed_error.message)),"ReservedCacheNodeQuotaExceeded" => return RusotoError::Service(PurchaseReservedCacheNodesOfferingError::ReservedCacheNodeQuotaExceededFault(parsed_error.message)),"ReservedCacheNodesOfferingNotFound" => return RusotoError::Service(PurchaseReservedCacheNodesOfferingError::ReservedCacheNodesOfferingNotFoundFault(parsed_error.message)),_ => {}
13078                                }
13079            }
13080        }
13081        RusotoError::Unknown(res)
13082    }
13083
13084    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13085    where
13086        T: Peek + Next,
13087    {
13088        xml_util::start_element("ErrorResponse", stack)?;
13089        XmlErrorDeserializer::deserialize("Error", stack)
13090    }
13091}
13092impl fmt::Display for PurchaseReservedCacheNodesOfferingError {
13093    #[allow(unused_variables)]
13094    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13095        match *self {
13096            PurchaseReservedCacheNodesOfferingError::InvalidParameterCombination(ref cause) => {
13097                write!(f, "{}", cause)
13098            }
13099            PurchaseReservedCacheNodesOfferingError::InvalidParameterValue(ref cause) => {
13100                write!(f, "{}", cause)
13101            }
13102            PurchaseReservedCacheNodesOfferingError::ReservedCacheNodeAlreadyExistsFault(
13103                ref cause,
13104            ) => write!(f, "{}", cause),
13105            PurchaseReservedCacheNodesOfferingError::ReservedCacheNodeQuotaExceededFault(
13106                ref cause,
13107            ) => write!(f, "{}", cause),
13108            PurchaseReservedCacheNodesOfferingError::ReservedCacheNodesOfferingNotFoundFault(
13109                ref cause,
13110            ) => write!(f, "{}", cause),
13111        }
13112    }
13113}
13114impl Error for PurchaseReservedCacheNodesOfferingError {}
13115/// Errors returned by RebalanceSlotsInGlobalReplicationGroup
13116#[derive(Debug, PartialEq)]
13117pub enum RebalanceSlotsInGlobalReplicationGroupError {
13118    /// <p>The Global Datastore does not exist</p>
13119    GlobalReplicationGroupNotFoundFault(String),
13120    /// <p>The Global Datastore is not available or in primary-only state.</p>
13121    InvalidGlobalReplicationGroupStateFault(String),
13122    /// <p>The value for a parameter is invalid.</p>
13123    InvalidParameterValue(String),
13124}
13125
13126impl RebalanceSlotsInGlobalReplicationGroupError {
13127    pub fn from_response(
13128        res: BufferedHttpResponse,
13129    ) -> RusotoError<RebalanceSlotsInGlobalReplicationGroupError> {
13130        {
13131            let reader = EventReader::new(res.body.as_ref());
13132            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13133            find_start_element(&mut stack);
13134            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13135                match &parsed_error.code[..] {
13136                                    "GlobalReplicationGroupNotFoundFault" => return RusotoError::Service(RebalanceSlotsInGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(parsed_error.message)),"InvalidGlobalReplicationGroupState" => return RusotoError::Service(RebalanceSlotsInGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(parsed_error.message)),"InvalidParameterValue" => return RusotoError::Service(RebalanceSlotsInGlobalReplicationGroupError::InvalidParameterValue(parsed_error.message)),_ => {}
13137                                }
13138            }
13139        }
13140        RusotoError::Unknown(res)
13141    }
13142
13143    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13144    where
13145        T: Peek + Next,
13146    {
13147        xml_util::start_element("ErrorResponse", stack)?;
13148        XmlErrorDeserializer::deserialize("Error", stack)
13149    }
13150}
13151impl fmt::Display for RebalanceSlotsInGlobalReplicationGroupError {
13152    #[allow(unused_variables)]
13153    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13154        match *self {
13155                            RebalanceSlotsInGlobalReplicationGroupError::GlobalReplicationGroupNotFoundFault(ref cause) => write!(f, "{}", cause),
13156RebalanceSlotsInGlobalReplicationGroupError::InvalidGlobalReplicationGroupStateFault(ref cause) => write!(f, "{}", cause),
13157RebalanceSlotsInGlobalReplicationGroupError::InvalidParameterValue(ref cause) => write!(f, "{}", cause)
13158                        }
13159    }
13160}
13161impl Error for RebalanceSlotsInGlobalReplicationGroupError {}
13162/// Errors returned by RebootCacheCluster
13163#[derive(Debug, PartialEq)]
13164pub enum RebootCacheClusterError {
13165    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
13166    CacheClusterNotFoundFault(String),
13167    /// <p>The requested cluster is not in the <code>available</code> state.</p>
13168    InvalidCacheClusterStateFault(String),
13169}
13170
13171impl RebootCacheClusterError {
13172    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RebootCacheClusterError> {
13173        {
13174            let reader = EventReader::new(res.body.as_ref());
13175            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13176            find_start_element(&mut stack);
13177            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13178                match &parsed_error.code[..] {
13179                    "CacheClusterNotFound" => {
13180                        return RusotoError::Service(
13181                            RebootCacheClusterError::CacheClusterNotFoundFault(
13182                                parsed_error.message,
13183                            ),
13184                        )
13185                    }
13186                    "InvalidCacheClusterState" => {
13187                        return RusotoError::Service(
13188                            RebootCacheClusterError::InvalidCacheClusterStateFault(
13189                                parsed_error.message,
13190                            ),
13191                        )
13192                    }
13193                    _ => {}
13194                }
13195            }
13196        }
13197        RusotoError::Unknown(res)
13198    }
13199
13200    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13201    where
13202        T: Peek + Next,
13203    {
13204        xml_util::start_element("ErrorResponse", stack)?;
13205        XmlErrorDeserializer::deserialize("Error", stack)
13206    }
13207}
13208impl fmt::Display for RebootCacheClusterError {
13209    #[allow(unused_variables)]
13210    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13211        match *self {
13212            RebootCacheClusterError::CacheClusterNotFoundFault(ref cause) => write!(f, "{}", cause),
13213            RebootCacheClusterError::InvalidCacheClusterStateFault(ref cause) => {
13214                write!(f, "{}", cause)
13215            }
13216        }
13217    }
13218}
13219impl Error for RebootCacheClusterError {}
13220/// Errors returned by RemoveTagsFromResource
13221#[derive(Debug, PartialEq)]
13222pub enum RemoveTagsFromResourceError {
13223    /// <p>The requested cluster ID does not refer to an existing cluster.</p>
13224    CacheClusterNotFoundFault(String),
13225    /// <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
13226    InvalidARNFault(String),
13227    /// <p>The requested snapshot name does not refer to an existing snapshot.</p>
13228    SnapshotNotFoundFault(String),
13229    /// <p>The requested tag was not found on this resource.</p>
13230    TagNotFoundFault(String),
13231}
13232
13233impl RemoveTagsFromResourceError {
13234    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromResourceError> {
13235        {
13236            let reader = EventReader::new(res.body.as_ref());
13237            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13238            find_start_element(&mut stack);
13239            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13240                match &parsed_error.code[..] {
13241                    "CacheClusterNotFound" => {
13242                        return RusotoError::Service(
13243                            RemoveTagsFromResourceError::CacheClusterNotFoundFault(
13244                                parsed_error.message,
13245                            ),
13246                        )
13247                    }
13248                    "InvalidARN" => {
13249                        return RusotoError::Service(RemoveTagsFromResourceError::InvalidARNFault(
13250                            parsed_error.message,
13251                        ))
13252                    }
13253                    "SnapshotNotFoundFault" => {
13254                        return RusotoError::Service(
13255                            RemoveTagsFromResourceError::SnapshotNotFoundFault(
13256                                parsed_error.message,
13257                            ),
13258                        )
13259                    }
13260                    "TagNotFound" => {
13261                        return RusotoError::Service(RemoveTagsFromResourceError::TagNotFoundFault(
13262                            parsed_error.message,
13263                        ))
13264                    }
13265                    _ => {}
13266                }
13267            }
13268        }
13269        RusotoError::Unknown(res)
13270    }
13271
13272    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13273    where
13274        T: Peek + Next,
13275    {
13276        xml_util::start_element("ErrorResponse", stack)?;
13277        XmlErrorDeserializer::deserialize("Error", stack)
13278    }
13279}
13280impl fmt::Display for RemoveTagsFromResourceError {
13281    #[allow(unused_variables)]
13282    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13283        match *self {
13284            RemoveTagsFromResourceError::CacheClusterNotFoundFault(ref cause) => {
13285                write!(f, "{}", cause)
13286            }
13287            RemoveTagsFromResourceError::InvalidARNFault(ref cause) => write!(f, "{}", cause),
13288            RemoveTagsFromResourceError::SnapshotNotFoundFault(ref cause) => write!(f, "{}", cause),
13289            RemoveTagsFromResourceError::TagNotFoundFault(ref cause) => write!(f, "{}", cause),
13290        }
13291    }
13292}
13293impl Error for RemoveTagsFromResourceError {}
13294/// Errors returned by ResetCacheParameterGroup
13295#[derive(Debug, PartialEq)]
13296pub enum ResetCacheParameterGroupError {
13297    /// <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
13298    CacheParameterGroupNotFoundFault(String),
13299    /// <p>The current state of the cache parameter group does not allow the requested operation to occur.</p>
13300    InvalidCacheParameterGroupStateFault(String),
13301    /// <p>The Global Datastore is not available or in primary-only state.</p>
13302    InvalidGlobalReplicationGroupStateFault(String),
13303    /// <p>Two or more incompatible parameters were specified.</p>
13304    InvalidParameterCombination(String),
13305    /// <p>The value for a parameter is invalid.</p>
13306    InvalidParameterValue(String),
13307}
13308
13309impl ResetCacheParameterGroupError {
13310    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResetCacheParameterGroupError> {
13311        {
13312            let reader = EventReader::new(res.body.as_ref());
13313            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13314            find_start_element(&mut stack);
13315            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13316                match &parsed_error.code[..] {
13317                    "CacheParameterGroupNotFound" => {
13318                        return RusotoError::Service(
13319                            ResetCacheParameterGroupError::CacheParameterGroupNotFoundFault(
13320                                parsed_error.message,
13321                            ),
13322                        )
13323                    }
13324                    "InvalidCacheParameterGroupState" => {
13325                        return RusotoError::Service(
13326                            ResetCacheParameterGroupError::InvalidCacheParameterGroupStateFault(
13327                                parsed_error.message,
13328                            ),
13329                        )
13330                    }
13331                    "InvalidGlobalReplicationGroupState" => {
13332                        return RusotoError::Service(
13333                            ResetCacheParameterGroupError::InvalidGlobalReplicationGroupStateFault(
13334                                parsed_error.message,
13335                            ),
13336                        )
13337                    }
13338                    "InvalidParameterCombination" => {
13339                        return RusotoError::Service(
13340                            ResetCacheParameterGroupError::InvalidParameterCombination(
13341                                parsed_error.message,
13342                            ),
13343                        )
13344                    }
13345                    "InvalidParameterValue" => {
13346                        return RusotoError::Service(
13347                            ResetCacheParameterGroupError::InvalidParameterValue(
13348                                parsed_error.message,
13349                            ),
13350                        )
13351                    }
13352                    _ => {}
13353                }
13354            }
13355        }
13356        RusotoError::Unknown(res)
13357    }
13358
13359    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13360    where
13361        T: Peek + Next,
13362    {
13363        xml_util::start_element("ErrorResponse", stack)?;
13364        XmlErrorDeserializer::deserialize("Error", stack)
13365    }
13366}
13367impl fmt::Display for ResetCacheParameterGroupError {
13368    #[allow(unused_variables)]
13369    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13370        match *self {
13371            ResetCacheParameterGroupError::CacheParameterGroupNotFoundFault(ref cause) => {
13372                write!(f, "{}", cause)
13373            }
13374            ResetCacheParameterGroupError::InvalidCacheParameterGroupStateFault(ref cause) => {
13375                write!(f, "{}", cause)
13376            }
13377            ResetCacheParameterGroupError::InvalidGlobalReplicationGroupStateFault(ref cause) => {
13378                write!(f, "{}", cause)
13379            }
13380            ResetCacheParameterGroupError::InvalidParameterCombination(ref cause) => {
13381                write!(f, "{}", cause)
13382            }
13383            ResetCacheParameterGroupError::InvalidParameterValue(ref cause) => {
13384                write!(f, "{}", cause)
13385            }
13386        }
13387    }
13388}
13389impl Error for ResetCacheParameterGroupError {}
13390/// Errors returned by RevokeCacheSecurityGroupIngress
13391#[derive(Debug, PartialEq)]
13392pub enum RevokeCacheSecurityGroupIngressError {
13393    /// <p>The specified Amazon EC2 security group is not authorized for the specified cache security group.</p>
13394    AuthorizationNotFoundFault(String),
13395    /// <p>The requested cache security group name does not refer to an existing cache security group.</p>
13396    CacheSecurityGroupNotFoundFault(String),
13397    /// <p>The current state of the cache security group does not allow deletion.</p>
13398    InvalidCacheSecurityGroupStateFault(String),
13399    /// <p>Two or more incompatible parameters were specified.</p>
13400    InvalidParameterCombination(String),
13401    /// <p>The value for a parameter is invalid.</p>
13402    InvalidParameterValue(String),
13403}
13404
13405impl RevokeCacheSecurityGroupIngressError {
13406    pub fn from_response(
13407        res: BufferedHttpResponse,
13408    ) -> RusotoError<RevokeCacheSecurityGroupIngressError> {
13409        {
13410            let reader = EventReader::new(res.body.as_ref());
13411            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13412            find_start_element(&mut stack);
13413            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13414                match &parsed_error.code[..] {
13415                    "AuthorizationNotFound" => {
13416                        return RusotoError::Service(
13417                            RevokeCacheSecurityGroupIngressError::AuthorizationNotFoundFault(
13418                                parsed_error.message,
13419                            ),
13420                        )
13421                    }
13422                    "CacheSecurityGroupNotFound" => {
13423                        return RusotoError::Service(
13424                            RevokeCacheSecurityGroupIngressError::CacheSecurityGroupNotFoundFault(
13425                                parsed_error.message,
13426                            ),
13427                        )
13428                    }
13429                    "InvalidCacheSecurityGroupState" => return RusotoError::Service(
13430                        RevokeCacheSecurityGroupIngressError::InvalidCacheSecurityGroupStateFault(
13431                            parsed_error.message,
13432                        ),
13433                    ),
13434                    "InvalidParameterCombination" => {
13435                        return RusotoError::Service(
13436                            RevokeCacheSecurityGroupIngressError::InvalidParameterCombination(
13437                                parsed_error.message,
13438                            ),
13439                        )
13440                    }
13441                    "InvalidParameterValue" => {
13442                        return RusotoError::Service(
13443                            RevokeCacheSecurityGroupIngressError::InvalidParameterValue(
13444                                parsed_error.message,
13445                            ),
13446                        )
13447                    }
13448                    _ => {}
13449                }
13450            }
13451        }
13452        RusotoError::Unknown(res)
13453    }
13454
13455    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13456    where
13457        T: Peek + Next,
13458    {
13459        xml_util::start_element("ErrorResponse", stack)?;
13460        XmlErrorDeserializer::deserialize("Error", stack)
13461    }
13462}
13463impl fmt::Display for RevokeCacheSecurityGroupIngressError {
13464    #[allow(unused_variables)]
13465    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13466        match *self {
13467            RevokeCacheSecurityGroupIngressError::AuthorizationNotFoundFault(ref cause) => {
13468                write!(f, "{}", cause)
13469            }
13470            RevokeCacheSecurityGroupIngressError::CacheSecurityGroupNotFoundFault(ref cause) => {
13471                write!(f, "{}", cause)
13472            }
13473            RevokeCacheSecurityGroupIngressError::InvalidCacheSecurityGroupStateFault(
13474                ref cause,
13475            ) => write!(f, "{}", cause),
13476            RevokeCacheSecurityGroupIngressError::InvalidParameterCombination(ref cause) => {
13477                write!(f, "{}", cause)
13478            }
13479            RevokeCacheSecurityGroupIngressError::InvalidParameterValue(ref cause) => {
13480                write!(f, "{}", cause)
13481            }
13482        }
13483    }
13484}
13485impl Error for RevokeCacheSecurityGroupIngressError {}
13486/// Errors returned by StartMigration
13487#[derive(Debug, PartialEq)]
13488pub enum StartMigrationError {
13489    /// <p>The value for a parameter is invalid.</p>
13490    InvalidParameterValue(String),
13491    /// <p>The requested replication group is not in the <code>available</code> state.</p>
13492    InvalidReplicationGroupStateFault(String),
13493    /// <p>The targeted replication group is not available. </p>
13494    ReplicationGroupAlreadyUnderMigrationFault(String),
13495    /// <p>The specified replication group does not exist.</p>
13496    ReplicationGroupNotFoundFault(String),
13497}
13498
13499impl StartMigrationError {
13500    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartMigrationError> {
13501        {
13502            let reader = EventReader::new(res.body.as_ref());
13503            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13504            find_start_element(&mut stack);
13505            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13506                match &parsed_error.code[..] {
13507                    "InvalidParameterValue" => {
13508                        return RusotoError::Service(StartMigrationError::InvalidParameterValue(
13509                            parsed_error.message,
13510                        ))
13511                    }
13512                    "InvalidReplicationGroupState" => {
13513                        return RusotoError::Service(
13514                            StartMigrationError::InvalidReplicationGroupStateFault(
13515                                parsed_error.message,
13516                            ),
13517                        )
13518                    }
13519                    "ReplicationGroupAlreadyUnderMigrationFault" => {
13520                        return RusotoError::Service(
13521                            StartMigrationError::ReplicationGroupAlreadyUnderMigrationFault(
13522                                parsed_error.message,
13523                            ),
13524                        )
13525                    }
13526                    "ReplicationGroupNotFoundFault" => {
13527                        return RusotoError::Service(
13528                            StartMigrationError::ReplicationGroupNotFoundFault(
13529                                parsed_error.message,
13530                            ),
13531                        )
13532                    }
13533                    _ => {}
13534                }
13535            }
13536        }
13537        RusotoError::Unknown(res)
13538    }
13539
13540    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13541    where
13542        T: Peek + Next,
13543    {
13544        xml_util::start_element("ErrorResponse", stack)?;
13545        XmlErrorDeserializer::deserialize("Error", stack)
13546    }
13547}
13548impl fmt::Display for StartMigrationError {
13549    #[allow(unused_variables)]
13550    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13551        match *self {
13552            StartMigrationError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
13553            StartMigrationError::InvalidReplicationGroupStateFault(ref cause) => {
13554                write!(f, "{}", cause)
13555            }
13556            StartMigrationError::ReplicationGroupAlreadyUnderMigrationFault(ref cause) => {
13557                write!(f, "{}", cause)
13558            }
13559            StartMigrationError::ReplicationGroupNotFoundFault(ref cause) => write!(f, "{}", cause),
13560        }
13561    }
13562}
13563impl Error for StartMigrationError {}
13564/// Errors returned by TestFailover
13565#[derive(Debug, PartialEq)]
13566pub enum TestFailoverError {
13567    /// <p>The customer has exceeded the allowed rate of API calls.</p>
13568    APICallRateForCustomerExceededFault(String),
13569    /// <p>The requested cluster is not in the <code>available</code> state.</p>
13570    InvalidCacheClusterStateFault(String),
13571    /// <p>The KMS key supplied is not valid.</p>
13572    InvalidKMSKeyFault(String),
13573    /// <p>Two or more incompatible parameters were specified.</p>
13574    InvalidParameterCombination(String),
13575    /// <p>The value for a parameter is invalid.</p>
13576    InvalidParameterValue(String),
13577    /// <p>The requested replication group is not in the <code>available</code> state.</p>
13578    InvalidReplicationGroupStateFault(String),
13579    /// <p>The node group specified by the <code>NodeGroupId</code> parameter could not be found. Please verify that the node group exists and that you spelled the <code>NodeGroupId</code> value correctly.</p>
13580    NodeGroupNotFoundFault(String),
13581    /// <p>The specified replication group does not exist.</p>
13582    ReplicationGroupNotFoundFault(String),
13583    /// <p>The <code>TestFailover</code> action is not available.</p>
13584    TestFailoverNotAvailableFault(String),
13585}
13586
13587impl TestFailoverError {
13588    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestFailoverError> {
13589        {
13590            let reader = EventReader::new(res.body.as_ref());
13591            let mut stack = XmlResponse::new(reader.into_iter().peekable());
13592            find_start_element(&mut stack);
13593            if let Ok(parsed_error) = Self::deserialize(&mut stack) {
13594                match &parsed_error.code[..] {
13595                    "APICallRateForCustomerExceeded" => {
13596                        return RusotoError::Service(
13597                            TestFailoverError::APICallRateForCustomerExceededFault(
13598                                parsed_error.message,
13599                            ),
13600                        )
13601                    }
13602                    "InvalidCacheClusterState" => {
13603                        return RusotoError::Service(
13604                            TestFailoverError::InvalidCacheClusterStateFault(parsed_error.message),
13605                        )
13606                    }
13607                    "InvalidKMSKeyFault" => {
13608                        return RusotoError::Service(TestFailoverError::InvalidKMSKeyFault(
13609                            parsed_error.message,
13610                        ))
13611                    }
13612                    "InvalidParameterCombination" => {
13613                        return RusotoError::Service(
13614                            TestFailoverError::InvalidParameterCombination(parsed_error.message),
13615                        )
13616                    }
13617                    "InvalidParameterValue" => {
13618                        return RusotoError::Service(TestFailoverError::InvalidParameterValue(
13619                            parsed_error.message,
13620                        ))
13621                    }
13622                    "InvalidReplicationGroupState" => {
13623                        return RusotoError::Service(
13624                            TestFailoverError::InvalidReplicationGroupStateFault(
13625                                parsed_error.message,
13626                            ),
13627                        )
13628                    }
13629                    "NodeGroupNotFoundFault" => {
13630                        return RusotoError::Service(TestFailoverError::NodeGroupNotFoundFault(
13631                            parsed_error.message,
13632                        ))
13633                    }
13634                    "ReplicationGroupNotFoundFault" => {
13635                        return RusotoError::Service(
13636                            TestFailoverError::ReplicationGroupNotFoundFault(parsed_error.message),
13637                        )
13638                    }
13639                    "TestFailoverNotAvailableFault" => {
13640                        return RusotoError::Service(
13641                            TestFailoverError::TestFailoverNotAvailableFault(parsed_error.message),
13642                        )
13643                    }
13644                    _ => {}
13645                }
13646            }
13647        }
13648        RusotoError::Unknown(res)
13649    }
13650
13651    fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
13652    where
13653        T: Peek + Next,
13654    {
13655        xml_util::start_element("ErrorResponse", stack)?;
13656        XmlErrorDeserializer::deserialize("Error", stack)
13657    }
13658}
13659impl fmt::Display for TestFailoverError {
13660    #[allow(unused_variables)]
13661    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13662        match *self {
13663            TestFailoverError::APICallRateForCustomerExceededFault(ref cause) => {
13664                write!(f, "{}", cause)
13665            }
13666            TestFailoverError::InvalidCacheClusterStateFault(ref cause) => write!(f, "{}", cause),
13667            TestFailoverError::InvalidKMSKeyFault(ref cause) => write!(f, "{}", cause),
13668            TestFailoverError::InvalidParameterCombination(ref cause) => write!(f, "{}", cause),
13669            TestFailoverError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
13670            TestFailoverError::InvalidReplicationGroupStateFault(ref cause) => {
13671                write!(f, "{}", cause)
13672            }
13673            TestFailoverError::NodeGroupNotFoundFault(ref cause) => write!(f, "{}", cause),
13674            TestFailoverError::ReplicationGroupNotFoundFault(ref cause) => write!(f, "{}", cause),
13675            TestFailoverError::TestFailoverNotAvailableFault(ref cause) => write!(f, "{}", cause),
13676        }
13677    }
13678}
13679impl Error for TestFailoverError {}
13680/// Trait representing the capabilities of the Amazon ElastiCache API. Amazon ElastiCache clients implement this trait.
13681#[async_trait]
13682pub trait ElastiCache {
13683    /// <p>Adds up to 50 cost allocation tags to the named resource. A cost allocation tag is a key-value pair where the key and value are case-sensitive. You can use cost allocation tags to categorize and track your AWS costs.</p> <p> When you apply tags to your ElastiCache resources, AWS generates a cost allocation report as a comma-separated value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html">Using Cost Allocation Tags in Amazon ElastiCache</a> in the <i>ElastiCache User Guide</i>.</p>
13684    async fn add_tags_to_resource(
13685        &self,
13686        input: AddTagsToResourceMessage,
13687    ) -> Result<TagListMessage, RusotoError<AddTagsToResourceError>>;
13688
13689    /// <p><p>Allows network ingress to a cache security group. Applications using ElastiCache must be running on Amazon EC2, and Amazon EC2 security groups are used as the authorization mechanism.</p> <note> <p>You cannot authorize ingress from an Amazon EC2 security group in one region to an ElastiCache cluster in another region.</p> </note></p>
13690    async fn authorize_cache_security_group_ingress(
13691        &self,
13692        input: AuthorizeCacheSecurityGroupIngressMessage,
13693    ) -> Result<
13694        AuthorizeCacheSecurityGroupIngressResult,
13695        RusotoError<AuthorizeCacheSecurityGroupIngressError>,
13696    >;
13697
13698    /// <p>Apply the service update. For more information on service updates and applying them, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/applying-updates.html">Applying Service Updates</a>.</p>
13699    async fn batch_apply_update_action(
13700        &self,
13701        input: BatchApplyUpdateActionMessage,
13702    ) -> Result<UpdateActionResultsMessage, RusotoError<BatchApplyUpdateActionError>>;
13703
13704    /// <p>Stop the service update. For more information on service updates and stopping them, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/stopping-self-service-updates.html">Stopping Service Updates</a>.</p>
13705    async fn batch_stop_update_action(
13706        &self,
13707        input: BatchStopUpdateActionMessage,
13708    ) -> Result<UpdateActionResultsMessage, RusotoError<BatchStopUpdateActionError>>;
13709
13710    /// <p>Complete the migration of data.</p>
13711    async fn complete_migration(
13712        &self,
13713        input: CompleteMigrationMessage,
13714    ) -> Result<CompleteMigrationResponse, RusotoError<CompleteMigrationError>>;
13715
13716    /// <p><p>Makes a copy of an existing snapshot.</p> <note> <p>This operation is valid for Redis only.</p> </note> <important> <p>Users or groups that have permissions to use the <code>CopySnapshot</code> operation can create their own Amazon S3 buckets and copy snapshots to it. To control access to your snapshots, use an IAM policy to control who has the ability to use the <code>CopySnapshot</code> operation. For more information about using IAM to control the use of ElastiCache operations, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html">Exporting Snapshots</a> and <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/IAM.html">Authentication &amp; Access Control</a>.</p> </important> <p>You could receive the following error messages.</p> <p class="title"> <b>Error Messages</b> </p> <ul> <li> <p> <b>Error Message:</b> The S3 bucket %s is outside of the region.</p> <p> <b>Solution:</b> Create an Amazon S3 bucket in the same region as your snapshot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-create-s3-bucket">Step 1: Create an Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message:</b> The S3 bucket %s does not exist.</p> <p> <b>Solution:</b> Create an Amazon S3 bucket in the same region as your snapshot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-create-s3-bucket">Step 1: Create an Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message:</b> The S3 bucket %s is not owned by the authenticated user.</p> <p> <b>Solution:</b> Create an Amazon S3 bucket in the same region as your snapshot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-create-s3-bucket">Step 1: Create an Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message:</b> The authenticated user does not have sufficient permissions to perform the desired activity.</p> <p> <b>Solution:</b> Contact your system administrator to get the needed permissions.</p> </li> <li> <p> <b>Error Message:</b> The S3 bucket %s already contains an object with key %s.</p> <p> <b>Solution:</b> Give the <code>TargetSnapshotName</code> a new and unique value. If exporting a snapshot, you could alternatively create a new Amazon S3 bucket and use this same value for <code>TargetSnapshotName</code>.</p> </li> <li> <p> <b>Error Message: </b> ElastiCache has not been granted READ permissions %s on the S3 Bucket.</p> <p> <b>Solution:</b> Add List and Read permissions on the bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access">Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message: </b> ElastiCache has not been granted WRITE permissions %s on the S3 Bucket.</p> <p> <b>Solution:</b> Add Upload/Delete permissions on the bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access">Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message: </b> ElastiCache has not been granted READ_ACP permissions %s on the S3 Bucket.</p> <p> <b>Solution:</b> Add View Permissions on the bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access">Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> </ul></p>
13717    async fn copy_snapshot(
13718        &self,
13719        input: CopySnapshotMessage,
13720    ) -> Result<CopySnapshotResult, RusotoError<CopySnapshotError>>;
13721
13722    /// <p>Creates a cluster. All nodes in the cluster run the same protocol-compliant cache engine software, either Memcached or Redis.</p> <p>This operation is not supported for Redis (cluster mode enabled) clusters.</p>
13723    async fn create_cache_cluster(
13724        &self,
13725        input: CreateCacheClusterMessage,
13726    ) -> Result<CreateCacheClusterResult, RusotoError<CreateCacheClusterError>>;
13727
13728    /// <p><p>Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache parameter group is a collection of parameters and their values that are applied to all of the nodes in any cluster or replication group using the CacheParameterGroup.</p> <p>A newly created CacheParameterGroup is an exact duplicate of the default parameter group for the CacheParameterGroupFamily. To customize the newly created CacheParameterGroup you can change the values of specific parameters. For more information, see:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheParameterGroup.html">ModifyCacheParameterGroup</a> in the ElastiCache API Reference.</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.html">Parameters and Parameter Groups</a> in the ElastiCache User Guide.</p> </li> </ul></p>
13729    async fn create_cache_parameter_group(
13730        &self,
13731        input: CreateCacheParameterGroupMessage,
13732    ) -> Result<CreateCacheParameterGroupResult, RusotoError<CreateCacheParameterGroupError>>;
13733
13734    /// <p>Creates a new cache security group. Use a cache security group to control access to one or more clusters.</p> <p>Cache security groups are only used when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cluster inside of a VPC, use a cache subnet group instead. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html">CreateCacheSubnetGroup</a>.</p>
13735    async fn create_cache_security_group(
13736        &self,
13737        input: CreateCacheSecurityGroupMessage,
13738    ) -> Result<CreateCacheSecurityGroupResult, RusotoError<CreateCacheSecurityGroupError>>;
13739
13740    /// <p>Creates a new cache subnet group.</p> <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
13741    async fn create_cache_subnet_group(
13742        &self,
13743        input: CreateCacheSubnetGroupMessage,
13744    ) -> Result<CreateCacheSubnetGroupResult, RusotoError<CreateCacheSubnetGroupError>>;
13745
13746    /// <p><p>Global Datastore for Redis offers fully managed, fast, reliable and secure cross-region replication. Using Global Datastore for Redis, you can create cross-region read replica clusters for ElastiCache for Redis to enable low-latency reads and disaster recovery across regions. For more information, see <a href="/AmazonElastiCache/latest/red-ug/Redis-Global-Clusters.html">Replication Across Regions Using Global Datastore</a>. </p> <ul> <li> <p>The <b>GlobalReplicationGroupIdSuffix</b> is the name of the Global Datastore.</p> </li> <li> <p>The <b>PrimaryReplicationGroupId</b> represents the name of the primary cluster that accepts writes and will replicate updates to the secondary cluster.</p> </li> </ul></p>
13747    async fn create_global_replication_group(
13748        &self,
13749        input: CreateGlobalReplicationGroupMessage,
13750    ) -> Result<CreateGlobalReplicationGroupResult, RusotoError<CreateGlobalReplicationGroupError>>;
13751
13752    /// <p><p>Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication group.</p> <p>This API can be used to create a standalone regional replication group or a secondary replication group associated with a Global Datastore.</p> <p>A Redis (cluster mode disabled) replication group is a collection of clusters, where one of the clusters is a read/write primary and the others are read-only replicas. Writes to the primary are asynchronously propagated to the replicas.</p> <p>A Redis (cluster mode enabled) replication group is a collection of 1 to 90 node groups (shards). Each node group (shard) has one read/write primary node and up to 5 read-only replica nodes. Writes to the primary are asynchronously propagated to the replicas. Redis (cluster mode enabled) replication groups partition the data across node groups (shards).</p> <p>When a Redis (cluster mode disabled) replication group has been successfully created, you can add one or more read replicas to it, up to a total of 5 read replicas. If you need to increase or decrease the number of node groups (console: shards), you can avail yourself of ElastiCache for Redis&#39; scaling. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Scaling.html">Scaling ElastiCache for Redis Clusters</a> in the <i>ElastiCache User Guide</i>.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
13753    async fn create_replication_group(
13754        &self,
13755        input: CreateReplicationGroupMessage,
13756    ) -> Result<CreateReplicationGroupResult, RusotoError<CreateReplicationGroupError>>;
13757
13758    /// <p><p>Creates a copy of an entire cluster or replication group at a specific moment in time.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
13759    async fn create_snapshot(
13760        &self,
13761        input: CreateSnapshotMessage,
13762    ) -> Result<CreateSnapshotResult, RusotoError<CreateSnapshotError>>;
13763
13764    /// <p>Decreases the number of node groups in a Global Datastore</p>
13765    async fn decrease_node_groups_in_global_replication_group(
13766        &self,
13767        input: DecreaseNodeGroupsInGlobalReplicationGroupMessage,
13768    ) -> Result<
13769        DecreaseNodeGroupsInGlobalReplicationGroupResult,
13770        RusotoError<DecreaseNodeGroupsInGlobalReplicationGroupError>,
13771    >;
13772
13773    /// <p>Dynamically decreases the number of replicas in a Redis (cluster mode disabled) replication group or the number of replica nodes in one or more node groups (shards) of a Redis (cluster mode enabled) replication group. This operation is performed with no cluster down time.</p>
13774    async fn decrease_replica_count(
13775        &self,
13776        input: DecreaseReplicaCountMessage,
13777    ) -> Result<DecreaseReplicaCountResult, RusotoError<DecreaseReplicaCountError>>;
13778
13779    /// <p><p>Deletes a previously provisioned cluster. <code>DeleteCacheCluster</code> deletes all associated cache nodes, node endpoints and the cluster itself. When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the cluster; you cannot cancel or revert this operation.</p> <p>This operation is not valid for:</p> <ul> <li> <p>Redis (cluster mode enabled) clusters</p> </li> <li> <p>A cluster that is the last read replica of a replication group</p> </li> <li> <p>A node group (shard) that has Multi-AZ mode enabled</p> </li> <li> <p>A cluster from a Redis (cluster mode enabled) replication group</p> </li> <li> <p>A cluster that is not in the <code>available</code> state</p> </li> </ul></p>
13780    async fn delete_cache_cluster(
13781        &self,
13782        input: DeleteCacheClusterMessage,
13783    ) -> Result<DeleteCacheClusterResult, RusotoError<DeleteCacheClusterError>>;
13784
13785    /// <p>Deletes the specified cache parameter group. You cannot delete a cache parameter group if it is associated with any cache clusters.</p>
13786    async fn delete_cache_parameter_group(
13787        &self,
13788        input: DeleteCacheParameterGroupMessage,
13789    ) -> Result<(), RusotoError<DeleteCacheParameterGroupError>>;
13790
13791    /// <p><p>Deletes a cache security group.</p> <note> <p>You cannot delete a cache security group if it is associated with any clusters.</p> </note></p>
13792    async fn delete_cache_security_group(
13793        &self,
13794        input: DeleteCacheSecurityGroupMessage,
13795    ) -> Result<(), RusotoError<DeleteCacheSecurityGroupError>>;
13796
13797    /// <p><p>Deletes a cache subnet group.</p> <note> <p>You cannot delete a cache subnet group if it is associated with any clusters.</p> </note></p>
13798    async fn delete_cache_subnet_group(
13799        &self,
13800        input: DeleteCacheSubnetGroupMessage,
13801    ) -> Result<(), RusotoError<DeleteCacheSubnetGroupError>>;
13802
13803    /// <p>Deleting a Global Datastore is a two-step process: </p> <ul> <li> <p>First, you must <a>DisassociateGlobalReplicationGroup</a> to remove the secondary clusters in the Global Datastore.</p> </li> <li> <p>Once the Global Datastore contains only the primary cluster, you can use DeleteGlobalReplicationGroup API to delete the Global Datastore while retainining the primary cluster using Retain…= true.</p> </li> </ul> <p>Since the Global Datastore has only a primary cluster, you can delete the Global Datastore while retaining the primary by setting <code>RetainPrimaryCluster=true</code>.</p> <p>When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot cancel or revert this operation.</p>
13804    async fn delete_global_replication_group(
13805        &self,
13806        input: DeleteGlobalReplicationGroupMessage,
13807    ) -> Result<DeleteGlobalReplicationGroupResult, RusotoError<DeleteGlobalReplicationGroupError>>;
13808
13809    /// <p><p>Deletes an existing replication group. By default, this operation deletes the entire replication group, including the primary/primaries and all of the read replicas. If the replication group has only one primary, you can optionally delete only the read replicas, while retaining the primary by setting <code>RetainPrimaryCluster=true</code>.</p> <p>When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot cancel or revert this operation.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
13810    async fn delete_replication_group(
13811        &self,
13812        input: DeleteReplicationGroupMessage,
13813    ) -> Result<DeleteReplicationGroupResult, RusotoError<DeleteReplicationGroupError>>;
13814
13815    /// <p><p>Deletes an existing snapshot. When you receive a successful response from this operation, ElastiCache immediately begins deleting the snapshot; you cannot cancel or revert this operation.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
13816    async fn delete_snapshot(
13817        &self,
13818        input: DeleteSnapshotMessage,
13819    ) -> Result<DeleteSnapshotResult, RusotoError<DeleteSnapshotError>>;
13820
13821    /// <p>Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cache cluster if a cluster identifier is supplied.</p> <p>By default, abbreviated information about the clusters is returned. You can use the optional <i>ShowCacheNodeInfo</i> flag to retrieve detailed information about the cache nodes associated with the clusters. These details include the DNS address and port for the cache node endpoint.</p> <p>If the cluster is in the <i>creating</i> state, only cluster-level information is displayed until all of the nodes are successfully provisioned.</p> <p>If the cluster is in the <i>deleting</i> state, only cluster-level information is displayed.</p> <p>If cache nodes are currently being added to the cluster, node endpoint information and creation time for the additional nodes are not displayed until they are completely provisioned. When the cluster state is <i>available</i>, the cluster is ready for use.</p> <p>If cache nodes are currently being removed from the cluster, no endpoint information for the removed nodes is displayed.</p>
13822    async fn describe_cache_clusters(
13823        &self,
13824        input: DescribeCacheClustersMessage,
13825    ) -> Result<CacheClusterMessage, RusotoError<DescribeCacheClustersError>>;
13826
13827    /// <p>Returns a list of the available cache engines and their versions.</p>
13828    async fn describe_cache_engine_versions(
13829        &self,
13830        input: DescribeCacheEngineVersionsMessage,
13831    ) -> Result<CacheEngineVersionMessage, RusotoError<DescribeCacheEngineVersionsError>>;
13832
13833    /// <p>Returns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list contains only the descriptions for that group.</p>
13834    async fn describe_cache_parameter_groups(
13835        &self,
13836        input: DescribeCacheParameterGroupsMessage,
13837    ) -> Result<CacheParameterGroupsMessage, RusotoError<DescribeCacheParameterGroupsError>>;
13838
13839    /// <p>Returns the detailed parameter list for a particular cache parameter group.</p>
13840    async fn describe_cache_parameters(
13841        &self,
13842        input: DescribeCacheParametersMessage,
13843    ) -> Result<CacheParameterGroupDetails, RusotoError<DescribeCacheParametersError>>;
13844
13845    /// <p>Returns a list of cache security group descriptions. If a cache security group name is specified, the list contains only the description of that group. This applicable only when you have ElastiCache in Classic setup </p>
13846    async fn describe_cache_security_groups(
13847        &self,
13848        input: DescribeCacheSecurityGroupsMessage,
13849    ) -> Result<CacheSecurityGroupMessage, RusotoError<DescribeCacheSecurityGroupsError>>;
13850
13851    /// <p>Returns a list of cache subnet group descriptions. If a subnet group name is specified, the list contains only the description of that group. This is applicable only when you have ElastiCache in VPC setup. All ElastiCache clusters now launch in VPC by default. </p>
13852    async fn describe_cache_subnet_groups(
13853        &self,
13854        input: DescribeCacheSubnetGroupsMessage,
13855    ) -> Result<CacheSubnetGroupMessage, RusotoError<DescribeCacheSubnetGroupsError>>;
13856
13857    /// <p>Returns the default engine and system parameter information for the specified cache engine.</p>
13858    async fn describe_engine_default_parameters(
13859        &self,
13860        input: DescribeEngineDefaultParametersMessage,
13861    ) -> Result<
13862        DescribeEngineDefaultParametersResult,
13863        RusotoError<DescribeEngineDefaultParametersError>,
13864    >;
13865
13866    /// <p>Returns events related to clusters, cache security groups, and cache parameter groups. You can obtain events specific to a particular cluster, cache security group, or cache parameter group by providing the name as a parameter.</p> <p>By default, only the events occurring within the last hour are returned; however, you can retrieve up to 14 days' worth of events if necessary.</p>
13867    async fn describe_events(
13868        &self,
13869        input: DescribeEventsMessage,
13870    ) -> Result<EventsMessage, RusotoError<DescribeEventsError>>;
13871
13872    /// <p>Returns information about a particular global replication group. If no identifier is specified, returns information about all Global Datastores. </p>
13873    async fn describe_global_replication_groups(
13874        &self,
13875        input: DescribeGlobalReplicationGroupsMessage,
13876    ) -> Result<
13877        DescribeGlobalReplicationGroupsResult,
13878        RusotoError<DescribeGlobalReplicationGroupsError>,
13879    >;
13880
13881    /// <p><p>Returns information about a particular replication group. If no identifier is specified, <code>DescribeReplicationGroups</code> returns information about all replication groups.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
13882    async fn describe_replication_groups(
13883        &self,
13884        input: DescribeReplicationGroupsMessage,
13885    ) -> Result<ReplicationGroupMessage, RusotoError<DescribeReplicationGroupsError>>;
13886
13887    /// <p>Returns information about reserved cache nodes for this account, or about a specified reserved cache node.</p>
13888    async fn describe_reserved_cache_nodes(
13889        &self,
13890        input: DescribeReservedCacheNodesMessage,
13891    ) -> Result<ReservedCacheNodeMessage, RusotoError<DescribeReservedCacheNodesError>>;
13892
13893    /// <p>Lists available reserved cache node offerings.</p>
13894    async fn describe_reserved_cache_nodes_offerings(
13895        &self,
13896        input: DescribeReservedCacheNodesOfferingsMessage,
13897    ) -> Result<
13898        ReservedCacheNodesOfferingMessage,
13899        RusotoError<DescribeReservedCacheNodesOfferingsError>,
13900    >;
13901
13902    /// <p>Returns details of the service updates</p>
13903    async fn describe_service_updates(
13904        &self,
13905        input: DescribeServiceUpdatesMessage,
13906    ) -> Result<ServiceUpdatesMessage, RusotoError<DescribeServiceUpdatesError>>;
13907
13908    /// <p><p>Returns information about cluster or replication group snapshots. By default, <code>DescribeSnapshots</code> lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with a particular cache cluster.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
13909    async fn describe_snapshots(
13910        &self,
13911        input: DescribeSnapshotsMessage,
13912    ) -> Result<DescribeSnapshotsListMessage, RusotoError<DescribeSnapshotsError>>;
13913
13914    /// <p>Returns details of the update actions </p>
13915    async fn describe_update_actions(
13916        &self,
13917        input: DescribeUpdateActionsMessage,
13918    ) -> Result<UpdateActionsMessage, RusotoError<DescribeUpdateActionsError>>;
13919
13920    /// <p>Remove a secondary cluster from the Global Datastore using the Global Datastore name. The secondary cluster will no longer receive updates from the primary cluster, but will remain as a standalone cluster in that AWS region.</p>
13921    async fn disassociate_global_replication_group(
13922        &self,
13923        input: DisassociateGlobalReplicationGroupMessage,
13924    ) -> Result<
13925        DisassociateGlobalReplicationGroupResult,
13926        RusotoError<DisassociateGlobalReplicationGroupError>,
13927    >;
13928
13929    /// <p>Used to failover the primary region to a selected secondary region. The selected secondary region will become primary, and all other clusters will become secondary.</p>
13930    async fn failover_global_replication_group(
13931        &self,
13932        input: FailoverGlobalReplicationGroupMessage,
13933    ) -> Result<
13934        FailoverGlobalReplicationGroupResult,
13935        RusotoError<FailoverGlobalReplicationGroupError>,
13936    >;
13937
13938    /// <p>Increase the number of node groups in the Global Datastore</p>
13939    async fn increase_node_groups_in_global_replication_group(
13940        &self,
13941        input: IncreaseNodeGroupsInGlobalReplicationGroupMessage,
13942    ) -> Result<
13943        IncreaseNodeGroupsInGlobalReplicationGroupResult,
13944        RusotoError<IncreaseNodeGroupsInGlobalReplicationGroupError>,
13945    >;
13946
13947    /// <p>Dynamically increases the number of replics in a Redis (cluster mode disabled) replication group or the number of replica nodes in one or more node groups (shards) of a Redis (cluster mode enabled) replication group. This operation is performed with no cluster down time.</p>
13948    async fn increase_replica_count(
13949        &self,
13950        input: IncreaseReplicaCountMessage,
13951    ) -> Result<IncreaseReplicaCountResult, RusotoError<IncreaseReplicaCountError>>;
13952
13953    /// <p>Lists all available node types that you can scale your Redis cluster's or replication group's current node type.</p> <p>When you use the <code>ModifyCacheCluster</code> or <code>ModifyReplicationGroup</code> operations to scale your cluster or replication group, the value of the <code>CacheNodeType</code> parameter must be one of the node types returned by this operation.</p>
13954    async fn list_allowed_node_type_modifications(
13955        &self,
13956        input: ListAllowedNodeTypeModificationsMessage,
13957    ) -> Result<
13958        AllowedNodeTypeModificationsMessage,
13959        RusotoError<ListAllowedNodeTypeModificationsError>,
13960    >;
13961
13962    /// <p>Lists all cost allocation tags currently on the named resource. A <code>cost allocation tag</code> is a key-value pair where the key is case-sensitive and the value is optional. You can use cost allocation tags to categorize and track your AWS costs.</p> <p>If the cluster is not in the <i>available</i> state, <code>ListTagsForResource</code> returns an error.</p> <p>You can have a maximum of 50 cost allocation tags on an ElastiCache resource. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html">Monitoring Costs with Tags</a>.</p>
13963    async fn list_tags_for_resource(
13964        &self,
13965        input: ListTagsForResourceMessage,
13966    ) -> Result<TagListMessage, RusotoError<ListTagsForResourceError>>;
13967
13968    /// <p>Modifies the settings for a cluster. You can use this operation to change one or more cluster configuration parameters by specifying the parameters and the new values.</p>
13969    async fn modify_cache_cluster(
13970        &self,
13971        input: ModifyCacheClusterMessage,
13972    ) -> Result<ModifyCacheClusterResult, RusotoError<ModifyCacheClusterError>>;
13973
13974    /// <p>Modifies the parameters of a cache parameter group. You can modify up to 20 parameters in a single request by submitting a list parameter name and value pairs.</p>
13975    async fn modify_cache_parameter_group(
13976        &self,
13977        input: ModifyCacheParameterGroupMessage,
13978    ) -> Result<CacheParameterGroupNameMessage, RusotoError<ModifyCacheParameterGroupError>>;
13979
13980    /// <p>Modifies an existing cache subnet group.</p>
13981    async fn modify_cache_subnet_group(
13982        &self,
13983        input: ModifyCacheSubnetGroupMessage,
13984    ) -> Result<ModifyCacheSubnetGroupResult, RusotoError<ModifyCacheSubnetGroupError>>;
13985
13986    /// <p>Modifies the settings for a Global Datastore.</p>
13987    async fn modify_global_replication_group(
13988        &self,
13989        input: ModifyGlobalReplicationGroupMessage,
13990    ) -> Result<ModifyGlobalReplicationGroupResult, RusotoError<ModifyGlobalReplicationGroupError>>;
13991
13992    /// <p><p>Modifies the settings for a replication group.</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html">Scaling for Amazon ElastiCache for Redis (cluster mode enabled)</a> in the ElastiCache User Guide</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html">ModifyReplicationGroupShardConfiguration</a> in the ElastiCache API Reference</p> </li> </ul> <note> <p>This operation is valid for Redis only.</p> </note></p>
13993    async fn modify_replication_group(
13994        &self,
13995        input: ModifyReplicationGroupMessage,
13996    ) -> Result<ModifyReplicationGroupResult, RusotoError<ModifyReplicationGroupError>>;
13997
13998    /// <p>Modifies a replication group's shards (node groups) by allowing you to add shards, remove shards, or rebalance the keyspaces among exisiting shards.</p>
13999    async fn modify_replication_group_shard_configuration(
14000        &self,
14001        input: ModifyReplicationGroupShardConfigurationMessage,
14002    ) -> Result<
14003        ModifyReplicationGroupShardConfigurationResult,
14004        RusotoError<ModifyReplicationGroupShardConfigurationError>,
14005    >;
14006
14007    /// <p>Allows you to purchase a reserved cache node offering.</p>
14008    async fn purchase_reserved_cache_nodes_offering(
14009        &self,
14010        input: PurchaseReservedCacheNodesOfferingMessage,
14011    ) -> Result<
14012        PurchaseReservedCacheNodesOfferingResult,
14013        RusotoError<PurchaseReservedCacheNodesOfferingError>,
14014    >;
14015
14016    /// <p>Redistribute slots to ensure uniform distribution across existing shards in the cluster.</p>
14017    async fn rebalance_slots_in_global_replication_group(
14018        &self,
14019        input: RebalanceSlotsInGlobalReplicationGroupMessage,
14020    ) -> Result<
14021        RebalanceSlotsInGlobalReplicationGroupResult,
14022        RusotoError<RebalanceSlotsInGlobalReplicationGroupError>,
14023    >;
14024
14025    /// <p>Reboots some, or all, of the cache nodes within a provisioned cluster. This operation applies any modified cache parameter groups to the cluster. The reboot operation takes place as soon as possible, and results in a momentary outage to the cluster. During the reboot, the cluster status is set to REBOOTING.</p> <p>The reboot causes the contents of the cache (for each cache node being rebooted) to be lost.</p> <p>When the reboot is complete, a cluster event is created.</p> <p>Rebooting a cluster is currently supported on Memcached and Redis (cluster mode disabled) clusters. Rebooting is not supported on Redis (cluster mode enabled) clusters.</p> <p>If you make changes to parameters that require a Redis (cluster mode enabled) cluster reboot for the changes to be applied, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html">Rebooting a Cluster</a> for an alternate process.</p>
14026    async fn reboot_cache_cluster(
14027        &self,
14028        input: RebootCacheClusterMessage,
14029    ) -> Result<RebootCacheClusterResult, RusotoError<RebootCacheClusterError>>;
14030
14031    /// <p>Removes the tags identified by the <code>TagKeys</code> list from the named resource.</p>
14032    async fn remove_tags_from_resource(
14033        &self,
14034        input: RemoveTagsFromResourceMessage,
14035    ) -> Result<TagListMessage, RusotoError<RemoveTagsFromResourceError>>;
14036
14037    /// <p>Modifies the parameters of a cache parameter group to the engine or system default value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the <code>ResetAllParameters</code> and <code>CacheParameterGroupName</code> parameters.</p>
14038    async fn reset_cache_parameter_group(
14039        &self,
14040        input: ResetCacheParameterGroupMessage,
14041    ) -> Result<CacheParameterGroupNameMessage, RusotoError<ResetCacheParameterGroupError>>;
14042
14043    /// <p>Revokes ingress from a cache security group. Use this operation to disallow access from an Amazon EC2 security group that had been previously authorized.</p>
14044    async fn revoke_cache_security_group_ingress(
14045        &self,
14046        input: RevokeCacheSecurityGroupIngressMessage,
14047    ) -> Result<
14048        RevokeCacheSecurityGroupIngressResult,
14049        RusotoError<RevokeCacheSecurityGroupIngressError>,
14050    >;
14051
14052    /// <p>Start the migration of data.</p>
14053    async fn start_migration(
14054        &self,
14055        input: StartMigrationMessage,
14056    ) -> Result<StartMigrationResponse, RusotoError<StartMigrationError>>;
14057
14058    /// <p>Represents the input of a <code>TestFailover</code> operation which test automatic failover on a specified node group (called shard in the console) in a replication group (called cluster in the console).</p> <p class="title"> <b>Note the following</b> </p> <ul> <li> <p>A customer can use this operation to test automatic failover on up to 5 shards (called node groups in the ElastiCache API and AWS CLI) in any rolling 24-hour period.</p> </li> <li> <p>If calling this operation on shards in different clusters (called replication groups in the API and CLI), the calls can be made concurrently.</p> <p> </p> </li> <li> <p>If calling this operation multiple times on different shards in the same Redis (cluster mode enabled) replication group, the first node replacement must complete before a subsequent call can be made.</p> </li> <li> <p>To determine whether the node replacement is complete you can check Events using the Amazon ElastiCache console, the AWS CLI, or the ElastiCache API. Look for the following automatic failover related events, listed here in order of occurrance:</p> <ol> <li> <p>Replication group message: <code>Test Failover API called for node group &lt;node-group-id&gt;</code> </p> </li> <li> <p>Cache cluster message: <code>Failover from master node &lt;primary-node-id&gt; to replica node &lt;node-id&gt; completed</code> </p> </li> <li> <p>Replication group message: <code>Failover from master node &lt;primary-node-id&gt; to replica node &lt;node-id&gt; completed</code> </p> </li> <li> <p>Cache cluster message: <code>Recovering cache nodes &lt;node-id&gt;</code> </p> </li> <li> <p>Cache cluster message: <code>Finished recovery for cache nodes &lt;node-id&gt;</code> </p> </li> </ol> <p>For more information see:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html">Viewing ElastiCache Events</a> in the <i>ElastiCache User Guide</i> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html">DescribeEvents</a> in the ElastiCache API Reference</p> </li> </ul> </li> </ul> <p>Also see, <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test">Testing Multi-AZ </a> in the <i>ElastiCache User Guide</i>.</p>
14059    async fn test_failover(
14060        &self,
14061        input: TestFailoverMessage,
14062    ) -> Result<TestFailoverResult, RusotoError<TestFailoverError>>;
14063}
14064/// A client for the Amazon ElastiCache API.
14065#[derive(Clone)]
14066pub struct ElastiCacheClient {
14067    client: Client,
14068    region: region::Region,
14069}
14070
14071impl ElastiCacheClient {
14072    /// Creates a client backed by the default tokio event loop.
14073    ///
14074    /// The client will use the default credentials provider and tls client.
14075    pub fn new(region: region::Region) -> ElastiCacheClient {
14076        ElastiCacheClient {
14077            client: Client::shared(),
14078            region,
14079        }
14080    }
14081
14082    pub fn new_with<P, D>(
14083        request_dispatcher: D,
14084        credentials_provider: P,
14085        region: region::Region,
14086    ) -> ElastiCacheClient
14087    where
14088        P: ProvideAwsCredentials + Send + Sync + 'static,
14089        D: DispatchSignedRequest + Send + Sync + 'static,
14090    {
14091        ElastiCacheClient {
14092            client: Client::new_with(credentials_provider, request_dispatcher),
14093            region,
14094        }
14095    }
14096
14097    pub fn new_with_client(client: Client, region: region::Region) -> ElastiCacheClient {
14098        ElastiCacheClient { client, region }
14099    }
14100}
14101
14102#[async_trait]
14103impl ElastiCache for ElastiCacheClient {
14104    /// <p>Adds up to 50 cost allocation tags to the named resource. A cost allocation tag is a key-value pair where the key and value are case-sensitive. You can use cost allocation tags to categorize and track your AWS costs.</p> <p> When you apply tags to your ElastiCache resources, AWS generates a cost allocation report as a comma-separated value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html">Using Cost Allocation Tags in Amazon ElastiCache</a> in the <i>ElastiCache User Guide</i>.</p>
14105    async fn add_tags_to_resource(
14106        &self,
14107        input: AddTagsToResourceMessage,
14108    ) -> Result<TagListMessage, RusotoError<AddTagsToResourceError>> {
14109        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14110        let params = self.new_params("AddTagsToResource");
14111        let mut params = params;
14112        AddTagsToResourceMessageSerializer::serialize(&mut params, "", &input);
14113        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14114        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14115
14116        let response = self
14117            .sign_and_dispatch(request, AddTagsToResourceError::from_response)
14118            .await?;
14119
14120        let mut response = response;
14121        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14122            xml_util::start_element(actual_tag_name, stack)?;
14123            let result = TagListMessageDeserializer::deserialize("AddTagsToResourceResult", stack)?;
14124            skip_tree(stack);
14125            xml_util::end_element(actual_tag_name, stack)?;
14126            Ok(result)
14127        })
14128        .await?;
14129
14130        drop(response); // parse non-payload
14131        Ok(result)
14132    }
14133
14134    /// <p><p>Allows network ingress to a cache security group. Applications using ElastiCache must be running on Amazon EC2, and Amazon EC2 security groups are used as the authorization mechanism.</p> <note> <p>You cannot authorize ingress from an Amazon EC2 security group in one region to an ElastiCache cluster in another region.</p> </note></p>
14135    async fn authorize_cache_security_group_ingress(
14136        &self,
14137        input: AuthorizeCacheSecurityGroupIngressMessage,
14138    ) -> Result<
14139        AuthorizeCacheSecurityGroupIngressResult,
14140        RusotoError<AuthorizeCacheSecurityGroupIngressError>,
14141    > {
14142        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14143        let params = self.new_params("AuthorizeCacheSecurityGroupIngress");
14144        let mut params = params;
14145        AuthorizeCacheSecurityGroupIngressMessageSerializer::serialize(&mut params, "", &input);
14146        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14147        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14148
14149        let response = self
14150            .sign_and_dispatch(
14151                request,
14152                AuthorizeCacheSecurityGroupIngressError::from_response,
14153            )
14154            .await?;
14155
14156        let mut response = response;
14157        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14158            xml_util::start_element(actual_tag_name, stack)?;
14159            let result = AuthorizeCacheSecurityGroupIngressResultDeserializer::deserialize(
14160                "AuthorizeCacheSecurityGroupIngressResult",
14161                stack,
14162            )?;
14163            skip_tree(stack);
14164            xml_util::end_element(actual_tag_name, stack)?;
14165            Ok(result)
14166        })
14167        .await?;
14168
14169        drop(response); // parse non-payload
14170        Ok(result)
14171    }
14172
14173    /// <p>Apply the service update. For more information on service updates and applying them, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/applying-updates.html">Applying Service Updates</a>.</p>
14174    async fn batch_apply_update_action(
14175        &self,
14176        input: BatchApplyUpdateActionMessage,
14177    ) -> Result<UpdateActionResultsMessage, RusotoError<BatchApplyUpdateActionError>> {
14178        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14179        let params = self.new_params("BatchApplyUpdateAction");
14180        let mut params = params;
14181        BatchApplyUpdateActionMessageSerializer::serialize(&mut params, "", &input);
14182        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14183        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14184
14185        let response = self
14186            .sign_and_dispatch(request, BatchApplyUpdateActionError::from_response)
14187            .await?;
14188
14189        let mut response = response;
14190        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14191            xml_util::start_element(actual_tag_name, stack)?;
14192            let result = UpdateActionResultsMessageDeserializer::deserialize(
14193                "BatchApplyUpdateActionResult",
14194                stack,
14195            )?;
14196            skip_tree(stack);
14197            xml_util::end_element(actual_tag_name, stack)?;
14198            Ok(result)
14199        })
14200        .await?;
14201
14202        drop(response); // parse non-payload
14203        Ok(result)
14204    }
14205
14206    /// <p>Stop the service update. For more information on service updates and stopping them, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/stopping-self-service-updates.html">Stopping Service Updates</a>.</p>
14207    async fn batch_stop_update_action(
14208        &self,
14209        input: BatchStopUpdateActionMessage,
14210    ) -> Result<UpdateActionResultsMessage, RusotoError<BatchStopUpdateActionError>> {
14211        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14212        let params = self.new_params("BatchStopUpdateAction");
14213        let mut params = params;
14214        BatchStopUpdateActionMessageSerializer::serialize(&mut params, "", &input);
14215        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14216        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14217
14218        let response = self
14219            .sign_and_dispatch(request, BatchStopUpdateActionError::from_response)
14220            .await?;
14221
14222        let mut response = response;
14223        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14224            xml_util::start_element(actual_tag_name, stack)?;
14225            let result = UpdateActionResultsMessageDeserializer::deserialize(
14226                "BatchStopUpdateActionResult",
14227                stack,
14228            )?;
14229            skip_tree(stack);
14230            xml_util::end_element(actual_tag_name, stack)?;
14231            Ok(result)
14232        })
14233        .await?;
14234
14235        drop(response); // parse non-payload
14236        Ok(result)
14237    }
14238
14239    /// <p>Complete the migration of data.</p>
14240    async fn complete_migration(
14241        &self,
14242        input: CompleteMigrationMessage,
14243    ) -> Result<CompleteMigrationResponse, RusotoError<CompleteMigrationError>> {
14244        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14245        let params = self.new_params("CompleteMigration");
14246        let mut params = params;
14247        CompleteMigrationMessageSerializer::serialize(&mut params, "", &input);
14248        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14249        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14250
14251        let response = self
14252            .sign_and_dispatch(request, CompleteMigrationError::from_response)
14253            .await?;
14254
14255        let mut response = response;
14256        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14257            xml_util::start_element(actual_tag_name, stack)?;
14258            let result = CompleteMigrationResponseDeserializer::deserialize(
14259                "CompleteMigrationResult",
14260                stack,
14261            )?;
14262            skip_tree(stack);
14263            xml_util::end_element(actual_tag_name, stack)?;
14264            Ok(result)
14265        })
14266        .await?;
14267
14268        drop(response); // parse non-payload
14269        Ok(result)
14270    }
14271
14272    /// <p><p>Makes a copy of an existing snapshot.</p> <note> <p>This operation is valid for Redis only.</p> </note> <important> <p>Users or groups that have permissions to use the <code>CopySnapshot</code> operation can create their own Amazon S3 buckets and copy snapshots to it. To control access to your snapshots, use an IAM policy to control who has the ability to use the <code>CopySnapshot</code> operation. For more information about using IAM to control the use of ElastiCache operations, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html">Exporting Snapshots</a> and <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/IAM.html">Authentication &amp; Access Control</a>.</p> </important> <p>You could receive the following error messages.</p> <p class="title"> <b>Error Messages</b> </p> <ul> <li> <p> <b>Error Message:</b> The S3 bucket %s is outside of the region.</p> <p> <b>Solution:</b> Create an Amazon S3 bucket in the same region as your snapshot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-create-s3-bucket">Step 1: Create an Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message:</b> The S3 bucket %s does not exist.</p> <p> <b>Solution:</b> Create an Amazon S3 bucket in the same region as your snapshot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-create-s3-bucket">Step 1: Create an Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message:</b> The S3 bucket %s is not owned by the authenticated user.</p> <p> <b>Solution:</b> Create an Amazon S3 bucket in the same region as your snapshot. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-create-s3-bucket">Step 1: Create an Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message:</b> The authenticated user does not have sufficient permissions to perform the desired activity.</p> <p> <b>Solution:</b> Contact your system administrator to get the needed permissions.</p> </li> <li> <p> <b>Error Message:</b> The S3 bucket %s already contains an object with key %s.</p> <p> <b>Solution:</b> Give the <code>TargetSnapshotName</code> a new and unique value. If exporting a snapshot, you could alternatively create a new Amazon S3 bucket and use this same value for <code>TargetSnapshotName</code>.</p> </li> <li> <p> <b>Error Message: </b> ElastiCache has not been granted READ permissions %s on the S3 Bucket.</p> <p> <b>Solution:</b> Add List and Read permissions on the bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access">Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message: </b> ElastiCache has not been granted WRITE permissions %s on the S3 Bucket.</p> <p> <b>Solution:</b> Add Upload/Delete permissions on the bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access">Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> <li> <p> <b>Error Message: </b> ElastiCache has not been granted READ_ACP permissions %s on the S3 Bucket.</p> <p> <b>Solution:</b> Add View Permissions on the bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html#backups-exporting-grant-access">Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket</a> in the ElastiCache User Guide.</p> </li> </ul></p>
14273    async fn copy_snapshot(
14274        &self,
14275        input: CopySnapshotMessage,
14276    ) -> Result<CopySnapshotResult, RusotoError<CopySnapshotError>> {
14277        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14278        let params = self.new_params("CopySnapshot");
14279        let mut params = params;
14280        CopySnapshotMessageSerializer::serialize(&mut params, "", &input);
14281        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14282        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14283
14284        let response = self
14285            .sign_and_dispatch(request, CopySnapshotError::from_response)
14286            .await?;
14287
14288        let mut response = response;
14289        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14290            xml_util::start_element(actual_tag_name, stack)?;
14291            let result = CopySnapshotResultDeserializer::deserialize("CopySnapshotResult", stack)?;
14292            skip_tree(stack);
14293            xml_util::end_element(actual_tag_name, stack)?;
14294            Ok(result)
14295        })
14296        .await?;
14297
14298        drop(response); // parse non-payload
14299        Ok(result)
14300    }
14301
14302    /// <p>Creates a cluster. All nodes in the cluster run the same protocol-compliant cache engine software, either Memcached or Redis.</p> <p>This operation is not supported for Redis (cluster mode enabled) clusters.</p>
14303    async fn create_cache_cluster(
14304        &self,
14305        input: CreateCacheClusterMessage,
14306    ) -> Result<CreateCacheClusterResult, RusotoError<CreateCacheClusterError>> {
14307        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14308        let params = self.new_params("CreateCacheCluster");
14309        let mut params = params;
14310        CreateCacheClusterMessageSerializer::serialize(&mut params, "", &input);
14311        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14312        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14313
14314        let response = self
14315            .sign_and_dispatch(request, CreateCacheClusterError::from_response)
14316            .await?;
14317
14318        let mut response = response;
14319        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14320            xml_util::start_element(actual_tag_name, stack)?;
14321            let result = CreateCacheClusterResultDeserializer::deserialize(
14322                "CreateCacheClusterResult",
14323                stack,
14324            )?;
14325            skip_tree(stack);
14326            xml_util::end_element(actual_tag_name, stack)?;
14327            Ok(result)
14328        })
14329        .await?;
14330
14331        drop(response); // parse non-payload
14332        Ok(result)
14333    }
14334
14335    /// <p><p>Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache parameter group is a collection of parameters and their values that are applied to all of the nodes in any cluster or replication group using the CacheParameterGroup.</p> <p>A newly created CacheParameterGroup is an exact duplicate of the default parameter group for the CacheParameterGroupFamily. To customize the newly created CacheParameterGroup you can change the values of specific parameters. For more information, see:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheParameterGroup.html">ModifyCacheParameterGroup</a> in the ElastiCache API Reference.</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.html">Parameters and Parameter Groups</a> in the ElastiCache User Guide.</p> </li> </ul></p>
14336    async fn create_cache_parameter_group(
14337        &self,
14338        input: CreateCacheParameterGroupMessage,
14339    ) -> Result<CreateCacheParameterGroupResult, RusotoError<CreateCacheParameterGroupError>> {
14340        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14341        let params = self.new_params("CreateCacheParameterGroup");
14342        let mut params = params;
14343        CreateCacheParameterGroupMessageSerializer::serialize(&mut params, "", &input);
14344        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14345        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14346
14347        let response = self
14348            .sign_and_dispatch(request, CreateCacheParameterGroupError::from_response)
14349            .await?;
14350
14351        let mut response = response;
14352        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14353            xml_util::start_element(actual_tag_name, stack)?;
14354            let result = CreateCacheParameterGroupResultDeserializer::deserialize(
14355                "CreateCacheParameterGroupResult",
14356                stack,
14357            )?;
14358            skip_tree(stack);
14359            xml_util::end_element(actual_tag_name, stack)?;
14360            Ok(result)
14361        })
14362        .await?;
14363
14364        drop(response); // parse non-payload
14365        Ok(result)
14366    }
14367
14368    /// <p>Creates a new cache security group. Use a cache security group to control access to one or more clusters.</p> <p>Cache security groups are only used when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cluster inside of a VPC, use a cache subnet group instead. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html">CreateCacheSubnetGroup</a>.</p>
14369    async fn create_cache_security_group(
14370        &self,
14371        input: CreateCacheSecurityGroupMessage,
14372    ) -> Result<CreateCacheSecurityGroupResult, RusotoError<CreateCacheSecurityGroupError>> {
14373        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14374        let params = self.new_params("CreateCacheSecurityGroup");
14375        let mut params = params;
14376        CreateCacheSecurityGroupMessageSerializer::serialize(&mut params, "", &input);
14377        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14378        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14379
14380        let response = self
14381            .sign_and_dispatch(request, CreateCacheSecurityGroupError::from_response)
14382            .await?;
14383
14384        let mut response = response;
14385        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14386            xml_util::start_element(actual_tag_name, stack)?;
14387            let result = CreateCacheSecurityGroupResultDeserializer::deserialize(
14388                "CreateCacheSecurityGroupResult",
14389                stack,
14390            )?;
14391            skip_tree(stack);
14392            xml_util::end_element(actual_tag_name, stack)?;
14393            Ok(result)
14394        })
14395        .await?;
14396
14397        drop(response); // parse non-payload
14398        Ok(result)
14399    }
14400
14401    /// <p>Creates a new cache subnet group.</p> <p>Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).</p>
14402    async fn create_cache_subnet_group(
14403        &self,
14404        input: CreateCacheSubnetGroupMessage,
14405    ) -> Result<CreateCacheSubnetGroupResult, RusotoError<CreateCacheSubnetGroupError>> {
14406        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14407        let params = self.new_params("CreateCacheSubnetGroup");
14408        let mut params = params;
14409        CreateCacheSubnetGroupMessageSerializer::serialize(&mut params, "", &input);
14410        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14411        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14412
14413        let response = self
14414            .sign_and_dispatch(request, CreateCacheSubnetGroupError::from_response)
14415            .await?;
14416
14417        let mut response = response;
14418        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14419            xml_util::start_element(actual_tag_name, stack)?;
14420            let result = CreateCacheSubnetGroupResultDeserializer::deserialize(
14421                "CreateCacheSubnetGroupResult",
14422                stack,
14423            )?;
14424            skip_tree(stack);
14425            xml_util::end_element(actual_tag_name, stack)?;
14426            Ok(result)
14427        })
14428        .await?;
14429
14430        drop(response); // parse non-payload
14431        Ok(result)
14432    }
14433
14434    /// <p><p>Global Datastore for Redis offers fully managed, fast, reliable and secure cross-region replication. Using Global Datastore for Redis, you can create cross-region read replica clusters for ElastiCache for Redis to enable low-latency reads and disaster recovery across regions. For more information, see <a href="/AmazonElastiCache/latest/red-ug/Redis-Global-Clusters.html">Replication Across Regions Using Global Datastore</a>. </p> <ul> <li> <p>The <b>GlobalReplicationGroupIdSuffix</b> is the name of the Global Datastore.</p> </li> <li> <p>The <b>PrimaryReplicationGroupId</b> represents the name of the primary cluster that accepts writes and will replicate updates to the secondary cluster.</p> </li> </ul></p>
14435    async fn create_global_replication_group(
14436        &self,
14437        input: CreateGlobalReplicationGroupMessage,
14438    ) -> Result<CreateGlobalReplicationGroupResult, RusotoError<CreateGlobalReplicationGroupError>>
14439    {
14440        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14441        let params = self.new_params("CreateGlobalReplicationGroup");
14442        let mut params = params;
14443        CreateGlobalReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
14444        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14445        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14446
14447        let response = self
14448            .sign_and_dispatch(request, CreateGlobalReplicationGroupError::from_response)
14449            .await?;
14450
14451        let mut response = response;
14452        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14453            xml_util::start_element(actual_tag_name, stack)?;
14454            let result = CreateGlobalReplicationGroupResultDeserializer::deserialize(
14455                "CreateGlobalReplicationGroupResult",
14456                stack,
14457            )?;
14458            skip_tree(stack);
14459            xml_util::end_element(actual_tag_name, stack)?;
14460            Ok(result)
14461        })
14462        .await?;
14463
14464        drop(response); // parse non-payload
14465        Ok(result)
14466    }
14467
14468    /// <p><p>Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication group.</p> <p>This API can be used to create a standalone regional replication group or a secondary replication group associated with a Global Datastore.</p> <p>A Redis (cluster mode disabled) replication group is a collection of clusters, where one of the clusters is a read/write primary and the others are read-only replicas. Writes to the primary are asynchronously propagated to the replicas.</p> <p>A Redis (cluster mode enabled) replication group is a collection of 1 to 90 node groups (shards). Each node group (shard) has one read/write primary node and up to 5 read-only replica nodes. Writes to the primary are asynchronously propagated to the replicas. Redis (cluster mode enabled) replication groups partition the data across node groups (shards).</p> <p>When a Redis (cluster mode disabled) replication group has been successfully created, you can add one or more read replicas to it, up to a total of 5 read replicas. If you need to increase or decrease the number of node groups (console: shards), you can avail yourself of ElastiCache for Redis&#39; scaling. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Scaling.html">Scaling ElastiCache for Redis Clusters</a> in the <i>ElastiCache User Guide</i>.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
14469    async fn create_replication_group(
14470        &self,
14471        input: CreateReplicationGroupMessage,
14472    ) -> Result<CreateReplicationGroupResult, RusotoError<CreateReplicationGroupError>> {
14473        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14474        let params = self.new_params("CreateReplicationGroup");
14475        let mut params = params;
14476        CreateReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
14477        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14478        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14479
14480        let response = self
14481            .sign_and_dispatch(request, CreateReplicationGroupError::from_response)
14482            .await?;
14483
14484        let mut response = response;
14485        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14486            xml_util::start_element(actual_tag_name, stack)?;
14487            let result = CreateReplicationGroupResultDeserializer::deserialize(
14488                "CreateReplicationGroupResult",
14489                stack,
14490            )?;
14491            skip_tree(stack);
14492            xml_util::end_element(actual_tag_name, stack)?;
14493            Ok(result)
14494        })
14495        .await?;
14496
14497        drop(response); // parse non-payload
14498        Ok(result)
14499    }
14500
14501    /// <p><p>Creates a copy of an entire cluster or replication group at a specific moment in time.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
14502    async fn create_snapshot(
14503        &self,
14504        input: CreateSnapshotMessage,
14505    ) -> Result<CreateSnapshotResult, RusotoError<CreateSnapshotError>> {
14506        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14507        let params = self.new_params("CreateSnapshot");
14508        let mut params = params;
14509        CreateSnapshotMessageSerializer::serialize(&mut params, "", &input);
14510        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14511        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14512
14513        let response = self
14514            .sign_and_dispatch(request, CreateSnapshotError::from_response)
14515            .await?;
14516
14517        let mut response = response;
14518        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14519            xml_util::start_element(actual_tag_name, stack)?;
14520            let result =
14521                CreateSnapshotResultDeserializer::deserialize("CreateSnapshotResult", stack)?;
14522            skip_tree(stack);
14523            xml_util::end_element(actual_tag_name, stack)?;
14524            Ok(result)
14525        })
14526        .await?;
14527
14528        drop(response); // parse non-payload
14529        Ok(result)
14530    }
14531
14532    /// <p>Decreases the number of node groups in a Global Datastore</p>
14533    async fn decrease_node_groups_in_global_replication_group(
14534        &self,
14535        input: DecreaseNodeGroupsInGlobalReplicationGroupMessage,
14536    ) -> Result<
14537        DecreaseNodeGroupsInGlobalReplicationGroupResult,
14538        RusotoError<DecreaseNodeGroupsInGlobalReplicationGroupError>,
14539    > {
14540        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14541        let params = self.new_params("DecreaseNodeGroupsInGlobalReplicationGroup");
14542        let mut params = params;
14543        DecreaseNodeGroupsInGlobalReplicationGroupMessageSerializer::serialize(
14544            &mut params,
14545            "",
14546            &input,
14547        );
14548        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14549        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14550
14551        let response = self
14552            .sign_and_dispatch(
14553                request,
14554                DecreaseNodeGroupsInGlobalReplicationGroupError::from_response,
14555            )
14556            .await?;
14557
14558        let mut response = response;
14559        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14560            xml_util::start_element(actual_tag_name, stack)?;
14561            let result = DecreaseNodeGroupsInGlobalReplicationGroupResultDeserializer::deserialize(
14562                "DecreaseNodeGroupsInGlobalReplicationGroupResult",
14563                stack,
14564            )?;
14565            skip_tree(stack);
14566            xml_util::end_element(actual_tag_name, stack)?;
14567            Ok(result)
14568        })
14569        .await?;
14570
14571        drop(response); // parse non-payload
14572        Ok(result)
14573    }
14574
14575    /// <p>Dynamically decreases the number of replicas in a Redis (cluster mode disabled) replication group or the number of replica nodes in one or more node groups (shards) of a Redis (cluster mode enabled) replication group. This operation is performed with no cluster down time.</p>
14576    async fn decrease_replica_count(
14577        &self,
14578        input: DecreaseReplicaCountMessage,
14579    ) -> Result<DecreaseReplicaCountResult, RusotoError<DecreaseReplicaCountError>> {
14580        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14581        let params = self.new_params("DecreaseReplicaCount");
14582        let mut params = params;
14583        DecreaseReplicaCountMessageSerializer::serialize(&mut params, "", &input);
14584        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14585        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14586
14587        let response = self
14588            .sign_and_dispatch(request, DecreaseReplicaCountError::from_response)
14589            .await?;
14590
14591        let mut response = response;
14592        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14593            xml_util::start_element(actual_tag_name, stack)?;
14594            let result = DecreaseReplicaCountResultDeserializer::deserialize(
14595                "DecreaseReplicaCountResult",
14596                stack,
14597            )?;
14598            skip_tree(stack);
14599            xml_util::end_element(actual_tag_name, stack)?;
14600            Ok(result)
14601        })
14602        .await?;
14603
14604        drop(response); // parse non-payload
14605        Ok(result)
14606    }
14607
14608    /// <p><p>Deletes a previously provisioned cluster. <code>DeleteCacheCluster</code> deletes all associated cache nodes, node endpoints and the cluster itself. When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the cluster; you cannot cancel or revert this operation.</p> <p>This operation is not valid for:</p> <ul> <li> <p>Redis (cluster mode enabled) clusters</p> </li> <li> <p>A cluster that is the last read replica of a replication group</p> </li> <li> <p>A node group (shard) that has Multi-AZ mode enabled</p> </li> <li> <p>A cluster from a Redis (cluster mode enabled) replication group</p> </li> <li> <p>A cluster that is not in the <code>available</code> state</p> </li> </ul></p>
14609    async fn delete_cache_cluster(
14610        &self,
14611        input: DeleteCacheClusterMessage,
14612    ) -> Result<DeleteCacheClusterResult, RusotoError<DeleteCacheClusterError>> {
14613        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14614        let params = self.new_params("DeleteCacheCluster");
14615        let mut params = params;
14616        DeleteCacheClusterMessageSerializer::serialize(&mut params, "", &input);
14617        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14618        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14619
14620        let response = self
14621            .sign_and_dispatch(request, DeleteCacheClusterError::from_response)
14622            .await?;
14623
14624        let mut response = response;
14625        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14626            xml_util::start_element(actual_tag_name, stack)?;
14627            let result = DeleteCacheClusterResultDeserializer::deserialize(
14628                "DeleteCacheClusterResult",
14629                stack,
14630            )?;
14631            skip_tree(stack);
14632            xml_util::end_element(actual_tag_name, stack)?;
14633            Ok(result)
14634        })
14635        .await?;
14636
14637        drop(response); // parse non-payload
14638        Ok(result)
14639    }
14640
14641    /// <p>Deletes the specified cache parameter group. You cannot delete a cache parameter group if it is associated with any cache clusters.</p>
14642    async fn delete_cache_parameter_group(
14643        &self,
14644        input: DeleteCacheParameterGroupMessage,
14645    ) -> Result<(), RusotoError<DeleteCacheParameterGroupError>> {
14646        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14647        let params = self.new_params("DeleteCacheParameterGroup");
14648        let mut params = params;
14649        DeleteCacheParameterGroupMessageSerializer::serialize(&mut params, "", &input);
14650        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14651        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14652
14653        let response = self
14654            .sign_and_dispatch(request, DeleteCacheParameterGroupError::from_response)
14655            .await?;
14656
14657        std::mem::drop(response);
14658        Ok(())
14659    }
14660
14661    /// <p><p>Deletes a cache security group.</p> <note> <p>You cannot delete a cache security group if it is associated with any clusters.</p> </note></p>
14662    async fn delete_cache_security_group(
14663        &self,
14664        input: DeleteCacheSecurityGroupMessage,
14665    ) -> Result<(), RusotoError<DeleteCacheSecurityGroupError>> {
14666        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14667        let params = self.new_params("DeleteCacheSecurityGroup");
14668        let mut params = params;
14669        DeleteCacheSecurityGroupMessageSerializer::serialize(&mut params, "", &input);
14670        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14671        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14672
14673        let response = self
14674            .sign_and_dispatch(request, DeleteCacheSecurityGroupError::from_response)
14675            .await?;
14676
14677        std::mem::drop(response);
14678        Ok(())
14679    }
14680
14681    /// <p><p>Deletes a cache subnet group.</p> <note> <p>You cannot delete a cache subnet group if it is associated with any clusters.</p> </note></p>
14682    async fn delete_cache_subnet_group(
14683        &self,
14684        input: DeleteCacheSubnetGroupMessage,
14685    ) -> Result<(), RusotoError<DeleteCacheSubnetGroupError>> {
14686        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14687        let params = self.new_params("DeleteCacheSubnetGroup");
14688        let mut params = params;
14689        DeleteCacheSubnetGroupMessageSerializer::serialize(&mut params, "", &input);
14690        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14691        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14692
14693        let response = self
14694            .sign_and_dispatch(request, DeleteCacheSubnetGroupError::from_response)
14695            .await?;
14696
14697        std::mem::drop(response);
14698        Ok(())
14699    }
14700
14701    /// <p>Deleting a Global Datastore is a two-step process: </p> <ul> <li> <p>First, you must <a>DisassociateGlobalReplicationGroup</a> to remove the secondary clusters in the Global Datastore.</p> </li> <li> <p>Once the Global Datastore contains only the primary cluster, you can use DeleteGlobalReplicationGroup API to delete the Global Datastore while retainining the primary cluster using Retain…= true.</p> </li> </ul> <p>Since the Global Datastore has only a primary cluster, you can delete the Global Datastore while retaining the primary by setting <code>RetainPrimaryCluster=true</code>.</p> <p>When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot cancel or revert this operation.</p>
14702    async fn delete_global_replication_group(
14703        &self,
14704        input: DeleteGlobalReplicationGroupMessage,
14705    ) -> Result<DeleteGlobalReplicationGroupResult, RusotoError<DeleteGlobalReplicationGroupError>>
14706    {
14707        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14708        let params = self.new_params("DeleteGlobalReplicationGroup");
14709        let mut params = params;
14710        DeleteGlobalReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
14711        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14712        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14713
14714        let response = self
14715            .sign_and_dispatch(request, DeleteGlobalReplicationGroupError::from_response)
14716            .await?;
14717
14718        let mut response = response;
14719        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14720            xml_util::start_element(actual_tag_name, stack)?;
14721            let result = DeleteGlobalReplicationGroupResultDeserializer::deserialize(
14722                "DeleteGlobalReplicationGroupResult",
14723                stack,
14724            )?;
14725            skip_tree(stack);
14726            xml_util::end_element(actual_tag_name, stack)?;
14727            Ok(result)
14728        })
14729        .await?;
14730
14731        drop(response); // parse non-payload
14732        Ok(result)
14733    }
14734
14735    /// <p><p>Deletes an existing replication group. By default, this operation deletes the entire replication group, including the primary/primaries and all of the read replicas. If the replication group has only one primary, you can optionally delete only the read replicas, while retaining the primary by setting <code>RetainPrimaryCluster=true</code>.</p> <p>When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot cancel or revert this operation.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
14736    async fn delete_replication_group(
14737        &self,
14738        input: DeleteReplicationGroupMessage,
14739    ) -> Result<DeleteReplicationGroupResult, RusotoError<DeleteReplicationGroupError>> {
14740        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14741        let params = self.new_params("DeleteReplicationGroup");
14742        let mut params = params;
14743        DeleteReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
14744        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14745        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14746
14747        let response = self
14748            .sign_and_dispatch(request, DeleteReplicationGroupError::from_response)
14749            .await?;
14750
14751        let mut response = response;
14752        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14753            xml_util::start_element(actual_tag_name, stack)?;
14754            let result = DeleteReplicationGroupResultDeserializer::deserialize(
14755                "DeleteReplicationGroupResult",
14756                stack,
14757            )?;
14758            skip_tree(stack);
14759            xml_util::end_element(actual_tag_name, stack)?;
14760            Ok(result)
14761        })
14762        .await?;
14763
14764        drop(response); // parse non-payload
14765        Ok(result)
14766    }
14767
14768    /// <p><p>Deletes an existing snapshot. When you receive a successful response from this operation, ElastiCache immediately begins deleting the snapshot; you cannot cancel or revert this operation.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
14769    async fn delete_snapshot(
14770        &self,
14771        input: DeleteSnapshotMessage,
14772    ) -> Result<DeleteSnapshotResult, RusotoError<DeleteSnapshotError>> {
14773        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14774        let params = self.new_params("DeleteSnapshot");
14775        let mut params = params;
14776        DeleteSnapshotMessageSerializer::serialize(&mut params, "", &input);
14777        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14778        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14779
14780        let response = self
14781            .sign_and_dispatch(request, DeleteSnapshotError::from_response)
14782            .await?;
14783
14784        let mut response = response;
14785        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14786            xml_util::start_element(actual_tag_name, stack)?;
14787            let result =
14788                DeleteSnapshotResultDeserializer::deserialize("DeleteSnapshotResult", stack)?;
14789            skip_tree(stack);
14790            xml_util::end_element(actual_tag_name, stack)?;
14791            Ok(result)
14792        })
14793        .await?;
14794
14795        drop(response); // parse non-payload
14796        Ok(result)
14797    }
14798
14799    /// <p>Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cache cluster if a cluster identifier is supplied.</p> <p>By default, abbreviated information about the clusters is returned. You can use the optional <i>ShowCacheNodeInfo</i> flag to retrieve detailed information about the cache nodes associated with the clusters. These details include the DNS address and port for the cache node endpoint.</p> <p>If the cluster is in the <i>creating</i> state, only cluster-level information is displayed until all of the nodes are successfully provisioned.</p> <p>If the cluster is in the <i>deleting</i> state, only cluster-level information is displayed.</p> <p>If cache nodes are currently being added to the cluster, node endpoint information and creation time for the additional nodes are not displayed until they are completely provisioned. When the cluster state is <i>available</i>, the cluster is ready for use.</p> <p>If cache nodes are currently being removed from the cluster, no endpoint information for the removed nodes is displayed.</p>
14800    async fn describe_cache_clusters(
14801        &self,
14802        input: DescribeCacheClustersMessage,
14803    ) -> Result<CacheClusterMessage, RusotoError<DescribeCacheClustersError>> {
14804        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14805        let params = self.new_params("DescribeCacheClusters");
14806        let mut params = params;
14807        DescribeCacheClustersMessageSerializer::serialize(&mut params, "", &input);
14808        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14809        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14810
14811        let response = self
14812            .sign_and_dispatch(request, DescribeCacheClustersError::from_response)
14813            .await?;
14814
14815        let mut response = response;
14816        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14817            xml_util::start_element(actual_tag_name, stack)?;
14818            let result =
14819                CacheClusterMessageDeserializer::deserialize("DescribeCacheClustersResult", stack)?;
14820            skip_tree(stack);
14821            xml_util::end_element(actual_tag_name, stack)?;
14822            Ok(result)
14823        })
14824        .await?;
14825
14826        drop(response); // parse non-payload
14827        Ok(result)
14828    }
14829
14830    /// <p>Returns a list of the available cache engines and their versions.</p>
14831    async fn describe_cache_engine_versions(
14832        &self,
14833        input: DescribeCacheEngineVersionsMessage,
14834    ) -> Result<CacheEngineVersionMessage, RusotoError<DescribeCacheEngineVersionsError>> {
14835        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14836        let params = self.new_params("DescribeCacheEngineVersions");
14837        let mut params = params;
14838        DescribeCacheEngineVersionsMessageSerializer::serialize(&mut params, "", &input);
14839        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14840        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14841
14842        let response = self
14843            .sign_and_dispatch(request, DescribeCacheEngineVersionsError::from_response)
14844            .await?;
14845
14846        let mut response = response;
14847        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14848            xml_util::start_element(actual_tag_name, stack)?;
14849            let result = CacheEngineVersionMessageDeserializer::deserialize(
14850                "DescribeCacheEngineVersionsResult",
14851                stack,
14852            )?;
14853            skip_tree(stack);
14854            xml_util::end_element(actual_tag_name, stack)?;
14855            Ok(result)
14856        })
14857        .await?;
14858
14859        drop(response); // parse non-payload
14860        Ok(result)
14861    }
14862
14863    /// <p>Returns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list contains only the descriptions for that group.</p>
14864    async fn describe_cache_parameter_groups(
14865        &self,
14866        input: DescribeCacheParameterGroupsMessage,
14867    ) -> Result<CacheParameterGroupsMessage, RusotoError<DescribeCacheParameterGroupsError>> {
14868        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14869        let params = self.new_params("DescribeCacheParameterGroups");
14870        let mut params = params;
14871        DescribeCacheParameterGroupsMessageSerializer::serialize(&mut params, "", &input);
14872        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14873        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14874
14875        let response = self
14876            .sign_and_dispatch(request, DescribeCacheParameterGroupsError::from_response)
14877            .await?;
14878
14879        let mut response = response;
14880        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14881            xml_util::start_element(actual_tag_name, stack)?;
14882            let result = CacheParameterGroupsMessageDeserializer::deserialize(
14883                "DescribeCacheParameterGroupsResult",
14884                stack,
14885            )?;
14886            skip_tree(stack);
14887            xml_util::end_element(actual_tag_name, stack)?;
14888            Ok(result)
14889        })
14890        .await?;
14891
14892        drop(response); // parse non-payload
14893        Ok(result)
14894    }
14895
14896    /// <p>Returns the detailed parameter list for a particular cache parameter group.</p>
14897    async fn describe_cache_parameters(
14898        &self,
14899        input: DescribeCacheParametersMessage,
14900    ) -> Result<CacheParameterGroupDetails, RusotoError<DescribeCacheParametersError>> {
14901        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14902        let params = self.new_params("DescribeCacheParameters");
14903        let mut params = params;
14904        DescribeCacheParametersMessageSerializer::serialize(&mut params, "", &input);
14905        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14906        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14907
14908        let response = self
14909            .sign_and_dispatch(request, DescribeCacheParametersError::from_response)
14910            .await?;
14911
14912        let mut response = response;
14913        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14914            xml_util::start_element(actual_tag_name, stack)?;
14915            let result = CacheParameterGroupDetailsDeserializer::deserialize(
14916                "DescribeCacheParametersResult",
14917                stack,
14918            )?;
14919            skip_tree(stack);
14920            xml_util::end_element(actual_tag_name, stack)?;
14921            Ok(result)
14922        })
14923        .await?;
14924
14925        drop(response); // parse non-payload
14926        Ok(result)
14927    }
14928
14929    /// <p>Returns a list of cache security group descriptions. If a cache security group name is specified, the list contains only the description of that group. This applicable only when you have ElastiCache in Classic setup </p>
14930    async fn describe_cache_security_groups(
14931        &self,
14932        input: DescribeCacheSecurityGroupsMessage,
14933    ) -> Result<CacheSecurityGroupMessage, RusotoError<DescribeCacheSecurityGroupsError>> {
14934        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14935        let params = self.new_params("DescribeCacheSecurityGroups");
14936        let mut params = params;
14937        DescribeCacheSecurityGroupsMessageSerializer::serialize(&mut params, "", &input);
14938        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14939        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14940
14941        let response = self
14942            .sign_and_dispatch(request, DescribeCacheSecurityGroupsError::from_response)
14943            .await?;
14944
14945        let mut response = response;
14946        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14947            xml_util::start_element(actual_tag_name, stack)?;
14948            let result = CacheSecurityGroupMessageDeserializer::deserialize(
14949                "DescribeCacheSecurityGroupsResult",
14950                stack,
14951            )?;
14952            skip_tree(stack);
14953            xml_util::end_element(actual_tag_name, stack)?;
14954            Ok(result)
14955        })
14956        .await?;
14957
14958        drop(response); // parse non-payload
14959        Ok(result)
14960    }
14961
14962    /// <p>Returns a list of cache subnet group descriptions. If a subnet group name is specified, the list contains only the description of that group. This is applicable only when you have ElastiCache in VPC setup. All ElastiCache clusters now launch in VPC by default. </p>
14963    async fn describe_cache_subnet_groups(
14964        &self,
14965        input: DescribeCacheSubnetGroupsMessage,
14966    ) -> Result<CacheSubnetGroupMessage, RusotoError<DescribeCacheSubnetGroupsError>> {
14967        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
14968        let params = self.new_params("DescribeCacheSubnetGroups");
14969        let mut params = params;
14970        DescribeCacheSubnetGroupsMessageSerializer::serialize(&mut params, "", &input);
14971        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
14972        request.set_content_type("application/x-www-form-urlencoded".to_owned());
14973
14974        let response = self
14975            .sign_and_dispatch(request, DescribeCacheSubnetGroupsError::from_response)
14976            .await?;
14977
14978        let mut response = response;
14979        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
14980            xml_util::start_element(actual_tag_name, stack)?;
14981            let result = CacheSubnetGroupMessageDeserializer::deserialize(
14982                "DescribeCacheSubnetGroupsResult",
14983                stack,
14984            )?;
14985            skip_tree(stack);
14986            xml_util::end_element(actual_tag_name, stack)?;
14987            Ok(result)
14988        })
14989        .await?;
14990
14991        drop(response); // parse non-payload
14992        Ok(result)
14993    }
14994
14995    /// <p>Returns the default engine and system parameter information for the specified cache engine.</p>
14996    async fn describe_engine_default_parameters(
14997        &self,
14998        input: DescribeEngineDefaultParametersMessage,
14999    ) -> Result<
15000        DescribeEngineDefaultParametersResult,
15001        RusotoError<DescribeEngineDefaultParametersError>,
15002    > {
15003        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15004        let params = self.new_params("DescribeEngineDefaultParameters");
15005        let mut params = params;
15006        DescribeEngineDefaultParametersMessageSerializer::serialize(&mut params, "", &input);
15007        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15008        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15009
15010        let response = self
15011            .sign_and_dispatch(request, DescribeEngineDefaultParametersError::from_response)
15012            .await?;
15013
15014        let mut response = response;
15015        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15016            xml_util::start_element(actual_tag_name, stack)?;
15017            let result = DescribeEngineDefaultParametersResultDeserializer::deserialize(
15018                "DescribeEngineDefaultParametersResult",
15019                stack,
15020            )?;
15021            skip_tree(stack);
15022            xml_util::end_element(actual_tag_name, stack)?;
15023            Ok(result)
15024        })
15025        .await?;
15026
15027        drop(response); // parse non-payload
15028        Ok(result)
15029    }
15030
15031    /// <p>Returns events related to clusters, cache security groups, and cache parameter groups. You can obtain events specific to a particular cluster, cache security group, or cache parameter group by providing the name as a parameter.</p> <p>By default, only the events occurring within the last hour are returned; however, you can retrieve up to 14 days' worth of events if necessary.</p>
15032    async fn describe_events(
15033        &self,
15034        input: DescribeEventsMessage,
15035    ) -> Result<EventsMessage, RusotoError<DescribeEventsError>> {
15036        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15037        let params = self.new_params("DescribeEvents");
15038        let mut params = params;
15039        DescribeEventsMessageSerializer::serialize(&mut params, "", &input);
15040        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15041        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15042
15043        let response = self
15044            .sign_and_dispatch(request, DescribeEventsError::from_response)
15045            .await?;
15046
15047        let mut response = response;
15048        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15049            xml_util::start_element(actual_tag_name, stack)?;
15050            let result = EventsMessageDeserializer::deserialize("DescribeEventsResult", stack)?;
15051            skip_tree(stack);
15052            xml_util::end_element(actual_tag_name, stack)?;
15053            Ok(result)
15054        })
15055        .await?;
15056
15057        drop(response); // parse non-payload
15058        Ok(result)
15059    }
15060
15061    /// <p>Returns information about a particular global replication group. If no identifier is specified, returns information about all Global Datastores. </p>
15062    async fn describe_global_replication_groups(
15063        &self,
15064        input: DescribeGlobalReplicationGroupsMessage,
15065    ) -> Result<
15066        DescribeGlobalReplicationGroupsResult,
15067        RusotoError<DescribeGlobalReplicationGroupsError>,
15068    > {
15069        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15070        let params = self.new_params("DescribeGlobalReplicationGroups");
15071        let mut params = params;
15072        DescribeGlobalReplicationGroupsMessageSerializer::serialize(&mut params, "", &input);
15073        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15074        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15075
15076        let response = self
15077            .sign_and_dispatch(request, DescribeGlobalReplicationGroupsError::from_response)
15078            .await?;
15079
15080        let mut response = response;
15081        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15082            xml_util::start_element(actual_tag_name, stack)?;
15083            let result = DescribeGlobalReplicationGroupsResultDeserializer::deserialize(
15084                "DescribeGlobalReplicationGroupsResult",
15085                stack,
15086            )?;
15087            skip_tree(stack);
15088            xml_util::end_element(actual_tag_name, stack)?;
15089            Ok(result)
15090        })
15091        .await?;
15092
15093        drop(response); // parse non-payload
15094        Ok(result)
15095    }
15096
15097    /// <p><p>Returns information about a particular replication group. If no identifier is specified, <code>DescribeReplicationGroups</code> returns information about all replication groups.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
15098    async fn describe_replication_groups(
15099        &self,
15100        input: DescribeReplicationGroupsMessage,
15101    ) -> Result<ReplicationGroupMessage, RusotoError<DescribeReplicationGroupsError>> {
15102        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15103        let params = self.new_params("DescribeReplicationGroups");
15104        let mut params = params;
15105        DescribeReplicationGroupsMessageSerializer::serialize(&mut params, "", &input);
15106        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15107        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15108
15109        let response = self
15110            .sign_and_dispatch(request, DescribeReplicationGroupsError::from_response)
15111            .await?;
15112
15113        let mut response = response;
15114        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15115            xml_util::start_element(actual_tag_name, stack)?;
15116            let result = ReplicationGroupMessageDeserializer::deserialize(
15117                "DescribeReplicationGroupsResult",
15118                stack,
15119            )?;
15120            skip_tree(stack);
15121            xml_util::end_element(actual_tag_name, stack)?;
15122            Ok(result)
15123        })
15124        .await?;
15125
15126        drop(response); // parse non-payload
15127        Ok(result)
15128    }
15129
15130    /// <p>Returns information about reserved cache nodes for this account, or about a specified reserved cache node.</p>
15131    async fn describe_reserved_cache_nodes(
15132        &self,
15133        input: DescribeReservedCacheNodesMessage,
15134    ) -> Result<ReservedCacheNodeMessage, RusotoError<DescribeReservedCacheNodesError>> {
15135        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15136        let params = self.new_params("DescribeReservedCacheNodes");
15137        let mut params = params;
15138        DescribeReservedCacheNodesMessageSerializer::serialize(&mut params, "", &input);
15139        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15140        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15141
15142        let response = self
15143            .sign_and_dispatch(request, DescribeReservedCacheNodesError::from_response)
15144            .await?;
15145
15146        let mut response = response;
15147        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15148            xml_util::start_element(actual_tag_name, stack)?;
15149            let result = ReservedCacheNodeMessageDeserializer::deserialize(
15150                "DescribeReservedCacheNodesResult",
15151                stack,
15152            )?;
15153            skip_tree(stack);
15154            xml_util::end_element(actual_tag_name, stack)?;
15155            Ok(result)
15156        })
15157        .await?;
15158
15159        drop(response); // parse non-payload
15160        Ok(result)
15161    }
15162
15163    /// <p>Lists available reserved cache node offerings.</p>
15164    async fn describe_reserved_cache_nodes_offerings(
15165        &self,
15166        input: DescribeReservedCacheNodesOfferingsMessage,
15167    ) -> Result<
15168        ReservedCacheNodesOfferingMessage,
15169        RusotoError<DescribeReservedCacheNodesOfferingsError>,
15170    > {
15171        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15172        let params = self.new_params("DescribeReservedCacheNodesOfferings");
15173        let mut params = params;
15174        DescribeReservedCacheNodesOfferingsMessageSerializer::serialize(&mut params, "", &input);
15175        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15176        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15177
15178        let response = self
15179            .sign_and_dispatch(
15180                request,
15181                DescribeReservedCacheNodesOfferingsError::from_response,
15182            )
15183            .await?;
15184
15185        let mut response = response;
15186        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15187            xml_util::start_element(actual_tag_name, stack)?;
15188            let result = ReservedCacheNodesOfferingMessageDeserializer::deserialize(
15189                "DescribeReservedCacheNodesOfferingsResult",
15190                stack,
15191            )?;
15192            skip_tree(stack);
15193            xml_util::end_element(actual_tag_name, stack)?;
15194            Ok(result)
15195        })
15196        .await?;
15197
15198        drop(response); // parse non-payload
15199        Ok(result)
15200    }
15201
15202    /// <p>Returns details of the service updates</p>
15203    async fn describe_service_updates(
15204        &self,
15205        input: DescribeServiceUpdatesMessage,
15206    ) -> Result<ServiceUpdatesMessage, RusotoError<DescribeServiceUpdatesError>> {
15207        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15208        let params = self.new_params("DescribeServiceUpdates");
15209        let mut params = params;
15210        DescribeServiceUpdatesMessageSerializer::serialize(&mut params, "", &input);
15211        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15212        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15213
15214        let response = self
15215            .sign_and_dispatch(request, DescribeServiceUpdatesError::from_response)
15216            .await?;
15217
15218        let mut response = response;
15219        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15220            xml_util::start_element(actual_tag_name, stack)?;
15221            let result = ServiceUpdatesMessageDeserializer::deserialize(
15222                "DescribeServiceUpdatesResult",
15223                stack,
15224            )?;
15225            skip_tree(stack);
15226            xml_util::end_element(actual_tag_name, stack)?;
15227            Ok(result)
15228        })
15229        .await?;
15230
15231        drop(response); // parse non-payload
15232        Ok(result)
15233    }
15234
15235    /// <p><p>Returns information about cluster or replication group snapshots. By default, <code>DescribeSnapshots</code> lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with a particular cache cluster.</p> <note> <p>This operation is valid for Redis only.</p> </note></p>
15236    async fn describe_snapshots(
15237        &self,
15238        input: DescribeSnapshotsMessage,
15239    ) -> Result<DescribeSnapshotsListMessage, RusotoError<DescribeSnapshotsError>> {
15240        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15241        let params = self.new_params("DescribeSnapshots");
15242        let mut params = params;
15243        DescribeSnapshotsMessageSerializer::serialize(&mut params, "", &input);
15244        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15245        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15246
15247        let response = self
15248            .sign_and_dispatch(request, DescribeSnapshotsError::from_response)
15249            .await?;
15250
15251        let mut response = response;
15252        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15253            xml_util::start_element(actual_tag_name, stack)?;
15254            let result = DescribeSnapshotsListMessageDeserializer::deserialize(
15255                "DescribeSnapshotsResult",
15256                stack,
15257            )?;
15258            skip_tree(stack);
15259            xml_util::end_element(actual_tag_name, stack)?;
15260            Ok(result)
15261        })
15262        .await?;
15263
15264        drop(response); // parse non-payload
15265        Ok(result)
15266    }
15267
15268    /// <p>Returns details of the update actions </p>
15269    async fn describe_update_actions(
15270        &self,
15271        input: DescribeUpdateActionsMessage,
15272    ) -> Result<UpdateActionsMessage, RusotoError<DescribeUpdateActionsError>> {
15273        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15274        let params = self.new_params("DescribeUpdateActions");
15275        let mut params = params;
15276        DescribeUpdateActionsMessageSerializer::serialize(&mut params, "", &input);
15277        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15278        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15279
15280        let response = self
15281            .sign_and_dispatch(request, DescribeUpdateActionsError::from_response)
15282            .await?;
15283
15284        let mut response = response;
15285        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15286            xml_util::start_element(actual_tag_name, stack)?;
15287            let result = UpdateActionsMessageDeserializer::deserialize(
15288                "DescribeUpdateActionsResult",
15289                stack,
15290            )?;
15291            skip_tree(stack);
15292            xml_util::end_element(actual_tag_name, stack)?;
15293            Ok(result)
15294        })
15295        .await?;
15296
15297        drop(response); // parse non-payload
15298        Ok(result)
15299    }
15300
15301    /// <p>Remove a secondary cluster from the Global Datastore using the Global Datastore name. The secondary cluster will no longer receive updates from the primary cluster, but will remain as a standalone cluster in that AWS region.</p>
15302    async fn disassociate_global_replication_group(
15303        &self,
15304        input: DisassociateGlobalReplicationGroupMessage,
15305    ) -> Result<
15306        DisassociateGlobalReplicationGroupResult,
15307        RusotoError<DisassociateGlobalReplicationGroupError>,
15308    > {
15309        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15310        let params = self.new_params("DisassociateGlobalReplicationGroup");
15311        let mut params = params;
15312        DisassociateGlobalReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
15313        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15314        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15315
15316        let response = self
15317            .sign_and_dispatch(
15318                request,
15319                DisassociateGlobalReplicationGroupError::from_response,
15320            )
15321            .await?;
15322
15323        let mut response = response;
15324        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15325            xml_util::start_element(actual_tag_name, stack)?;
15326            let result = DisassociateGlobalReplicationGroupResultDeserializer::deserialize(
15327                "DisassociateGlobalReplicationGroupResult",
15328                stack,
15329            )?;
15330            skip_tree(stack);
15331            xml_util::end_element(actual_tag_name, stack)?;
15332            Ok(result)
15333        })
15334        .await?;
15335
15336        drop(response); // parse non-payload
15337        Ok(result)
15338    }
15339
15340    /// <p>Used to failover the primary region to a selected secondary region. The selected secondary region will become primary, and all other clusters will become secondary.</p>
15341    async fn failover_global_replication_group(
15342        &self,
15343        input: FailoverGlobalReplicationGroupMessage,
15344    ) -> Result<
15345        FailoverGlobalReplicationGroupResult,
15346        RusotoError<FailoverGlobalReplicationGroupError>,
15347    > {
15348        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15349        let params = self.new_params("FailoverGlobalReplicationGroup");
15350        let mut params = params;
15351        FailoverGlobalReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
15352        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15353        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15354
15355        let response = self
15356            .sign_and_dispatch(request, FailoverGlobalReplicationGroupError::from_response)
15357            .await?;
15358
15359        let mut response = response;
15360        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15361            xml_util::start_element(actual_tag_name, stack)?;
15362            let result = FailoverGlobalReplicationGroupResultDeserializer::deserialize(
15363                "FailoverGlobalReplicationGroupResult",
15364                stack,
15365            )?;
15366            skip_tree(stack);
15367            xml_util::end_element(actual_tag_name, stack)?;
15368            Ok(result)
15369        })
15370        .await?;
15371
15372        drop(response); // parse non-payload
15373        Ok(result)
15374    }
15375
15376    /// <p>Increase the number of node groups in the Global Datastore</p>
15377    async fn increase_node_groups_in_global_replication_group(
15378        &self,
15379        input: IncreaseNodeGroupsInGlobalReplicationGroupMessage,
15380    ) -> Result<
15381        IncreaseNodeGroupsInGlobalReplicationGroupResult,
15382        RusotoError<IncreaseNodeGroupsInGlobalReplicationGroupError>,
15383    > {
15384        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15385        let params = self.new_params("IncreaseNodeGroupsInGlobalReplicationGroup");
15386        let mut params = params;
15387        IncreaseNodeGroupsInGlobalReplicationGroupMessageSerializer::serialize(
15388            &mut params,
15389            "",
15390            &input,
15391        );
15392        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15393        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15394
15395        let response = self
15396            .sign_and_dispatch(
15397                request,
15398                IncreaseNodeGroupsInGlobalReplicationGroupError::from_response,
15399            )
15400            .await?;
15401
15402        let mut response = response;
15403        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15404            xml_util::start_element(actual_tag_name, stack)?;
15405            let result = IncreaseNodeGroupsInGlobalReplicationGroupResultDeserializer::deserialize(
15406                "IncreaseNodeGroupsInGlobalReplicationGroupResult",
15407                stack,
15408            )?;
15409            skip_tree(stack);
15410            xml_util::end_element(actual_tag_name, stack)?;
15411            Ok(result)
15412        })
15413        .await?;
15414
15415        drop(response); // parse non-payload
15416        Ok(result)
15417    }
15418
15419    /// <p>Dynamically increases the number of replics in a Redis (cluster mode disabled) replication group or the number of replica nodes in one or more node groups (shards) of a Redis (cluster mode enabled) replication group. This operation is performed with no cluster down time.</p>
15420    async fn increase_replica_count(
15421        &self,
15422        input: IncreaseReplicaCountMessage,
15423    ) -> Result<IncreaseReplicaCountResult, RusotoError<IncreaseReplicaCountError>> {
15424        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15425        let params = self.new_params("IncreaseReplicaCount");
15426        let mut params = params;
15427        IncreaseReplicaCountMessageSerializer::serialize(&mut params, "", &input);
15428        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15429        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15430
15431        let response = self
15432            .sign_and_dispatch(request, IncreaseReplicaCountError::from_response)
15433            .await?;
15434
15435        let mut response = response;
15436        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15437            xml_util::start_element(actual_tag_name, stack)?;
15438            let result = IncreaseReplicaCountResultDeserializer::deserialize(
15439                "IncreaseReplicaCountResult",
15440                stack,
15441            )?;
15442            skip_tree(stack);
15443            xml_util::end_element(actual_tag_name, stack)?;
15444            Ok(result)
15445        })
15446        .await?;
15447
15448        drop(response); // parse non-payload
15449        Ok(result)
15450    }
15451
15452    /// <p>Lists all available node types that you can scale your Redis cluster's or replication group's current node type.</p> <p>When you use the <code>ModifyCacheCluster</code> or <code>ModifyReplicationGroup</code> operations to scale your cluster or replication group, the value of the <code>CacheNodeType</code> parameter must be one of the node types returned by this operation.</p>
15453    async fn list_allowed_node_type_modifications(
15454        &self,
15455        input: ListAllowedNodeTypeModificationsMessage,
15456    ) -> Result<
15457        AllowedNodeTypeModificationsMessage,
15458        RusotoError<ListAllowedNodeTypeModificationsError>,
15459    > {
15460        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15461        let params = self.new_params("ListAllowedNodeTypeModifications");
15462        let mut params = params;
15463        ListAllowedNodeTypeModificationsMessageSerializer::serialize(&mut params, "", &input);
15464        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15465        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15466
15467        let response = self
15468            .sign_and_dispatch(
15469                request,
15470                ListAllowedNodeTypeModificationsError::from_response,
15471            )
15472            .await?;
15473
15474        let mut response = response;
15475        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15476            xml_util::start_element(actual_tag_name, stack)?;
15477            let result = AllowedNodeTypeModificationsMessageDeserializer::deserialize(
15478                "ListAllowedNodeTypeModificationsResult",
15479                stack,
15480            )?;
15481            skip_tree(stack);
15482            xml_util::end_element(actual_tag_name, stack)?;
15483            Ok(result)
15484        })
15485        .await?;
15486
15487        drop(response); // parse non-payload
15488        Ok(result)
15489    }
15490
15491    /// <p>Lists all cost allocation tags currently on the named resource. A <code>cost allocation tag</code> is a key-value pair where the key is case-sensitive and the value is optional. You can use cost allocation tags to categorize and track your AWS costs.</p> <p>If the cluster is not in the <i>available</i> state, <code>ListTagsForResource</code> returns an error.</p> <p>You can have a maximum of 50 cost allocation tags on an ElastiCache resource. For more information, see <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html">Monitoring Costs with Tags</a>.</p>
15492    async fn list_tags_for_resource(
15493        &self,
15494        input: ListTagsForResourceMessage,
15495    ) -> Result<TagListMessage, RusotoError<ListTagsForResourceError>> {
15496        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15497        let params = self.new_params("ListTagsForResource");
15498        let mut params = params;
15499        ListTagsForResourceMessageSerializer::serialize(&mut params, "", &input);
15500        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15501        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15502
15503        let response = self
15504            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
15505            .await?;
15506
15507        let mut response = response;
15508        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15509            xml_util::start_element(actual_tag_name, stack)?;
15510            let result =
15511                TagListMessageDeserializer::deserialize("ListTagsForResourceResult", stack)?;
15512            skip_tree(stack);
15513            xml_util::end_element(actual_tag_name, stack)?;
15514            Ok(result)
15515        })
15516        .await?;
15517
15518        drop(response); // parse non-payload
15519        Ok(result)
15520    }
15521
15522    /// <p>Modifies the settings for a cluster. You can use this operation to change one or more cluster configuration parameters by specifying the parameters and the new values.</p>
15523    async fn modify_cache_cluster(
15524        &self,
15525        input: ModifyCacheClusterMessage,
15526    ) -> Result<ModifyCacheClusterResult, RusotoError<ModifyCacheClusterError>> {
15527        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15528        let params = self.new_params("ModifyCacheCluster");
15529        let mut params = params;
15530        ModifyCacheClusterMessageSerializer::serialize(&mut params, "", &input);
15531        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15532        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15533
15534        let response = self
15535            .sign_and_dispatch(request, ModifyCacheClusterError::from_response)
15536            .await?;
15537
15538        let mut response = response;
15539        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15540            xml_util::start_element(actual_tag_name, stack)?;
15541            let result = ModifyCacheClusterResultDeserializer::deserialize(
15542                "ModifyCacheClusterResult",
15543                stack,
15544            )?;
15545            skip_tree(stack);
15546            xml_util::end_element(actual_tag_name, stack)?;
15547            Ok(result)
15548        })
15549        .await?;
15550
15551        drop(response); // parse non-payload
15552        Ok(result)
15553    }
15554
15555    /// <p>Modifies the parameters of a cache parameter group. You can modify up to 20 parameters in a single request by submitting a list parameter name and value pairs.</p>
15556    async fn modify_cache_parameter_group(
15557        &self,
15558        input: ModifyCacheParameterGroupMessage,
15559    ) -> Result<CacheParameterGroupNameMessage, RusotoError<ModifyCacheParameterGroupError>> {
15560        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15561        let params = self.new_params("ModifyCacheParameterGroup");
15562        let mut params = params;
15563        ModifyCacheParameterGroupMessageSerializer::serialize(&mut params, "", &input);
15564        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15565        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15566
15567        let response = self
15568            .sign_and_dispatch(request, ModifyCacheParameterGroupError::from_response)
15569            .await?;
15570
15571        let mut response = response;
15572        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15573            xml_util::start_element(actual_tag_name, stack)?;
15574            let result = CacheParameterGroupNameMessageDeserializer::deserialize(
15575                "ModifyCacheParameterGroupResult",
15576                stack,
15577            )?;
15578            skip_tree(stack);
15579            xml_util::end_element(actual_tag_name, stack)?;
15580            Ok(result)
15581        })
15582        .await?;
15583
15584        drop(response); // parse non-payload
15585        Ok(result)
15586    }
15587
15588    /// <p>Modifies an existing cache subnet group.</p>
15589    async fn modify_cache_subnet_group(
15590        &self,
15591        input: ModifyCacheSubnetGroupMessage,
15592    ) -> Result<ModifyCacheSubnetGroupResult, RusotoError<ModifyCacheSubnetGroupError>> {
15593        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15594        let params = self.new_params("ModifyCacheSubnetGroup");
15595        let mut params = params;
15596        ModifyCacheSubnetGroupMessageSerializer::serialize(&mut params, "", &input);
15597        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15598        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15599
15600        let response = self
15601            .sign_and_dispatch(request, ModifyCacheSubnetGroupError::from_response)
15602            .await?;
15603
15604        let mut response = response;
15605        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15606            xml_util::start_element(actual_tag_name, stack)?;
15607            let result = ModifyCacheSubnetGroupResultDeserializer::deserialize(
15608                "ModifyCacheSubnetGroupResult",
15609                stack,
15610            )?;
15611            skip_tree(stack);
15612            xml_util::end_element(actual_tag_name, stack)?;
15613            Ok(result)
15614        })
15615        .await?;
15616
15617        drop(response); // parse non-payload
15618        Ok(result)
15619    }
15620
15621    /// <p>Modifies the settings for a Global Datastore.</p>
15622    async fn modify_global_replication_group(
15623        &self,
15624        input: ModifyGlobalReplicationGroupMessage,
15625    ) -> Result<ModifyGlobalReplicationGroupResult, RusotoError<ModifyGlobalReplicationGroupError>>
15626    {
15627        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15628        let params = self.new_params("ModifyGlobalReplicationGroup");
15629        let mut params = params;
15630        ModifyGlobalReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
15631        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15632        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15633
15634        let response = self
15635            .sign_and_dispatch(request, ModifyGlobalReplicationGroupError::from_response)
15636            .await?;
15637
15638        let mut response = response;
15639        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15640            xml_util::start_element(actual_tag_name, stack)?;
15641            let result = ModifyGlobalReplicationGroupResultDeserializer::deserialize(
15642                "ModifyGlobalReplicationGroupResult",
15643                stack,
15644            )?;
15645            skip_tree(stack);
15646            xml_util::end_element(actual_tag_name, stack)?;
15647            Ok(result)
15648        })
15649        .await?;
15650
15651        drop(response); // parse non-payload
15652        Ok(result)
15653    }
15654
15655    /// <p><p>Modifies the settings for a replication group.</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html">Scaling for Amazon ElastiCache for Redis (cluster mode enabled)</a> in the ElastiCache User Guide</p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html">ModifyReplicationGroupShardConfiguration</a> in the ElastiCache API Reference</p> </li> </ul> <note> <p>This operation is valid for Redis only.</p> </note></p>
15656    async fn modify_replication_group(
15657        &self,
15658        input: ModifyReplicationGroupMessage,
15659    ) -> Result<ModifyReplicationGroupResult, RusotoError<ModifyReplicationGroupError>> {
15660        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15661        let params = self.new_params("ModifyReplicationGroup");
15662        let mut params = params;
15663        ModifyReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
15664        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15665        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15666
15667        let response = self
15668            .sign_and_dispatch(request, ModifyReplicationGroupError::from_response)
15669            .await?;
15670
15671        let mut response = response;
15672        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15673            xml_util::start_element(actual_tag_name, stack)?;
15674            let result = ModifyReplicationGroupResultDeserializer::deserialize(
15675                "ModifyReplicationGroupResult",
15676                stack,
15677            )?;
15678            skip_tree(stack);
15679            xml_util::end_element(actual_tag_name, stack)?;
15680            Ok(result)
15681        })
15682        .await?;
15683
15684        drop(response); // parse non-payload
15685        Ok(result)
15686    }
15687
15688    /// <p>Modifies a replication group's shards (node groups) by allowing you to add shards, remove shards, or rebalance the keyspaces among exisiting shards.</p>
15689    async fn modify_replication_group_shard_configuration(
15690        &self,
15691        input: ModifyReplicationGroupShardConfigurationMessage,
15692    ) -> Result<
15693        ModifyReplicationGroupShardConfigurationResult,
15694        RusotoError<ModifyReplicationGroupShardConfigurationError>,
15695    > {
15696        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15697        let params = self.new_params("ModifyReplicationGroupShardConfiguration");
15698        let mut params = params;
15699        ModifyReplicationGroupShardConfigurationMessageSerializer::serialize(
15700            &mut params,
15701            "",
15702            &input,
15703        );
15704        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15705        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15706
15707        let response = self
15708            .sign_and_dispatch(
15709                request,
15710                ModifyReplicationGroupShardConfigurationError::from_response,
15711            )
15712            .await?;
15713
15714        let mut response = response;
15715        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15716            xml_util::start_element(actual_tag_name, stack)?;
15717            let result = ModifyReplicationGroupShardConfigurationResultDeserializer::deserialize(
15718                "ModifyReplicationGroupShardConfigurationResult",
15719                stack,
15720            )?;
15721            skip_tree(stack);
15722            xml_util::end_element(actual_tag_name, stack)?;
15723            Ok(result)
15724        })
15725        .await?;
15726
15727        drop(response); // parse non-payload
15728        Ok(result)
15729    }
15730
15731    /// <p>Allows you to purchase a reserved cache node offering.</p>
15732    async fn purchase_reserved_cache_nodes_offering(
15733        &self,
15734        input: PurchaseReservedCacheNodesOfferingMessage,
15735    ) -> Result<
15736        PurchaseReservedCacheNodesOfferingResult,
15737        RusotoError<PurchaseReservedCacheNodesOfferingError>,
15738    > {
15739        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15740        let params = self.new_params("PurchaseReservedCacheNodesOffering");
15741        let mut params = params;
15742        PurchaseReservedCacheNodesOfferingMessageSerializer::serialize(&mut params, "", &input);
15743        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15744        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15745
15746        let response = self
15747            .sign_and_dispatch(
15748                request,
15749                PurchaseReservedCacheNodesOfferingError::from_response,
15750            )
15751            .await?;
15752
15753        let mut response = response;
15754        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15755            xml_util::start_element(actual_tag_name, stack)?;
15756            let result = PurchaseReservedCacheNodesOfferingResultDeserializer::deserialize(
15757                "PurchaseReservedCacheNodesOfferingResult",
15758                stack,
15759            )?;
15760            skip_tree(stack);
15761            xml_util::end_element(actual_tag_name, stack)?;
15762            Ok(result)
15763        })
15764        .await?;
15765
15766        drop(response); // parse non-payload
15767        Ok(result)
15768    }
15769
15770    /// <p>Redistribute slots to ensure uniform distribution across existing shards in the cluster.</p>
15771    async fn rebalance_slots_in_global_replication_group(
15772        &self,
15773        input: RebalanceSlotsInGlobalReplicationGroupMessage,
15774    ) -> Result<
15775        RebalanceSlotsInGlobalReplicationGroupResult,
15776        RusotoError<RebalanceSlotsInGlobalReplicationGroupError>,
15777    > {
15778        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15779        let params = self.new_params("RebalanceSlotsInGlobalReplicationGroup");
15780        let mut params = params;
15781        RebalanceSlotsInGlobalReplicationGroupMessageSerializer::serialize(&mut params, "", &input);
15782        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15783        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15784
15785        let response = self
15786            .sign_and_dispatch(
15787                request,
15788                RebalanceSlotsInGlobalReplicationGroupError::from_response,
15789            )
15790            .await?;
15791
15792        let mut response = response;
15793        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15794            xml_util::start_element(actual_tag_name, stack)?;
15795            let result = RebalanceSlotsInGlobalReplicationGroupResultDeserializer::deserialize(
15796                "RebalanceSlotsInGlobalReplicationGroupResult",
15797                stack,
15798            )?;
15799            skip_tree(stack);
15800            xml_util::end_element(actual_tag_name, stack)?;
15801            Ok(result)
15802        })
15803        .await?;
15804
15805        drop(response); // parse non-payload
15806        Ok(result)
15807    }
15808
15809    /// <p>Reboots some, or all, of the cache nodes within a provisioned cluster. This operation applies any modified cache parameter groups to the cluster. The reboot operation takes place as soon as possible, and results in a momentary outage to the cluster. During the reboot, the cluster status is set to REBOOTING.</p> <p>The reboot causes the contents of the cache (for each cache node being rebooted) to be lost.</p> <p>When the reboot is complete, a cluster event is created.</p> <p>Rebooting a cluster is currently supported on Memcached and Redis (cluster mode disabled) clusters. Rebooting is not supported on Redis (cluster mode enabled) clusters.</p> <p>If you make changes to parameters that require a Redis (cluster mode enabled) cluster reboot for the changes to be applied, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html">Rebooting a Cluster</a> for an alternate process.</p>
15810    async fn reboot_cache_cluster(
15811        &self,
15812        input: RebootCacheClusterMessage,
15813    ) -> Result<RebootCacheClusterResult, RusotoError<RebootCacheClusterError>> {
15814        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15815        let params = self.new_params("RebootCacheCluster");
15816        let mut params = params;
15817        RebootCacheClusterMessageSerializer::serialize(&mut params, "", &input);
15818        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15819        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15820
15821        let response = self
15822            .sign_and_dispatch(request, RebootCacheClusterError::from_response)
15823            .await?;
15824
15825        let mut response = response;
15826        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15827            xml_util::start_element(actual_tag_name, stack)?;
15828            let result = RebootCacheClusterResultDeserializer::deserialize(
15829                "RebootCacheClusterResult",
15830                stack,
15831            )?;
15832            skip_tree(stack);
15833            xml_util::end_element(actual_tag_name, stack)?;
15834            Ok(result)
15835        })
15836        .await?;
15837
15838        drop(response); // parse non-payload
15839        Ok(result)
15840    }
15841
15842    /// <p>Removes the tags identified by the <code>TagKeys</code> list from the named resource.</p>
15843    async fn remove_tags_from_resource(
15844        &self,
15845        input: RemoveTagsFromResourceMessage,
15846    ) -> Result<TagListMessage, RusotoError<RemoveTagsFromResourceError>> {
15847        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15848        let params = self.new_params("RemoveTagsFromResource");
15849        let mut params = params;
15850        RemoveTagsFromResourceMessageSerializer::serialize(&mut params, "", &input);
15851        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15852        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15853
15854        let response = self
15855            .sign_and_dispatch(request, RemoveTagsFromResourceError::from_response)
15856            .await?;
15857
15858        let mut response = response;
15859        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15860            xml_util::start_element(actual_tag_name, stack)?;
15861            let result =
15862                TagListMessageDeserializer::deserialize("RemoveTagsFromResourceResult", stack)?;
15863            skip_tree(stack);
15864            xml_util::end_element(actual_tag_name, stack)?;
15865            Ok(result)
15866        })
15867        .await?;
15868
15869        drop(response); // parse non-payload
15870        Ok(result)
15871    }
15872
15873    /// <p>Modifies the parameters of a cache parameter group to the engine or system default value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the <code>ResetAllParameters</code> and <code>CacheParameterGroupName</code> parameters.</p>
15874    async fn reset_cache_parameter_group(
15875        &self,
15876        input: ResetCacheParameterGroupMessage,
15877    ) -> Result<CacheParameterGroupNameMessage, RusotoError<ResetCacheParameterGroupError>> {
15878        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15879        let params = self.new_params("ResetCacheParameterGroup");
15880        let mut params = params;
15881        ResetCacheParameterGroupMessageSerializer::serialize(&mut params, "", &input);
15882        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15883        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15884
15885        let response = self
15886            .sign_and_dispatch(request, ResetCacheParameterGroupError::from_response)
15887            .await?;
15888
15889        let mut response = response;
15890        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15891            xml_util::start_element(actual_tag_name, stack)?;
15892            let result = CacheParameterGroupNameMessageDeserializer::deserialize(
15893                "ResetCacheParameterGroupResult",
15894                stack,
15895            )?;
15896            skip_tree(stack);
15897            xml_util::end_element(actual_tag_name, stack)?;
15898            Ok(result)
15899        })
15900        .await?;
15901
15902        drop(response); // parse non-payload
15903        Ok(result)
15904    }
15905
15906    /// <p>Revokes ingress from a cache security group. Use this operation to disallow access from an Amazon EC2 security group that had been previously authorized.</p>
15907    async fn revoke_cache_security_group_ingress(
15908        &self,
15909        input: RevokeCacheSecurityGroupIngressMessage,
15910    ) -> Result<
15911        RevokeCacheSecurityGroupIngressResult,
15912        RusotoError<RevokeCacheSecurityGroupIngressError>,
15913    > {
15914        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15915        let params = self.new_params("RevokeCacheSecurityGroupIngress");
15916        let mut params = params;
15917        RevokeCacheSecurityGroupIngressMessageSerializer::serialize(&mut params, "", &input);
15918        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15919        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15920
15921        let response = self
15922            .sign_and_dispatch(request, RevokeCacheSecurityGroupIngressError::from_response)
15923            .await?;
15924
15925        let mut response = response;
15926        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15927            xml_util::start_element(actual_tag_name, stack)?;
15928            let result = RevokeCacheSecurityGroupIngressResultDeserializer::deserialize(
15929                "RevokeCacheSecurityGroupIngressResult",
15930                stack,
15931            )?;
15932            skip_tree(stack);
15933            xml_util::end_element(actual_tag_name, stack)?;
15934            Ok(result)
15935        })
15936        .await?;
15937
15938        drop(response); // parse non-payload
15939        Ok(result)
15940    }
15941
15942    /// <p>Start the migration of data.</p>
15943    async fn start_migration(
15944        &self,
15945        input: StartMigrationMessage,
15946    ) -> Result<StartMigrationResponse, RusotoError<StartMigrationError>> {
15947        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15948        let params = self.new_params("StartMigration");
15949        let mut params = params;
15950        StartMigrationMessageSerializer::serialize(&mut params, "", &input);
15951        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15952        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15953
15954        let response = self
15955            .sign_and_dispatch(request, StartMigrationError::from_response)
15956            .await?;
15957
15958        let mut response = response;
15959        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15960            xml_util::start_element(actual_tag_name, stack)?;
15961            let result =
15962                StartMigrationResponseDeserializer::deserialize("StartMigrationResult", stack)?;
15963            skip_tree(stack);
15964            xml_util::end_element(actual_tag_name, stack)?;
15965            Ok(result)
15966        })
15967        .await?;
15968
15969        drop(response); // parse non-payload
15970        Ok(result)
15971    }
15972
15973    /// <p>Represents the input of a <code>TestFailover</code> operation which test automatic failover on a specified node group (called shard in the console) in a replication group (called cluster in the console).</p> <p class="title"> <b>Note the following</b> </p> <ul> <li> <p>A customer can use this operation to test automatic failover on up to 5 shards (called node groups in the ElastiCache API and AWS CLI) in any rolling 24-hour period.</p> </li> <li> <p>If calling this operation on shards in different clusters (called replication groups in the API and CLI), the calls can be made concurrently.</p> <p> </p> </li> <li> <p>If calling this operation multiple times on different shards in the same Redis (cluster mode enabled) replication group, the first node replacement must complete before a subsequent call can be made.</p> </li> <li> <p>To determine whether the node replacement is complete you can check Events using the Amazon ElastiCache console, the AWS CLI, or the ElastiCache API. Look for the following automatic failover related events, listed here in order of occurrance:</p> <ol> <li> <p>Replication group message: <code>Test Failover API called for node group &lt;node-group-id&gt;</code> </p> </li> <li> <p>Cache cluster message: <code>Failover from master node &lt;primary-node-id&gt; to replica node &lt;node-id&gt; completed</code> </p> </li> <li> <p>Replication group message: <code>Failover from master node &lt;primary-node-id&gt; to replica node &lt;node-id&gt; completed</code> </p> </li> <li> <p>Cache cluster message: <code>Recovering cache nodes &lt;node-id&gt;</code> </p> </li> <li> <p>Cache cluster message: <code>Finished recovery for cache nodes &lt;node-id&gt;</code> </p> </li> </ol> <p>For more information see:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html">Viewing ElastiCache Events</a> in the <i>ElastiCache User Guide</i> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html">DescribeEvents</a> in the ElastiCache API Reference</p> </li> </ul> </li> </ul> <p>Also see, <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test">Testing Multi-AZ </a> in the <i>ElastiCache User Guide</i>.</p>
15974    async fn test_failover(
15975        &self,
15976        input: TestFailoverMessage,
15977    ) -> Result<TestFailoverResult, RusotoError<TestFailoverError>> {
15978        let mut request = SignedRequest::new("POST", "elasticache", &self.region, "/");
15979        let params = self.new_params("TestFailover");
15980        let mut params = params;
15981        TestFailoverMessageSerializer::serialize(&mut params, "", &input);
15982        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
15983        request.set_content_type("application/x-www-form-urlencoded".to_owned());
15984
15985        let response = self
15986            .sign_and_dispatch(request, TestFailoverError::from_response)
15987            .await?;
15988
15989        let mut response = response;
15990        let result = xml_util::parse_response(&mut response, |actual_tag_name, stack| {
15991            xml_util::start_element(actual_tag_name, stack)?;
15992            let result = TestFailoverResultDeserializer::deserialize("TestFailoverResult", stack)?;
15993            skip_tree(stack);
15994            xml_util::end_element(actual_tag_name, stack)?;
15995            Ok(result)
15996        })
15997        .await?;
15998
15999        drop(response); // parse non-payload
16000        Ok(result)
16001    }
16002}