rustenium-cdp-definitions 0.1.1

Generated Chrome DevTools Protocol type definitions for Rustenium
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
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
use serde::{Deserialize, Serialize};
#[doc = "Fired when data chunk was received over the network.\n[dataReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-dataReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DataReceivedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "Data chunk length."]
    #[serde(rename = "dataLength")]
    pub data_length: i64,
    #[doc = "Actual bytes received (might be less than dataLength for compressed encodings)."]
    #[serde(rename = "encodedDataLength")]
    pub encoded_data_length: i64,
    #[doc = "Data that was received."]
    #[serde(rename = "data")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub data: Option<crate::Binary>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DataReceivedMethod {
    #[serde(rename = "Network.dataReceived")]
    DataReceived,
}
#[doc = "Fired when data chunk was received over the network.\n[dataReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-dataReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DataReceived {
    pub method: DataReceivedMethod,
    pub params: DataReceivedParams,
}
impl DataReceived {
    pub const IDENTIFIER: &'static str = "Network.dataReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when EventSource message is received.\n[eventSourceMessageReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-eventSourceMessageReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EventSourceMessageReceivedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "Message type."]
    #[serde(rename = "eventName")]
    pub event_name: String,
    #[doc = "Message identifier."]
    #[serde(rename = "eventId")]
    pub event_id: String,
    #[doc = "Message content."]
    #[serde(rename = "data")]
    pub data: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum EventSourceMessageReceivedMethod {
    #[serde(rename = "Network.eventSourceMessageReceived")]
    EventSourceMessageReceived,
}
#[doc = "Fired when EventSource message is received.\n[eventSourceMessageReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-eventSourceMessageReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EventSourceMessageReceived {
    pub method: EventSourceMessageReceivedMethod,
    pub params: EventSourceMessageReceivedParams,
}
impl EventSourceMessageReceived {
    pub const IDENTIFIER: &'static str = "Network.eventSourceMessageReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when HTTP request has failed to load.\n[loadingFailed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-loadingFailed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoadingFailedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "Resource type."]
    #[serde(rename = "type")]
    pub r#type: super::types::ResourceType,
    #[doc = "Error message. List of network errors: https://cs.chromium.org/chromium/src/net/base/net_error_list.h"]
    #[serde(rename = "errorText")]
    pub error_text: String,
    #[doc = "True if loading was canceled."]
    #[serde(rename = "canceled")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub canceled: Option<bool>,
    #[doc = "The reason why loading was blocked, if any."]
    #[serde(rename = "blockedReason")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub blocked_reason: Option<super::types::BlockedReason>,
    #[doc = "The reason why loading was blocked by CORS, if any."]
    #[serde(rename = "corsErrorStatus")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub cors_error_status: Option<super::types::CorsErrorStatus>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum LoadingFailedMethod {
    #[serde(rename = "Network.loadingFailed")]
    LoadingFailed,
}
#[doc = "Fired when HTTP request has failed to load.\n[loadingFailed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-loadingFailed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoadingFailed {
    pub method: LoadingFailedMethod,
    pub params: LoadingFailedParams,
}
impl LoadingFailed {
    pub const IDENTIFIER: &'static str = "Network.loadingFailed";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when HTTP request has finished loading.\n[loadingFinished](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-loadingFinished)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoadingFinishedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "Total number of bytes received for this request."]
    #[serde(rename = "encodedDataLength")]
    pub encoded_data_length: f64,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum LoadingFinishedMethod {
    #[serde(rename = "Network.loadingFinished")]
    LoadingFinished,
}
#[doc = "Fired when HTTP request has finished loading.\n[loadingFinished](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-loadingFinished)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoadingFinished {
    pub method: LoadingFinishedMethod,
    pub params: LoadingFinishedParams,
}
impl LoadingFinished {
    pub const IDENTIFIER: &'static str = "Network.loadingFinished";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired if request ended up loading from cache.\n[requestServedFromCache](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestServedFromCache)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RequestServedFromCacheParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum RequestServedFromCacheMethod {
    #[serde(rename = "Network.requestServedFromCache")]
    RequestServedFromCache,
}
#[doc = "Fired if request ended up loading from cache.\n[requestServedFromCache](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestServedFromCache)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RequestServedFromCache {
    pub method: RequestServedFromCacheMethod,
    pub params: RequestServedFromCacheParams,
}
impl RequestServedFromCache {
    pub const IDENTIFIER: &'static str = "Network.requestServedFromCache";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when page is about to send HTTP request.\n[requestWillBeSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RequestWillBeSentParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Loader identifier. Empty string if the request is fetched from worker."]
    #[serde(rename = "loaderId")]
    pub loader_id: Box<super::types::LoaderId>,
    #[doc = "URL of the document this request is loaded for."]
    #[serde(rename = "documentURL")]
    pub document_url: String,
    #[doc = "Request data."]
    #[serde(rename = "request")]
    pub request: super::types::Request,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "Timestamp."]
    #[serde(rename = "wallTime")]
    pub wall_time: super::types::TimeSinceEpoch,
    #[doc = "Request initiator."]
    #[serde(rename = "initiator")]
    pub initiator: super::types::Initiator,
    #[doc = "In the case that redirectResponse is populated, this flag indicates whether\nrequestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted\nfor the request which was just redirected."]
    #[serde(rename = "redirectHasExtraInfo")]
    pub redirect_has_extra_info: bool,
    #[doc = "Redirect response data."]
    #[serde(rename = "redirectResponse")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub redirect_response: Option<super::types::Response>,
    #[doc = "Type of this resource."]
    #[serde(rename = "type")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub r#type: Option<super::types::ResourceType>,
    #[doc = "Frame identifier."]
    #[serde(rename = "frameId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub frame_id: Option<crate::browser_protocol::page::types::FrameId>,
    #[doc = "Whether the request is initiated by a user gesture. Defaults to false."]
    #[serde(rename = "hasUserGesture")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub has_user_gesture: Option<bool>,
    #[doc = "The render blocking behavior of the request."]
    #[serde(rename = "renderBlockingBehavior")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub render_blocking_behavior: Option<super::types::RenderBlockingBehavior>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum RequestWillBeSentMethod {
    #[serde(rename = "Network.requestWillBeSent")]
    RequestWillBeSent,
}
#[doc = "Fired when page is about to send HTTP request.\n[requestWillBeSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RequestWillBeSent {
    pub method: RequestWillBeSentMethod,
    pub params: RequestWillBeSentParams,
}
impl RequestWillBeSent {
    pub const IDENTIFIER: &'static str = "Network.requestWillBeSent";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when resource loading priority is changed\n[resourceChangedPriority](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-resourceChangedPriority)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceChangedPriorityParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "New priority"]
    #[serde(rename = "newPriority")]
    pub new_priority: super::types::ResourcePriority,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ResourceChangedPriorityMethod {
    #[serde(rename = "Network.resourceChangedPriority")]
    ResourceChangedPriority,
}
#[doc = "Fired when resource loading priority is changed\n[resourceChangedPriority](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-resourceChangedPriority)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceChangedPriority {
    pub method: ResourceChangedPriorityMethod,
    pub params: ResourceChangedPriorityParams,
}
impl ResourceChangedPriority {
    pub const IDENTIFIER: &'static str = "Network.resourceChangedPriority";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when a signed exchange was received over the network\n[signedExchangeReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-signedExchangeReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SignedExchangeReceivedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Information about the signed exchange response."]
    #[serde(rename = "info")]
    pub info: super::types::SignedExchangeInfo,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum SignedExchangeReceivedMethod {
    #[serde(rename = "Network.signedExchangeReceived")]
    SignedExchangeReceived,
}
#[doc = "Fired when a signed exchange was received over the network\n[signedExchangeReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-signedExchangeReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SignedExchangeReceived {
    pub method: SignedExchangeReceivedMethod,
    pub params: SignedExchangeReceivedParams,
}
impl SignedExchangeReceived {
    pub const IDENTIFIER: &'static str = "Network.signedExchangeReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when HTTP response is available.\n[responseReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-responseReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Loader identifier. Empty string if the request is fetched from worker."]
    #[serde(rename = "loaderId")]
    pub loader_id: Box<super::types::LoaderId>,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "Resource type."]
    #[serde(rename = "type")]
    pub r#type: super::types::ResourceType,
    #[doc = "Response data."]
    #[serde(rename = "response")]
    pub response: super::types::Response,
    #[doc = "Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be\nor were emitted for this request."]
    #[serde(rename = "hasExtraInfo")]
    pub has_extra_info: bool,
    #[doc = "Frame identifier."]
    #[serde(rename = "frameId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub frame_id: Option<crate::browser_protocol::page::types::FrameId>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ResponseReceivedMethod {
    #[serde(rename = "Network.responseReceived")]
    ResponseReceived,
}
#[doc = "Fired when HTTP response is available.\n[responseReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-responseReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceived {
    pub method: ResponseReceivedMethod,
    pub params: ResponseReceivedParams,
}
impl ResponseReceived {
    pub const IDENTIFIER: &'static str = "Network.responseReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebSocket is closed.\n[webSocketClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketClosedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebSocketClosedMethod {
    #[serde(rename = "Network.webSocketClosed")]
    WebSocketClosed,
}
#[doc = "Fired when WebSocket is closed.\n[webSocketClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketClosed {
    pub method: WebSocketClosedMethod,
    pub params: WebSocketClosedParams,
}
impl WebSocketClosed {
    pub const IDENTIFIER: &'static str = "Network.webSocketClosed";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired upon WebSocket creation.\n[webSocketCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketCreatedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "WebSocket request URL."]
    #[serde(rename = "url")]
    pub url: String,
    #[doc = "Request initiator."]
    #[serde(rename = "initiator")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub initiator: Option<super::types::Initiator>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebSocketCreatedMethod {
    #[serde(rename = "Network.webSocketCreated")]
    WebSocketCreated,
}
#[doc = "Fired upon WebSocket creation.\n[webSocketCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketCreated {
    pub method: WebSocketCreatedMethod,
    pub params: WebSocketCreatedParams,
}
impl WebSocketCreated {
    pub const IDENTIFIER: &'static str = "Network.webSocketCreated";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebSocket message error occurs.\n[webSocketFrameError](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameError)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameErrorParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "WebSocket error message."]
    #[serde(rename = "errorMessage")]
    pub error_message: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebSocketFrameErrorMethod {
    #[serde(rename = "Network.webSocketFrameError")]
    WebSocketFrameError,
}
#[doc = "Fired when WebSocket message error occurs.\n[webSocketFrameError](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameError)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameError {
    pub method: WebSocketFrameErrorMethod,
    pub params: WebSocketFrameErrorParams,
}
impl WebSocketFrameError {
    pub const IDENTIFIER: &'static str = "Network.webSocketFrameError";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebSocket message is received.\n[webSocketFrameReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameReceivedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "WebSocket response data."]
    #[serde(rename = "response")]
    pub response: super::types::WebSocketFrame,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebSocketFrameReceivedMethod {
    #[serde(rename = "Network.webSocketFrameReceived")]
    WebSocketFrameReceived,
}
#[doc = "Fired when WebSocket message is received.\n[webSocketFrameReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameReceived {
    pub method: WebSocketFrameReceivedMethod,
    pub params: WebSocketFrameReceivedParams,
}
impl WebSocketFrameReceived {
    pub const IDENTIFIER: &'static str = "Network.webSocketFrameReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebSocket message is sent.\n[webSocketFrameSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameSentParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "WebSocket response data."]
    #[serde(rename = "response")]
    pub response: super::types::WebSocketFrame,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebSocketFrameSentMethod {
    #[serde(rename = "Network.webSocketFrameSent")]
    WebSocketFrameSent,
}
#[doc = "Fired when WebSocket message is sent.\n[webSocketFrameSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketFrameSent {
    pub method: WebSocketFrameSentMethod,
    pub params: WebSocketFrameSentParams,
}
impl WebSocketFrameSent {
    pub const IDENTIFIER: &'static str = "Network.webSocketFrameSent";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebSocket handshake response becomes available.\n[webSocketHandshakeResponseReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketHandshakeResponseReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketHandshakeResponseReceivedParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "WebSocket response data."]
    #[serde(rename = "response")]
    pub response: super::types::WebSocketResponse,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebSocketHandshakeResponseReceivedMethod {
    #[serde(rename = "Network.webSocketHandshakeResponseReceived")]
    WebSocketHandshakeResponseReceived,
}
#[doc = "Fired when WebSocket handshake response becomes available.\n[webSocketHandshakeResponseReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketHandshakeResponseReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketHandshakeResponseReceived {
    pub method: WebSocketHandshakeResponseReceivedMethod,
    pub params: WebSocketHandshakeResponseReceivedParams,
}
impl WebSocketHandshakeResponseReceived {
    pub const IDENTIFIER: &'static str = "Network.webSocketHandshakeResponseReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebSocket is about to initiate handshake.\n[webSocketWillSendHandshakeRequest](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketWillSendHandshakeRequest)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketWillSendHandshakeRequestParams {
    #[doc = "Request identifier."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "UTC Timestamp."]
    #[serde(rename = "wallTime")]
    pub wall_time: super::types::TimeSinceEpoch,
    #[doc = "WebSocket request data."]
    #[serde(rename = "request")]
    pub request: super::types::WebSocketRequest,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebSocketWillSendHandshakeRequestMethod {
    #[serde(rename = "Network.webSocketWillSendHandshakeRequest")]
    WebSocketWillSendHandshakeRequest,
}
#[doc = "Fired when WebSocket is about to initiate handshake.\n[webSocketWillSendHandshakeRequest](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketWillSendHandshakeRequest)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebSocketWillSendHandshakeRequest {
    pub method: WebSocketWillSendHandshakeRequestMethod,
    pub params: WebSocketWillSendHandshakeRequestParams,
}
impl WebSocketWillSendHandshakeRequest {
    pub const IDENTIFIER: &'static str = "Network.webSocketWillSendHandshakeRequest";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired upon WebTransport creation.\n[webTransportCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webTransportCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebTransportCreatedParams {
    #[doc = "WebTransport identifier."]
    #[serde(rename = "transportId")]
    pub transport_id: super::types::RequestId,
    #[doc = "WebTransport request URL."]
    #[serde(rename = "url")]
    pub url: String,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[doc = "Request initiator."]
    #[serde(rename = "initiator")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub initiator: Option<super::types::Initiator>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebTransportCreatedMethod {
    #[serde(rename = "Network.webTransportCreated")]
    WebTransportCreated,
}
#[doc = "Fired upon WebTransport creation.\n[webTransportCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webTransportCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebTransportCreated {
    pub method: WebTransportCreatedMethod,
    pub params: WebTransportCreatedParams,
}
impl WebTransportCreated {
    pub const IDENTIFIER: &'static str = "Network.webTransportCreated";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebTransport handshake is finished.\n[webTransportConnectionEstablished](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webTransportConnectionEstablished)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebTransportConnectionEstablishedParams {
    #[doc = "WebTransport identifier."]
    #[serde(rename = "transportId")]
    pub transport_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebTransportConnectionEstablishedMethod {
    #[serde(rename = "Network.webTransportConnectionEstablished")]
    WebTransportConnectionEstablished,
}
#[doc = "Fired when WebTransport handshake is finished.\n[webTransportConnectionEstablished](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webTransportConnectionEstablished)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebTransportConnectionEstablished {
    pub method: WebTransportConnectionEstablishedMethod,
    pub params: WebTransportConnectionEstablishedParams,
}
impl WebTransportConnectionEstablished {
    pub const IDENTIFIER: &'static str = "Network.webTransportConnectionEstablished";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when WebTransport is disposed.\n[webTransportClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webTransportClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebTransportClosedParams {
    #[doc = "WebTransport identifier."]
    #[serde(rename = "transportId")]
    pub transport_id: super::types::RequestId,
    #[doc = "Timestamp."]
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum WebTransportClosedMethod {
    #[serde(rename = "Network.webTransportClosed")]
    WebTransportClosed,
}
#[doc = "Fired when WebTransport is disposed.\n[webTransportClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webTransportClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebTransportClosed {
    pub method: WebTransportClosedMethod,
    pub params: WebTransportClosedParams,
}
impl WebTransportClosed {
    pub const IDENTIFIER: &'static str = "Network.webTransportClosed";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired upon direct_socket.TCPSocket creation.\n[directTCPSocketCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketCreatedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "remoteAddr")]
    pub remote_addr: String,
    #[doc = "Unsigned int 16."]
    #[serde(rename = "remotePort")]
    pub remote_port: i64,
    #[serde(rename = "options")]
    pub options: super::types::DirectTcpSocketOptions,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[serde(rename = "initiator")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub initiator: Option<super::types::Initiator>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectTcpSocketCreatedMethod {
    #[serde(rename = "Network.directTCPSocketCreated")]
    DirectTcpSocketCreated,
}
#[doc = "Fired upon direct_socket.TCPSocket creation.\n[directTCPSocketCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketCreated {
    pub method: DirectTcpSocketCreatedMethod,
    pub params: DirectTcpSocketCreatedParams,
}
impl DirectTcpSocketCreated {
    pub const IDENTIFIER: &'static str = "Network.directTCPSocketCreated";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when direct_socket.TCPSocket connection is opened.\n[directTCPSocketOpened](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketOpened)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketOpenedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "remoteAddr")]
    pub remote_addr: String,
    #[doc = "Expected to be unsigned integer."]
    #[serde(rename = "remotePort")]
    pub remote_port: i64,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[serde(rename = "localAddr")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub local_addr: Option<String>,
    #[doc = "Expected to be unsigned integer."]
    #[serde(rename = "localPort")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub local_port: Option<i64>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectTcpSocketOpenedMethod {
    #[serde(rename = "Network.directTCPSocketOpened")]
    DirectTcpSocketOpened,
}
#[doc = "Fired when direct_socket.TCPSocket connection is opened.\n[directTCPSocketOpened](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketOpened)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketOpened {
    pub method: DirectTcpSocketOpenedMethod,
    pub params: DirectTcpSocketOpenedParams,
}
impl DirectTcpSocketOpened {
    pub const IDENTIFIER: &'static str = "Network.directTCPSocketOpened";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when direct_socket.TCPSocket is aborted.\n[directTCPSocketAborted](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketAborted)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketAbortedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "errorMessage")]
    pub error_message: String,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectTcpSocketAbortedMethod {
    #[serde(rename = "Network.directTCPSocketAborted")]
    DirectTcpSocketAborted,
}
#[doc = "Fired when direct_socket.TCPSocket is aborted.\n[directTCPSocketAborted](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketAborted)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketAborted {
    pub method: DirectTcpSocketAbortedMethod,
    pub params: DirectTcpSocketAbortedParams,
}
impl DirectTcpSocketAborted {
    pub const IDENTIFIER: &'static str = "Network.directTCPSocketAborted";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when direct_socket.TCPSocket is closed.\n[directTCPSocketClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketClosedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectTcpSocketClosedMethod {
    #[serde(rename = "Network.directTCPSocketClosed")]
    DirectTcpSocketClosed,
}
#[doc = "Fired when direct_socket.TCPSocket is closed.\n[directTCPSocketClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketClosed {
    pub method: DirectTcpSocketClosedMethod,
    pub params: DirectTcpSocketClosedParams,
}
impl DirectTcpSocketClosed {
    pub const IDENTIFIER: &'static str = "Network.directTCPSocketClosed";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when data is sent to tcp direct socket stream.\n[directTCPSocketChunkSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketChunkSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketChunkSentParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "data")]
    pub data: crate::Binary,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectTcpSocketChunkSentMethod {
    #[serde(rename = "Network.directTCPSocketChunkSent")]
    DirectTcpSocketChunkSent,
}
#[doc = "Fired when data is sent to tcp direct socket stream.\n[directTCPSocketChunkSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketChunkSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketChunkSent {
    pub method: DirectTcpSocketChunkSentMethod,
    pub params: DirectTcpSocketChunkSentParams,
}
impl DirectTcpSocketChunkSent {
    pub const IDENTIFIER: &'static str = "Network.directTCPSocketChunkSent";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when data is received from tcp direct socket stream.\n[directTCPSocketChunkReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketChunkReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketChunkReceivedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "data")]
    pub data: crate::Binary,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectTcpSocketChunkReceivedMethod {
    #[serde(rename = "Network.directTCPSocketChunkReceived")]
    DirectTcpSocketChunkReceived,
}
#[doc = "Fired when data is received from tcp direct socket stream.\n[directTCPSocketChunkReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directTCPSocketChunkReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectTcpSocketChunkReceived {
    pub method: DirectTcpSocketChunkReceivedMethod,
    pub params: DirectTcpSocketChunkReceivedParams,
}
impl DirectTcpSocketChunkReceived {
    pub const IDENTIFIER: &'static str = "Network.directTCPSocketChunkReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketJoinedMulticastGroupParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "IPAddress")]
    pub ip_address: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketJoinedMulticastGroupMethod {
    #[serde(rename = "Network.directUDPSocketJoinedMulticastGroup")]
    DirectUdpSocketJoinedMulticastGroup,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketJoinedMulticastGroup {
    pub method: DirectUdpSocketJoinedMulticastGroupMethod,
    pub params: DirectUdpSocketJoinedMulticastGroupParams,
}
impl DirectUdpSocketJoinedMulticastGroup {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketJoinedMulticastGroup";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketLeftMulticastGroupParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "IPAddress")]
    pub ip_address: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketLeftMulticastGroupMethod {
    #[serde(rename = "Network.directUDPSocketLeftMulticastGroup")]
    DirectUdpSocketLeftMulticastGroup,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketLeftMulticastGroup {
    pub method: DirectUdpSocketLeftMulticastGroupMethod,
    pub params: DirectUdpSocketLeftMulticastGroupParams,
}
impl DirectUdpSocketLeftMulticastGroup {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketLeftMulticastGroup";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired upon direct_socket.UDPSocket creation.\n[directUDPSocketCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketCreatedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "options")]
    pub options: super::types::DirectUdpSocketOptions,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[serde(rename = "initiator")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub initiator: Option<super::types::Initiator>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketCreatedMethod {
    #[serde(rename = "Network.directUDPSocketCreated")]
    DirectUdpSocketCreated,
}
#[doc = "Fired upon direct_socket.UDPSocket creation.\n[directUDPSocketCreated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketCreated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketCreated {
    pub method: DirectUdpSocketCreatedMethod,
    pub params: DirectUdpSocketCreatedParams,
}
impl DirectUdpSocketCreated {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketCreated";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when direct_socket.UDPSocket connection is opened.\n[directUDPSocketOpened](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketOpened)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketOpenedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "localAddr")]
    pub local_addr: String,
    #[doc = "Expected to be unsigned integer."]
    #[serde(rename = "localPort")]
    pub local_port: i64,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
    #[serde(rename = "remoteAddr")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub remote_addr: Option<String>,
    #[doc = "Expected to be unsigned integer."]
    #[serde(rename = "remotePort")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub remote_port: Option<i64>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketOpenedMethod {
    #[serde(rename = "Network.directUDPSocketOpened")]
    DirectUdpSocketOpened,
}
#[doc = "Fired when direct_socket.UDPSocket connection is opened.\n[directUDPSocketOpened](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketOpened)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketOpened {
    pub method: DirectUdpSocketOpenedMethod,
    pub params: DirectUdpSocketOpenedParams,
}
impl DirectUdpSocketOpened {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketOpened";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when direct_socket.UDPSocket is aborted.\n[directUDPSocketAborted](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketAborted)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketAbortedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "errorMessage")]
    pub error_message: String,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketAbortedMethod {
    #[serde(rename = "Network.directUDPSocketAborted")]
    DirectUdpSocketAborted,
}
#[doc = "Fired when direct_socket.UDPSocket is aborted.\n[directUDPSocketAborted](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketAborted)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketAborted {
    pub method: DirectUdpSocketAbortedMethod,
    pub params: DirectUdpSocketAbortedParams,
}
impl DirectUdpSocketAborted {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketAborted";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when direct_socket.UDPSocket is closed.\n[directUDPSocketClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketClosedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketClosedMethod {
    #[serde(rename = "Network.directUDPSocketClosed")]
    DirectUdpSocketClosed,
}
#[doc = "Fired when direct_socket.UDPSocket is closed.\n[directUDPSocketClosed](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketClosed)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketClosed {
    pub method: DirectUdpSocketClosedMethod,
    pub params: DirectUdpSocketClosedParams,
}
impl DirectUdpSocketClosed {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketClosed";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when message is sent to udp direct socket stream.\n[directUDPSocketChunkSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketChunkSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketChunkSentParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "message")]
    pub message: super::types::DirectUdpMessage,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketChunkSentMethod {
    #[serde(rename = "Network.directUDPSocketChunkSent")]
    DirectUdpSocketChunkSent,
}
#[doc = "Fired when message is sent to udp direct socket stream.\n[directUDPSocketChunkSent](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketChunkSent)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketChunkSent {
    pub method: DirectUdpSocketChunkSentMethod,
    pub params: DirectUdpSocketChunkSentParams,
}
impl DirectUdpSocketChunkSent {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketChunkSent";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when message is received from udp direct socket stream.\n[directUDPSocketChunkReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketChunkReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketChunkReceivedParams {
    #[serde(rename = "identifier")]
    pub identifier: super::types::RequestId,
    #[serde(rename = "message")]
    pub message: super::types::DirectUdpMessage,
    #[serde(rename = "timestamp")]
    pub timestamp: super::types::MonotonicTime,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DirectUdpSocketChunkReceivedMethod {
    #[serde(rename = "Network.directUDPSocketChunkReceived")]
    DirectUdpSocketChunkReceived,
}
#[doc = "Fired when message is received from udp direct socket stream.\n[directUDPSocketChunkReceived](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-directUDPSocketChunkReceived)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DirectUdpSocketChunkReceived {
    pub method: DirectUdpSocketChunkReceivedMethod,
    pub params: DirectUdpSocketChunkReceivedParams,
}
impl DirectUdpSocketChunkReceived {
    pub const IDENTIFIER: &'static str = "Network.directUDPSocketChunkReceived";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when additional information about a requestWillBeSent event is available from the\nnetwork stack. Not every requestWillBeSent event will have an additional\nrequestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent\nor requestWillBeSentExtraInfo will be fired first for the same request.\n[requestWillBeSentExtraInfo](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSentExtraInfo)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RequestWillBeSentExtraInfoParams {
    #[doc = "Request identifier. Used to match this information to an existing requestWillBeSent event."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "A list of cookies potentially associated to the requested URL. This includes both cookies sent with\nthe request and the ones not sent; the latter are distinguished by having blockedReasons field set."]
    #[serde(rename = "associatedCookies")]
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub associated_cookies: Vec<super::types::AssociatedCookie>,
    #[doc = "Raw request headers as they will be sent over the wire."]
    #[serde(rename = "headers")]
    pub headers: super::types::Headers,
    #[doc = "Connection timing information for the request."]
    #[serde(rename = "connectTiming")]
    pub connect_timing: super::types::ConnectTiming,
    #[doc = "How the request site's device bound sessions were used during this request."]
    #[serde(rename = "deviceBoundSessionUsages")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub device_bound_session_usages: Option<Vec<super::types::DeviceBoundSessionWithUsage>>,
    #[doc = "The client security state set for the request."]
    #[serde(rename = "clientSecurityState")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub client_security_state: Option<super::types::ClientSecurityState>,
    #[doc = "Whether the site has partitioned cookies stored in a partition different than the current one."]
    #[serde(rename = "siteHasCookieInOtherPartition")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub site_has_cookie_in_other_partition: Option<bool>,
    #[doc = "The network conditions id if this request was affected by network conditions configured via\nemulateNetworkConditionsByRule."]
    #[serde(rename = "appliedNetworkConditionsId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub applied_network_conditions_id: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum RequestWillBeSentExtraInfoMethod {
    #[serde(rename = "Network.requestWillBeSentExtraInfo")]
    RequestWillBeSentExtraInfo,
}
#[doc = "Fired when additional information about a requestWillBeSent event is available from the\nnetwork stack. Not every requestWillBeSent event will have an additional\nrequestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent\nor requestWillBeSentExtraInfo will be fired first for the same request.\n[requestWillBeSentExtraInfo](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSentExtraInfo)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RequestWillBeSentExtraInfo {
    pub method: RequestWillBeSentExtraInfoMethod,
    pub params: RequestWillBeSentExtraInfoParams,
}
impl RequestWillBeSentExtraInfo {
    pub const IDENTIFIER: &'static str = "Network.requestWillBeSentExtraInfo";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when additional information about a responseReceived event is available from the network\nstack. Not every responseReceived event will have an additional responseReceivedExtraInfo for\nit, and responseReceivedExtraInfo may be fired before or after responseReceived.\n[responseReceivedExtraInfo](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-responseReceivedExtraInfo)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedExtraInfoParams {
    #[doc = "Request identifier. Used to match this information to another responseReceived event."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "A list of cookies which were not stored from the response along with the corresponding\nreasons for blocking. The cookies here may not be valid due to syntax errors, which\nare represented by the invalid cookie line string instead of a proper cookie."]
    #[serde(rename = "blockedCookies")]
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub blocked_cookies: Vec<super::types::BlockedSetCookieWithReason>,
    #[doc = "Raw response headers as they were received over the wire.\nDuplicate headers in the response are represented as a single key with their values\nconcatentated using `\\n` as the separator.\nSee also `headersText` that contains verbatim text for HTTP/1.*."]
    #[serde(rename = "headers")]
    pub headers: super::types::Headers,
    #[doc = "The IP address space of the resource. The address space can only be determined once the transport\nestablished the connection, so we can't send it in `requestWillBeSentExtraInfo`."]
    #[serde(rename = "resourceIPAddressSpace")]
    pub resource_ip_address_space: super::types::IpAddressSpace,
    #[doc = "The status code of the response. This is useful in cases the request failed and no responseReceived\nevent is triggered, which is the case for, e.g., CORS errors. This is also the correct status code\nfor cached requests, where the status in responseReceived is a 200 and this will be 304."]
    #[serde(rename = "statusCode")]
    pub status_code: i64,
    #[doc = "Raw response header text as it was received over the wire. The raw text may not always be\navailable, such as in the case of HTTP/2 or QUIC."]
    #[serde(rename = "headersText")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub headers_text: Option<String>,
    #[doc = "The cookie partition key that will be used to store partitioned cookies set in this response.\nOnly sent when partitioned cookies are enabled."]
    #[serde(rename = "cookiePartitionKey")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub cookie_partition_key: Option<super::types::CookiePartitionKey>,
    #[doc = "True if partitioned cookies are enabled, but the partition key is not serializable to string."]
    #[serde(rename = "cookiePartitionKeyOpaque")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub cookie_partition_key_opaque: Option<bool>,
    #[doc = "A list of cookies which should have been blocked by 3PCD but are exempted and stored from\nthe response with the corresponding reason."]
    #[serde(rename = "exemptedCookies")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub exempted_cookies: Option<Vec<super::types::ExemptedSetCookieWithReason>>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ResponseReceivedExtraInfoMethod {
    #[serde(rename = "Network.responseReceivedExtraInfo")]
    ResponseReceivedExtraInfo,
}
#[doc = "Fired when additional information about a responseReceived event is available from the network\nstack. Not every responseReceived event will have an additional responseReceivedExtraInfo for\nit, and responseReceivedExtraInfo may be fired before or after responseReceived.\n[responseReceivedExtraInfo](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-responseReceivedExtraInfo)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedExtraInfo {
    pub method: ResponseReceivedExtraInfoMethod,
    pub params: ResponseReceivedExtraInfoParams,
}
impl ResponseReceivedExtraInfo {
    pub const IDENTIFIER: &'static str = "Network.responseReceivedExtraInfo";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired when 103 Early Hints headers is received in addition to the common response.\nNot every responseReceived event will have an responseReceivedEarlyHints fired.\nOnly one responseReceivedEarlyHints may be fired for eached responseReceived event.\n[responseReceivedEarlyHints](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-responseReceivedEarlyHints)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedEarlyHintsParams {
    #[doc = "Request identifier. Used to match this information to another responseReceived event."]
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Raw response headers as they were received over the wire.\nDuplicate headers in the response are represented as a single key with their values\nconcatentated using `\\n` as the separator.\nSee also `headersText` that contains verbatim text for HTTP/1.*."]
    #[serde(rename = "headers")]
    pub headers: super::types::Headers,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ResponseReceivedEarlyHintsMethod {
    #[serde(rename = "Network.responseReceivedEarlyHints")]
    ResponseReceivedEarlyHints,
}
#[doc = "Fired when 103 Early Hints headers is received in addition to the common response.\nNot every responseReceived event will have an responseReceivedEarlyHints fired.\nOnly one responseReceivedEarlyHints may be fired for eached responseReceived event.\n[responseReceivedEarlyHints](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-responseReceivedEarlyHints)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseReceivedEarlyHints {
    pub method: ResponseReceivedEarlyHintsMethod,
    pub params: ResponseReceivedEarlyHintsParams,
}
impl ResponseReceivedEarlyHints {
    pub const IDENTIFIER: &'static str = "Network.responseReceivedEarlyHints";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired exactly once for each Trust Token operation. Depending on\nthe type of the operation and whether the operation succeeded or\nfailed, the event is fired before the corresponding request was sent\nor after the response was received.\n[trustTokenOperationDone](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-trustTokenOperationDone)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TrustTokenOperationDoneParams {
    #[doc = "Detailed success or error status of the operation.\n'AlreadyExists' also signifies a successful operation, as the result\nof the operation already exists und thus, the operation was abort\npreemptively (e.g. a cache hit)."]
    #[serde(rename = "status")]
    pub status: TrustTokenOperationDoneStatus,
    #[serde(rename = "type")]
    pub r#type: super::types::TrustTokenOperationType,
    #[serde(rename = "requestId")]
    pub request_id: super::types::RequestId,
    #[doc = "Top level origin. The context in which the operation was attempted."]
    #[serde(rename = "topLevelOrigin")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub top_level_origin: Option<String>,
    #[doc = "Origin of the issuer in case of a \"Issuance\" or \"Redemption\" operation."]
    #[serde(rename = "issuerOrigin")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub issuer_origin: Option<String>,
    #[doc = "The number of obtained Trust Tokens on a successful \"Issuance\" operation."]
    #[serde(rename = "issuedTokenCount")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub issued_token_count: Option<i64>,
}
#[doc = "Detailed success or error status of the operation.\n'AlreadyExists' also signifies a successful operation, as the result\nof the operation already exists und thus, the operation was abort\npreemptively (e.g. a cache hit)."]
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TrustTokenOperationDoneStatus {
    #[serde(rename = "Ok")]
    Ok,
    #[serde(rename = "InvalidArgument")]
    InvalidArgument,
    #[serde(rename = "MissingIssuerKeys")]
    MissingIssuerKeys,
    #[serde(rename = "FailedPrecondition")]
    FailedPrecondition,
    #[serde(rename = "ResourceExhausted")]
    ResourceExhausted,
    #[serde(rename = "AlreadyExists")]
    AlreadyExists,
    #[serde(rename = "ResourceLimited")]
    ResourceLimited,
    #[serde(rename = "Unauthorized")]
    Unauthorized,
    #[serde(rename = "BadResponse")]
    BadResponse,
    #[serde(rename = "InternalError")]
    InternalError,
    #[serde(rename = "UnknownError")]
    UnknownError,
    #[serde(rename = "FulfilledLocally")]
    FulfilledLocally,
    #[serde(rename = "SiteIssuerLimit")]
    SiteIssuerLimit,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum TrustTokenOperationDoneMethod {
    #[serde(rename = "Network.trustTokenOperationDone")]
    TrustTokenOperationDone,
}
#[doc = "Fired exactly once for each Trust Token operation. Depending on\nthe type of the operation and whether the operation succeeded or\nfailed, the event is fired before the corresponding request was sent\nor after the response was received.\n[trustTokenOperationDone](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-trustTokenOperationDone)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TrustTokenOperationDone {
    pub method: TrustTokenOperationDoneMethod,
    pub params: TrustTokenOperationDoneParams,
}
impl TrustTokenOperationDone {
    pub const IDENTIFIER: &'static str = "Network.trustTokenOperationDone";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Fired once security policy has been updated.\n[policyUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-policyUpdated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PolicyUpdatedParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum PolicyUpdatedMethod {
    #[serde(rename = "Network.policyUpdated")]
    PolicyUpdated,
}
#[doc = "Fired once security policy has been updated.\n[policyUpdated](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-policyUpdated)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PolicyUpdated {
    pub method: PolicyUpdatedMethod,
    pub params: PolicyUpdatedParams,
}
impl PolicyUpdated {
    pub const IDENTIFIER: &'static str = "Network.policyUpdated";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Is sent whenever a new report is added.\nAnd after 'enableReportingApi' for all existing reports.\n[reportingApiReportAdded](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-reportingApiReportAdded)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiReportAddedParams {
    #[serde(rename = "report")]
    pub report: super::types::ReportingApiReport,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ReportingApiReportAddedMethod {
    #[serde(rename = "Network.reportingApiReportAdded")]
    ReportingApiReportAdded,
}
#[doc = "Is sent whenever a new report is added.\nAnd after 'enableReportingApi' for all existing reports.\n[reportingApiReportAdded](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-reportingApiReportAdded)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiReportAdded {
    pub method: ReportingApiReportAddedMethod,
    pub params: ReportingApiReportAddedParams,
}
impl ReportingApiReportAdded {
    pub const IDENTIFIER: &'static str = "Network.reportingApiReportAdded";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiReportUpdatedParams {
    #[serde(rename = "report")]
    pub report: super::types::ReportingApiReport,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ReportingApiReportUpdatedMethod {
    #[serde(rename = "Network.reportingApiReportUpdated")]
    ReportingApiReportUpdated,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiReportUpdated {
    pub method: ReportingApiReportUpdatedMethod,
    pub params: ReportingApiReportUpdatedParams,
}
impl ReportingApiReportUpdated {
    pub const IDENTIFIER: &'static str = "Network.reportingApiReportUpdated";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiEndpointsChangedForOriginParams {
    #[doc = "Origin of the document(s) which configured the endpoints."]
    #[serde(rename = "origin")]
    pub origin: String,
    #[serde(rename = "endpoints")]
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub endpoints: Vec<super::types::ReportingApiEndpoint>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ReportingApiEndpointsChangedForOriginMethod {
    #[serde(rename = "Network.reportingApiEndpointsChangedForOrigin")]
    ReportingApiEndpointsChangedForOrigin,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReportingApiEndpointsChangedForOrigin {
    pub method: ReportingApiEndpointsChangedForOriginMethod,
    pub params: ReportingApiEndpointsChangedForOriginParams,
}
impl ReportingApiEndpointsChangedForOrigin {
    pub const IDENTIFIER: &'static str = "Network.reportingApiEndpointsChangedForOrigin";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Triggered when the initial set of device bound sessions is added.\n[deviceBoundSessionsAdded](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-deviceBoundSessionsAdded)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionsAddedParams {
    #[doc = "The device bound sessions."]
    #[serde(rename = "sessions")]
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub sessions: Vec<super::types::DeviceBoundSession>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DeviceBoundSessionsAddedMethod {
    #[serde(rename = "Network.deviceBoundSessionsAdded")]
    DeviceBoundSessionsAdded,
}
#[doc = "Triggered when the initial set of device bound sessions is added.\n[deviceBoundSessionsAdded](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-deviceBoundSessionsAdded)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionsAdded {
    pub method: DeviceBoundSessionsAddedMethod,
    pub params: DeviceBoundSessionsAddedParams,
}
impl DeviceBoundSessionsAdded {
    pub const IDENTIFIER: &'static str = "Network.deviceBoundSessionsAdded";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
#[doc = "Triggered when a device bound session event occurs.\n[deviceBoundSessionEventOccurred](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-deviceBoundSessionEventOccurred)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionEventOccurredParams {
    #[doc = "A unique identifier for this session event."]
    #[serde(rename = "eventId")]
    pub event_id: super::types::DeviceBoundSessionEventId,
    #[doc = "The site this session event is associated with."]
    #[serde(rename = "site")]
    pub site: String,
    #[doc = "Whether this event was considered successful."]
    #[serde(rename = "succeeded")]
    pub succeeded: bool,
    #[doc = "The session ID this event is associated with. May not be populated for\nfailed events."]
    #[serde(rename = "sessionId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub session_id: Option<String>,
    #[doc = "The below are the different session event type details. Exactly one is populated."]
    #[serde(rename = "creationEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub creation_event_details: Option<super::types::CreationEventDetails>,
    #[serde(rename = "refreshEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub refresh_event_details: Option<super::types::RefreshEventDetails>,
    #[serde(rename = "terminationEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub termination_event_details: Option<super::types::TerminationEventDetails>,
    #[serde(rename = "challengeEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub challenge_event_details: Option<super::types::ChallengeEventDetails>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DeviceBoundSessionEventOccurredMethod {
    #[serde(rename = "Network.deviceBoundSessionEventOccurred")]
    DeviceBoundSessionEventOccurred,
}
#[doc = "Triggered when a device bound session event occurs.\n[deviceBoundSessionEventOccurred](https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-deviceBoundSessionEventOccurred)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceBoundSessionEventOccurred {
    pub method: DeviceBoundSessionEventOccurredMethod,
    pub params: DeviceBoundSessionEventOccurredParams,
}
impl DeviceBoundSessionEventOccurred {
    pub const IDENTIFIER: &'static str = "Network.deviceBoundSessionEventOccurred";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
group_enum ! (NetworkEvents { DataReceived (DataReceived) , EventSourceMessageReceived (EventSourceMessageReceived) , LoadingFailed (LoadingFailed) , LoadingFinished (LoadingFinished) , RequestServedFromCache (RequestServedFromCache) , RequestWillBeSent (RequestWillBeSent) , ResourceChangedPriority (ResourceChangedPriority) , SignedExchangeReceived (SignedExchangeReceived) , ResponseReceived (ResponseReceived) , WebSocketClosed (WebSocketClosed) , WebSocketCreated (WebSocketCreated) , WebSocketFrameError (WebSocketFrameError) , WebSocketFrameReceived (WebSocketFrameReceived) , WebSocketFrameSent (WebSocketFrameSent) , WebSocketHandshakeResponseReceived (WebSocketHandshakeResponseReceived) , WebSocketWillSendHandshakeRequest (WebSocketWillSendHandshakeRequest) , WebTransportCreated (WebTransportCreated) , WebTransportConnectionEstablished (WebTransportConnectionEstablished) , WebTransportClosed (WebTransportClosed) , DirectTcpSocketCreated (DirectTcpSocketCreated) , DirectTcpSocketOpened (DirectTcpSocketOpened) , DirectTcpSocketAborted (DirectTcpSocketAborted) , DirectTcpSocketClosed (DirectTcpSocketClosed) , DirectTcpSocketChunkSent (DirectTcpSocketChunkSent) , DirectTcpSocketChunkReceived (DirectTcpSocketChunkReceived) , DirectUdpSocketJoinedMulticastGroup (DirectUdpSocketJoinedMulticastGroup) , DirectUdpSocketLeftMulticastGroup (DirectUdpSocketLeftMulticastGroup) , DirectUdpSocketCreated (DirectUdpSocketCreated) , DirectUdpSocketOpened (DirectUdpSocketOpened) , DirectUdpSocketAborted (DirectUdpSocketAborted) , DirectUdpSocketClosed (DirectUdpSocketClosed) , DirectUdpSocketChunkSent (DirectUdpSocketChunkSent) , DirectUdpSocketChunkReceived (DirectUdpSocketChunkReceived) , RequestWillBeSentExtraInfo (RequestWillBeSentExtraInfo) , ResponseReceivedExtraInfo (ResponseReceivedExtraInfo) , ResponseReceivedEarlyHints (ResponseReceivedEarlyHints) , TrustTokenOperationDone (TrustTokenOperationDone) , PolicyUpdated (PolicyUpdated) , ReportingApiReportAdded (ReportingApiReportAdded) , ReportingApiReportUpdated (ReportingApiReportUpdated) , ReportingApiEndpointsChangedForOrigin (ReportingApiEndpointsChangedForOrigin) , DeviceBoundSessionsAdded (DeviceBoundSessionsAdded) , DeviceBoundSessionEventOccurred (DeviceBoundSessionEventOccurred) } + identifiable);