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
package Torello.Browser.BrowserAPI;

// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// Java-HTML Imports
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

import Torello.Browser.*;
import Torello.Browser.helper.*;
import Torello.Browser.JavaScriptAPI.*;
import Torello.JSON.*;

import Torello.Java.ReadOnly.ReadOnlyList;
import Torello.Java.ReadOnly.ReadOnlyArrayList;

import Torello.JavaDoc.Annotations.StaticFunctional;
import Torello.JavaDoc.Annotations.JDHeaderBackgroundImg;

import Torello.Browser.BrowserAPI.NestedHelpers.Commands.Accessibility$$Commands;


// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
// JDK Imports
// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

import javax.json.JsonObject;
import javax.json.JsonValue;

/**
 * <SPAN CLASS=COPIEDJDK><B><CODE>[No Description Provided by Google]</CODE></B></SPAN>
 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.CODE_GEN_NOTE>
 */
@StaticFunctional@JDHeaderBackgroundImg(EmbedTagFileID="CDP.WOOD_PLANK_NOTE")
public class Accessibility
{
    // No Pubic Constructors
    private Accessibility() { }


    // ********************************************************************************************
    // ********************************************************************************************
    // Eliminated Types
    // ********************************************************************************************
    // ********************************************************************************************


    /**
     * Unique accessibility node identifier.

     * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType
     *     DATA-NAME=AXNodeId>
     */
    public static final String AXNodeId =
        "AXNodeId has been eliminated.\n" +
        "It was replaced with the standard Java-Type: String";


    // ********************************************************************************************
    // ********************************************************************************************
    // Enumerated String Constants Lists
    // ********************************************************************************************
    // ********************************************************************************************


    /**
     * Values of AXProperty name:
     * - from 'busy' to 'roledescription': states which apply to every AX node
     * - from 'live' to 'root': attributes which apply to nodes in live regions
     * - from 'autocomplete' to 'valuetext': attributes which apply to widgets
     * - from 'checked' to 'selected': states which apply to widgets
     * - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
     * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B>
     */
    public static final ReadOnlyList<String> AXPropertyName = new ReadOnlyArrayList<>(
        String.class, 
        "actions", "activedescendant", "atomic", "autocomplete", "busy", "checked", "controls",
        "describedby", "details", "disabled", "editable", "errormessage", "expanded", "flowto",
        "focusable", "focused", "hasPopup", "hidden", "hiddenRoot", "invalid", "keyshortcuts",
        "labelledby", "level", "live", "modal", "multiline", "multiselectable", "orientation",
        "owns", "pressed", "readonly", "relevant", "required", "roledescription", "root",
        "selected", "settable", "url", "valuemax", "valuemin", "valuetext"
    );

    /**
     * Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
     * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B>
     */
    public static final ReadOnlyList<String> AXValueNativeSourceType = new ReadOnlyArrayList<>(
        String.class, 
        "description", "figcaption", "label", "labelfor", "labelwrapped", "legend", "other",
        "rubyannotation", "tablecaption", "title"
    );

    /**
     * Enum of possible property sources.
     * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B>
     */
    public static final ReadOnlyList<String> AXValueSourceType = new ReadOnlyArrayList<>(
        String.class, 
        "attribute", "contents", "implicit", "placeholder", "relatedElement", "style"
    );

    /**
     * Enum of possible property types.
     * <BR /><BR /><B CLASS=StrEnumType>String-Enumeration Type</B>
     */
    public static final ReadOnlyList<String> AXValueType = new ReadOnlyArrayList<>(
        String.class, 
        "boolean", "booleanOrUndefined", "computedString", "domRelation", "idref", "idrefList",
        "integer", "internalRole", "node", "nodeList", "number", "role", "string", "token",
        "tokenList", "tristate", "valueUndefined"
    );



    // ********************************************************************************************
    // ********************************************************************************************
    // Basic Types
    // ********************************************************************************************
    // ********************************************************************************************


