browser-protocol 0.1.0

Generated Rust types and commands for the Chrome DevTools Protocol (browser-protocol)
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
//! This domain provides various functionality related to drawing atop the inspected page.

use serde::{Serialize, Deserialize};
use serde_json::Value as JsonValue;

/// Configuration data for drawing the source order of an elements children.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SourceOrderConfig {
    /// the color to outline the given element in.

    pub parentOutlineColor: crate::dom::RGBA,
    /// the color to outline the child elements in.

    pub childOutlineColor: crate::dom::RGBA,
}

/// Configuration data for the highlighting of Grid elements.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GridHighlightConfig {
    /// Whether the extension lines from grid cells to the rulers should be shown (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showGridExtensionLines: Option<bool>,
    /// Show Positive line number labels (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showPositiveLineNumbers: Option<bool>,
    /// Show Negative line number labels (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showNegativeLineNumbers: Option<bool>,
    /// Show area name labels (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showAreaNames: Option<bool>,
    /// Show line name labels (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showLineNames: Option<bool>,
    /// Show track size labels (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showTrackSizes: Option<bool>,
    /// The grid container border highlight color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub gridBorderColor: Option<crate::dom::RGBA>,
    /// The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub cellBorderColor: Option<crate::dom::RGBA>,
    /// The row line color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub rowLineColor: Option<crate::dom::RGBA>,
    /// The column line color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub columnLineColor: Option<crate::dom::RGBA>,
    /// Whether the grid border is dashed (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub gridBorderDash: Option<bool>,
    /// Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub cellBorderDash: Option<bool>,
    /// Whether row lines are dashed (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub rowLineDash: Option<bool>,
    /// Whether column lines are dashed (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub columnLineDash: Option<bool>,
    /// The row gap highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub rowGapColor: Option<crate::dom::RGBA>,
    /// The row gap hatching fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub rowHatchColor: Option<crate::dom::RGBA>,
    /// The column gap highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub columnGapColor: Option<crate::dom::RGBA>,
    /// The column gap hatching fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub columnHatchColor: Option<crate::dom::RGBA>,
    /// The named grid areas border color (Default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub areaBorderColor: Option<crate::dom::RGBA>,
    /// The grid container background color (Default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub gridBackgroundColor: Option<crate::dom::RGBA>,
}

/// Configuration data for the highlighting of Flex container elements.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct FlexContainerHighlightConfig {
    /// The style of the container border

    #[serde(skip_serializing_if = "Option::is_none")]
    pub containerBorder: Option<LineStyle>,
    /// The style of the separator between lines

    #[serde(skip_serializing_if = "Option::is_none")]
    pub lineSeparator: Option<LineStyle>,
    /// The style of the separator between items

    #[serde(skip_serializing_if = "Option::is_none")]
    pub itemSeparator: Option<LineStyle>,
    /// Style of content-distribution space on the main axis (justify-content).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub mainDistributedSpace: Option<BoxStyle>,
    /// Style of content-distribution space on the cross axis (align-content).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub crossDistributedSpace: Option<BoxStyle>,
    /// Style of empty space caused by row gaps (gap/row-gap).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub rowGapSpace: Option<BoxStyle>,
    /// Style of empty space caused by columns gaps (gap/column-gap).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub columnGapSpace: Option<BoxStyle>,
    /// Style of the self-alignment line (align-items).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub crossAlignment: Option<LineStyle>,
}

/// Configuration data for the highlighting of Flex item elements.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct FlexItemHighlightConfig {
    /// Style of the box representing the item's base size

    #[serde(skip_serializing_if = "Option::is_none")]
    pub baseSizeBox: Option<BoxStyle>,
    /// Style of the border around the box representing the item's base size

    #[serde(skip_serializing_if = "Option::is_none")]
    pub baseSizeBorder: Option<LineStyle>,
    /// Style of the arrow representing if the item grew or shrank

    #[serde(skip_serializing_if = "Option::is_none")]
    pub flexibilityArrow: Option<LineStyle>,
}

/// Style information for drawing a line.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct LineStyle {
    /// The color of the line (default: transparent)

    #[serde(skip_serializing_if = "Option::is_none")]
    pub color: Option<crate::dom::RGBA>,
    /// The line pattern (default: solid)

    #[serde(skip_serializing_if = "Option::is_none")]
    pub pattern: Option<String>,
}

