aws-sdk-connect 1.169.0

AWS SDK for Amazon Connect Service
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
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information about a contact.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Contact {
    /// <p>The Amazon Resource Name (ARN) for the contact.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the contact.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>If this contact is related to other contacts, this is the ID of the initial contact.</p>
    pub initial_contact_id: ::std::option::Option<::std::string::String>,
    /// <p>If this contact is not the first contact, this is the ID of the previous contact.</p>
    pub previous_contact_id: ::std::option::Option<::std::string::String>,
    /// <p>This is the root contactId which is used as a unique identifier for all subsequent contacts in a contact tree.</p>
    pub contact_association_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates how the contact was initiated.</p>
    pub initiation_method: ::std::option::Option<crate::types::ContactInitiationMethod>,
    /// <p>The name of the contact.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the contact.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>How the contact reached your contact center.</p>
    pub channel: ::std::option::Option<crate::types::Channel>,
    /// <p>If this contact was queued, this contains information about the queue.</p>
    pub queue_info: ::std::option::Option<crate::types::QueueInfo>,
    /// <p>Information about the agent who accepted the contact.</p>
    pub agent_info: ::std::option::Option<crate::types::AgentInfo>,
    /// <p>The date and time this contact was initiated, in UTC time. For <code>INBOUND</code>, this is when the contact arrived. For <code>OUTBOUND</code>, this is when the agent began dialing. For <code>CALLBACK</code>, this is when the callback contact was created. For <code>TRANSFER</code> and <code>QUEUE_TRANSFER</code>, this is when the transfer was initiated. For <code>API</code>, this is when the request arrived. For <code>EXTERNAL_OUTBOUND</code>, this is when the agent started dialing the external participant. For <code>MONITOR</code>, this is when the supervisor started listening to a contact.</p>
    pub initiation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.</p>
    pub disconnect_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp when contact was last updated.</p>
    pub last_update_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp when the contact was last paused.</p>
    pub last_paused_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp when the contact was last resumed.</p>
    pub last_resumed_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp when ringing started for a campaign call.</p>
    pub ring_start_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Total pause count for a contact.</p>
    pub total_pause_count: ::std::option::Option<i32>,
    /// <p>Total pause duration for a contact in seconds.</p>
    pub total_pause_duration_in_seconds: ::std::option::Option<i32>,
    /// <p>The timestamp, in Unix epoch time format, at which to start running the inbound flow.</p>
    pub scheduled_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html#relatedcontactid">related</a> to this contact.</p>
    pub related_contact_id: ::std::option::Option<::std::string::String>,
    /// <p>Information about Amazon Connect Wisdom.</p>
    pub wisdom_info: ::std::option::Option<crate::types::WisdomInfo>,
    /// <p>The customer's identification number. For example, the <code>CustomerId</code> may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the <code>CustomerSpeakerId</code> of the caller.</p>
    pub customer_id: ::std::option::Option<::std::string::String>,
    /// <p>The customer or external third party participant endpoint.</p>
    pub customer_endpoint: ::std::option::Option<crate::types::EndpointInfo>,
    /// <p>The system endpoint. For <code>INBOUND</code>, this is the phone number or email address that the customer dialed. For <code>OUTBOUND</code> and <code>EXTERNAL_OUTBOUND</code>, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For callback, this shows up as Softphone for calls handled by agents with softphone.</p>
    pub system_endpoint: ::std::option::Option<crate::types::EndpointInfo>,
    /// <p>An integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue time are routed preferentially). Cannot be specified if the QueuePriority is specified. Must be statically defined and a valid integer value.</p>
    pub queue_time_adjustment_seconds: ::std::option::Option<i32>,
    /// <p>An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if the QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value. Default Value is 5.</p>
    pub queue_priority: ::std::option::Option<i64>,
    /// <p>Tags associated with the contact. This contains both Amazon Web Services generated and user-defined tags.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The timestamp when customer endpoint connected to Amazon Connect.</p>
    pub connected_to_system_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Latest routing criteria on the contact.</p>
    pub routing_criteria: ::std::option::Option<crate::types::RoutingCriteria>,
    /// <p>Information about the Customer on the contact.</p>
    pub customer: ::std::option::Option<crate::types::Customer>,
    /// <p>Information associated with a campaign.</p>
    pub campaign: ::std::option::Option<crate::types::Campaign>,
    /// <p>Indicates how an <a href="https://docs.aws.amazon.com/connect/latest/adminguide/how-to-create-campaigns.html">outbound campaign</a> call is actually disposed if the contact is connected to Amazon Connect.</p>
    pub answering_machine_detection_status: ::std::option::Option<crate::types::AnsweringMachineDetectionStatus>,
    /// <p>Information about customer’s voice activity.</p>
    pub customer_voice_activity: ::std::option::Option<crate::types::CustomerVoiceActivity>,
    /// <p>Information about the quality of the participant's media connection.</p>
    pub quality_metrics: ::std::option::Option<crate::types::QualityMetrics>,
    /// <p>Information about how agent, bot, and customer interact in a chat contact.</p>
    pub chat_metrics: ::std::option::Option<crate::types::ChatMetrics>,
    /// <p>Information about the call disconnect experience.</p>
    pub disconnect_details: ::std::option::Option<crate::types::DisconnectDetails>,
    /// <p>List of additional email addresses for an email contact.</p>
    pub additional_email_recipients: ::std::option::Option<crate::types::AdditionalEmailRecipients>,
    /// <p>A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes and can be accessed in flows. Attribute keys can include only alphanumeric, -, and _ characters. This field can be used to show channel subtype. For example, <code>connect:Guide</code> or <code>connect:SMS</code>.</p>
    pub segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
    /// <p>If recording was enabled, this is information about the recordings.</p>
    pub recordings: ::std::option::Option<::std::vec::Vec<crate::types::RecordingInfo>>,
    /// <p>The disconnect reason for the contact. For a list and description of all the possible disconnect reasons by channel, see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub disconnect_reason: ::std::option::Option<::std::string::String>,
    /// <p>Information about the contact evaluations where the key is the FormId, which is a unique identifier for the form.</p>
    pub contact_evaluations: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ContactEvaluation>>,
    /// <p>If this contact was created using a task template, this contains information about the task template.</p>
    pub task_template_info: ::std::option::Option<crate::types::TaskTemplateInfoV2>,
    /// <p>A map of string key/value pairs that contain user-defined attributes which are lightly typed within the contact. This object is used only for task contacts.</p>
    pub contact_details: ::std::option::Option<crate::types::ContactDetails>,
    /// <p>Information about the outbound strategy.</p>
    pub outbound_strategy: ::std::option::Option<crate::types::OutboundStrategy>,
    /// <p>The attributes of the contact.</p>
    pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>List of next contact entries for the contact.</p>
    pub next_contacts: ::std::option::Option<::std::vec::Vec<crate::types::NextContactEntry>>,
    /// <p>Information about the global resiliency configuration for the contact, including traffic distribution details.</p>
    pub global_resiliency_metadata: ::std::option::Option<crate::types::GlobalResiliencyMetadata>,
}
impl Contact {
    /// <p>The Amazon Resource Name (ARN) for the contact.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The identifier for the contact.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>If this contact is related to other contacts, this is the ID of the initial contact.</p>
    pub fn initial_contact_id(&self) -> ::std::option::Option<&str> {
        self.initial_contact_id.as_deref()
    }
    /// <p>If this contact is not the first contact, this is the ID of the previous contact.</p>
    pub fn previous_contact_id(&self) -> ::std::option::Option<&str> {
        self.previous_contact_id.as_deref()
    }
    /// <p>This is the root contactId which is used as a unique identifier for all subsequent contacts in a contact tree.</p>
    pub fn contact_association_id(&self) -> ::std::option::Option<&str> {
        self.contact_association_id.as_deref()
    }
    /// <p>Indicates how the contact was initiated.</p>
    pub fn initiation_method(&self) -> ::std::option::Option<&crate::types::ContactInitiationMethod> {
        self.initiation_method.as_ref()
    }
    /// <p>The name of the contact.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the contact.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>How the contact reached your contact center.</p>
    pub fn channel(&self) -> ::std::option::Option<&crate::types::Channel> {
        self.channel.as_ref()
    }
    /// <p>If this contact was queued, this contains information about the queue.</p>
    pub fn queue_info(&self) -> ::std::option::Option<&crate::types::QueueInfo> {
        self.queue_info.as_ref()
    }
    /// <p>Information about the agent who accepted the contact.</p>
    pub fn agent_info(&self) -> ::std::option::Option<&crate::types::AgentInfo> {
        self.agent_info.as_ref()
    }
    /// <p>The date and time this contact was initiated, in UTC time. For <code>INBOUND</code>, this is when the contact arrived. For <code>OUTBOUND</code>, this is when the agent began dialing. For <code>CALLBACK</code>, this is when the callback contact was created. For <code>TRANSFER</code> and <code>QUEUE_TRANSFER</code>, this is when the transfer was initiated. For <code>API</code>, this is when the request arrived. For <code>EXTERNAL_OUTBOUND</code>, this is when the agent started dialing the external participant. For <code>MONITOR</code>, this is when the supervisor started listening to a contact.</p>
    pub fn initiation_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.initiation_timestamp.as_ref()
    }
    /// <p>The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.</p>
    pub fn disconnect_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.disconnect_timestamp.as_ref()
    }
    /// <p>The timestamp when contact was last updated.</p>
    pub fn last_update_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_update_timestamp.as_ref()
    }
    /// <p>The timestamp when the contact was last paused.</p>
    pub fn last_paused_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_paused_timestamp.as_ref()
    }
    /// <p>The timestamp when the contact was last resumed.</p>
    pub fn last_resumed_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_resumed_timestamp.as_ref()
    }
    /// <p>The timestamp when ringing started for a campaign call.</p>
    pub fn ring_start_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.ring_start_timestamp.as_ref()
    }
    /// <p>Total pause count for a contact.</p>
    pub fn total_pause_count(&self) -> ::std::option::Option<i32> {
        self.total_pause_count
    }
    /// <p>Total pause duration for a contact in seconds.</p>
    pub fn total_pause_duration_in_seconds(&self) -> ::std::option::Option<i32> {
        self.total_pause_duration_in_seconds
    }
    /// <p>The timestamp, in Unix epoch time format, at which to start running the inbound flow.</p>
    pub fn scheduled_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.scheduled_timestamp.as_ref()
    }
    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html#relatedcontactid">related</a> to this contact.</p>
    pub fn related_contact_id(&self) -> ::std::option::Option<&str> {
        self.related_contact_id.as_deref()
    }
    /// <p>Information about Amazon Connect Wisdom.</p>
    pub fn wisdom_info(&self) -> ::std::option::Option<&crate::types::WisdomInfo> {
        self.wisdom_info.as_ref()
    }
    /// <p>The customer's identification number. For example, the <code>CustomerId</code> may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the <code>CustomerSpeakerId</code> of the caller.</p>
    pub fn customer_id(&self) -> ::std::option::Option<&str> {
        self.customer_id.as_deref()
    }
    /// <p>The customer or external third party participant endpoint.</p>
    pub fn customer_endpoint(&self) -> ::std::option::Option<&crate::types::EndpointInfo> {
        self.customer_endpoint.as_ref()
    }
    /// <p>The system endpoint. For <code>INBOUND</code>, this is the phone number or email address that the customer dialed. For <code>OUTBOUND</code> and <code>EXTERNAL_OUTBOUND</code>, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For callback, this shows up as Softphone for calls handled by agents with softphone.</p>
    pub fn system_endpoint(&self) -> ::std::option::Option<&crate::types::EndpointInfo> {
        self.system_endpoint.as_ref()
    }
    /// <p>An integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue time are routed preferentially). Cannot be specified if the QueuePriority is specified. Must be statically defined and a valid integer value.</p>
    pub fn queue_time_adjustment_seconds(&self) -> ::std::option::Option<i32> {
        self.queue_time_adjustment_seconds
    }
    /// <p>An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if the QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value. Default Value is 5.</p>
    pub fn queue_priority(&self) -> ::std::option::Option<i64> {
        self.queue_priority
    }
    /// <p>Tags associated with the contact. This contains both Amazon Web Services generated and user-defined tags.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The timestamp when customer endpoint connected to Amazon Connect.</p>
    pub fn connected_to_system_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.connected_to_system_timestamp.as_ref()
    }
    /// <p>Latest routing criteria on the contact.</p>
    pub fn routing_criteria(&self) -> ::std::option::Option<&crate::types::RoutingCriteria> {
        self.routing_criteria.as_ref()
    }
    /// <p>Information about the Customer on the contact.</p>
    pub fn customer(&self) -> ::std::option::Option<&crate::types::Customer> {
        self.customer.as_ref()
    }
    /// <p>Information associated with a campaign.</p>
    pub fn campaign(&self) -> ::std::option::Option<&crate::types::Campaign> {
        self.campaign.as_ref()
    }
    /// <p>Indicates how an <a href="https://docs.aws.amazon.com/connect/latest/adminguide/how-to-create-campaigns.html">outbound campaign</a> call is actually disposed if the contact is connected to Amazon Connect.</p>
    pub fn answering_machine_detection_status(&self) -> ::std::option::Option<&crate::types::AnsweringMachineDetectionStatus> {
        self.answering_machine_detection_status.as_ref()
    }
    /// <p>Information about customer’s voice activity.</p>
    pub fn customer_voice_activity(&self) -> ::std::option::Option<&crate::types::CustomerVoiceActivity> {
        self.customer_voice_activity.as_ref()
    }
    /// <p>Information about the quality of the participant's media connection.</p>
    pub fn quality_metrics(&self) -> ::std::option::Option<&crate::types::QualityMetrics> {
        self.quality_metrics.as_ref()
    }
    /// <p>Information about how agent, bot, and customer interact in a chat contact.</p>
    pub fn chat_metrics(&self) -> ::std::option::Option<&crate::types::ChatMetrics> {
        self.chat_metrics.as_ref()
    }
    /// <p>Information about the call disconnect experience.</p>
    pub fn disconnect_details(&self) -> ::std::option::Option<&crate::types::DisconnectDetails> {
        self.disconnect_details.as_ref()
    }
    /// <p>List of additional email addresses for an email contact.</p>
    pub fn additional_email_recipients(&self) -> ::std::option::Option<&crate::types::AdditionalEmailRecipients> {
        self.additional_email_recipients.as_ref()
    }
    /// <p>A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes and can be accessed in flows. Attribute keys can include only alphanumeric, -, and _ characters. This field can be used to show channel subtype. For example, <code>connect:Guide</code> or <code>connect:SMS</code>.</p>
    pub fn segment_attributes(
        &self,
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
        self.segment_attributes.as_ref()
    }
    /// <p>If recording was enabled, this is information about the recordings.</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 `.recordings.is_none()`.
    pub fn recordings(&self) -> &[crate::types::RecordingInfo] {
        self.recordings.as_deref().unwrap_or_default()
    }
    /// <p>The disconnect reason for the contact. For a list and description of all the possible disconnect reasons by channel, see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub fn disconnect_reason(&self) -> ::std::option::Option<&str> {
        self.disconnect_reason.as_deref()
    }
    /// <p>Information about the contact evaluations where the key is the FormId, which is a unique identifier for the form.</p>
    pub fn contact_evaluations(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ContactEvaluation>> {
        self.contact_evaluations.as_ref()
    }
    /// <p>If this contact was created using a task template, this contains information about the task template.</p>
    pub fn task_template_info(&self) -> ::std::option::Option<&crate::types::TaskTemplateInfoV2> {
        self.task_template_info.as_ref()
    }
    /// <p>A map of string key/value pairs that contain user-defined attributes which are lightly typed within the contact. This object is used only for task contacts.</p>
    pub fn contact_details(&self) -> ::std::option::Option<&crate::types::ContactDetails> {
        self.contact_details.as_ref()
    }
    /// <p>Information about the outbound strategy.</p>
    pub fn outbound_strategy(&self) -> ::std::option::Option<&crate::types::OutboundStrategy> {
        self.outbound_strategy.as_ref()
    }
    /// <p>The attributes of the contact.</p>
    pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.attributes.as_ref()
    }
    /// <p>List of next contact entries for the contact.</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 `.next_contacts.is_none()`.
    pub fn next_contacts(&self) -> &[crate::types::NextContactEntry] {
        self.next_contacts.as_deref().unwrap_or_default()
    }
    /// <p>Information about the global resiliency configuration for the contact, including traffic distribution details.</p>
    pub fn global_resiliency_metadata(&self) -> ::std::option::Option<&crate::types::GlobalResiliencyMetadata> {
        self.global_resiliency_metadata.as_ref()
    }
}
impl ::std::fmt::Debug for Contact {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Contact");
        formatter.field("arn", &self.arn);
        formatter.field("id", &self.id);
        formatter.field("initial_contact_id", &self.initial_contact_id);
        formatter.field("previous_contact_id", &self.previous_contact_id);
        formatter.field("contact_association_id", &self.contact_association_id);
        formatter.field("initiation_method", &self.initiation_method);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("channel", &self.channel);
        formatter.field("queue_info", &self.queue_info);
        formatter.field("agent_info", &self.agent_info);
        formatter.field("initiation_timestamp", &self.initiation_timestamp);
        formatter.field("disconnect_timestamp", &self.disconnect_timestamp);
        formatter.field("last_update_timestamp", &self.last_update_timestamp);
        formatter.field("last_paused_timestamp", &self.last_paused_timestamp);
        formatter.field("last_resumed_timestamp", &self.last_resumed_timestamp);
        formatter.field("ring_start_timestamp", &self.ring_start_timestamp);
        formatter.field("total_pause_count", &self.total_pause_count);
        formatter.field("total_pause_duration_in_seconds", &self.total_pause_duration_in_seconds);
        formatter.field("scheduled_timestamp", &self.scheduled_timestamp);
        formatter.field("related_contact_id", &self.related_contact_id);
        formatter.field("wisdom_info", &self.wisdom_info);
        formatter.field("customer_id", &self.customer_id);
        formatter.field("customer_endpoint", &self.customer_endpoint);
        formatter.field("system_endpoint", &self.system_endpoint);
        formatter.field("queue_time_adjustment_seconds", &self.queue_time_adjustment_seconds);
        formatter.field("queue_priority", &self.queue_priority);
        formatter.field("tags", &self.tags);
        formatter.field("connected_to_system_timestamp", &self.connected_to_system_timestamp);
        formatter.field("routing_criteria", &self.routing_criteria);
        formatter.field("customer", &self.customer);
        formatter.field("campaign", &self.campaign);
        formatter.field("answering_machine_detection_status", &self.answering_machine_detection_status);
        formatter.field("customer_voice_activity", &self.customer_voice_activity);
        formatter.field("quality_metrics", &self.quality_metrics);
        formatter.field("chat_metrics", &self.chat_metrics);
        formatter.field("disconnect_details", &self.disconnect_details);
        formatter.field("additional_email_recipients", &self.additional_email_recipients);
        formatter.field("segment_attributes", &self.segment_attributes);
        formatter.field("recordings", &self.recordings);
        formatter.field("disconnect_reason", &self.disconnect_reason);
        formatter.field("contact_evaluations", &self.contact_evaluations);
        formatter.field("task_template_info", &self.task_template_info);
        formatter.field("contact_details", &self.contact_details);
        formatter.field("outbound_strategy", &self.outbound_strategy);
        formatter.field("attributes", &self.attributes);
        formatter.field("next_contacts", &self.next_contacts);
        formatter.field("global_resiliency_metadata", &self.global_resiliency_metadata);
        formatter.finish()
    }
}
impl Contact {
    /// Creates a new builder-style object to manufacture [`Contact`](crate::types::Contact).
    pub fn builder() -> crate::types::builders::ContactBuilder {
        crate::types::builders::ContactBuilder::default()
    }
}