    /**
     * A node in the accessibility tree.
     * 
     * <EMBED CLASS=globalDefs DATA-DOMAIN=Accessibility DATA-API=BrowserAPI>
     */
    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
    public static class AXNode
        extends BaseType<AXNode>
        implements java.io.Serializable
    {
        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
        protected static final long serialVersionUID = 1;

        private static final NestedHelper<Accessibility.AXNode> singleton =
            Torello.Browser.BrowserAPI.NestedHelpers.Types.
                Accessibility$$AXNode$$.singleton;

        /** Unique identifier for this node. */
        public final String nodeId;

        /** Whether this node is ignored for accessibility */
        public final boolean ignored;

        /**
         * Collection of reasons why this node is hidden.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXProperty[] ignoredReasons;

        /**
         * This <CODE>Node</CODE>'s role, whether explicit or implicit.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue role;

        /**
         * This <CODE>Node</CODE>'s Chrome raw role.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue chromeRole;

        /**
         * The accessible name for this <CODE>Node</CODE>.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue name;

        /**
         * The accessible description for this <CODE>Node</CODE>.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue description;

        /**
         * The value for this <CODE>Node</CODE>.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue value;

        /**
         * All other properties
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXProperty[] properties;

        /**
         * ID for this node's parent.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final String parentId;

        /**
         * IDs for each of this node's child nodes.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final String[] childIds;

        /**
         * The backend ID for the associated DOM node, if any.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Integer backendDOMNodeId;

        /**
         * The frame ID for the frame associated with this nodes document.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final String frameId;

        /** Constructor.  Please review this class' fields for documentation. */
        public AXNode(
                ReadOnlyList<Boolean> isPresent, String nodeId, boolean ignored,
                AXProperty[] ignoredReasons, AXValue role, AXValue chromeRole, AXValue name,
                AXValue description, AXValue value, AXProperty[] properties, String parentId,
                String[] childIds, Integer backendDOMNodeId, String frameId
            )
        {
            super(singleton, Domains.Accessibility, "AXNode", 13);

            this.nodeId             = nodeId;
            this.ignored            = ignored;
            this.ignoredReasons     = ignoredReasons;
            this.role               = role;
            this.chromeRole         = chromeRole;
            this.name               = name;
            this.description        = description;
            this.value              = value;
            this.properties         = properties;
            this.parentId           = parentId;
            this.childIds           = childIds;
            this.backendDOMNodeId   = backendDOMNodeId;
            this.frameId            = frameId;

            this.isPresent = (isPresent == null)
                ? singleton.generateIsPresentList(this)
                : THROWS.check(isPresent, 13, "Accessibility.AXNode");
        }

        /** Creates an instance of this class from a {@link JsonObject}.*/
        public static AXNode fromJSON(JsonObject jo)
        { return singleton.fromJSON(jo); }

        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
        public static NestedDescriptor<AXNode> descriptor()
        { return singleton.descriptor(); }
    }

    /**
     * <CODE>[No Description Provided by Google]</CODE>
     * 
     * <EMBED CLASS=globalDefs DATA-DOMAIN=Accessibility DATA-API=BrowserAPI>
     */
    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
    public static class AXProperty
        extends BaseType<AXProperty>
        implements java.io.Serializable
    {
        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
        protected static final long serialVersionUID = 1;

        private static final NestedHelper<Accessibility.AXProperty> singleton =
            Torello.Browser.BrowserAPI.NestedHelpers.Types.
                Accessibility$$AXProperty$$.singleton;

        /**
         * The name of this property.
         * <EMBED CLASS='external-html' DATA-D=Accessibility DATA-C=AXPropertyName DATA-F=name DATA-FILE-ID=CDP.EL2>
         * @see BaseType#enumStrList(String)
         */
        public final String name;

        /** The value of this property. */
        public final Accessibility.AXValue value;

        /** Constructor.  Please review this class' fields for documentation. */
        public AXProperty(ReadOnlyList<Boolean> isPresent, String name, AXValue value)
        {
            super(singleton, Domains.Accessibility, "AXProperty", 2);

            this.name   = name;
            this.value  = value;

            this.isPresent = (isPresent == null)
                ? singleton.generateIsPresentList(this)
                : THROWS.check(isPresent, 2, "Accessibility.AXProperty");
        }

        /** Creates an instance of this class from a {@link JsonObject}.*/
        public static AXProperty fromJSON(JsonObject jo)
        { return singleton.fromJSON(jo); }

        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
        public static NestedDescriptor<AXProperty> descriptor()
        { return singleton.descriptor(); }
    }