/// Style information for drawing a box.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct BoxStyle {
    /// The background color for the box (default: transparent)

    #[serde(skip_serializing_if = "Option::is_none")]
    pub fillColor: Option<crate::dom::RGBA>,
    /// The hatching color for the box (default: transparent)

    #[serde(skip_serializing_if = "Option::is_none")]
    pub hatchColor: Option<crate::dom::RGBA>,
}


#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
pub enum ContrastAlgorithm {
    #[default]
    Aa,
    Aaa,
    Apca,
}

/// Configuration data for the highlighting of page elements.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HighlightConfig {
    /// Whether the node info tooltip should be shown (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showInfo: Option<bool>,
    /// Whether the node styles in the tooltip (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showStyles: Option<bool>,
    /// Whether the rulers should be shown (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showRulers: Option<bool>,
    /// Whether the a11y info should be shown (default: true).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showAccessibilityInfo: Option<bool>,
    /// Whether the extension lines from node to the rulers should be shown (default: false).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showExtensionLines: Option<bool>,
    /// The content box highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub contentColor: Option<crate::dom::RGBA>,
    /// The padding highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub paddingColor: Option<crate::dom::RGBA>,
    /// The border highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub borderColor: Option<crate::dom::RGBA>,
    /// The margin highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub marginColor: Option<crate::dom::RGBA>,
    /// The event target element highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub eventTargetColor: Option<crate::dom::RGBA>,
    /// The shape outside fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub shapeColor: Option<crate::dom::RGBA>,
    /// The shape margin fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub shapeMarginColor: Option<crate::dom::RGBA>,
    /// The grid layout color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub cssGridColor: Option<crate::dom::RGBA>,
    /// The color format used to format color styles (default: hex).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub colorFormat: Option<ColorFormat>,
    /// The grid layout highlight configuration (default: all transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub gridHighlightConfig: Option<GridHighlightConfig>,
    /// The flex container highlight configuration (default: all transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub flexContainerHighlightConfig: Option<FlexContainerHighlightConfig>,
    /// The flex item highlight configuration (default: all transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub flexItemHighlightConfig: Option<FlexItemHighlightConfig>,
    /// The contrast algorithm to use for the contrast ratio (default: aa).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub contrastAlgorithm: Option<ContrastAlgorithm>,
    /// The container query container highlight configuration (default: all transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub containerQueryContainerHighlightConfig: Option<ContainerQueryContainerHighlightConfig>,
}


#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
pub enum ColorFormat {
    #[default]
    Rgb,
    Hsl,
    Hwb,
    Hex,
}

