aws-sdk-elasticache 1.110.0

AWS SDK for Amazon ElastiCache
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the input of a <code>ModifyCacheCluster</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModifyCacheClusterInput {
    /// <p>The cluster identifier. This value is stored as a lowercase string.</p>
    pub cache_cluster_id: ::std::option::Option<::std::string::String>,
    /// <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 Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</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'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>
    pub num_cache_nodes: ::std::option::Option<i32>,
    /// <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>
    pub cache_node_ids_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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>
    pub az_mode: ::std::option::Option<crate::types::AzMode>,
    /// <note>
    /// <p>This option is only supported on Memcached clusters.</p>
    /// </note>
    /// <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>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/dg/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>
    pub new_availability_zones: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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>
    pub cache_security_group_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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>
    pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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>
    pub preferred_maintenance_window: ::std::option::Option<::std::string::String>,
    /// <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>
    pub notification_topic_arn: ::std::option::Option<::std::string::String>,
    /// <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>
    pub cache_parameter_group_name: ::std::option::Option<::std::string::String>,
    /// <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>
    pub notification_topic_status: ::std::option::Option<::std::string::String>,
    /// <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>
    pub apply_immediately: ::std::option::Option<bool>,
    /// <p>The engine type used by the cache cluster. The options are valkey, memcached or redis.</p>
    pub engine: ::std::option::Option<::std::string::String>,
    /// <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/dg/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>
    pub engine_version: ::std::option::Option<::std::string::String>,
    /// <p>&nbsp;If you are running Valkey 7.2 or Redis OSS engine version 6.0 or later, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
    pub auto_minor_version_upgrade: ::std::option::Option<bool>,
    /// <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>
    pub snapshot_retention_limit: ::std::option::Option<i32>,
    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your cluster.</p>
    pub snapshot_window: ::std::option::Option<::std::string::String>,
    /// <p>A valid cache node type that you want to scale this cluster up to.</p>
    pub cache_node_type: ::std::option::Option<::std::string::String>,
    /// <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>
    pub auth_token: ::std::option::Option<::std::string::String>,
    /// <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 - default, if no update strategy is provided</p></li>
    /// <li>
    /// <p>SET - allowed only after ROTATE</p></li>
    /// <li>
    /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
    /// </ul>
    /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
    pub auth_token_update_strategy: ::std::option::Option<crate::types::AuthTokenUpdateStrategyType>,
    /// <p>Specifies the destination, format and type of the logs.</p>
    pub log_delivery_configurations: ::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>>,
    /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 or Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
    pub ip_discovery: ::std::option::Option<crate::types::IpDiscovery>,
    /// <p>Configures horizontal or vertical scaling for Memcached clusters, specifying the scaling percentage and interval.</p>
    pub scale_config: ::std::option::Option<crate::types::ScaleConfig>,
}
impl ModifyCacheClusterInput {
    /// <p>The cluster identifier. This value is stored as a lowercase string.</p>
    pub fn cache_cluster_id(&self) -> ::std::option::Option<&str> {
        self.cache_cluster_id.as_deref()
    }
    /// <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 Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</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'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>
    pub fn num_cache_nodes(&self) -> ::std::option::Option<i32> {
        self.num_cache_nodes
    }
    /// <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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cache_node_ids_to_remove.is_none()`.
    pub fn cache_node_ids_to_remove(&self) -> &[::std::string::String] {
        self.cache_node_ids_to_remove.as_deref().unwrap_or_default()
    }
    /// <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>
    pub fn az_mode(&self) -> ::std::option::Option<&crate::types::AzMode> {
        self.az_mode.as_ref()
    }
    /// <note>
    /// <p>This option is only supported on Memcached clusters.</p>
    /// </note>
    /// <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>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/dg/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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.new_availability_zones.is_none()`.
    pub fn new_availability_zones(&self) -> &[::std::string::String] {
        self.new_availability_zones.as_deref().unwrap_or_default()
    }
    /// <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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cache_security_group_names.is_none()`.
    pub fn cache_security_group_names(&self) -> &[::std::string::String] {
        self.cache_security_group_names.as_deref().unwrap_or_default()
    }
    /// <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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
    pub fn security_group_ids(&self) -> &[::std::string::String] {
        self.security_group_ids.as_deref().unwrap_or_default()
    }
    /// <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>
    pub fn preferred_maintenance_window(&self) -> ::std::option::Option<&str> {
        self.preferred_maintenance_window.as_deref()
    }
    /// <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>
    pub fn notification_topic_arn(&self) -> ::std::option::Option<&str> {
        self.notification_topic_arn.as_deref()
    }
    /// <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>
    pub fn cache_parameter_group_name(&self) -> ::std::option::Option<&str> {
        self.cache_parameter_group_name.as_deref()
    }
    /// <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>
    pub fn notification_topic_status(&self) -> ::std::option::Option<&str> {
        self.notification_topic_status.as_deref()
    }
    /// <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>
    pub fn apply_immediately(&self) -> ::std::option::Option<bool> {
        self.apply_immediately
    }
    /// <p>The engine type used by the cache cluster. The options are valkey, memcached or redis.</p>
    pub fn engine(&self) -> ::std::option::Option<&str> {
        self.engine.as_deref()
    }
    /// <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/dg/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>
    pub fn engine_version(&self) -> ::std::option::Option<&str> {
        self.engine_version.as_deref()
    }
    /// <p>&nbsp;If you are running Valkey 7.2 or Redis OSS engine version 6.0 or later, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
    pub fn auto_minor_version_upgrade(&self) -> ::std::option::Option<bool> {
        self.auto_minor_version_upgrade
    }
    /// <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>
    pub fn snapshot_retention_limit(&self) -> ::std::option::Option<i32> {
        self.snapshot_retention_limit
    }
    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your cluster.</p>
    pub fn snapshot_window(&self) -> ::std::option::Option<&str> {
        self.snapshot_window.as_deref()
    }
    /// <p>A valid cache node type that you want to scale this cluster up to.</p>
    pub fn cache_node_type(&self) -> ::std::option::Option<&str> {
        self.cache_node_type.as_deref()
    }
    /// <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>
    pub fn auth_token(&self) -> ::std::option::Option<&str> {
        self.auth_token.as_deref()
    }
    /// <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 - default, if no update strategy is provided</p></li>
    /// <li>
    /// <p>SET - allowed only after ROTATE</p></li>
    /// <li>
    /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
    /// </ul>
    /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
    pub fn auth_token_update_strategy(&self) -> ::std::option::Option<&crate::types::AuthTokenUpdateStrategyType> {
        self.auth_token_update_strategy.as_ref()
    }
    /// <p>Specifies the destination, format and type of the logs.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.log_delivery_configurations.is_none()`.
    pub fn log_delivery_configurations(&self) -> &[crate::types::LogDeliveryConfigurationRequest] {
        self.log_delivery_configurations.as_deref().unwrap_or_default()
    }
    /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 or Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
    pub fn ip_discovery(&self) -> ::std::option::Option<&crate::types::IpDiscovery> {
        self.ip_discovery.as_ref()
    }
    /// <p>Configures horizontal or vertical scaling for Memcached clusters, specifying the scaling percentage and interval.</p>
    pub fn scale_config(&self) -> ::std::option::Option<&crate::types::ScaleConfig> {
        self.scale_config.as_ref()
    }
}
impl ModifyCacheClusterInput {
    /// Creates a new builder-style object to manufacture [`ModifyCacheClusterInput`](crate::operation::modify_cache_cluster::ModifyCacheClusterInput).
    pub fn builder() -> crate::operation::modify_cache_cluster::builders::ModifyCacheClusterInputBuilder {
        crate::operation::modify_cache_cluster::builders::ModifyCacheClusterInputBuilder::default()
    }
}