    /**
     * <CODE>[No Description Provided by Google]</CODE>
     * 
     * <EMBED CLASS=globalDefs DATA-DOMAIN=Accessibility DATA-API=BrowserAPI>
     */
    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
    public static class AXRelatedNode
        extends BaseType<AXRelatedNode>
        implements java.io.Serializable
    {
        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
        protected static final long serialVersionUID = 1;

        private static final NestedHelper<Accessibility.AXRelatedNode> singleton =
            Torello.Browser.BrowserAPI.NestedHelpers.Types.
                Accessibility$$AXRelatedNode$$.singleton;

        /** The BackendNodeId of the related DOM node. */
        public final int backendDOMNodeId;

        /**
         * The IDRef value provided, if any.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final String idref;

        /**
         * The text alternative of this node in the current context.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final String text;

        /** Constructor.  Please review this class' fields for documentation. */
        public AXRelatedNode
            (ReadOnlyList<Boolean> isPresent, int backendDOMNodeId, String idref, String text)
        {
            super(singleton, Domains.Accessibility, "AXRelatedNode", 3);

            this.backendDOMNodeId   = backendDOMNodeId;
            this.idref              = idref;
            this.text               = text;

            this.isPresent = (isPresent == null)
                ? singleton.generateIsPresentList(this)
                : THROWS.check(isPresent, 3, "Accessibility.AXRelatedNode");
        }

        /** Creates an instance of this class from a {@link JsonObject}.*/
        public static AXRelatedNode fromJSON(JsonObject jo)
        { return singleton.fromJSON(jo); }

        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
        public static NestedDescriptor<AXRelatedNode> descriptor()
        { return singleton.descriptor(); }
    }

    /**
     * A single computed AX property.
     * 
     * <EMBED CLASS=globalDefs DATA-DOMAIN=Accessibility DATA-API=BrowserAPI>
     */
    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
    public static class AXValue
        extends BaseType<AXValue>
        implements java.io.Serializable
    {
        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
        protected static final long serialVersionUID = 1;

        private static final NestedHelper<Accessibility.AXValue> singleton =
            Torello.Browser.BrowserAPI.NestedHelpers.Types.
                Accessibility$$AXValue$$.singleton;

        /**
         * The type of this value.
         * <EMBED CLASS='external-html' DATA-D=Accessibility DATA-C=AXValueType DATA-F=type DATA-FILE-ID=CDP.EL2>
         * @see BaseType#enumStrList(String)
         */
        public final String type;

        /**
         * The computed value of this property.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final JsonValue value;

        /**
         * One or more related nodes, if applicable.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXRelatedNode[] relatedNodes;

        /**
         * The sources which contributed to the computation of this property.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValueSource[] sources;

        /** Constructor.  Please review this class' fields for documentation. */
        public AXValue(
                ReadOnlyList<Boolean> isPresent, String type, JsonValue value,
                AXRelatedNode[] relatedNodes, AXValueSource[] sources
            )
        {
            super(singleton, Domains.Accessibility, "AXValue", 4);

            this.type           = type;
            this.value          = value;
            this.relatedNodes   = relatedNodes;
            this.sources        = sources;

            this.isPresent = (isPresent == null)
                ? singleton.generateIsPresentList(this)
                : THROWS.check(isPresent, 4, "Accessibility.AXValue");
        }

        /** Creates an instance of this class from a {@link JsonObject}.*/
        public static AXValue fromJSON(JsonObject jo)
        { return singleton.fromJSON(jo); }

        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
        public static NestedDescriptor<AXValue> descriptor()
        { return singleton.descriptor(); }
    }