/// A builder for [`Contact`](crate::types::Contact).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ContactBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) initial_contact_id: ::std::option::Option<::std::string::String>,
    pub(crate) previous_contact_id: ::std::option::Option<::std::string::String>,
    pub(crate) contact_association_id: ::std::option::Option<::std::string::String>,
    pub(crate) initiation_method: ::std::option::Option<crate::types::ContactInitiationMethod>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) channel: ::std::option::Option<crate::types::Channel>,
    pub(crate) queue_info: ::std::option::Option<crate::types::QueueInfo>,
    pub(crate) agent_info: ::std::option::Option<crate::types::AgentInfo>,
    pub(crate) initiation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) disconnect_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_update_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_paused_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_resumed_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) ring_start_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) total_pause_count: ::std::option::Option<i32>,
    pub(crate) total_pause_duration_in_seconds: ::std::option::Option<i32>,
    pub(crate) scheduled_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) related_contact_id: ::std::option::Option<::std::string::String>,
    pub(crate) wisdom_info: ::std::option::Option<crate::types::WisdomInfo>,
    pub(crate) customer_id: ::std::option::Option<::std::string::String>,
    pub(crate) customer_endpoint: ::std::option::Option<crate::types::EndpointInfo>,
    pub(crate) system_endpoint: ::std::option::Option<crate::types::EndpointInfo>,
    pub(crate) queue_time_adjustment_seconds: ::std::option::Option<i32>,
    pub(crate) queue_priority: ::std::option::Option<i64>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) connected_to_system_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) routing_criteria: ::std::option::Option<crate::types::RoutingCriteria>,
    pub(crate) customer: ::std::option::Option<crate::types::Customer>,
    pub(crate) campaign: ::std::option::Option<crate::types::Campaign>,
    pub(crate) answering_machine_detection_status: ::std::option::Option<crate::types::AnsweringMachineDetectionStatus>,
    pub(crate) customer_voice_activity: ::std::option::Option<crate::types::CustomerVoiceActivity>,
    pub(crate) quality_metrics: ::std::option::Option<crate::types::QualityMetrics>,
    pub(crate) chat_metrics: ::std::option::Option<crate::types::ChatMetrics>,
    pub(crate) disconnect_details: ::std::option::Option<crate::types::DisconnectDetails>,
    pub(crate) additional_email_recipients: ::std::option::Option<crate::types::AdditionalEmailRecipients>,
    pub(crate) segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
    pub(crate) recordings: ::std::option::Option<::std::vec::Vec<crate::types::RecordingInfo>>,
    pub(crate) disconnect_reason: ::std::option::Option<::std::string::String>,
    pub(crate) contact_evaluations: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ContactEvaluation>>,
    pub(crate) task_template_info: ::std::option::Option<crate::types::TaskTemplateInfoV2>,
    pub(crate) contact_details: ::std::option::Option<crate::types::ContactDetails>,
    pub(crate) outbound_strategy: ::std::option::Option<crate::types::OutboundStrategy>,
    pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) next_contacts: ::std::option::Option<::std::vec::Vec<crate::types::NextContactEntry>>,
    pub(crate) global_resiliency_metadata: ::std::option::Option<crate::types::GlobalResiliencyMetadata>,
}
impl ContactBuilder {
    /// <p>The Amazon Resource Name (ARN) for the contact.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the contact.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the contact.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The identifier for the contact.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the contact.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The identifier for the contact.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>If this contact is related to other contacts, this is the ID of the initial contact.</p>
    pub fn initial_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.initial_contact_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If this contact is related to other contacts, this is the ID of the initial contact.</p>
    pub fn set_initial_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.initial_contact_id = input;
        self
    }
    /// <p>If this contact is related to other contacts, this is the ID of the initial contact.</p>
    pub fn get_initial_contact_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.initial_contact_id
    }
    /// <p>If this contact is not the first contact, this is the ID of the previous contact.</p>
    pub fn previous_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.previous_contact_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If this contact is not the first contact, this is the ID of the previous contact.</p>
    pub fn set_previous_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.previous_contact_id = input;
        self
    }
    /// <p>If this contact is not the first contact, this is the ID of the previous contact.</p>
    pub fn get_previous_contact_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.previous_contact_id
    }
    /// <p>This is the root contactId which is used as a unique identifier for all subsequent contacts in a contact tree.</p>
    pub fn contact_association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.contact_association_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>This is the root contactId which is used as a unique identifier for all subsequent contacts in a contact tree.</p>
    pub fn set_contact_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.contact_association_id = input;
        self
    }
    /// <p>This is the root contactId which is used as a unique identifier for all subsequent contacts in a contact tree.</p>
    pub fn get_contact_association_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.contact_association_id
    }
    /// <p>Indicates how the contact was initiated.</p>
    pub fn initiation_method(mut self, input: crate::types::ContactInitiationMethod) -> Self {
        self.initiation_method = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates how the contact was initiated.</p>
    pub fn set_initiation_method(mut self, input: ::std::option::Option<crate::types::ContactInitiationMethod>) -> Self {
        self.initiation_method = input;
        self
    }
    /// <p>Indicates how the contact was initiated.</p>
    pub fn get_initiation_method(&self) -> &::std::option::Option<crate::types::ContactInitiationMethod> {
        &self.initiation_method
    }
    /// <p>The name of the contact.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the contact.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the contact.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the contact.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the contact.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the contact.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>How the contact reached your contact center.</p>
    pub fn channel(mut self, input: crate::types::Channel) -> Self {
        self.channel = ::std::option::Option::Some(input);
        self
    }
    /// <p>How the contact reached your contact center.</p>
    pub fn set_channel(mut self, input: ::std::option::Option<crate::types::Channel>) -> Self {
        self.channel = input;
        self
    }
    /// <p>How the contact reached your contact center.</p>
    pub fn get_channel(&self) -> &::std::option::Option<crate::types::Channel> {
        &self.channel
    }
    /// <p>If this contact was queued, this contains information about the queue.</p>
    pub fn queue_info(mut self, input: crate::types::QueueInfo) -> Self {
        self.queue_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>If this contact was queued, this contains information about the queue.</p>
    pub fn set_queue_info(mut self, input: ::std::option::Option<crate::types::QueueInfo>) -> Self {
        self.queue_info = input;
        self
    }
    /// <p>If this contact was queued, this contains information about the queue.</p>
    pub fn get_queue_info(&self) -> &::std::option::Option<crate::types::QueueInfo> {
        &self.queue_info
    }
    /// <p>Information about the agent who accepted the contact.</p>
    pub fn agent_info(mut self, input: crate::types::AgentInfo) -> Self {
        self.agent_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the agent who accepted the contact.</p>
    pub fn set_agent_info(mut self, input: ::std::option::Option<crate::types::AgentInfo>) -> Self {
        self.agent_info = input;
        self
    }
    /// <p>Information about the agent who accepted the contact.</p>
    pub fn get_agent_info(&self) -> &::std::option::Option<crate::types::AgentInfo> {
        &self.agent_info
    }
    /// <p>The date and time this contact was initiated, in UTC time. For <code>INBOUND</code>, this is when the contact arrived. For <code>OUTBOUND</code>, this is when the agent began dialing. For <code>CALLBACK</code>, this is when the callback contact was created. For <code>TRANSFER</code> and <code>QUEUE_TRANSFER</code>, this is when the transfer was initiated. For <code>API</code>, this is when the request arrived. For <code>EXTERNAL_OUTBOUND</code>, this is when the agent started dialing the external participant. For <code>MONITOR</code>, this is when the supervisor started listening to a contact.</p>
    pub fn initiation_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.initiation_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time this contact was initiated, in UTC time. For <code>INBOUND</code>, this is when the contact arrived. For <code>OUTBOUND</code>, this is when the agent began dialing. For <code>CALLBACK</code>, this is when the callback contact was created. For <code>TRANSFER</code> and <code>QUEUE_TRANSFER</code>, this is when the transfer was initiated. For <code>API</code>, this is when the request arrived. For <code>EXTERNAL_OUTBOUND</code>, this is when the agent started dialing the external participant. For <code>MONITOR</code>, this is when the supervisor started listening to a contact.</p>
    pub fn set_initiation_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.initiation_timestamp = input;
        self
    }
    /// <p>The date and time this contact was initiated, in UTC time. For <code>INBOUND</code>, this is when the contact arrived. For <code>OUTBOUND</code>, this is when the agent began dialing. For <code>CALLBACK</code>, this is when the callback contact was created. For <code>TRANSFER</code> and <code>QUEUE_TRANSFER</code>, this is when the transfer was initiated. For <code>API</code>, this is when the request arrived. For <code>EXTERNAL_OUTBOUND</code>, this is when the agent started dialing the external participant. For <code>MONITOR</code>, this is when the supervisor started listening to a contact.</p>
    pub fn get_initiation_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.initiation_timestamp
    }
    /// <p>The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.</p>
    pub fn disconnect_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.disconnect_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.</p>
    pub fn set_disconnect_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.disconnect_timestamp = input;
        self
    }
    /// <p>The date and time that the customer endpoint disconnected from the current contact, in UTC time. In transfer scenarios, the DisconnectTimestamp of the previous contact indicates the date and time when that contact ended.</p>
    pub fn get_disconnect_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.disconnect_timestamp
    }
    /// <p>The timestamp when contact was last updated.</p>
    pub fn last_update_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_update_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when contact was last updated.</p>
    pub fn set_last_update_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_update_timestamp = input;
        self
    }
    /// <p>The timestamp when contact was last updated.</p>
    pub fn get_last_update_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_update_timestamp
    }
    /// <p>The timestamp when the contact was last paused.</p>
    pub fn last_paused_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_paused_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the contact was last paused.</p>
    pub fn set_last_paused_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_paused_timestamp = input;
        self
    }
    /// <p>The timestamp when the contact was last paused.</p>
    pub fn get_last_paused_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_paused_timestamp
    }
    /// <p>The timestamp when the contact was last resumed.</p>
    pub fn last_resumed_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_resumed_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the contact was last resumed.</p>
    pub fn set_last_resumed_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_resumed_timestamp = input;
        self
    }
    /// <p>The timestamp when the contact was last resumed.</p>
    pub fn get_last_resumed_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_resumed_timestamp
    }
    /// <p>The timestamp when ringing started for a campaign call.</p>
    pub fn ring_start_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.ring_start_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when ringing started for a campaign call.</p>
    pub fn set_ring_start_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.ring_start_timestamp = input;
        self
    }
    /// <p>The timestamp when ringing started for a campaign call.</p>
    pub fn get_ring_start_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.ring_start_timestamp
    }
    /// <p>Total pause count for a contact.</p>
    pub fn total_pause_count(mut self, input: i32) -> Self {
        self.total_pause_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>Total pause count for a contact.</p>
    pub fn set_total_pause_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.total_pause_count = input;
        self
    }
    /// <p>Total pause count for a contact.</p>
    pub fn get_total_pause_count(&self) -> &::std::option::Option<i32> {
        &self.total_pause_count
    }
    /// <p>Total pause duration for a contact in seconds.</p>
    pub fn total_pause_duration_in_seconds(mut self, input: i32) -> Self {
        self.total_pause_duration_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>Total pause duration for a contact in seconds.</p>
    pub fn set_total_pause_duration_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.total_pause_duration_in_seconds = input;
        self
    }
    /// <p>Total pause duration for a contact in seconds.</p>
    pub fn get_total_pause_duration_in_seconds(&self) -> &::std::option::Option<i32> {
        &self.total_pause_duration_in_seconds
    }
    /// <p>The timestamp, in Unix epoch time format, at which to start running the inbound flow.</p>
    pub fn scheduled_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.scheduled_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp, in Unix epoch time format, at which to start running the inbound flow.</p>
    pub fn set_scheduled_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.scheduled_timestamp = input;
        self
    }
    /// <p>The timestamp, in Unix epoch time format, at which to start running the inbound flow.</p>
    pub fn get_scheduled_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.scheduled_timestamp
    }
    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html#relatedcontactid">related</a> to this contact.</p>
    pub fn related_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.related_contact_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html#relatedcontactid">related</a> to this contact.</p>
    pub fn set_related_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.related_contact_id = input;
        self
    }
    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html#relatedcontactid">related</a> to this contact.</p>
    pub fn get_related_contact_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.related_contact_id
    }
    /// <p>Information about Amazon Connect Wisdom.</p>
    pub fn wisdom_info(mut self, input: crate::types::WisdomInfo) -> Self {
        self.wisdom_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about Amazon Connect Wisdom.</p>
    pub fn set_wisdom_info(mut self, input: ::std::option::Option<crate::types::WisdomInfo>) -> Self {
        self.wisdom_info = input;
        self
    }
    /// <p>Information about Amazon Connect Wisdom.</p>
    pub fn get_wisdom_info(&self) -> &::std::option::Option<crate::types::WisdomInfo> {
        &self.wisdom_info
    }
    /// <p>The customer's identification number. For example, the <code>CustomerId</code> may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the <code>CustomerSpeakerId</code> of the caller.</p>
    pub fn customer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.customer_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The customer's identification number. For example, the <code>CustomerId</code> may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the <code>CustomerSpeakerId</code> of the caller.</p>
    pub fn set_customer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.customer_id = input;
        self
    }
    /// <p>The customer's identification number. For example, the <code>CustomerId</code> may be a customer number from your CRM. You can create a Lambda function to pull the unique customer ID of the caller from your CRM system. If you enable Amazon Connect Voice ID capability, this attribute is populated with the <code>CustomerSpeakerId</code> of the caller.</p>
    pub fn get_customer_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.customer_id
    }
    /// <p>The customer or external third party participant endpoint.</p>
    pub fn customer_endpoint(mut self, input: crate::types::EndpointInfo) -> Self {
        self.customer_endpoint = ::std::option::Option::Some(input);
        self
    }
    /// <p>The customer or external third party participant endpoint.</p>
    pub fn set_customer_endpoint(mut self, input: ::std::option::Option<crate::types::EndpointInfo>) -> Self {
        self.customer_endpoint = input;
        self
    }
    /// <p>The customer or external third party participant endpoint.</p>
    pub fn get_customer_endpoint(&self) -> &::std::option::Option<crate::types::EndpointInfo> {
        &self.customer_endpoint
    }
    /// <p>The system endpoint. For <code>INBOUND</code>, this is the phone number or email address that the customer dialed. For <code>OUTBOUND</code> and <code>EXTERNAL_OUTBOUND</code>, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For callback, this shows up as Softphone for calls handled by agents with softphone.</p>
    pub fn system_endpoint(mut self, input: crate::types::EndpointInfo) -> Self {
        self.system_endpoint = ::std::option::Option::Some(input);
        self
    }
    /// <p>The system endpoint. For <code>INBOUND</code>, this is the phone number or email address that the customer dialed. For <code>OUTBOUND</code> and <code>EXTERNAL_OUTBOUND</code>, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For callback, this shows up as Softphone for calls handled by agents with softphone.</p>
    pub fn set_system_endpoint(mut self, input: ::std::option::Option<crate::types::EndpointInfo>) -> Self {
        self.system_endpoint = input;
        self
    }
    /// <p>The system endpoint. For <code>INBOUND</code>, this is the phone number or email address that the customer dialed. For <code>OUTBOUND</code> and <code>EXTERNAL_OUTBOUND</code>, this is the outbound caller ID number assigned to the outbound queue that is used to dial the customer. For callback, this shows up as Softphone for calls handled by agents with softphone.</p>
    pub fn get_system_endpoint(&self) -> &::std::option::Option<crate::types::EndpointInfo> {
        &self.system_endpoint
    }
    /// <p>An integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue time are routed preferentially). Cannot be specified if the QueuePriority is specified. Must be statically defined and a valid integer value.</p>
    pub fn queue_time_adjustment_seconds(mut self, input: i32) -> Self {
        self.queue_time_adjustment_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>An integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue time are routed preferentially). Cannot be specified if the QueuePriority is specified. Must be statically defined and a valid integer value.</p>
    pub fn set_queue_time_adjustment_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.queue_time_adjustment_seconds = input;
        self
    }
    /// <p>An integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue time are routed preferentially). Cannot be specified if the QueuePriority is specified. Must be statically defined and a valid integer value.</p>
    pub fn get_queue_time_adjustment_seconds(&self) -> &::std::option::Option<i32> {
        &self.queue_time_adjustment_seconds
    }
    /// <p>An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if the QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value. Default Value is 5.</p>
    pub fn queue_priority(mut self, input: i64) -> Self {
        self.queue_priority = ::std::option::Option::Some(input);
        self
    }
    /// <p>An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if the QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value. Default Value is 5.</p>
    pub fn set_queue_priority(mut self, input: ::std::option::Option<i64>) -> Self {
        self.queue_priority = input;
        self
    }
    /// <p>An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if the QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value. Default Value is 5.</p>
    pub fn get_queue_priority(&self) -> &::std::option::Option<i64> {
        &self.queue_priority
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Tags associated with the contact. This contains both Amazon Web Services generated and user-defined tags.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Tags associated with the contact. This contains both Amazon Web Services generated and user-defined tags.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Tags associated with the contact. This contains both Amazon Web Services generated and user-defined tags.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The timestamp when customer endpoint connected to Amazon Connect.</p>
    pub fn connected_to_system_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.connected_to_system_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when customer endpoint connected to Amazon Connect.</p>
    pub fn set_connected_to_system_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.connected_to_system_timestamp = input;
        self
    }
    /// <p>The timestamp when customer endpoint connected to Amazon Connect.</p>
    pub fn get_connected_to_system_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.connected_to_system_timestamp
    }
    /// <p>Latest routing criteria on the contact.</p>
    pub fn routing_criteria(mut self, input: crate::types::RoutingCriteria) -> Self {
        self.routing_criteria = ::std::option::Option::Some(input);
        self
    }
    /// <p>Latest routing criteria on the contact.</p>
    pub fn set_routing_criteria(mut self, input: ::std::option::Option<crate::types::RoutingCriteria>) -> Self {
        self.routing_criteria = input;
        self
    }
    /// <p>Latest routing criteria on the contact.</p>
    pub fn get_routing_criteria(&self) -> &::std::option::Option<crate::types::RoutingCriteria> {
        &self.routing_criteria
    }
    /// <p>Information about the Customer on the contact.</p>
    pub fn customer(mut self, input: crate::types::Customer) -> Self {
        self.customer = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the Customer on the contact.</p>
    pub fn set_customer(mut self, input: ::std::option::Option<crate::types::Customer>) -> Self {
        self.customer = input;
        self
    }
    /// <p>Information about the Customer on the contact.</p>
    pub fn get_customer(&self) -> &::std::option::Option<crate::types::Customer> {
        &self.customer
    }
    /// <p>Information associated with a campaign.</p>
    pub fn campaign(mut self, input: crate::types::Campaign) -> Self {
        self.campaign = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information associated with a campaign.</p>
    pub fn set_campaign(mut self, input: ::std::option::Option<crate::types::Campaign>) -> Self {
        self.campaign = input;
        self
    }
    /// <p>Information associated with a campaign.</p>
    pub fn get_campaign(&self) -> &::std::option::Option<crate::types::Campaign> {
        &self.campaign
    }
    /// <p>Indicates how an <a href="https://docs.aws.amazon.com/connect/latest/adminguide/how-to-create-campaigns.html">outbound campaign</a> call is actually disposed if the contact is connected to Amazon Connect.</p>
    pub fn answering_machine_detection_status(mut self, input: crate::types::AnsweringMachineDetectionStatus) -> Self {
        self.answering_machine_detection_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates how an <a href="https://docs.aws.amazon.com/connect/latest/adminguide/how-to-create-campaigns.html">outbound campaign</a> call is actually disposed if the contact is connected to Amazon Connect.</p>
    pub fn set_answering_machine_detection_status(mut self, input: ::std::option::Option<crate::types::AnsweringMachineDetectionStatus>) -> Self {
        self.answering_machine_detection_status = input;
        self
    }
    /// <p>Indicates how an <a href="https://docs.aws.amazon.com/connect/latest/adminguide/how-to-create-campaigns.html">outbound campaign</a> call is actually disposed if the contact is connected to Amazon Connect.</p>
    pub fn get_answering_machine_detection_status(&self) -> &::std::option::Option<crate::types::AnsweringMachineDetectionStatus> {
        &self.answering_machine_detection_status
    }
    /// <p>Information about customer’s voice activity.</p>
    pub fn customer_voice_activity(mut self, input: crate::types::CustomerVoiceActivity) -> Self {
        self.customer_voice_activity = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about customer’s voice activity.</p>
    pub fn set_customer_voice_activity(mut self, input: ::std::option::Option<crate::types::CustomerVoiceActivity>) -> Self {
        self.customer_voice_activity = input;
        self
    }
    /// <p>Information about customer’s voice activity.</p>
    pub fn get_customer_voice_activity(&self) -> &::std::option::Option<crate::types::CustomerVoiceActivity> {
        &self.customer_voice_activity
    }
    /// <p>Information about the quality of the participant's media connection.</p>
    pub fn quality_metrics(mut self, input: crate::types::QualityMetrics) -> Self {
        self.quality_metrics = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the quality of the participant's media connection.</p>
    pub fn set_quality_metrics(mut self, input: ::std::option::Option<crate::types::QualityMetrics>) -> Self {
        self.quality_metrics = input;
        self
    }
    /// <p>Information about the quality of the participant's media connection.</p>
    pub fn get_quality_metrics(&self) -> &::std::option::Option<crate::types::QualityMetrics> {
        &self.quality_metrics
    }
    /// <p>Information about how agent, bot, and customer interact in a chat contact.</p>
    pub fn chat_metrics(mut self, input: crate::types::ChatMetrics) -> Self {
        self.chat_metrics = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about how agent, bot, and customer interact in a chat contact.</p>
    pub fn set_chat_metrics(mut self, input: ::std::option::Option<crate::types::ChatMetrics>) -> Self {
        self.chat_metrics = input;
        self
    }
    /// <p>Information about how agent, bot, and customer interact in a chat contact.</p>
    pub fn get_chat_metrics(&self) -> &::std::option::Option<crate::types::ChatMetrics> {
        &self.chat_metrics
    }
    /// <p>Information about the call disconnect experience.</p>
    pub fn disconnect_details(mut self, input: crate::types::DisconnectDetails) -> Self {
        self.disconnect_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the call disconnect experience.</p>
    pub fn set_disconnect_details(mut self, input: ::std::option::Option<crate::types::DisconnectDetails>) -> Self {
        self.disconnect_details = input;
        self
    }
    /// <p>Information about the call disconnect experience.</p>
    pub fn get_disconnect_details(&self) -> &::std::option::Option<crate::types::DisconnectDetails> {
        &self.disconnect_details
    }
    /// <p>List of additional email addresses for an email contact.</p>
    pub fn additional_email_recipients(mut self, input: crate::types::AdditionalEmailRecipients) -> Self {
        self.additional_email_recipients = ::std::option::Option::Some(input);
        self
    }
    /// <p>List of additional email addresses for an email contact.</p>
    pub fn set_additional_email_recipients(mut self, input: ::std::option::Option<crate::types::AdditionalEmailRecipients>) -> Self {
        self.additional_email_recipients = input;
        self
    }
    /// <p>List of additional email addresses for an email contact.</p>
    pub fn get_additional_email_recipients(&self) -> &::std::option::Option<crate::types::AdditionalEmailRecipients> {
        &self.additional_email_recipients
    }
    /// Adds a key-value pair to `segment_attributes`.
    ///
    /// To override the contents of this collection use [`set_segment_attributes`](Self::set_segment_attributes).
    ///
    /// <p>A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes and can be accessed in flows. Attribute keys can include only alphanumeric, -, and _ characters. This field can be used to show channel subtype. For example, <code>connect:Guide</code> or <code>connect:SMS</code>.</p>
    pub fn segment_attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::SegmentAttributeValue) -> Self {
        let mut hash_map = self.segment_attributes.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.segment_attributes = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes and can be accessed in flows. Attribute keys can include only alphanumeric, -, and _ characters. This field can be used to show channel subtype. For example, <code>connect:Guide</code> or <code>connect:SMS</code>.</p>
    pub fn set_segment_attributes(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
    ) -> Self {
        self.segment_attributes = input;
        self
    }
    /// <p>A set of system defined key-value pairs stored on individual contact segments using an attribute map. The attributes are standard Amazon Connect attributes and can be accessed in flows. Attribute keys can include only alphanumeric, -, and _ characters. This field can be used to show channel subtype. For example, <code>connect:Guide</code> or <code>connect:SMS</code>.</p>
    pub fn get_segment_attributes(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
        &self.segment_attributes
    }
    /// Appends an item to `recordings`.
    ///
    /// To override the contents of this collection use [`set_recordings`](Self::set_recordings).
    ///
    /// <p>If recording was enabled, this is information about the recordings.</p>
    pub fn recordings(mut self, input: crate::types::RecordingInfo) -> Self {
        let mut v = self.recordings.unwrap_or_default();
        v.push(input);
        self.recordings = ::std::option::Option::Some(v);
        self
    }
    /// <p>If recording was enabled, this is information about the recordings.</p>
    pub fn set_recordings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RecordingInfo>>) -> Self {
        self.recordings = input;
        self
    }
    /// <p>If recording was enabled, this is information about the recordings.</p>
    pub fn get_recordings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RecordingInfo>> {
        &self.recordings
    }
    /// <p>The disconnect reason for the contact. For a list and description of all the possible disconnect reasons by channel, see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub fn disconnect_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.disconnect_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The disconnect reason for the contact. For a list and description of all the possible disconnect reasons by channel, see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub fn set_disconnect_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.disconnect_reason = input;
        self
    }
    /// <p>The disconnect reason for the contact. For a list and description of all the possible disconnect reasons by channel, see DisconnectReason under <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
    pub fn get_disconnect_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.disconnect_reason
    }
    /// Adds a key-value pair to `contact_evaluations`.
    ///
    /// To override the contents of this collection use [`set_contact_evaluations`](Self::set_contact_evaluations).
    ///
    /// <p>Information about the contact evaluations where the key is the FormId, which is a unique identifier for the form.</p>
    pub fn contact_evaluations(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ContactEvaluation) -> Self {
        let mut hash_map = self.contact_evaluations.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.contact_evaluations = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Information about the contact evaluations where the key is the FormId, which is a unique identifier for the form.</p>
    pub fn set_contact_evaluations(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ContactEvaluation>>,
    ) -> Self {
        self.contact_evaluations = input;
        self
    }
    /// <p>Information about the contact evaluations where the key is the FormId, which is a unique identifier for the form.</p>
    pub fn get_contact_evaluations(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ContactEvaluation>> {
        &self.contact_evaluations
    }
    /// <p>If this contact was created using a task template, this contains information about the task template.</p>
    pub fn task_template_info(mut self, input: crate::types::TaskTemplateInfoV2) -> Self {
        self.task_template_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>If this contact was created using a task template, this contains information about the task template.</p>
    pub fn set_task_template_info(mut self, input: ::std::option::Option<crate::types::TaskTemplateInfoV2>) -> Self {
        self.task_template_info = input;
        self
    }
    /// <p>If this contact was created using a task template, this contains information about the task template.</p>
    pub fn get_task_template_info(&self) -> &::std::option::Option<crate::types::TaskTemplateInfoV2> {
        &self.task_template_info
    }
    /// <p>A map of string key/value pairs that contain user-defined attributes which are lightly typed within the contact. This object is used only for task contacts.</p>
    pub fn contact_details(mut self, input: crate::types::ContactDetails) -> Self {
        self.contact_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>A map of string key/value pairs that contain user-defined attributes which are lightly typed within the contact. This object is used only for task contacts.</p>
    pub fn set_contact_details(mut self, input: ::std::option::Option<crate::types::ContactDetails>) -> Self {
        self.contact_details = input;
        self
    }
    /// <p>A map of string key/value pairs that contain user-defined attributes which are lightly typed within the contact. This object is used only for task contacts.</p>
    pub fn get_contact_details(&self) -> &::std::option::Option<crate::types::ContactDetails> {
        &self.contact_details
    }
    /// <p>Information about the outbound strategy.</p>
    pub fn outbound_strategy(mut self, input: crate::types::OutboundStrategy) -> Self {
        self.outbound_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the outbound strategy.</p>
    pub fn set_outbound_strategy(mut self, input: ::std::option::Option<crate::types::OutboundStrategy>) -> Self {
        self.outbound_strategy = input;
        self
    }
    /// <p>Information about the outbound strategy.</p>
    pub fn get_outbound_strategy(&self) -> &::std::option::Option<crate::types::OutboundStrategy> {
        &self.outbound_strategy
    }
    /// Adds a key-value pair to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// <p>The attributes of the contact.</p>
    pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.attributes.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.attributes = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The attributes of the contact.</p>
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.attributes = input;
        self
    }
    /// <p>The attributes of the contact.</p>
    pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.attributes
    }
    /// Appends an item to `next_contacts`.
    ///
    /// To override the contents of this collection use [`set_next_contacts`](Self::set_next_contacts).
    ///
    /// <p>List of next contact entries for the contact.</p>
    pub fn next_contacts(mut self, input: crate::types::NextContactEntry) -> Self {
        let mut v = self.next_contacts.unwrap_or_default();
        v.push(input);
        self.next_contacts = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of next contact entries for the contact.</p>
    pub fn set_next_contacts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NextContactEntry>>) -> Self {
        self.next_contacts = input;
        self
    }
    /// <p>List of next contact entries for the contact.</p>
    pub fn get_next_contacts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NextContactEntry>> {
        &self.next_contacts
    }
    /// <p>Information about the global resiliency configuration for the contact, including traffic distribution details.</p>
    pub fn global_resiliency_metadata(mut self, input: crate::types::GlobalResiliencyMetadata) -> Self {
        self.global_resiliency_metadata = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the global resiliency configuration for the contact, including traffic distribution details.</p>
    pub fn set_global_resiliency_metadata(mut self, input: ::std::option::Option<crate::types::GlobalResiliencyMetadata>) -> Self {
        self.global_resiliency_metadata = input;
        self
    }
    /// <p>Information about the global resiliency configuration for the contact, including traffic distribution details.</p>
    pub fn get_global_resiliency_metadata(&self) -> &::std::option::Option<crate::types::GlobalResiliencyMetadata> {
        &self.global_resiliency_metadata
    }
    /// Consumes the builder and constructs a [`Contact`](crate::types::Contact).
    pub fn build(self) -> crate::types::Contact {
        crate::types::Contact {
            arn: self.arn,
            id: self.id,
            initial_contact_id: self.initial_contact_id,
            previous_contact_id: self.previous_contact_id,
            contact_association_id: self.contact_association_id,
            initiation_method: self.initiation_method,
            name: self.name,
            description: self.description,
            channel: self.channel,
            queue_info: self.queue_info,
            agent_info: self.agent_info,
            initiation_timestamp: self.initiation_timestamp,
            disconnect_timestamp: self.disconnect_timestamp,
            last_update_timestamp: self.last_update_timestamp,
            last_paused_timestamp: self.last_paused_timestamp,
            last_resumed_timestamp: self.last_resumed_timestamp,
            ring_start_timestamp: self.ring_start_timestamp,
            total_pause_count: self.total_pause_count,
            total_pause_duration_in_seconds: self.total_pause_duration_in_seconds,
            scheduled_timestamp: self.scheduled_timestamp,
            related_contact_id: self.related_contact_id,
            wisdom_info: self.wisdom_info,
            customer_id: self.customer_id,
            customer_endpoint: self.customer_endpoint,
            system_endpoint: self.system_endpoint,
            queue_time_adjustment_seconds: self.queue_time_adjustment_seconds,
            queue_priority: self.queue_priority,
            tags: self.tags,
            connected_to_system_timestamp: self.connected_to_system_timestamp,
            routing_criteria: self.routing_criteria,
            customer: self.customer,
            campaign: self.campaign,
            answering_machine_detection_status: self.answering_machine_detection_status,
            customer_voice_activity: self.customer_voice_activity,
            quality_metrics: self.quality_metrics,
            chat_metrics: self.chat_metrics,
            disconnect_details: self.disconnect_details,
            additional_email_recipients: self.additional_email_recipients,
            segment_attributes: self.segment_attributes,
            recordings: self.recordings,
            disconnect_reason: self.disconnect_reason,
            contact_evaluations: self.contact_evaluations,
            task_template_info: self.task_template_info,
            contact_details: self.contact_details,
            outbound_strategy: self.outbound_strategy,
            attributes: self.attributes,
            next_contacts: self.next_contacts,
            global_resiliency_metadata: self.global_resiliency_metadata,
        }
    }
}
impl ::std::fmt::Debug for ContactBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ContactBuilder");
        formatter.field("arn", &self.arn);
        formatter.field("id", &self.id);
        formatter.field("initial_contact_id", &self.initial_contact_id);
        formatter.field("previous_contact_id", &self.previous_contact_id);
        formatter.field("contact_association_id", &self.contact_association_id);
        formatter.field("initiation_method", &self.initiation_method);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("channel", &self.channel);
        formatter.field("queue_info", &self.queue_info);
        formatter.field("agent_info", &self.agent_info);
        formatter.field("initiation_timestamp", &self.initiation_timestamp);
        formatter.field("disconnect_timestamp", &self.disconnect_timestamp);
        formatter.field("last_update_timestamp", &self.last_update_timestamp);
        formatter.field("last_paused_timestamp", &self.last_paused_timestamp);
        formatter.field("last_resumed_timestamp", &self.last_resumed_timestamp);
        formatter.field("ring_start_timestamp", &self.ring_start_timestamp);
        formatter.field("total_pause_count", &self.total_pause_count);
        formatter.field("total_pause_duration_in_seconds", &self.total_pause_duration_in_seconds);
        formatter.field("scheduled_timestamp", &self.scheduled_timestamp);
        formatter.field("related_contact_id", &self.related_contact_id);
        formatter.field("wisdom_info", &self.wisdom_info);
        formatter.field("customer_id", &self.customer_id);
        formatter.field("customer_endpoint", &self.customer_endpoint);
        formatter.field("system_endpoint", &self.system_endpoint);
        formatter.field("queue_time_adjustment_seconds", &self.queue_time_adjustment_seconds);
        formatter.field("queue_priority", &self.queue_priority);
        formatter.field("tags", &self.tags);
        formatter.field("connected_to_system_timestamp", &self.connected_to_system_timestamp);
        formatter.field("routing_criteria", &self.routing_criteria);
        formatter.field("customer", &self.customer);
        formatter.field("campaign", &self.campaign);
        formatter.field("answering_machine_detection_status", &self.answering_machine_detection_status);
        formatter.field("customer_voice_activity", &self.customer_voice_activity);
        formatter.field("quality_metrics", &self.quality_metrics);
        formatter.field("chat_metrics", &self.chat_metrics);
        formatter.field("disconnect_details", &self.disconnect_details);
        formatter.field("additional_email_recipients", &self.additional_email_recipients);
        formatter.field("segment_attributes", &self.segment_attributes);
        formatter.field("recordings", &self.recordings);
        formatter.field("disconnect_reason", &self.disconnect_reason);
        formatter.field("contact_evaluations", &self.contact_evaluations);
        formatter.field("task_template_info", &self.task_template_info);
        formatter.field("contact_details", &self.contact_details);
        formatter.field("outbound_strategy", &self.outbound_strategy);
        formatter.field("attributes", &self.attributes);
        formatter.field("next_contacts", &self.next_contacts);
        formatter.field("global_resiliency_metadata", &self.global_resiliency_metadata);
        formatter.finish()
    }
}