/// A builder for [`ModifyCacheClusterInput`](crate::operation::modify_cache_cluster::ModifyCacheClusterInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyCacheClusterInputBuilder {
    pub(crate) cache_cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) num_cache_nodes: ::std::option::Option<i32>,
    pub(crate) cache_node_ids_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) az_mode: ::std::option::Option<crate::types::AzMode>,
    pub(crate) new_availability_zones: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) cache_security_group_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) preferred_maintenance_window: ::std::option::Option<::std::string::String>,
    pub(crate) notification_topic_arn: ::std::option::Option<::std::string::String>,
    pub(crate) cache_parameter_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) notification_topic_status: ::std::option::Option<::std::string::String>,
    pub(crate) apply_immediately: ::std::option::Option<bool>,
    pub(crate) engine: ::std::option::Option<::std::string::String>,
    pub(crate) engine_version: ::std::option::Option<::std::string::String>,
    pub(crate) auto_minor_version_upgrade: ::std::option::Option<bool>,
    pub(crate) snapshot_retention_limit: ::std::option::Option<i32>,
    pub(crate) snapshot_window: ::std::option::Option<::std::string::String>,
    pub(crate) cache_node_type: ::std::option::Option<::std::string::String>,
    pub(crate) auth_token: ::std::option::Option<::std::string::String>,
    pub(crate) auth_token_update_strategy: ::std::option::Option<crate::types::AuthTokenUpdateStrategyType>,
    pub(crate) log_delivery_configurations: ::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>>,
    pub(crate) ip_discovery: ::std::option::Option<crate::types::IpDiscovery>,
    pub(crate) scale_config: ::std::option::Option<crate::types::ScaleConfig>,
}
impl ModifyCacheClusterInputBuilder {
    /// <p>The cluster identifier. This value is stored as a lowercase string.</p>
    /// This field is required.
    pub fn cache_cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cache_cluster_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The cluster identifier. This value is stored as a lowercase string.</p>
    pub fn set_cache_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cache_cluster_id = input;
        self
    }
    /// <p>The cluster identifier. This value is stored as a lowercase string.</p>
    pub fn get_cache_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.cache_cluster_id
    }
    /// <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 Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</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'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>
    pub fn num_cache_nodes(mut self, input: i32) -> Self {
        self.num_cache_nodes = ::std::option::Option::Some(input);
        self
    }
    /// <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 Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</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'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>
    pub fn set_num_cache_nodes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.num_cache_nodes = input;
        self
    }
    /// <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 Valkey or Redis OSS, this value must be 1. For clusters running Memcached, this value must be between 1 and 40.</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'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>
    pub fn get_num_cache_nodes(&self) -> &::std::option::Option<i32> {
        &self.num_cache_nodes
    }
    /// Appends an item to `cache_node_ids_to_remove`.
    ///
    /// To override the contents of this collection use [`set_cache_node_ids_to_remove`](Self::set_cache_node_ids_to_remove).
    ///
    /// <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>
    pub fn cache_node_ids_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.cache_node_ids_to_remove.unwrap_or_default();
        v.push(input.into());
        self.cache_node_ids_to_remove = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_cache_node_ids_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.cache_node_ids_to_remove = input;
        self
    }
    /// <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>
    pub fn get_cache_node_ids_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.cache_node_ids_to_remove
    }
    /// <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>
    pub fn az_mode(mut self, input: crate::types::AzMode) -> Self {
        self.az_mode = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_az_mode(mut self, input: ::std::option::Option<crate::types::AzMode>) -> Self {
        self.az_mode = input;
        self
    }
    /// <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>
    pub fn get_az_mode(&self) -> &::std::option::Option<crate::types::AzMode> {
        &self.az_mode
    }
    /// Appends an item to `new_availability_zones`.
    ///
    /// To override the contents of this collection use [`set_new_availability_zones`](Self::set_new_availability_zones).
    ///
    /// <note>
    /// <p>This option is only supported on Memcached clusters.</p>
    /// </note>
    /// <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>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/dg/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>
    pub fn new_availability_zones(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.new_availability_zones.unwrap_or_default();
        v.push(input.into());
        self.new_availability_zones = ::std::option::Option::Some(v);
        self
    }
    /// <note>
    /// <p>This option is only supported on Memcached clusters.</p>
    /// </note>
    /// <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>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/dg/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>
    pub fn set_new_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.new_availability_zones = input;
        self
    }
    /// <note>
    /// <p>This option is only supported on Memcached clusters.</p>
    /// </note>
    /// <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>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/dg/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>
    pub fn get_new_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.new_availability_zones
    }
    /// Appends an item to `cache_security_group_names`.
    ///
    /// To override the contents of this collection use [`set_cache_security_group_names`](Self::set_cache_security_group_names).
    ///
    /// <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>
    pub fn cache_security_group_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.cache_security_group_names.unwrap_or_default();
        v.push(input.into());
        self.cache_security_group_names = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_cache_security_group_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.cache_security_group_names = input;
        self
    }
    /// <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>
    pub fn get_cache_security_group_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.cache_security_group_names
    }
    /// Appends an item to `security_group_ids`.
    ///
    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
    ///
    /// <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>
    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.security_group_ids.unwrap_or_default();
        v.push(input.into());
        self.security_group_ids = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.security_group_ids = input;
        self
    }
    /// <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>
    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.security_group_ids
    }
    /// <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>
    pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.preferred_maintenance_window = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.preferred_maintenance_window = input;
        self
    }
    /// <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>
    pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
        &self.preferred_maintenance_window
    }
    /// <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>
    pub fn notification_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.notification_topic_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_notification_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.notification_topic_arn = input;
        self
    }
    /// <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>
    pub fn get_notification_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.notification_topic_arn
    }
    /// <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>
    pub fn cache_parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cache_parameter_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_cache_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cache_parameter_group_name = input;
        self
    }
    /// <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>
    pub fn get_cache_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.cache_parameter_group_name
    }
    /// <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>
    pub fn notification_topic_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.notification_topic_status = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_notification_topic_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.notification_topic_status = input;
        self
    }
    /// <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>
    pub fn get_notification_topic_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.notification_topic_status
    }
    /// <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>
    pub fn apply_immediately(mut self, input: bool) -> Self {
        self.apply_immediately = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_apply_immediately(mut self, input: ::std::option::Option<bool>) -> Self {
        self.apply_immediately = input;
        self
    }
    /// <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>
    pub fn get_apply_immediately(&self) -> &::std::option::Option<bool> {
        &self.apply_immediately
    }
    /// <p>The engine type used by the cache cluster. The options are valkey, memcached or redis.</p>
    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The engine type used by the cache cluster. The options are valkey, memcached or redis.</p>
    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine = input;
        self
    }
    /// <p>The engine type used by the cache cluster. The options are valkey, memcached or redis.</p>
    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine
    }
    /// <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/dg/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>
    pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <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/dg/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>
    pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine_version = input;
        self
    }
    /// <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/dg/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>
    pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine_version
    }
    /// <p>&nbsp;If you are running Valkey 7.2 or Redis OSS engine version 6.0 or later, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
    pub fn auto_minor_version_upgrade(mut self, input: bool) -> Self {
        self.auto_minor_version_upgrade = ::std::option::Option::Some(input);
        self
    }
    /// <p>&nbsp;If you are running Valkey 7.2 or Redis OSS engine version 6.0 or later, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
    pub fn set_auto_minor_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
        self.auto_minor_version_upgrade = input;
        self
    }
    /// <p>&nbsp;If you are running Valkey 7.2 or Redis OSS engine version 6.0 or later, set this parameter to yes to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions.&nbsp;</p>
    pub fn get_auto_minor_version_upgrade(&self) -> &::std::option::Option<bool> {
        &self.auto_minor_version_upgrade
    }
    /// <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>
    pub fn snapshot_retention_limit(mut self, input: i32) -> Self {
        self.snapshot_retention_limit = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_snapshot_retention_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.snapshot_retention_limit = input;
        self
    }
    /// <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>
    pub fn get_snapshot_retention_limit(&self) -> &::std::option::Option<i32> {
        &self.snapshot_retention_limit
    }
    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your cluster.</p>
    pub fn snapshot_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_window = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your cluster.</p>
    pub fn set_snapshot_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_window = input;
        self
    }
    /// <p>The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your cluster.</p>
    pub fn get_snapshot_window(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_window
    }
    /// <p>A valid cache node type that you want to scale this cluster up to.</p>
    pub fn cache_node_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cache_node_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A valid cache node type that you want to scale this cluster up to.</p>
    pub fn set_cache_node_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cache_node_type = input;
        self
    }
    /// <p>A valid cache node type that you want to scale this cluster up to.</p>
    pub fn get_cache_node_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.cache_node_type
    }
    /// <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>
    pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.auth_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.auth_token = input;
        self
    }
    /// <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>
    pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.auth_token
    }
    /// <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 - default, if no update strategy is provided</p></li>
    /// <li>
    /// <p>SET - allowed only after ROTATE</p></li>
    /// <li>
    /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
    /// </ul>
    /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
    pub fn auth_token_update_strategy(mut self, input: crate::types::AuthTokenUpdateStrategyType) -> Self {
        self.auth_token_update_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <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 - default, if no update strategy is provided</p></li>
    /// <li>
    /// <p>SET - allowed only after ROTATE</p></li>
    /// <li>
    /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
    /// </ul>
    /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
    pub fn set_auth_token_update_strategy(mut self, input: ::std::option::Option<crate::types::AuthTokenUpdateStrategyType>) -> Self {
        self.auth_token_update_strategy = input;
        self
    }
    /// <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 - default, if no update strategy is provided</p></li>
    /// <li>
    /// <p>SET - allowed only after ROTATE</p></li>
    /// <li>
    /// <p>DELETE - allowed only when transitioning to RBAC</p></li>
    /// </ul>
    /// <p>For more information, see <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth.html">Authenticating Users with AUTH</a></p>
    pub fn get_auth_token_update_strategy(&self) -> &::std::option::Option<crate::types::AuthTokenUpdateStrategyType> {
        &self.auth_token_update_strategy
    }
    /// Appends an item to `log_delivery_configurations`.
    ///
    /// To override the contents of this collection use [`set_log_delivery_configurations`](Self::set_log_delivery_configurations).
    ///
    /// <p>Specifies the destination, format and type of the logs.</p>
    pub fn log_delivery_configurations(mut self, input: crate::types::LogDeliveryConfigurationRequest) -> Self {
        let mut v = self.log_delivery_configurations.unwrap_or_default();
        v.push(input);
        self.log_delivery_configurations = ::std::option::Option::Some(v);
        self
    }
    /// <p>Specifies the destination, format and type of the logs.</p>
    pub fn set_log_delivery_configurations(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>>,
    ) -> Self {
        self.log_delivery_configurations = input;
        self
    }
    /// <p>Specifies the destination, format and type of the logs.</p>
    pub fn get_log_delivery_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LogDeliveryConfigurationRequest>> {
        &self.log_delivery_configurations
    }
    /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 or Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
    pub fn ip_discovery(mut self, input: crate::types::IpDiscovery) -> Self {
        self.ip_discovery = ::std::option::Option::Some(input);
        self
    }
    /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 or Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
    pub fn set_ip_discovery(mut self, input: ::std::option::Option<crate::types::IpDiscovery>) -> Self {
        self.ip_discovery = input;
        self
    }
    /// <p>The network type you choose when modifying a cluster, either <code>ipv4</code> | <code>ipv6</code>. IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 or Memcached engine version 1.6.6 and above on all instances built on the <a href="http://aws.amazon.com/ec2/nitro/">Nitro system</a>.</p>
    pub fn get_ip_discovery(&self) -> &::std::option::Option<crate::types::IpDiscovery> {
        &self.ip_discovery
    }
    /// <p>Configures horizontal or vertical scaling for Memcached clusters, specifying the scaling percentage and interval.</p>
    pub fn scale_config(mut self, input: crate::types::ScaleConfig) -> Self {
        self.scale_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configures horizontal or vertical scaling for Memcached clusters, specifying the scaling percentage and interval.</p>
    pub fn set_scale_config(mut self, input: ::std::option::Option<crate::types::ScaleConfig>) -> Self {
        self.scale_config = input;
        self
    }
    /// <p>Configures horizontal or vertical scaling for Memcached clusters, specifying the scaling percentage and interval.</p>
    pub fn get_scale_config(&self) -> &::std::option::Option<crate::types::ScaleConfig> {
        &self.scale_config
    }
    /// Consumes the builder and constructs a [`ModifyCacheClusterInput`](crate::operation::modify_cache_cluster::ModifyCacheClusterInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::modify_cache_cluster::ModifyCacheClusterInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::modify_cache_cluster::ModifyCacheClusterInput {
            cache_cluster_id: self.cache_cluster_id,
            num_cache_nodes: self.num_cache_nodes,
            cache_node_ids_to_remove: self.cache_node_ids_to_remove,
            az_mode: self.az_mode,
            new_availability_zones: self.new_availability_zones,
            cache_security_group_names: self.cache_security_group_names,
            security_group_ids: self.security_group_ids,
            preferred_maintenance_window: self.preferred_maintenance_window,
            notification_topic_arn: self.notification_topic_arn,
            cache_parameter_group_name: self.cache_parameter_group_name,
            notification_topic_status: self.notification_topic_status,
            apply_immediately: self.apply_immediately,
            engine: self.engine,
            engine_version: self.engine_version,
            auto_minor_version_upgrade: self.auto_minor_version_upgrade,
            snapshot_retention_limit: self.snapshot_retention_limit,
            snapshot_window: self.snapshot_window,
            cache_node_type: self.cache_node_type,
            auth_token: self.auth_token,
            auth_token_update_strategy: self.auth_token_update_strategy,
            log_delivery_configurations: self.log_delivery_configurations,
            ip_discovery: self.ip_discovery,
            scale_config: self.scale_config,
        })
    }
}