    /**
     * A single source for a computed AX property.
     * 
     * <EMBED CLASS=globalDefs DATA-DOMAIN=Accessibility DATA-API=BrowserAPI>
     */
    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
    public static class AXValueSource
        extends BaseType<AXValueSource>
        implements java.io.Serializable
    {
        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
        protected static final long serialVersionUID = 1;

        private static final NestedHelper<Accessibility.AXValueSource> singleton =
            Torello.Browser.BrowserAPI.NestedHelpers.Types.
                Accessibility$$AXValueSource$$.singleton;

        /**
         * What type of source this is.
         * <EMBED CLASS='external-html' DATA-D=Accessibility DATA-C=AXValueSourceType DATA-F=type DATA-FILE-ID=CDP.EL2>
         * @see BaseType#enumStrList(String)
         */
        public final String type;

        /**
         * The value of this property source.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue value;

        /**
         * The name of the relevant attribute, if any.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final String attribute;

        /**
         * The value of the relevant attribute, if any.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue attributeValue;

        /**
         * Whether this source is superseded by a higher priority source.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Boolean superseded;

        /**
         * The native markup source for this value, e.g. a <CODE>{@code <label>}</CODE> element.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         * <EMBED CLASS='external-html' DATA-D=Accessibility DATA-C=AXValueNativeSourceType DATA-F=nativeSource DATA-FILE-ID=CDP.EL2>
         * @see BaseType#enumStrList(String)
         */
        public final String nativeSource;

        /**
         * The value, such as a node or node list, of the native source.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Accessibility.AXValue nativeSourceValue;

        /**
         * Whether the value for this property is invalid.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final Boolean invalid;

        /**
         * Reason for the value being invalid, if it is.
         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
         */
        public final String invalidReason;

        /** Constructor.  Please review this class' fields for documentation. */
        public AXValueSource(
                ReadOnlyList<Boolean> isPresent, String type, AXValue value, String attribute,
                AXValue attributeValue, Boolean superseded, String nativeSource,
                AXValue nativeSourceValue, Boolean invalid, String invalidReason
            )
        {
            super(singleton, Domains.Accessibility, "AXValueSource", 9);

            this.type               = type;
            this.value              = value;
            this.attribute          = attribute;
            this.attributeValue     = attributeValue;
            this.superseded         = superseded;
            this.nativeSource       = nativeSource;
            this.nativeSourceValue  = nativeSourceValue;
            this.invalid            = invalid;
            this.invalidReason      = invalidReason;

            this.isPresent = (isPresent == null)
                ? singleton.generateIsPresentList(this)
                : THROWS.check(isPresent, 9, "Accessibility.AXValueSource");
        }

        /** Creates an instance of this class from a {@link JsonObject}.*/
        public static AXValueSource fromJSON(JsonObject jo)
        { return singleton.fromJSON(jo); }

        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
        public static NestedDescriptor<AXValueSource> descriptor()
        { return singleton.descriptor(); }
    }


    // ********************************************************************************************
    // ********************************************************************************************
    // Event Types
    // ********************************************************************************************
    // ********************************************************************************************


    /**
     * The loadComplete event mirrors the load complete event sent by the browser to assistive
     * technology when the web page has finished loading.
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * <EMBED CLASS=globalDefs DATA-DOMAIN=Accessibility DATA-API=BrowserAPI>
     */
    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
    public static class loadComplete
        extends BrowserEvent<loadComplete>
        implements java.io.Serializable
    {
        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
        protected static final long serialVersionUID = 1;

        private static final NestedHelper<Accessibility.loadComplete> singleton =
            Torello.Browser.BrowserAPI.NestedHelpers.Events.
                Accessibility$$loadComplete$$.singleton;

        /** New document root node. */
        public final Accessibility.AXNode root;

        /** Constructor.  Please review this class' fields for documentation. */
        public loadComplete(ReadOnlyList<Boolean> isPresent, AXNode root)
        {
            super(singleton, Domains.Accessibility, "loadComplete", 1);

            this.root = root;

            this.isPresent = (isPresent == null)
                ? singleton.generateIsPresentList(this)
                : THROWS.check(isPresent, 1, "Accessibility.loadComplete");
        }

        /** Creates an instance of this class from a {@link JsonObject}.*/
        public static loadComplete fromJSON(JsonObject jo)
        { return singleton.fromJSON(jo); }

        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
        public static NestedDescriptor<loadComplete> descriptor()
        { return singleton.descriptor(); }
    }