/// Configurations for Persistent Grid Highlight

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GridNodeHighlightConfig {
    /// A descriptor for the highlight appearance.

    pub gridHighlightConfig: GridHighlightConfig,
    /// Identifier of the node to highlight.

    pub nodeId: crate::dom::NodeId,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct FlexNodeHighlightConfig {
    /// A descriptor for the highlight appearance of flex containers.

    pub flexContainerHighlightConfig: FlexContainerHighlightConfig,
    /// Identifier of the node to highlight.

    pub nodeId: crate::dom::NodeId,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ScrollSnapContainerHighlightConfig {
    /// The style of the snapport border (default: transparent)

    #[serde(skip_serializing_if = "Option::is_none")]
    pub snapportBorder: Option<LineStyle>,
    /// The style of the snap area border (default: transparent)

    #[serde(skip_serializing_if = "Option::is_none")]
    pub snapAreaBorder: Option<LineStyle>,
    /// The margin highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub scrollMarginColor: Option<crate::dom::RGBA>,
    /// The padding highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub scrollPaddingColor: Option<crate::dom::RGBA>,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ScrollSnapHighlightConfig {
    /// A descriptor for the highlight appearance of scroll snap containers.

    pub scrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig,
    /// Identifier of the node to highlight.

    pub nodeId: crate::dom::NodeId,
}

/// Configuration for dual screen hinge

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HingeConfig {
    /// A rectangle represent hinge

    pub rect: crate::dom::Rect,
    /// The content box highlight fill color (default: a dark color).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub contentColor: Option<crate::dom::RGBA>,
    /// The content box highlight outline color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub outlineColor: Option<crate::dom::RGBA>,
}

/// Configuration for Window Controls Overlay

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct WindowControlsOverlayConfig {
    /// Whether the title bar CSS should be shown when emulating the Window Controls Overlay.

    pub showCSS: bool,
    /// Selected platforms to show the overlay.

    pub selectedPlatform: String,
    /// The theme color defined in app manifest.

    pub themeColor: String,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContainerQueryHighlightConfig {
    /// A descriptor for the highlight appearance of container query containers.

    pub containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig,
    /// Identifier of the container node to highlight.

    pub nodeId: crate::dom::NodeId,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContainerQueryContainerHighlightConfig {
    /// The style of the container border.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub containerBorder: Option<LineStyle>,
    /// The style of the descendants' borders.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub descendantBorder: Option<LineStyle>,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct IsolatedElementHighlightConfig {
    /// A descriptor for the highlight appearance of an element in isolation mode.

    pub isolationModeHighlightConfig: IsolationModeHighlightConfig,
    /// Identifier of the isolated element to highlight.

    pub nodeId: crate::dom::NodeId,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct IsolationModeHighlightConfig {
    /// The fill color of the resizers (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub resizerColor: Option<crate::dom::RGBA>,
    /// The fill color for resizer handles (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub resizerHandleColor: Option<crate::dom::RGBA>,
    /// The fill color for the mask covering non-isolated elements (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub maskColor: Option<crate::dom::RGBA>,
}


#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
pub enum InspectMode {
    #[default]
    SearchForNode,
    SearchForUAShadowDOM,
    CaptureAreaScreenshot,
    None,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct InspectedElementAnchorConfig {
    /// Identifier of the node to highlight.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub nodeId: Option<crate::dom::NodeId>,
    /// Identifier of the backend node to highlight.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub backendNodeId: Option<crate::dom::BackendNodeId>,
}

/// For testing.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetHighlightObjectForTestParams {
    /// Id of the node to get highlight object for.

    pub nodeId: crate::dom::NodeId,
    /// Whether to include distance info.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub includeDistance: Option<bool>,
    /// Whether to include style info.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub includeStyle: Option<bool>,
    /// The color format to get config with (default: hex).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub colorFormat: Option<ColorFormat>,
    /// Whether to show accessibility info (default: true).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub showAccessibilityInfo: Option<bool>,
}

/// For testing.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetHighlightObjectForTestReturns {
    /// Highlight data for the node.

    pub highlight: serde_json::Map<String, JsonValue>,
}

/// For Persistent Grid testing.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetGridHighlightObjectsForTestParams {
    /// Ids of the node to get highlight object for.

    pub nodeIds: Vec<crate::dom::NodeId>,
}

/// For Persistent Grid testing.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetGridHighlightObjectsForTestReturns {
    /// Grid Highlight data for the node ids provided.

    pub highlights: serde_json::Map<String, JsonValue>,
}

/// For Source Order Viewer testing.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetSourceOrderHighlightObjectForTestParams {
    /// Id of the node to highlight.

    pub nodeId: crate::dom::NodeId,
}

/// For Source Order Viewer testing.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetSourceOrderHighlightObjectForTestReturns {
    /// Source order highlight data for the node id provided.

    pub highlight: serde_json::Map<String, JsonValue>,
}

/// Highlights owner element of the frame with given id.
/// Deprecated: Doesn't work reliably and cannot be fixed due to process
/// separation (the owner node might be in a different process). Determine
/// the owner node in the client and use highlightNode.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HighlightFrameParams {
    /// Identifier of the frame to highlight.

    pub frameId: crate::page::FrameId,
    /// The content box highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub contentColor: Option<crate::dom::RGBA>,
    /// The content box highlight outline color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub contentOutlineColor: Option<crate::dom::RGBA>,
}

/// Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
/// objectId must be specified.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HighlightNodeParams {
    /// A descriptor for the highlight appearance.

    pub highlightConfig: HighlightConfig,
    /// Identifier of the node to highlight.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub nodeId: Option<crate::dom::NodeId>,
    /// Identifier of the backend node to highlight.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub backendNodeId: Option<crate::dom::BackendNodeId>,
    /// JavaScript object id of the node to be highlighted.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub objectId: Option<crate::runtime::RemoteObjectId>,
    /// Selectors to highlight relevant nodes.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub selector: Option<String>,
}

/// Highlights given quad. Coordinates are absolute with respect to the main frame viewport.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HighlightQuadParams {
    /// Quad to highlight

    pub quad: crate::dom::Quad,
    /// The highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub color: Option<crate::dom::RGBA>,
    /// The highlight outline color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub outlineColor: Option<crate::dom::RGBA>,
}

/// Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
/// Issue: the method does not handle device pixel ratio (DPR) correctly.
/// The coordinates currently have to be adjusted by the client
/// if DPR is not 1 (see crbug.com/437807128).

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HighlightRectParams {
    /// X coordinate

    pub x: i32,
    /// Y coordinate

    pub y: i32,
    /// Rectangle width

    pub width: u64,
    /// Rectangle height

    pub height: i64,
    /// The highlight fill color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub color: Option<crate::dom::RGBA>,
    /// The highlight outline color (default: transparent).

    #[serde(skip_serializing_if = "Option::is_none")]
    pub outlineColor: Option<crate::dom::RGBA>,
}

/// Highlights the source order of the children of the DOM node with given id or with the given
/// JavaScript object wrapper. Either nodeId or objectId must be specified.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HighlightSourceOrderParams {
    /// A descriptor for the appearance of the overlay drawing.

    pub sourceOrderConfig: SourceOrderConfig,
    /// Identifier of the node to highlight.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub nodeId: Option<crate::dom::NodeId>,
    /// Identifier of the backend node to highlight.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub backendNodeId: Option<crate::dom::BackendNodeId>,
    /// JavaScript object id of the node to be highlighted.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub objectId: Option<crate::runtime::RemoteObjectId>,
}

/// Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
/// Backend then generates 'inspectNodeRequested' event upon element selection.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetInspectModeParams {
    /// Set an inspection mode.

    pub mode: InspectMode,
    /// A descriptor for the highlight appearance of hovered-over nodes. May be omitted if 'enabled
    /// == false'.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub highlightConfig: Option<HighlightConfig>,
}

/// Highlights owner element of all frames detected to be ads.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowAdHighlightsParams {
    /// True for showing ad highlights

    pub show: bool,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetPausedInDebuggerMessageParams {
    /// The message to display, also triggers resume and step over controls.

    #[serde(skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

/// Requests that backend shows debug borders on layers

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowDebugBordersParams {
    /// True for showing debug borders

    pub show: bool,
}

/// Requests that backend shows the FPS counter

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowFPSCounterParams {
    /// True for showing the FPS counter

    pub show: bool,
}

/// Highlight multiple elements with the CSS Grid overlay.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowGridOverlaysParams {
    /// An array of node identifiers and descriptors for the highlight appearance.

    pub gridNodeHighlightConfigs: Vec<GridNodeHighlightConfig>,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowFlexOverlaysParams {
    /// An array of node identifiers and descriptors for the highlight appearance.

    pub flexNodeHighlightConfigs: Vec<FlexNodeHighlightConfig>,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowScrollSnapOverlaysParams {
    /// An array of node identifiers and descriptors for the highlight appearance.

    pub scrollSnapHighlightConfigs: Vec<ScrollSnapHighlightConfig>,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowContainerQueryOverlaysParams {
    /// An array of node identifiers and descriptors for the highlight appearance.

    pub containerQueryHighlightConfigs: Vec<ContainerQueryHighlightConfig>,
}


#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowInspectedElementAnchorParams {
    /// Node identifier for which to show an anchor for.

    pub inspectedElementAnchorConfig: InspectedElementAnchorConfig,
}

/// Requests that backend shows paint rectangles

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowPaintRectsParams {
    /// True for showing paint rectangles

    pub result: bool,
}

/// Requests that backend shows layout shift regions

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowLayoutShiftRegionsParams {
    /// True for showing layout shift regions

    pub result: bool,
}

/// Requests that backend shows scroll bottleneck rects

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowScrollBottleneckRectsParams {
    /// True for showing scroll bottleneck rects

    pub show: bool,
}

/// Deprecated, no longer has any effect.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowHitTestBordersParams {
    /// True for showing hit-test borders

    pub show: bool,
}

/// Deprecated, no longer has any effect.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowWebVitalsParams {

    pub show: bool,
}

/// Paints viewport size upon main frame resize.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowViewportSizeOnResizeParams {
    /// Whether to paint size or not.

    pub show: bool,
}

/// Add a dual screen device hinge

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowHingeParams {
    /// hinge data, null means hideHinge

    #[serde(skip_serializing_if = "Option::is_none")]
    pub hingeConfig: Option<HingeConfig>,
}

/// Show elements in isolation mode with overlays.

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowIsolatedElementsParams {
    /// An array of node identifiers and descriptors for the highlight appearance.

    pub isolatedElementHighlightConfigs: Vec<IsolatedElementHighlightConfig>,
}

/// Show Window Controls Overlay for PWA

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct SetShowWindowControlsOverlayParams {
    /// Window Controls Overlay data, null means hide Window Controls Overlay

    #[serde(skip_serializing_if = "Option::is_none")]
    pub windowControlsOverlayConfig: Option<WindowControlsOverlayConfig>,
}