    /**
     * The nodesUpdated event is sent every time a previously requested node has changed the in tree.
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * <EMBED CLASS=globalDefs DATA-DOMAIN=Accessibility DATA-API=BrowserAPI>
     */
    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
    public static class nodesUpdated
        extends BrowserEvent<nodesUpdated>
        implements java.io.Serializable
    {
        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
        protected static final long serialVersionUID = 1;

        private static final NestedHelper<Accessibility.nodesUpdated> singleton =
            Torello.Browser.BrowserAPI.NestedHelpers.Events.
                Accessibility$$nodesUpdated$$.singleton;

        /** Updated node data. */
        public final Accessibility.AXNode[] nodes;

        /** Constructor.  Please review this class' fields for documentation. */
        public nodesUpdated(ReadOnlyList<Boolean> isPresent, AXNode[] nodes)
        {
            super(singleton, Domains.Accessibility, "nodesUpdated", 1);

            this.nodes = nodes;

            this.isPresent = (isPresent == null)
                ? singleton.generateIsPresentList(this)
                : THROWS.check(isPresent, 1, "Accessibility.nodesUpdated");
        }

        /** Creates an instance of this class from a {@link JsonObject}.*/
        public static nodesUpdated fromJSON(JsonObject jo)
        { return singleton.fromJSON(jo); }

        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
        public static NestedDescriptor<nodesUpdated> descriptor()
        { return singleton.descriptor(); }
    }




    // ********************************************************************************************
    // ********************************************************************************************
    // Commands
    // ********************************************************************************************
    // ********************************************************************************************


    /**
     * Disables the accessibility domain.
     * 
     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
     *
     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
     * browser receives the invocation-request.
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
     * the Browser Function has run to completion.
     * </DIV>
     */
    public static Script<Void> disable()
    {
        // Ultra-Simple Request JSON - Because this method has no parameters
        final String requestJSON = "{\"method\":\"Accessibility.disable\"}";

        return Script.NO_RET(Domains.Accessibility, "disable", requestJSON);
    }

    /**
     * Enables the accessibility domain which causes <CODE>AXNodeId</CODE>s to remain consistent between method calls.
     * This turns on accessibility for the page, which can impact performance until accessibility is disabled.
     * 
     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
     *
     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
     * browser receives the invocation-request.
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
     * the Browser Function has run to completion.
     * </DIV>
     */
    public static Script<Void> enable()
    {
        // Ultra-Simple Request JSON - Because this method has no parameters
        final String requestJSON = "{\"method\":\"Accessibility.enable\"}";

        return Script.NO_RET(Domains.Accessibility, "enable", requestJSON);
    }

    /**
     * Fetches a node and all ancestors up to and including the root.
     * Requires <CODE>enable()</CODE> to have been called previously.
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * 
     * @param nodeId Identifier of the node to get.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param backendNodeId Identifier of the backend node to get.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param objectId JavaScript object id of the node wrapper to get.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @return An instance of <CODE>{@link Script}&lt;{@link Accessibility.AXNode}[]&gt;</CODE>
     * 
     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
     * <CODE>&lt;{@link Accessibility.AXNode}[]&gt;</CODE> will be returned
     *
     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
     * be retrieved.</I>
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser Function's {@code Promise} returns:
     * <CODE>{@link Accessibility.AXNode}[] (<B>nodes</B>)</CODE>
     * </DIV>
     */
    public static Script<Accessibility.AXNode[]> getAXNodeAndAncestors
        (Integer nodeId, Integer backendNodeId, String objectId)
    {
        // Convert all Method Parameters into a JSON Request-Object (as a String)
        final String requestJSON = WriteJSON.get(
            Accessibility$$Commands.getAXNodeAndAncestors$$, "Accessibility.getAXNodeAndAncestors",
            nodeId, backendNodeId, objectId
        );

        return new Script<>(
            Domains.Accessibility, "getAXNodeAndAncestors", requestJSON,
            Accessibility$$Commands::getAXNodeAndAncestors,
            Accessibility.AXNode[].class
        );
    }

    /**
     * Fetches a particular accessibility node by AXNodeId.
     * Requires <CODE>enable()</CODE> to have been called previously.
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * 
     * @param id -
     * 
     * @param frameId 
     * The frame in whose document the node resides.
     * If omitted, the root frame is used.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @return An instance of <CODE>{@link Script}&lt;{@link Accessibility.AXNode}[]&gt;</CODE>
     * 
     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
     * <CODE>&lt;{@link Accessibility.AXNode}[]&gt;</CODE> will be returned
     *
     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
     * be retrieved.</I>
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser Function's {@code Promise} returns:
     * <CODE>{@link Accessibility.AXNode}[] (<B>nodes</B>)</CODE>
     * </DIV>
     */
    public static Script<Accessibility.AXNode[]> getChildAXNodes(String id, String frameId)
    {
        // Convert all Method Parameters into a JSON Request-Object (as a String)
        final String requestJSON = WriteJSON.get(
            Accessibility$$Commands.getChildAXNodes$$, "Accessibility.getChildAXNodes",
            id, frameId
        );

        return new Script<>(
            Domains.Accessibility, "getChildAXNodes", requestJSON,
            Accessibility$$Commands::getChildAXNodes,
            Accessibility.AXNode[].class
        );
    }

    /**
     * Fetches the entire accessibility tree for the root Document
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * 
     * @param depth 
     * The maximum depth at which descendants of the root node should be retrieved.
     * If omitted, the full tree is returned.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param frameId 
     * The frame for whose document the AX tree should be retrieved.
     * If omitted, the root frame is used.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @return An instance of <CODE>{@link Script}&lt;{@link Accessibility.AXNode}[]&gt;</CODE>
     * 
     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
     * <CODE>&lt;{@link Accessibility.AXNode}[]&gt;</CODE> will be returned
     *
     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
     * be retrieved.</I>
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser Function's {@code Promise} returns:
     * <CODE>{@link Accessibility.AXNode}[] (<B>nodes</B>)</CODE>
     * </DIV>
     */
    public static Script<Accessibility.AXNode[]> getFullAXTree(Integer depth, String frameId)
    {
        // Convert all Method Parameters into a JSON Request-Object (as a String)
        final String requestJSON = WriteJSON.get(
            Accessibility$$Commands.getFullAXTree$$, "Accessibility.getFullAXTree",
            depth, frameId
        );

        return new Script<>(
            Domains.Accessibility, "getFullAXTree", requestJSON,
            Accessibility$$Commands::getFullAXTree,
            Accessibility.AXNode[].class
        );
    }

    /**
     * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * 
     * @param nodeId Identifier of the node to get the partial accessibility tree for.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param backendNodeId Identifier of the backend node to get the partial accessibility tree for.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param objectId JavaScript object id of the node wrapper to get the partial accessibility tree for.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param fetchRelatives Whether to fetch this node's ancestors, siblings and children. Defaults to true.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @return An instance of <CODE>{@link Script}&lt;{@link Accessibility.AXNode}[]&gt;</CODE>
     * 
     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
     * <CODE>&lt;{@link Accessibility.AXNode}[]&gt;</CODE> will be returned
     *
     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
     * be retrieved.</I>
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser Function's {@code Promise} returns:
     * <CODE>{@link Accessibility.AXNode}[] (<B>nodes</B>)</CODE>
     * <BR />
     * The <CODE>Accessibility.AXNode</CODE> for this DOM node, if it exists, plus its ancestors, siblings and
     *     children, if requested.
     * </DIV>
     */
    public static Script<Accessibility.AXNode[]> getPartialAXTree
        (Integer nodeId, Integer backendNodeId, String objectId, Boolean fetchRelatives)
    {
        // Convert all Method Parameters into a JSON Request-Object (as a String)
        final String requestJSON = WriteJSON.get(
            Accessibility$$Commands.getPartialAXTree$$, "Accessibility.getPartialAXTree",
            nodeId, backendNodeId, objectId, fetchRelatives
        );

        return new Script<>(
            Domains.Accessibility, "getPartialAXTree", requestJSON,
            Accessibility$$Commands::getPartialAXTree,
            Accessibility.AXNode[].class
        );
    }

    /**
     * Fetches the root node.
     * Requires <CODE>enable()</CODE> to have been called previously.
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * 
     * @param frameId 
     * The frame in whose document the node resides.
     * If omitted, the root frame is used.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @return An instance of <CODE>{@link Script}&lt;{@link Accessibility.AXNode}&gt;</CODE>
     * 
     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
     * <CODE>&lt;{@link Accessibility.AXNode}&gt;</CODE> will be returned
     *
     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
     * be retrieved.</I>
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser Function's {@code Promise} returns:
     * <CODE>{@link Accessibility.AXNode} (<B>node</B>)</CODE>
     * </DIV>
     */
    public static Script<Accessibility.AXNode> getRootAXNode(String frameId)
    {
        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
        final String requestJSON = WriteJSON.get
            (CDPTypes.STRING, "frameId", true, "Accessibility.getRootAXNode", frameId);

        return new Script<>(
            Domains.Accessibility, "getRootAXNode", requestJSON,
            Accessibility$$Commands::getRootAXNode,
            Accessibility.AXNode.class
        );
    }

    /**
     * Query a DOM node's accessibility subtree for accessible name and role.
     * This command computes the name and role for all nodes in the subtree, including those that are
     * ignored for accessibility, and returns those that match the specified name and role. If no DOM
     * node is specified, or the DOM node does not exist, the command returns an error. If neither
     * <CODE>accessibleName</CODE> or <CODE>role</CODE> is specified, it returns all the accessibility nodes in the subtree.
     * 
     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
     * 
     * <BR /><BR /><DIV CLASS=JDHint>
     * 👍 Because of the sheer number of input parameters to this method, there is a
     * a {@link CommandBuilder} variant to this method which may be invoked instead.
     * 
     * <BR /><BR />
     * Please View: {@link #queryAXTree()}
     * </DIV>
     * 
     * @param nodeId Identifier of the node for the root to query.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param backendNodeId Identifier of the backend node for the root to query.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param objectId JavaScript object id of the node wrapper for the root to query.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param accessibleName Find nodes with this computed name.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @param role Find nodes with this computed role.
     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
     * 
     * @return An instance of <CODE>{@link Script}&lt;{@link Accessibility.AXNode}[]&gt;</CODE>
     * 
     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
     * <CODE>&lt;{@link Accessibility.AXNode}[]&gt;</CODE> will be returned
     *
     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
     * be retrieved.</I>
     *
     * <BR /><BR /><DIV CLASS=JDHint>
     * This Browser Function's {@code Promise} returns:
     * <CODE>{@link Accessibility.AXNode}[] (<B>nodes</B>)</CODE>
     * <BR />
     * A list of <CODE>Accessibility.AXNode</CODE> matching the specified attributes,
     *     including nodes that are ignored for accessibility.
     * </DIV>
     */
    public static Script<Accessibility.AXNode[]> queryAXTree(
            Integer nodeId, Integer backendNodeId, String objectId, String accessibleName,
            String role
        )
    {
        // Convert all Method Parameters into a JSON Request-Object (as a String)
        final String requestJSON = WriteJSON.get(
            Accessibility$$Commands.queryAXTree$$, "Accessibility.queryAXTree",
            nodeId, backendNodeId, objectId, accessibleName, role
        );

        return new Script<>(
            Domains.Accessibility, "queryAXTree", requestJSON,
            Accessibility$$Commands::queryAXTree,
            Accessibility.AXNode[].class
        );
    }


    // ********************************************************************************************
    // ********************************************************************************************
    // CommandBuilder Getter-Methods
    // ********************************************************************************************
    // ********************************************************************************************


    /**
     * Creates a buider for conveniently assigning parameters to this method.
     * 
     * <BR /><BR /><DIV CLASS=JDHint>
     * Note that the original method expects 5 parameters, and can be cumbersome.
     * </DIV>
     * 
     * @return {@link CommandBuilder} instance, for assigning parameter values, one by one.
     * @see #queryAXTree
     */
    public static CommandBuilder<Accessibility.AXNode[]> queryAXTree()
    { return CommandBuilder.builder(Accessibility$$Commands.queryAXTree$$); }


}