001package Torello.Browser.JavaScriptAPI;
002
003// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
004// Java-HTML Imports
005// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
006
007import Torello.Browser.*;
008import Torello.Browser.helper.*;
009import Torello.Browser.BrowserAPI.*;
010import Torello.JSON.*;
011
012import Torello.Java.ReadOnly.ReadOnlyList;
013import Torello.Java.ReadOnly.ReadOnlyArrayList;
014
015import Torello.JavaDoc.Annotations.StaticFunctional;
016import Torello.JavaDoc.Annotations.JDHeaderBackgroundImg;
017
018import Torello.Browser.JavaScriptAPI.NestedHelpers.Commands.RunTime$$Commands;
019
020
021// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
022// JDK Imports
023// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
024
025import javax.json.JsonObject;
026import javax.json.JsonValue;
027
028/**
029 * <SPAN CLASS=COPIEDJDK><B>RunTime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
030 * Evaluation results are returned as mirror object that expose object type, string representation
031 * and unique identifier that can be used for further object reference. Original objects are
032 * maintained in memory unless they are either explicitly released or are released along with the
033 * other objects in their object group.</B></SPAN>
034 * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.CODE_GEN_NOTE>
035 */
036@StaticFunctional@JDHeaderBackgroundImg(EmbedTagFileID="CDP.WOOD_PLANK_NOTE")
037public class RunTime
038{
039    // No Pubic Constructors
040    private RunTime() { }
041
042
043    // ********************************************************************************************
044    // ********************************************************************************************
045    // Eliminated Types
046    // ********************************************************************************************
047    // ********************************************************************************************
048
049
050    /**
051     * Id of an execution context.
052
053     * <EMBED CLASS='external-html' DATA-CTAS='int' DATA-FILE-ID=CDP.EliminatedType
054     *     DATA-NAME=ExecutionContextId>
055     */
056    public static final String ExecutionContextId =
057        "ExecutionContextId has been eliminated.\n" +
058        "It was replaced with the standard Java-Type: int";
059
060    /**
061     * Unique object identifier.
062
063     * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType
064     *     DATA-NAME=RemoteObjectId>
065     */
066    public static final String RemoteObjectId =
067        "RemoteObjectId has been eliminated.\n" +
068        "It was replaced with the standard Java-Type: String";
069
070    /**
071     * Unique script identifier.
072
073     * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType
074     *     DATA-NAME=ScriptId>
075     */
076    public static final String ScriptId =
077        "ScriptId has been eliminated.\n" +
078        "It was replaced with the standard Java-Type: String";
079
080    /**
081     * Number of milliseconds.
082
083     * <EMBED CLASS='external-html' DATA-CTAS='Number' DATA-FILE-ID=CDP.EliminatedType
084     *     DATA-NAME=TimeDelta>
085     */
086    public static final String TimeDelta =
087        "TimeDelta has been eliminated.\n" +
088        "It was replaced with the standard Java-Type: Number";
089
090    /**
091     * Number of milliseconds since epoch.
092
093     * <EMBED CLASS='external-html' DATA-CTAS='Number' DATA-FILE-ID=CDP.EliminatedType
094     *     DATA-NAME=Timestamp>
095     */
096    public static final String Timestamp =
097        "Timestamp has been eliminated.\n" +
098        "It was replaced with the standard Java-Type: Number";
099
100    /**
101     * Unique identifier of current debugger.
102     * 
103     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
104
105     * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType
106     *     DATA-NAME=UniqueDebuggerId>
107     */
108    public static final String UniqueDebuggerId =
109        "UniqueDebuggerId has been eliminated.\n" +
110        "It was replaced with the standard Java-Type: String";
111
112    /**
113     * Primitive value which cannot be JSON-stringified. Includes values <CODE>-0</CODE>, <CODE>NaN</CODE>, <CODE>Infinity</CODE>,
114     * <CODE>-Infinity</CODE>, and bigint literals.
115
116     * <EMBED CLASS='external-html' DATA-CTAS='String' DATA-FILE-ID=CDP.EliminatedType
117     *     DATA-NAME=UnserializableValue>
118     */
119    public static final String UnserializableValue =
120        "UnserializableValue has been eliminated.\n" +
121        "It was replaced with the standard Java-Type: String";
122
123
124    // ********************************************************************************************
125    // ********************************************************************************************
126    // Marker Events
127    // ********************************************************************************************
128    // ********************************************************************************************
129
130
131    /**
132     * Issued when all executionContexts were cleared in browser
133
134     * 
135     * <EMBED CLASS='external-html' DATA-FILE-ID=CDP.MarkerEvent
136     *     DATA-NAME=executionContextsCleared>
137     */
138    public static final String executionContextsCleared = "RunTime.executionContextsCleared Marker Event";
139
140
141
142    // ********************************************************************************************
143    // ********************************************************************************************
144    // Basic Types
145    // ********************************************************************************************
146    // ********************************************************************************************
147
148
149    /**
150     * Represents function call argument. Either remote object id <CODE>objectId</CODE>, primitive <CODE>value</CODE>,
151     * unserializable primitive value or neither of (for undefined) them should be specified.
152     * 
153     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
154     */
155    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
156    public static class CallArgument
157        extends BaseType<CallArgument>
158        implements java.io.Serializable
159    {
160        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
161        protected static final long serialVersionUID = 1;
162
163        private static final NestedHelper<RunTime.CallArgument> singleton =
164            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
165                RunTime$$CallArgument$$.singleton;
166
167        /**
168         * Primitive value or serializable javascript object.
169         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
170         */
171        public final JsonValue value;
172
173        /**
174         * Primitive value which can not be JSON-stringified.
175         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
176         */
177        public final String unserializableValue;
178
179        /**
180         * Remote object handle.
181         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
182         */
183        public final String objectId;
184
185        /** Constructor.  Please review this class' fields for documentation. */
186        public CallArgument(
187                ReadOnlyList<Boolean> isPresent, JsonValue value, String unserializableValue,
188                String objectId
189            )
190        {
191            super(singleton, Domains.RunTime, "CallArgument", 3);
192
193            this.value                  = value;
194            this.unserializableValue    = unserializableValue;
195            this.objectId               = objectId;
196
197            this.isPresent = (isPresent == null)
198                ? singleton.generateIsPresentList(this)
199                : THROWS.check(isPresent, 3, "RunTime.CallArgument");
200        }
201
202        /** Creates an instance of this class from a {@link JsonObject}.*/
203        public static CallArgument fromJSON(JsonObject jo)
204        { return singleton.fromJSON(jo); }
205
206        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
207        public static NestedDescriptor<CallArgument> descriptor()
208        { return singleton.descriptor(); }
209    }
210
211    /**
212     * Stack entry for runtime errors and assertions.
213     * 
214     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
215     */
216    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
217    public static class CallFrame
218        extends BaseType<CallFrame>
219        implements java.io.Serializable
220    {
221        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
222        protected static final long serialVersionUID = 1;
223
224        private static final NestedHelper<RunTime.CallFrame> singleton =
225            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
226                RunTime$$CallFrame$$.singleton;
227
228        /** JavaScript function name. */
229        public final String functionName;
230
231        /** JavaScript script id. */
232        public final String scriptId;
233
234        /** JavaScript script name or url. */
235        public final String url;
236
237        /** JavaScript script line number (0-based). */
238        public final int lineNumber;
239
240        /** JavaScript script column number (0-based). */
241        public final int columnNumber;
242
243        /** Constructor.  Please review this class' fields for documentation. */
244        public CallFrame(
245                ReadOnlyList<Boolean> isPresent, String functionName, String scriptId, String url,
246                int lineNumber, int columnNumber
247            )
248        {
249            super(singleton, Domains.RunTime, "CallFrame", 5);
250
251            this.functionName   = functionName;
252            this.scriptId       = scriptId;
253            this.url            = url;
254            this.lineNumber     = lineNumber;
255            this.columnNumber   = columnNumber;
256
257            this.isPresent = (isPresent == null)
258                ? singleton.generateIsPresentList(this)
259                : THROWS.check(isPresent, 5, "RunTime.CallFrame");
260        }
261
262        /** Creates an instance of this class from a {@link JsonObject}.*/
263        public static CallFrame fromJSON(JsonObject jo)
264        { return singleton.fromJSON(jo); }
265
266        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
267        public static NestedDescriptor<CallFrame> descriptor()
268        { return singleton.descriptor(); }
269    }
270
271    /**
272     * <CODE>[No Description Provided by Google]</CODE>
273     * 
274     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
275     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
276     */
277    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
278    public static class CustomPreview
279        extends BaseType<CustomPreview>
280        implements java.io.Serializable
281    {
282        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
283        protected static final long serialVersionUID = 1;
284
285        private static final NestedHelper<RunTime.CustomPreview> singleton =
286            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
287                RunTime$$CustomPreview$$.singleton;
288
289        /**
290         * The JSON-stringified result of formatter.header(object, config) call.
291         * It contains json ML array that represents RemoteObject.
292         */
293        public final String header;
294
295        /**
296         * If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
297         * contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
298         * The result value is json ML array.
299         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
300         */
301        public final String bodyGetterId;
302
303        /** Constructor.  Please review this class' fields for documentation. */
304        public CustomPreview(ReadOnlyList<Boolean> isPresent, String header, String bodyGetterId)
305        {
306            super(singleton, Domains.RunTime, "CustomPreview", 2);
307
308            this.header         = header;
309            this.bodyGetterId   = bodyGetterId;
310
311            this.isPresent = (isPresent == null)
312                ? singleton.generateIsPresentList(this)
313                : THROWS.check(isPresent, 2, "RunTime.CustomPreview");
314        }
315
316        /** Creates an instance of this class from a {@link JsonObject}.*/
317        public static CustomPreview fromJSON(JsonObject jo)
318        { return singleton.fromJSON(jo); }
319
320        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
321        public static NestedDescriptor<CustomPreview> descriptor()
322        { return singleton.descriptor(); }
323    }
324
325    /**
326     * Represents deep serialized value.
327     * 
328     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
329     */
330    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
331    public static class DeepSerializedValue
332        extends BaseType<DeepSerializedValue>
333        implements java.io.Serializable
334    {
335        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
336        protected static final long serialVersionUID = 1;
337
338        private static final NestedHelper<RunTime.DeepSerializedValue> singleton =
339            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
340                RunTime$$DeepSerializedValue$$.singleton;
341
342        /**
343         * <CODE>[No Description Provided by Google]</CODE>
344         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=DeepSerializedValue DATA-F=type DATA-FILE-ID=CDP.EL1>
345         * @see BaseType#enumStrList(String)
346         */
347        public final String type;
348
349        /**
350         * <CODE>[No Description Provided by Google]</CODE>
351         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
352         */
353        public final JsonValue value;
354
355        /**
356         * <CODE>[No Description Provided by Google]</CODE>
357         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
358         */
359        public final String objectId;
360
361        /**
362         * Set if value reference met more then once during serialization. In such
363         * case, value is provided only to one of the serialized values. Unique
364         * per value in the scope of one CDP call.
365         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
366         */
367        public final Integer weakLocalObjectReference;
368
369        /** Constructor.  Please review this class' fields for documentation. */
370        public DeepSerializedValue(
371                ReadOnlyList<Boolean> isPresent, String type, JsonValue value, String objectId,
372                Integer weakLocalObjectReference
373            )
374        {
375            super(singleton, Domains.RunTime, "DeepSerializedValue", 4);
376
377            this.type                       = type;
378            this.value                      = value;
379            this.objectId                   = objectId;
380            this.weakLocalObjectReference   = weakLocalObjectReference;
381
382            this.isPresent = (isPresent == null)
383                ? singleton.generateIsPresentList(this)
384                : THROWS.check(isPresent, 4, "RunTime.DeepSerializedValue");
385        }
386
387        /** Creates an instance of this class from a {@link JsonObject}.*/
388        public static DeepSerializedValue fromJSON(JsonObject jo)
389        { return singleton.fromJSON(jo); }
390
391        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
392        public static NestedDescriptor<DeepSerializedValue> descriptor()
393        { return singleton.descriptor(); }
394    }
395
396    /**
397     * <CODE>[No Description Provided by Google]</CODE>
398     * 
399     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
400     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
401     */
402    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
403    public static class EntryPreview
404        extends BaseType<EntryPreview>
405        implements java.io.Serializable
406    {
407        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
408        protected static final long serialVersionUID = 1;
409
410        private static final NestedHelper<RunTime.EntryPreview> singleton =
411            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
412                RunTime$$EntryPreview$$.singleton;
413
414        /**
415         * Preview of the key. Specified for map-like collection entries.
416         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
417         */
418        public final RunTime.ObjectPreview key;
419
420        /** Preview of the value. */
421        public final RunTime.ObjectPreview value;
422
423        /** Constructor.  Please review this class' fields for documentation. */
424        public EntryPreview
425            (ReadOnlyList<Boolean> isPresent, ObjectPreview key, ObjectPreview value)
426        {
427            super(singleton, Domains.RunTime, "EntryPreview", 2);
428
429            this.key    = key;
430            this.value  = value;
431
432            this.isPresent = (isPresent == null)
433                ? singleton.generateIsPresentList(this)
434                : THROWS.check(isPresent, 2, "RunTime.EntryPreview");
435        }
436
437        /** Creates an instance of this class from a {@link JsonObject}.*/
438        public static EntryPreview fromJSON(JsonObject jo)
439        { return singleton.fromJSON(jo); }
440
441        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
442        public static NestedDescriptor<EntryPreview> descriptor()
443        { return singleton.descriptor(); }
444    }
445
446    /**
447     * Detailed information about exception (or error) that was thrown during script compilation or
448     * execution.
449     * 
450     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
451     */
452    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
453    public static class ExceptionDetails
454        extends BaseType<ExceptionDetails>
455        implements java.io.Serializable
456    {
457        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
458        protected static final long serialVersionUID = 1;
459
460        private static final NestedHelper<RunTime.ExceptionDetails> singleton =
461            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
462                RunTime$$ExceptionDetails$$.singleton;
463
464        /** Exception id. */
465        public final int exceptionId;
466
467        /** Exception text, which should be used together with exception object when available. */
468        public final String text;
469
470        /** Line number of the exception location (0-based). */
471        public final int lineNumber;
472
473        /** Column number of the exception location (0-based). */
474        public final int columnNumber;
475
476        /**
477         * Script ID of the exception location.
478         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
479         */
480        public final String scriptId;
481
482        /**
483         * URL of the exception location, to be used when the script was not reported.
484         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
485         */
486        public final String url;
487
488        /**
489         * JavaScript stack trace if available.
490         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
491         */
492        public final RunTime.StackTrace stackTrace;
493
494        /**
495         * Exception object if available.
496         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
497         */
498        public final RunTime.RemoteObject exception;
499
500        /**
501         * Identifier of the context where exception happened.
502         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
503         */
504        public final Integer executionContextId;
505
506        /**
507         * Dictionary with entries of meta data that the client associated
508         * with this exception, such as information about associated network
509         * requests, etc.
510         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
511         */
512        public final JsonValue exceptionMetaData;
513
514        /** Constructor.  Please review this class' fields for documentation. */
515        public ExceptionDetails(
516                ReadOnlyList<Boolean> isPresent, int exceptionId, String text, int lineNumber,
517                int columnNumber, String scriptId, String url, StackTrace stackTrace,
518                RemoteObject exception, Integer executionContextId, JsonValue exceptionMetaData
519            )
520        {
521            super(singleton, Domains.RunTime, "ExceptionDetails", 10);
522
523            this.exceptionId        = exceptionId;
524            this.text               = text;
525            this.lineNumber         = lineNumber;
526            this.columnNumber       = columnNumber;
527            this.scriptId           = scriptId;
528            this.url                = url;
529            this.stackTrace         = stackTrace;
530            this.exception          = exception;
531            this.executionContextId = executionContextId;
532            this.exceptionMetaData  = exceptionMetaData;
533
534            this.isPresent = (isPresent == null)
535                ? singleton.generateIsPresentList(this)
536                : THROWS.check(isPresent, 10, "RunTime.ExceptionDetails");
537        }
538
539        /** Creates an instance of this class from a {@link JsonObject}.*/
540        public static ExceptionDetails fromJSON(JsonObject jo)
541        { return singleton.fromJSON(jo); }
542
543        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
544        public static NestedDescriptor<ExceptionDetails> descriptor()
545        { return singleton.descriptor(); }
546    }
547
548    /**
549     * Description of an isolated world.
550     * 
551     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
552     */
553    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
554    public static class ExecutionContextDescription
555        extends BaseType<ExecutionContextDescription>
556        implements java.io.Serializable
557    {
558        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
559        protected static final long serialVersionUID = 1;
560
561        private static final NestedHelper<RunTime.ExecutionContextDescription> singleton =
562            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
563                RunTime$$ExecutionContextDescription$$.singleton;
564
565        /**
566         * Unique id of the execution context. It can be used to specify in which execution context
567         * script evaluation should be performed.
568         */
569        public final int id;
570
571        /** Execution context origin. */
572        public final String origin;
573
574        /** Human readable name describing given context. */
575        public final String name;
576
577        /**
578         * A system-unique execution context identifier. Unlike the id, this is unique across
579         * multiple processes, so can be reliably used to identify specific context while backend
580         * performs a cross-process navigation.
581         * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
582         */
583        public final String uniqueId;
584
585        /**
586         * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
587         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
588         */
589        public final JsonValue auxData;
590
591        /** Constructor.  Please review this class' fields for documentation. */
592        public ExecutionContextDescription(
593                ReadOnlyList<Boolean> isPresent, int id, String origin, String name,
594                String uniqueId, JsonValue auxData
595            )
596        {
597            super(singleton, Domains.RunTime, "ExecutionContextDescription", 5);
598
599            this.id         = id;
600            this.origin     = origin;
601            this.name       = name;
602            this.uniqueId   = uniqueId;
603            this.auxData    = auxData;
604
605            this.isPresent = (isPresent == null)
606                ? singleton.generateIsPresentList(this)
607                : THROWS.check(isPresent, 5, "RunTime.ExecutionContextDescription");
608        }
609
610        /** Creates an instance of this class from a {@link JsonObject}.*/
611        public static ExecutionContextDescription fromJSON(JsonObject jo)
612        { return singleton.fromJSON(jo); }
613
614        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
615        public static NestedDescriptor<ExecutionContextDescription> descriptor()
616        { return singleton.descriptor(); }
617    }
618
619    /**
620     * Object internal property descriptor. This property isn't normally visible in JavaScript code.
621     * 
622     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
623     */
624    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
625    public static class InternalPropertyDescriptor
626        extends BaseType<InternalPropertyDescriptor>
627        implements java.io.Serializable
628    {
629        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
630        protected static final long serialVersionUID = 1;
631
632        private static final NestedHelper<RunTime.InternalPropertyDescriptor> singleton =
633            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
634                RunTime$$InternalPropertyDescriptor$$.singleton;
635
636        /** Conventional property name. */
637        public final String name;
638
639        /**
640         * The value associated with the property.
641         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
642         */
643        public final RunTime.RemoteObject value;
644
645        /** Constructor.  Please review this class' fields for documentation. */
646        public InternalPropertyDescriptor
647            (ReadOnlyList<Boolean> isPresent, String name, RemoteObject value)
648        {
649            super(singleton, Domains.RunTime, "InternalPropertyDescriptor", 2);
650
651            this.name   = name;
652            this.value  = value;
653
654            this.isPresent = (isPresent == null)
655                ? singleton.generateIsPresentList(this)
656                : THROWS.check(isPresent, 2, "RunTime.InternalPropertyDescriptor");
657        }
658
659        /** Creates an instance of this class from a {@link JsonObject}.*/
660        public static InternalPropertyDescriptor fromJSON(JsonObject jo)
661        { return singleton.fromJSON(jo); }
662
663        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
664        public static NestedDescriptor<InternalPropertyDescriptor> descriptor()
665        { return singleton.descriptor(); }
666    }
667
668    /**
669     * Object containing abbreviated remote object value.
670     * 
671     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
672     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
673     */
674    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
675    public static class ObjectPreview
676        extends BaseType<ObjectPreview>
677        implements java.io.Serializable
678    {
679        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
680        protected static final long serialVersionUID = 1;
681
682        private static final NestedHelper<RunTime.ObjectPreview> singleton =
683            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
684                RunTime$$ObjectPreview$$.singleton;
685
686        /**
687         * Object type.
688         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=ObjectPreview DATA-F=type DATA-FILE-ID=CDP.EL1>
689         * @see BaseType#enumStrList(String)
690         */
691        public final String type;
692
693        /**
694         * Object subtype hint. Specified for <CODE>object</CODE> type values only.
695         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
696         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=ObjectPreview DATA-F=subtype DATA-FILE-ID=CDP.EL1>
697         * @see BaseType#enumStrList(String)
698         */
699        public final String subtype;
700
701        /**
702         * String representation of the object.
703         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
704         */
705        public final String description;
706
707        /** True iff some of the properties or entries of the original object did not fit. */
708        public final boolean overflow;
709
710        /** List of the properties. */
711        public final RunTime.PropertyPreview[] properties;
712
713        /**
714         * List of the entries. Specified for <CODE>map</CODE> and <CODE>set</CODE> subtype values only.
715         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
716         */
717        public final RunTime.EntryPreview[] entries;
718
719        /** Constructor.  Please review this class' fields for documentation. */
720        public ObjectPreview(
721                ReadOnlyList<Boolean> isPresent, String type, String subtype, String description,
722                boolean overflow, PropertyPreview[] properties, EntryPreview[] entries
723            )
724        {
725            super(singleton, Domains.RunTime, "ObjectPreview", 6);
726
727            this.type           = type;
728            this.subtype        = subtype;
729            this.description    = description;
730            this.overflow       = overflow;
731            this.properties     = properties;
732            this.entries        = entries;
733
734            this.isPresent = (isPresent == null)
735                ? singleton.generateIsPresentList(this)
736                : THROWS.check(isPresent, 6, "RunTime.ObjectPreview");
737        }
738
739        /** Creates an instance of this class from a {@link JsonObject}.*/
740        public static ObjectPreview fromJSON(JsonObject jo)
741        { return singleton.fromJSON(jo); }
742
743        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
744        public static NestedDescriptor<ObjectPreview> descriptor()
745        { return singleton.descriptor(); }
746    }
747
748    /**
749     * Object private field descriptor.
750     * 
751     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
752     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
753     */
754    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
755    public static class PrivatePropertyDescriptor
756        extends BaseType<PrivatePropertyDescriptor>
757        implements java.io.Serializable
758    {
759        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
760        protected static final long serialVersionUID = 1;
761
762        private static final NestedHelper<RunTime.PrivatePropertyDescriptor> singleton =
763            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
764                RunTime$$PrivatePropertyDescriptor$$.singleton;
765
766        /** Private property name. */
767        public final String name;
768
769        /**
770         * The value associated with the private property.
771         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
772         */
773        public final RunTime.RemoteObject value;
774
775        /**
776         * A function which serves as a getter for the private property,
777         * or <CODE>undefined</CODE> if there is no getter (accessor descriptors only).
778         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
779         */
780        public final RunTime.RemoteObject get;
781
782        /**
783         * A function which serves as a setter for the private property,
784         * or <CODE>undefined</CODE> if there is no setter (accessor descriptors only).
785         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
786         */
787        public final RunTime.RemoteObject set;
788
789        /** Constructor.  Please review this class' fields for documentation. */
790        public PrivatePropertyDescriptor(
791                ReadOnlyList<Boolean> isPresent, String name, RemoteObject value, RemoteObject get,
792                RemoteObject set
793            )
794        {
795            super(singleton, Domains.RunTime, "PrivatePropertyDescriptor", 4);
796
797            this.name   = name;
798            this.value  = value;
799            this.get    = get;
800            this.set    = set;
801
802            this.isPresent = (isPresent == null)
803                ? singleton.generateIsPresentList(this)
804                : THROWS.check(isPresent, 4, "RunTime.PrivatePropertyDescriptor");
805        }
806
807        /** Creates an instance of this class from a {@link JsonObject}.*/
808        public static PrivatePropertyDescriptor fromJSON(JsonObject jo)
809        { return singleton.fromJSON(jo); }
810
811        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
812        public static NestedDescriptor<PrivatePropertyDescriptor> descriptor()
813        { return singleton.descriptor(); }
814    }
815
816    /**
817     * Object property descriptor.
818     * 
819     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
820     */
821    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
822    public static class PropertyDescriptor
823        extends BaseType<PropertyDescriptor>
824        implements java.io.Serializable
825    {
826        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
827        protected static final long serialVersionUID = 1;
828
829        private static final NestedHelper<RunTime.PropertyDescriptor> singleton =
830            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
831                RunTime$$PropertyDescriptor$$.singleton;
832
833        /** Property name or symbol description. */
834        public final String name;
835
836        /**
837         * The value associated with the property.
838         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
839         */
840        public final RunTime.RemoteObject value;
841
842        /**
843         * True if the value associated with the property may be changed (data descriptors only).
844         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
845         */
846        public final Boolean writable;
847
848        /**
849         * A function which serves as a getter for the property, or <CODE>undefined</CODE> if there is no getter
850         * (accessor descriptors only).
851         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
852         */
853        public final RunTime.RemoteObject get;
854
855        /**
856         * A function which serves as a setter for the property, or <CODE>undefined</CODE> if there is no setter
857         * (accessor descriptors only).
858         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
859         */
860        public final RunTime.RemoteObject set;
861
862        /**
863         * True if the type of this property descriptor may be changed and if the property may be
864         * deleted from the corresponding object.
865         */
866        public final boolean configurable;
867
868        /**
869         * True if this property shows up during enumeration of the properties on the corresponding
870         * object.
871         */
872        public final boolean enumerable;
873
874        /**
875         * True if the result was thrown during the evaluation.
876         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
877         */
878        public final Boolean wasThrown;
879
880        /**
881         * True if the property is owned for the object.
882         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
883         */
884        public final Boolean isOwn;
885
886        /**
887         * Property symbol object, if the property is of the <CODE>symbol</CODE> type.
888         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
889         */
890        public final RunTime.RemoteObject symbol;
891
892        /** Constructor.  Please review this class' fields for documentation. */
893        public PropertyDescriptor(
894                ReadOnlyList<Boolean> isPresent, String name, RemoteObject value, Boolean writable,
895                RemoteObject get, RemoteObject set, boolean configurable, boolean enumerable,
896                Boolean wasThrown, Boolean isOwn, RemoteObject symbol
897            )
898        {
899            super(singleton, Domains.RunTime, "PropertyDescriptor", 10);
900
901            this.name           = name;
902            this.value          = value;
903            this.writable       = writable;
904            this.get            = get;
905            this.set            = set;
906            this.configurable   = configurable;
907            this.enumerable     = enumerable;
908            this.wasThrown      = wasThrown;
909            this.isOwn          = isOwn;
910            this.symbol         = symbol;
911
912            this.isPresent = (isPresent == null)
913                ? singleton.generateIsPresentList(this)
914                : THROWS.check(isPresent, 10, "RunTime.PropertyDescriptor");
915        }
916
917        /** Creates an instance of this class from a {@link JsonObject}.*/
918        public static PropertyDescriptor fromJSON(JsonObject jo)
919        { return singleton.fromJSON(jo); }
920
921        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
922        public static NestedDescriptor<PropertyDescriptor> descriptor()
923        { return singleton.descriptor(); }
924    }
925
926    /**
927     * <CODE>[No Description Provided by Google]</CODE>
928     * 
929     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
930     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
931     */
932    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
933    public static class PropertyPreview
934        extends BaseType<PropertyPreview>
935        implements java.io.Serializable
936    {
937        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
938        protected static final long serialVersionUID = 1;
939
940        private static final NestedHelper<RunTime.PropertyPreview> singleton =
941            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
942                RunTime$$PropertyPreview$$.singleton;
943
944        /** Property name. */
945        public final String name;
946
947        /**
948         * Object type. Accessor means that the property itself is an accessor property.
949         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=PropertyPreview DATA-F=type DATA-FILE-ID=CDP.EL1>
950         * @see BaseType#enumStrList(String)
951         */
952        public final String type;
953
954        /**
955         * User-friendly property value string.
956         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
957         */
958        public final String value;
959
960        /**
961         * Nested value preview.
962         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
963         */
964        public final RunTime.ObjectPreview valuePreview;
965
966        /**
967         * Object subtype hint. Specified for <CODE>object</CODE> type values only.
968         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
969         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=PropertyPreview DATA-F=subtype DATA-FILE-ID=CDP.EL1>
970         * @see BaseType#enumStrList(String)
971         */
972        public final String subtype;
973
974        /** Constructor.  Please review this class' fields for documentation. */
975        public PropertyPreview(
976                ReadOnlyList<Boolean> isPresent, String name, String type, String value,
977                ObjectPreview valuePreview, String subtype
978            )
979        {
980            super(singleton, Domains.RunTime, "PropertyPreview", 5);
981
982            this.name           = name;
983            this.type           = type;
984            this.value          = value;
985            this.valuePreview   = valuePreview;
986            this.subtype        = subtype;
987
988            this.isPresent = (isPresent == null)
989                ? singleton.generateIsPresentList(this)
990                : THROWS.check(isPresent, 5, "RunTime.PropertyPreview");
991        }
992
993        /** Creates an instance of this class from a {@link JsonObject}.*/
994        public static PropertyPreview fromJSON(JsonObject jo)
995        { return singleton.fromJSON(jo); }
996
997        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
998        public static NestedDescriptor<PropertyPreview> descriptor()
999        { return singleton.descriptor(); }
1000    }
1001
1002    /**
1003     * Mirror object referencing original JavaScript object.
1004     * 
1005     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1006     */
1007    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
1008    public static class RemoteObject
1009        extends BaseType<RemoteObject>
1010        implements java.io.Serializable
1011    {
1012        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1013        protected static final long serialVersionUID = 1;
1014
1015        private static final NestedHelper<RunTime.RemoteObject> singleton =
1016            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
1017                RunTime$$RemoteObject$$.singleton;
1018
1019        /**
1020         * Object type.
1021         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=RemoteObject DATA-F=type DATA-FILE-ID=CDP.EL1>
1022         * @see BaseType#enumStrList(String)
1023         */
1024        public final String type;
1025
1026        /**
1027         * Object subtype hint. Specified for <CODE>object</CODE> type values only.
1028         * NOTE: If you change anything here, make sure to also update
1029         * <CODE>subtype</CODE> in <CODE>ObjectPreview</CODE> and <CODE>PropertyPreview</CODE> below.
1030         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1031         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=RemoteObject DATA-F=subtype DATA-FILE-ID=CDP.EL1>
1032         * @see BaseType#enumStrList(String)
1033         */
1034        public final String subtype;
1035
1036        /**
1037         * Object class (constructor) name. Specified for <CODE>object</CODE> type values only.
1038         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1039         */
1040        public final String className;
1041
1042        /**
1043         * Remote object value in case of primitive values or JSON values (if it was requested).
1044         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1045         */
1046        public final JsonValue value;
1047
1048        /**
1049         * Primitive value which can not be JSON-stringified does not have <CODE>value</CODE>, but gets this
1050         * property.
1051         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1052         */
1053        public final String unserializableValue;
1054
1055        /**
1056         * String representation of the object.
1057         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1058         */
1059        public final String description;
1060
1061        /**
1062         * Deep serialized value.
1063         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
1064         */
1065        public final RunTime.DeepSerializedValue deepSerializedValue;
1066
1067        /**
1068         * Unique object identifier (for non-primitive values).
1069         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1070         */
1071        public final String objectId;
1072
1073        /**
1074         * Preview containing abbreviated property values. Specified for <CODE>object</CODE> type values only.
1075         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
1076         */
1077        public final RunTime.ObjectPreview preview;
1078
1079        /**
1080         * <CODE>[No Description Provided by Google]</CODE>
1081         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
1082         */
1083        public final RunTime.CustomPreview customPreview;
1084
1085        /** Constructor.  Please review this class' fields for documentation. */
1086        public RemoteObject(
1087                ReadOnlyList<Boolean> isPresent, String type, String subtype, String className,
1088                JsonValue value, String unserializableValue, String description,
1089                DeepSerializedValue deepSerializedValue, String objectId, ObjectPreview preview,
1090                CustomPreview customPreview
1091            )
1092        {
1093            super(singleton, Domains.RunTime, "RemoteObject", 10);
1094
1095            this.type                   = type;
1096            this.subtype                = subtype;
1097            this.className              = className;
1098            this.value                  = value;
1099            this.unserializableValue    = unserializableValue;
1100            this.description            = description;
1101            this.deepSerializedValue    = deepSerializedValue;
1102            this.objectId               = objectId;
1103            this.preview                = preview;
1104            this.customPreview          = customPreview;
1105
1106            this.isPresent = (isPresent == null)
1107                ? singleton.generateIsPresentList(this)
1108                : THROWS.check(isPresent, 10, "RunTime.RemoteObject");
1109        }
1110
1111        /** Creates an instance of this class from a {@link JsonObject}.*/
1112        public static RemoteObject fromJSON(JsonObject jo)
1113        { return singleton.fromJSON(jo); }
1114
1115        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1116        public static NestedDescriptor<RemoteObject> descriptor()
1117        { return singleton.descriptor(); }
1118    }
1119
1120    /**
1121     * Represents options for serialization. Overrides <CODE>generatePreview</CODE> and <CODE>returnByValue</CODE>.
1122     * 
1123     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1124     */
1125    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
1126    public static class SerializationOptions
1127        extends BaseType<SerializationOptions>
1128        implements java.io.Serializable
1129    {
1130        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1131        protected static final long serialVersionUID = 1;
1132
1133        private static final NestedHelper<RunTime.SerializationOptions> singleton =
1134            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
1135                RunTime$$SerializationOptions$$.singleton;
1136
1137        /**
1138         * <CODE>[No Description Provided by Google]</CODE>
1139         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=SerializationOptions DATA-F=serialization DATA-FILE-ID=CDP.EL1>
1140         * @see BaseType#enumStrList(String)
1141         */
1142        public final String serialization;
1143
1144        /**
1145         * Deep serialization depth. Default is full depth. Respected only in <CODE>deep</CODE> serialization mode.
1146         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1147         */
1148        public final Integer maxDepth;
1149
1150        /**
1151         * Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM
1152         * serialization via <CODE>maxNodeDepth: integer</CODE> and <CODE>includeShadowTree: "none" | "open" | "all"</CODE>.
1153         * Values can be only of type string or integer.
1154         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1155         */
1156        public final JsonValue additionalParameters;
1157
1158        /** Constructor.  Please review this class' fields for documentation. */
1159        public SerializationOptions(
1160                ReadOnlyList<Boolean> isPresent, String serialization, Integer maxDepth,
1161                JsonValue additionalParameters
1162            )
1163        {
1164            super(singleton, Domains.RunTime, "SerializationOptions", 3);
1165
1166            this.serialization          = serialization;
1167            this.maxDepth               = maxDepth;
1168            this.additionalParameters   = additionalParameters;
1169
1170            this.isPresent = (isPresent == null)
1171                ? singleton.generateIsPresentList(this)
1172                : THROWS.check(isPresent, 3, "RunTime.SerializationOptions");
1173        }
1174
1175        /** Creates an instance of this class from a {@link JsonObject}.*/
1176        public static SerializationOptions fromJSON(JsonObject jo)
1177        { return singleton.fromJSON(jo); }
1178
1179        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1180        public static NestedDescriptor<SerializationOptions> descriptor()
1181        { return singleton.descriptor(); }
1182    }
1183
1184    /**
1185     * Call frames for assertions or error messages.
1186     * 
1187     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1188     */
1189    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
1190    public static class StackTrace
1191        extends BaseType<StackTrace>
1192        implements java.io.Serializable
1193    {
1194        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1195        protected static final long serialVersionUID = 1;
1196
1197        private static final NestedHelper<RunTime.StackTrace> singleton =
1198            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
1199                RunTime$$StackTrace$$.singleton;
1200
1201        /**
1202         * String label of this stack trace. For async traces this may be a name of the function that
1203         * initiated the async call.
1204         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1205         */
1206        public final String description;
1207
1208        /** JavaScript function name. */
1209        public final RunTime.CallFrame[] callFrames;
1210
1211        /**
1212         * Asynchronous JavaScript stack trace that preceded this stack, if available.
1213         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1214         */
1215        public final RunTime.StackTrace parent;
1216
1217        /**
1218         * Asynchronous JavaScript stack trace that preceded this stack, if available.
1219         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
1220         */
1221        public final RunTime.StackTraceId parentId;
1222
1223        /** Constructor.  Please review this class' fields for documentation. */
1224        public StackTrace(
1225                ReadOnlyList<Boolean> isPresent, String description, CallFrame[] callFrames,
1226                StackTrace parent, StackTraceId parentId
1227            )
1228        {
1229            super(singleton, Domains.RunTime, "StackTrace", 4);
1230
1231            this.description    = description;
1232            this.callFrames     = callFrames;
1233            this.parent         = parent;
1234            this.parentId       = parentId;
1235
1236            this.isPresent = (isPresent == null)
1237                ? singleton.generateIsPresentList(this)
1238                : THROWS.check(isPresent, 4, "RunTime.StackTrace");
1239        }
1240
1241        /** Creates an instance of this class from a {@link JsonObject}.*/
1242        public static StackTrace fromJSON(JsonObject jo)
1243        { return singleton.fromJSON(jo); }
1244
1245        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1246        public static NestedDescriptor<StackTrace> descriptor()
1247        { return singleton.descriptor(); }
1248    }
1249
1250    /**
1251     * If <CODE>debuggerId</CODE> is set stack trace comes from another debugger and can be resolved there. This
1252     * allows to track cross-debugger calls. See <CODE>RunTime.StackTrace</CODE> and <CODE>Debugger.paused</CODE> for usages.
1253     * 
1254     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
1255     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1256     */
1257    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_TYPE_JDHBI")
1258    public static class StackTraceId
1259        extends BaseType<StackTraceId>
1260        implements java.io.Serializable
1261    {
1262        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1263        protected static final long serialVersionUID = 1;
1264
1265        private static final NestedHelper<RunTime.StackTraceId> singleton =
1266            Torello.Browser.JavaScriptAPI.NestedHelpers.Types.
1267                RunTime$$StackTraceId$$.singleton;
1268
1269        /** <CODE>[No Description Provided by Google]</CODE> */
1270        public final String id;
1271
1272        /**
1273         * <CODE>[No Description Provided by Google]</CODE>
1274         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1275         */
1276        public final String debuggerId;
1277
1278        /** Constructor.  Please review this class' fields for documentation. */
1279        public StackTraceId(ReadOnlyList<Boolean> isPresent, String id, String debuggerId)
1280        {
1281            super(singleton, Domains.RunTime, "StackTraceId", 2);
1282
1283            this.id         = id;
1284            this.debuggerId = debuggerId;
1285
1286            this.isPresent = (isPresent == null)
1287                ? singleton.generateIsPresentList(this)
1288                : THROWS.check(isPresent, 2, "RunTime.StackTraceId");
1289        }
1290
1291        /** Creates an instance of this class from a {@link JsonObject}.*/
1292        public static StackTraceId fromJSON(JsonObject jo)
1293        { return singleton.fromJSON(jo); }
1294
1295        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1296        public static NestedDescriptor<StackTraceId> descriptor()
1297        { return singleton.descriptor(); }
1298    }
1299
1300
1301    // ********************************************************************************************
1302    // ********************************************************************************************
1303    // Command-Return Types
1304    // ********************************************************************************************
1305    // ********************************************************************************************
1306
1307
1308    /**
1309     * Add handler to promise with given promise object id.
1310     * 
1311     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI DATA-CMD=awaitPromise>
1312     * @see RunTime#awaitPromise
1313     */
1314    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI")
1315    public static class awaitPromise$$RET
1316        extends BaseType<awaitPromise$$RET>
1317        implements java.io.Serializable
1318    {
1319        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1320        protected static final long serialVersionUID = 1;
1321
1322        private static final NestedHelper<RunTime.awaitPromise$$RET> singleton =
1323            Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns.
1324                RunTime$$awaitPromise$$RET.singleton;
1325
1326        /** Promise result. Will contain rejected value if promise was rejected. */
1327        public final RunTime.RemoteObject result;
1328
1329        /**
1330         * Exception details if stack strace is available.
1331         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1332         */
1333        public final RunTime.ExceptionDetails exceptionDetails;
1334
1335        /** Constructor.  Please review this class' fields for documentation. */
1336        public awaitPromise$$RET(
1337                ReadOnlyList<Boolean> isPresent, RemoteObject result,
1338                ExceptionDetails exceptionDetails
1339            )
1340        {
1341            super(singleton, Domains.RunTime, "awaitPromise", 2);
1342
1343            this.result             = result;
1344            this.exceptionDetails   = exceptionDetails;
1345
1346            this.isPresent = (isPresent == null)
1347                ? singleton.generateIsPresentList(this)
1348                : THROWS.check(isPresent, 2, "RunTime.awaitPromise$$RET");
1349        }
1350
1351        /** Creates an instance of this class from a {@link JsonObject}.*/
1352        public static awaitPromise$$RET fromJSON(JsonObject jo)
1353        { return singleton.fromJSON(jo); }
1354
1355        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1356        public static NestedDescriptor<awaitPromise$$RET> descriptor()
1357        { return singleton.descriptor(); }
1358    }
1359
1360    /**
1361     * Calls function with given declaration on the given object. Object group of the result is
1362     * inherited from the target object.
1363     * 
1364     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI DATA-CMD=callFunctionOn>
1365     * @see RunTime#callFunctionOn
1366     */
1367    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI")
1368    public static class callFunctionOn$$RET
1369        extends BaseType<callFunctionOn$$RET>
1370        implements java.io.Serializable
1371    {
1372        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1373        protected static final long serialVersionUID = 1;
1374
1375        private static final NestedHelper<RunTime.callFunctionOn$$RET> singleton =
1376            Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns.
1377                RunTime$$callFunctionOn$$RET.singleton;
1378
1379        /** Call result. */
1380        public final RunTime.RemoteObject result;
1381
1382        /**
1383         * Exception details.
1384         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1385         */
1386        public final RunTime.ExceptionDetails exceptionDetails;
1387
1388        /** Constructor.  Please review this class' fields for documentation. */
1389        public callFunctionOn$$RET(
1390                ReadOnlyList<Boolean> isPresent, RemoteObject result,
1391                ExceptionDetails exceptionDetails
1392            )
1393        {
1394            super(singleton, Domains.RunTime, "callFunctionOn", 2);
1395
1396            this.result             = result;
1397            this.exceptionDetails   = exceptionDetails;
1398
1399            this.isPresent = (isPresent == null)
1400                ? singleton.generateIsPresentList(this)
1401                : THROWS.check(isPresent, 2, "RunTime.callFunctionOn$$RET");
1402        }
1403
1404        /** Creates an instance of this class from a {@link JsonObject}.*/
1405        public static callFunctionOn$$RET fromJSON(JsonObject jo)
1406        { return singleton.fromJSON(jo); }
1407
1408        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1409        public static NestedDescriptor<callFunctionOn$$RET> descriptor()
1410        { return singleton.descriptor(); }
1411    }
1412
1413    /**
1414     * Compiles expression.
1415     * 
1416     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI DATA-CMD=compileScript>
1417     * @see RunTime#compileScript
1418     */
1419    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI")
1420    public static class compileScript$$RET
1421        extends BaseType<compileScript$$RET>
1422        implements java.io.Serializable
1423    {
1424        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1425        protected static final long serialVersionUID = 1;
1426
1427        private static final NestedHelper<RunTime.compileScript$$RET> singleton =
1428            Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns.
1429                RunTime$$compileScript$$RET.singleton;
1430
1431        /**
1432         * Id of the script.
1433         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1434         */
1435        public final String scriptId;
1436
1437        /**
1438         * Exception details.
1439         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1440         */
1441        public final RunTime.ExceptionDetails exceptionDetails;
1442
1443        /** Constructor.  Please review this class' fields for documentation. */
1444        public compileScript$$RET
1445            (ReadOnlyList<Boolean> isPresent, String scriptId, ExceptionDetails exceptionDetails)
1446        {
1447            super(singleton, Domains.RunTime, "compileScript", 2);
1448
1449            this.scriptId           = scriptId;
1450            this.exceptionDetails   = exceptionDetails;
1451
1452            this.isPresent = (isPresent == null)
1453                ? singleton.generateIsPresentList(this)
1454                : THROWS.check(isPresent, 2, "RunTime.compileScript$$RET");
1455        }
1456
1457        /** Creates an instance of this class from a {@link JsonObject}.*/
1458        public static compileScript$$RET fromJSON(JsonObject jo)
1459        { return singleton.fromJSON(jo); }
1460
1461        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1462        public static NestedDescriptor<compileScript$$RET> descriptor()
1463        { return singleton.descriptor(); }
1464    }
1465
1466    /**
1467     * Evaluates expression on global object.
1468     * 
1469     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI DATA-CMD=evaluate>
1470     * @see RunTime#evaluate
1471     */
1472    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI")
1473    public static class evaluate$$RET
1474        extends BaseType<evaluate$$RET>
1475        implements java.io.Serializable
1476    {
1477        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1478        protected static final long serialVersionUID = 1;
1479
1480        private static final NestedHelper<RunTime.evaluate$$RET> singleton =
1481            Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns.
1482                RunTime$$evaluate$$RET.singleton;
1483
1484        /** Evaluation result. */
1485        public final RunTime.RemoteObject result;
1486
1487        /**
1488         * Exception details.
1489         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1490         */
1491        public final RunTime.ExceptionDetails exceptionDetails;
1492
1493        /** Constructor.  Please review this class' fields for documentation. */
1494        public evaluate$$RET(
1495                ReadOnlyList<Boolean> isPresent, RemoteObject result,
1496                ExceptionDetails exceptionDetails
1497            )
1498        {
1499            super(singleton, Domains.RunTime, "evaluate", 2);
1500
1501            this.result             = result;
1502            this.exceptionDetails   = exceptionDetails;
1503
1504            this.isPresent = (isPresent == null)
1505                ? singleton.generateIsPresentList(this)
1506                : THROWS.check(isPresent, 2, "RunTime.evaluate$$RET");
1507        }
1508
1509        /** Creates an instance of this class from a {@link JsonObject}.*/
1510        public static evaluate$$RET fromJSON(JsonObject jo)
1511        { return singleton.fromJSON(jo); }
1512
1513        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1514        public static NestedDescriptor<evaluate$$RET> descriptor()
1515        { return singleton.descriptor(); }
1516    }
1517
1518    /**
1519     * Returns the JavaScript heap usage.
1520     * It is the total usage of the corresponding isolate not scoped to a particular RunTime.
1521     * 
1522     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
1523     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI DATA-CMD=getHeapUsage>
1524     * @see RunTime#getHeapUsage
1525     */
1526    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI")
1527    public static class getHeapUsage$$RET
1528        extends BaseType<getHeapUsage$$RET>
1529        implements java.io.Serializable
1530    {
1531        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1532        protected static final long serialVersionUID = 1;
1533
1534        private static final NestedHelper<RunTime.getHeapUsage$$RET> singleton =
1535            Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns.
1536                RunTime$$getHeapUsage$$RET.singleton;
1537
1538        /** Used JavaScript heap size in bytes. */
1539        public final Number usedSize;
1540
1541        /** Allocated JavaScript heap size in bytes. */
1542        public final Number totalSize;
1543
1544        /** Used size in bytes in the embedder's garbage-collected heap. */
1545        public final Number embedderHeapUsedSize;
1546
1547        /** Size in bytes of backing storage for array buffers and external strings. */
1548        public final Number backingStorageSize;
1549
1550        /** Constructor.  Please review this class' fields for documentation. */
1551        public getHeapUsage$$RET(
1552                ReadOnlyList<Boolean> isPresent, Number usedSize, Number totalSize,
1553                Number embedderHeapUsedSize, Number backingStorageSize
1554            )
1555        {
1556            super(singleton, Domains.RunTime, "getHeapUsage", 4);
1557
1558            this.usedSize               = usedSize;
1559            this.totalSize              = totalSize;
1560            this.embedderHeapUsedSize   = embedderHeapUsedSize;
1561            this.backingStorageSize     = backingStorageSize;
1562
1563            this.isPresent = (isPresent == null)
1564                ? singleton.generateIsPresentList(this)
1565                : THROWS.check(isPresent, 4, "RunTime.getHeapUsage$$RET");
1566        }
1567
1568        /** Creates an instance of this class from a {@link JsonObject}.*/
1569        public static getHeapUsage$$RET fromJSON(JsonObject jo)
1570        { return singleton.fromJSON(jo); }
1571
1572        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1573        public static NestedDescriptor<getHeapUsage$$RET> descriptor()
1574        { return singleton.descriptor(); }
1575    }
1576
1577    /**
1578     * Returns properties of a given object. Object group of the result is inherited from the target
1579     * object.
1580     * 
1581     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI DATA-CMD=getProperties>
1582     * @see RunTime#getProperties
1583     */
1584    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI")
1585    public static class getProperties$$RET
1586        extends BaseType<getProperties$$RET>
1587        implements java.io.Serializable
1588    {
1589        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1590        protected static final long serialVersionUID = 1;
1591
1592        private static final NestedHelper<RunTime.getProperties$$RET> singleton =
1593            Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns.
1594                RunTime$$getProperties$$RET.singleton;
1595
1596        /** Object properties. */
1597        public final RunTime.PropertyDescriptor[] result;
1598
1599        /**
1600         * Internal object properties (only of the element itself).
1601         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1602         */
1603        public final RunTime.InternalPropertyDescriptor[] internalProperties;
1604
1605        /**
1606         * Object private properties.
1607         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
1608         */
1609        public final RunTime.PrivatePropertyDescriptor[] privateProperties;
1610
1611        /**
1612         * Exception details.
1613         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1614         */
1615        public final RunTime.ExceptionDetails exceptionDetails;
1616
1617        /** Constructor.  Please review this class' fields for documentation. */
1618        public getProperties$$RET(
1619                ReadOnlyList<Boolean> isPresent, PropertyDescriptor[] result,
1620                InternalPropertyDescriptor[] internalProperties,
1621                PrivatePropertyDescriptor[] privateProperties, ExceptionDetails exceptionDetails
1622            )
1623        {
1624            super(singleton, Domains.RunTime, "getProperties", 4);
1625
1626            this.result             = result;
1627            this.internalProperties = internalProperties;
1628            this.privateProperties  = privateProperties;
1629            this.exceptionDetails   = exceptionDetails;
1630
1631            this.isPresent = (isPresent == null)
1632                ? singleton.generateIsPresentList(this)
1633                : THROWS.check(isPresent, 4, "RunTime.getProperties$$RET");
1634        }
1635
1636        /** Creates an instance of this class from a {@link JsonObject}.*/
1637        public static getProperties$$RET fromJSON(JsonObject jo)
1638        { return singleton.fromJSON(jo); }
1639
1640        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1641        public static NestedDescriptor<getProperties$$RET> descriptor()
1642        { return singleton.descriptor(); }
1643    }
1644
1645    /**
1646     * Runs script with given id in a given context.
1647     * 
1648     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI DATA-CMD=runScript>
1649     * @see RunTime#runScript
1650     */
1651    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_CMD_JDHBI")
1652    public static class runScript$$RET
1653        extends BaseType<runScript$$RET>
1654        implements java.io.Serializable
1655    {
1656        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1657        protected static final long serialVersionUID = 1;
1658
1659        private static final NestedHelper<RunTime.runScript$$RET> singleton =
1660            Torello.Browser.JavaScriptAPI.NestedHelpers.CmdReturns.
1661                RunTime$$runScript$$RET.singleton;
1662
1663        /** Run result. */
1664        public final RunTime.RemoteObject result;
1665
1666        /**
1667         * Exception details.
1668         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1669         */
1670        public final RunTime.ExceptionDetails exceptionDetails;
1671
1672        /** Constructor.  Please review this class' fields for documentation. */
1673        public runScript$$RET(
1674                ReadOnlyList<Boolean> isPresent, RemoteObject result,
1675                ExceptionDetails exceptionDetails
1676            )
1677        {
1678            super(singleton, Domains.RunTime, "runScript", 2);
1679
1680            this.result             = result;
1681            this.exceptionDetails   = exceptionDetails;
1682
1683            this.isPresent = (isPresent == null)
1684                ? singleton.generateIsPresentList(this)
1685                : THROWS.check(isPresent, 2, "RunTime.runScript$$RET");
1686        }
1687
1688        /** Creates an instance of this class from a {@link JsonObject}.*/
1689        public static runScript$$RET fromJSON(JsonObject jo)
1690        { return singleton.fromJSON(jo); }
1691
1692        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1693        public static NestedDescriptor<runScript$$RET> descriptor()
1694        { return singleton.descriptor(); }
1695    }
1696
1697
1698    // ********************************************************************************************
1699    // ********************************************************************************************
1700    // Event Types
1701    // ********************************************************************************************
1702    // ********************************************************************************************
1703
1704
1705    /**
1706     * Notification is issued every time when binding is called.
1707     * 
1708     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
1709     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1710     */
1711    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
1712    public static class bindingCalled
1713        extends BrowserEvent<bindingCalled>
1714        implements java.io.Serializable
1715    {
1716        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1717        protected static final long serialVersionUID = 1;
1718
1719        private static final NestedHelper<RunTime.bindingCalled> singleton =
1720            Torello.Browser.JavaScriptAPI.NestedHelpers.Events.
1721                RunTime$$bindingCalled$$.singleton;
1722
1723        /** <CODE>[No Description Provided by Google]</CODE> */
1724        public final String name;
1725
1726        /** <CODE>[No Description Provided by Google]</CODE> */
1727        public final String payload;
1728
1729        /** Identifier of the context where the call was made. */
1730        public final int executionContextId;
1731
1732        /** Constructor.  Please review this class' fields for documentation. */
1733        public bindingCalled
1734            (ReadOnlyList<Boolean> isPresent, String name, String payload, int executionContextId)
1735        {
1736            super(singleton, Domains.RunTime, "bindingCalled", 3);
1737
1738            this.name               = name;
1739            this.payload            = payload;
1740            this.executionContextId = executionContextId;
1741
1742            this.isPresent = (isPresent == null)
1743                ? singleton.generateIsPresentList(this)
1744                : THROWS.check(isPresent, 3, "RunTime.bindingCalled");
1745        }
1746
1747        /** Creates an instance of this class from a {@link JsonObject}.*/
1748        public static bindingCalled fromJSON(JsonObject jo)
1749        { return singleton.fromJSON(jo); }
1750
1751        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1752        public static NestedDescriptor<bindingCalled> descriptor()
1753        { return singleton.descriptor(); }
1754    }
1755
1756    /**
1757     * Issued when console API was called.
1758     * 
1759     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1760     */
1761    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
1762    public static class consoleAPICalled
1763        extends BrowserEvent<consoleAPICalled>
1764        implements java.io.Serializable
1765    {
1766        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1767        protected static final long serialVersionUID = 1;
1768
1769        private static final NestedHelper<RunTime.consoleAPICalled> singleton =
1770            Torello.Browser.JavaScriptAPI.NestedHelpers.Events.
1771                RunTime$$consoleAPICalled$$.singleton;
1772
1773        /**
1774         * Type of the call.
1775         * <EMBED CLASS='external-html' DATA-D=RunTime DATA-C=consoleAPICalled DATA-F=type DATA-FILE-ID=CDP.EL1>
1776         * @see BaseType#enumStrList(String)
1777         */
1778        public final String type;
1779
1780        /** Call arguments. */
1781        public final RunTime.RemoteObject[] args;
1782
1783        /** Identifier of the context where the call was made. */
1784        public final int executionContextId;
1785
1786        /** Call timestamp. */
1787        public final Number timestamp;
1788
1789        /**
1790         * Stack trace captured when the call was made. The async stack chain is automatically reported for
1791         * the following call types: <CODE>assert</CODE>, <CODE>error</CODE>, <CODE>trace</CODE>, <CODE>warning</CODE>. For other types the async call
1792         * chain can be retrieved using <CODE>Debugger.getStackTrace</CODE> and <CODE>stackTrace.parentId</CODE> field.
1793         * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
1794         */
1795        public final RunTime.StackTrace stackTrace;
1796
1797        /**
1798         * Console context descriptor for calls on non-default console context (not console.*):
1799         * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
1800         * on named context.
1801         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
1802         */
1803        public final String context;
1804
1805        /** Constructor.  Please review this class' fields for documentation. */
1806        public consoleAPICalled(
1807                ReadOnlyList<Boolean> isPresent, String type, RemoteObject[] args,
1808                int executionContextId, Number timestamp, StackTrace stackTrace, String context
1809            )
1810        {
1811            super(singleton, Domains.RunTime, "consoleAPICalled", 6);
1812
1813            this.type               = type;
1814            this.args               = args;
1815            this.executionContextId = executionContextId;
1816            this.timestamp          = timestamp;
1817            this.stackTrace         = stackTrace;
1818            this.context            = context;
1819
1820            this.isPresent = (isPresent == null)
1821                ? singleton.generateIsPresentList(this)
1822                : THROWS.check(isPresent, 6, "RunTime.consoleAPICalled");
1823        }
1824
1825        /** Creates an instance of this class from a {@link JsonObject}.*/
1826        public static consoleAPICalled fromJSON(JsonObject jo)
1827        { return singleton.fromJSON(jo); }
1828
1829        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1830        public static NestedDescriptor<consoleAPICalled> descriptor()
1831        { return singleton.descriptor(); }
1832    }
1833
1834    /**
1835     * Issued when unhandled exception was revoked.
1836     * 
1837     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1838     */
1839    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
1840    public static class exceptionRevoked
1841        extends BrowserEvent<exceptionRevoked>
1842        implements java.io.Serializable
1843    {
1844        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1845        protected static final long serialVersionUID = 1;
1846
1847        private static final NestedHelper<RunTime.exceptionRevoked> singleton =
1848            Torello.Browser.JavaScriptAPI.NestedHelpers.Events.
1849                RunTime$$exceptionRevoked$$.singleton;
1850
1851        /** Reason describing why exception was revoked. */
1852        public final String reason;
1853
1854        /** The id of revoked exception, as reported in <CODE>exceptionThrown</CODE>. */
1855        public final int exceptionId;
1856
1857        /** Constructor.  Please review this class' fields for documentation. */
1858        public exceptionRevoked(ReadOnlyList<Boolean> isPresent, String reason, int exceptionId)
1859        {
1860            super(singleton, Domains.RunTime, "exceptionRevoked", 2);
1861
1862            this.reason         = reason;
1863            this.exceptionId    = exceptionId;
1864
1865            this.isPresent = (isPresent == null)
1866                ? singleton.generateIsPresentList(this)
1867                : THROWS.check(isPresent, 2, "RunTime.exceptionRevoked");
1868        }
1869
1870        /** Creates an instance of this class from a {@link JsonObject}.*/
1871        public static exceptionRevoked fromJSON(JsonObject jo)
1872        { return singleton.fromJSON(jo); }
1873
1874        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1875        public static NestedDescriptor<exceptionRevoked> descriptor()
1876        { return singleton.descriptor(); }
1877    }
1878
1879    /**
1880     * Issued when exception was thrown and unhandled.
1881     * 
1882     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1883     */
1884    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
1885    public static class exceptionThrown
1886        extends BrowserEvent<exceptionThrown>
1887        implements java.io.Serializable
1888    {
1889        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1890        protected static final long serialVersionUID = 1;
1891
1892        private static final NestedHelper<RunTime.exceptionThrown> singleton =
1893            Torello.Browser.JavaScriptAPI.NestedHelpers.Events.
1894                RunTime$$exceptionThrown$$.singleton;
1895
1896        /** Timestamp of the exception. */
1897        public final Number timestamp;
1898
1899        /** <CODE>[No Description Provided by Google]</CODE> */
1900        public final RunTime.ExceptionDetails exceptionDetails;
1901
1902        /** Constructor.  Please review this class' fields for documentation. */
1903        public exceptionThrown
1904            (ReadOnlyList<Boolean> isPresent, Number timestamp, ExceptionDetails exceptionDetails)
1905        {
1906            super(singleton, Domains.RunTime, "exceptionThrown", 2);
1907
1908            this.timestamp          = timestamp;
1909            this.exceptionDetails   = exceptionDetails;
1910
1911            this.isPresent = (isPresent == null)
1912                ? singleton.generateIsPresentList(this)
1913                : THROWS.check(isPresent, 2, "RunTime.exceptionThrown");
1914        }
1915
1916        /** Creates an instance of this class from a {@link JsonObject}.*/
1917        public static exceptionThrown fromJSON(JsonObject jo)
1918        { return singleton.fromJSON(jo); }
1919
1920        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1921        public static NestedDescriptor<exceptionThrown> descriptor()
1922        { return singleton.descriptor(); }
1923    }
1924
1925    /**
1926     * Issued when new execution context is created.
1927     * 
1928     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1929     */
1930    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
1931    public static class executionContextCreated
1932        extends BrowserEvent<executionContextCreated>
1933        implements java.io.Serializable
1934    {
1935        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1936        protected static final long serialVersionUID = 1;
1937
1938        private static final NestedHelper<RunTime.executionContextCreated> singleton =
1939            Torello.Browser.JavaScriptAPI.NestedHelpers.Events.
1940                RunTime$$executionContextCreated$$.singleton;
1941
1942        /** A newly created execution context. */
1943        public final RunTime.ExecutionContextDescription context;
1944
1945        /** Constructor.  Please review this class' fields for documentation. */
1946        public executionContextCreated
1947            (ReadOnlyList<Boolean> isPresent, ExecutionContextDescription context)
1948        {
1949            super(singleton, Domains.RunTime, "executionContextCreated", 1);
1950
1951            this.context = context;
1952
1953            this.isPresent = (isPresent == null)
1954                ? singleton.generateIsPresentList(this)
1955                : THROWS.check(isPresent, 1, "RunTime.executionContextCreated");
1956        }
1957
1958        /** Creates an instance of this class from a {@link JsonObject}.*/
1959        public static executionContextCreated fromJSON(JsonObject jo)
1960        { return singleton.fromJSON(jo); }
1961
1962        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
1963        public static NestedDescriptor<executionContextCreated> descriptor()
1964        { return singleton.descriptor(); }
1965    }
1966
1967    /**
1968     * Issued when execution context is destroyed.
1969     * 
1970     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
1971     */
1972    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
1973    public static class executionContextDestroyed
1974        extends BrowserEvent<executionContextDestroyed>
1975        implements java.io.Serializable
1976    {
1977        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
1978        protected static final long serialVersionUID = 1;
1979
1980        private static final NestedHelper<RunTime.executionContextDestroyed> singleton =
1981            Torello.Browser.JavaScriptAPI.NestedHelpers.Events.
1982                RunTime$$executionContextDestroyed$$.singleton;
1983
1984        /**
1985         * Id of the destroyed context
1986         * <BR /><B CLASS=Dep-Top>DEPRECATED</B>
1987         */
1988        public final int executionContextId;
1989
1990        /**
1991         * Unique Id of the destroyed context
1992         * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
1993         */
1994        public final String executionContextUniqueId;
1995
1996        /** Constructor.  Please review this class' fields for documentation. */
1997        public executionContextDestroyed(
1998                ReadOnlyList<Boolean> isPresent, int executionContextId,
1999                String executionContextUniqueId
2000            )
2001        {
2002            super(singleton, Domains.RunTime, "executionContextDestroyed", 2);
2003
2004            this.executionContextId         = executionContextId;
2005            this.executionContextUniqueId   = executionContextUniqueId;
2006
2007            this.isPresent = (isPresent == null)
2008                ? singleton.generateIsPresentList(this)
2009                : THROWS.check(isPresent, 2, "RunTime.executionContextDestroyed");
2010        }
2011
2012        /** Creates an instance of this class from a {@link JsonObject}.*/
2013        public static executionContextDestroyed fromJSON(JsonObject jo)
2014        { return singleton.fromJSON(jo); }
2015
2016        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
2017        public static NestedDescriptor<executionContextDestroyed> descriptor()
2018        { return singleton.descriptor(); }
2019    }
2020
2021    /**
2022     * Issued when object should be inspected (for example, as a result of inspect() command line API
2023     * call).
2024     * 
2025     * <EMBED CLASS=globalDefs DATA-DOMAIN=RunTime DATA-API=JavaScriptAPI>
2026     */
2027    @JDHeaderBackgroundImg(EmbedTagFileID="CDP.NESTED_EVENT_JDHBI")
2028    public static class inspectRequested
2029        extends BrowserEvent<inspectRequested>
2030        implements java.io.Serializable
2031    {
2032        /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID> */
2033        protected static final long serialVersionUID = 1;
2034
2035        private static final NestedHelper<RunTime.inspectRequested> singleton =
2036            Torello.Browser.JavaScriptAPI.NestedHelpers.Events.
2037                RunTime$$inspectRequested$$.singleton;
2038
2039        /** <CODE>[No Description Provided by Google]</CODE> */
2040        public final RunTime.RemoteObject object;
2041
2042        /** <CODE>[No Description Provided by Google]</CODE> */
2043        public final JsonValue hints;
2044
2045        /**
2046         * Identifier of the context where the call was made.
2047         * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2048         */
2049        public final Integer executionContextId;
2050
2051        /** Constructor.  Please review this class' fields for documentation. */
2052        public inspectRequested(
2053                ReadOnlyList<Boolean> isPresent, RemoteObject object, JsonValue hints,
2054                Integer executionContextId
2055            )
2056        {
2057            super(singleton, Domains.RunTime, "inspectRequested", 3);
2058
2059            this.object             = object;
2060            this.hints              = hints;
2061            this.executionContextId = executionContextId;
2062
2063            this.isPresent = (isPresent == null)
2064                ? singleton.generateIsPresentList(this)
2065                : THROWS.check(isPresent, 3, "RunTime.inspectRequested");
2066        }
2067
2068        /** Creates an instance of this class from a {@link JsonObject}.*/
2069        public static inspectRequested fromJSON(JsonObject jo)
2070        { return singleton.fromJSON(jo); }
2071
2072        /** Returns this class's {@link NestedDescriptor} singleton-instance. class / type.*/
2073        public static NestedDescriptor<inspectRequested> descriptor()
2074        { return singleton.descriptor(); }
2075    }
2076
2077
2078
2079
2080    // ********************************************************************************************
2081    // ********************************************************************************************
2082    // Commands
2083    // ********************************************************************************************
2084    // ********************************************************************************************
2085
2086
2087    /**
2088     * If executionContextId is empty, adds binding with the given name on the
2089     * global objects of all inspected contexts, including those created later,
2090     * bindings survive reloads.
2091     * Binding function takes exactly one argument, this argument should be string,
2092     * in case of any other input, function throws an exception.
2093     * Each binding function call produces RunTime.bindingCalled notification.
2094     * 
2095     * @param name -
2096     * 
2097     * @param executionContextId 
2098     * If specified, the binding would only be exposed to the specified
2099     * execution context. If omitted and <CODE>executionContextName</CODE> is not set,
2100     * the binding is exposed to all execution contexts of the target.
2101     * This parameter is mutually exclusive with <CODE>executionContextName</CODE>.
2102     * Deprecated in favor of <CODE>executionContextName</CODE> due to an unclear use case
2103     * and bugs in implementation (crbug.com/1169639). <CODE>executionContextId</CODE> will be
2104     * removed in the future.
2105     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B><B CLASS=Dep-Top>DEPRECATED</B>
2106     * 
2107     * @param executionContextName 
2108     * If specified, the binding is exposed to the executionContext with
2109     * matching name, even for contexts created after the binding is added.
2110     * See also <CODE>ExecutionContext.name</CODE> and <CODE>worldName</CODE> parameter to
2111     * <CODE>Page.addScriptToEvaluateOnNewDocument</CODE>.
2112     * This parameter is mutually exclusive with <CODE>executionContextId</CODE>.
2113     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2114     * 
2115     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2116     *
2117     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2118     * browser receives the invocation-request.
2119     *
2120     * <BR /><BR /><DIV CLASS=JDHint>
2121     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2122     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2123     * the Browser Function has run to completion.
2124     * </DIV>
2125     */
2126    public static Script<Void> addBinding
2127        (String name, Integer executionContextId, String executionContextName)
2128    {
2129        // Convert all Method Parameters into a JSON Request-Object (as a String)
2130        final String requestJSON = WriteJSON.get(
2131            RunTime$$Commands.addBinding$$, "Runtime.addBinding",
2132            name, executionContextId, executionContextName
2133        );
2134
2135        return Script.NO_RET(Domains.RunTime, "addBinding", requestJSON);
2136    }
2137
2138    /**
2139     * Add handler to promise with given promise object id.
2140     * 
2141     * @param promiseObjectId Identifier of the promise.
2142     * 
2143     * @param returnByValue Whether the result is expected to be a JSON object that should be sent by value.
2144     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2145     * 
2146     * @param generatePreview Whether preview should be generated for the result.
2147     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2148     * 
2149     * @return An instance of <CODE>{@link Script}&lt;{@link awaitPromise$$RET}&gt;</CODE>
2150     * 
2151     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2152     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2153     * <CODE>&lt;{@link awaitPromise$$RET}&gt;</CODE> will be returned
2154     *
2155     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2156     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2157     * be retrieved.</I>
2158     *
2159     * <BR /><BR /><DIV CLASS=JDHint>
2160     * This Browser Function's {@code Promise} returns:{@link awaitPromise$$RET}
2161     * A dedicated return type implies that the browser may return more than 1 datum
2162     * </DIV>
2163     */
2164    public static Script<awaitPromise$$RET> awaitPromise
2165        (String promiseObjectId, Boolean returnByValue, Boolean generatePreview)
2166    {
2167        // Convert all Method Parameters into a JSON Request-Object (as a String)
2168        final String requestJSON = WriteJSON.get(
2169            RunTime$$Commands.awaitPromise$$, "Runtime.awaitPromise",
2170            promiseObjectId, returnByValue, generatePreview
2171        );
2172
2173        return new Script<>(
2174            Domains.RunTime, "awaitPromise", requestJSON,
2175            awaitPromise$$RET::fromJSON,
2176            awaitPromise$$RET.class
2177        );
2178    }
2179
2180    /**
2181     * Calls function with given declaration on the given object. Object group of the result is
2182     * inherited from the target object.
2183     * 
2184     * <BR /><BR /><DIV CLASS=JDHint>
2185     * 👍 Because of the sheer number of input parameters to this method, there is a
2186     * a {@link CommandBuilder} variant to this method which may be invoked instead.
2187     * 
2188     * <BR /><BR />
2189     * Please View: {@link #callFunctionOn()}
2190     * </DIV>
2191     * 
2192     * @param functionDeclaration Declaration of the function to call.
2193     * 
2194     * @param objectId 
2195     * Identifier of the object to call function on. Either objectId or executionContextId should
2196     * be specified.
2197     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2198     * 
2199     * @param arguments 
2200     * Call arguments. All call arguments must belong to the same JavaScript world as the target
2201     * object.
2202     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2203     * 
2204     * @param silent 
2205     * In silent mode exceptions thrown during evaluation are not reported and do not pause
2206     * execution. Overrides <CODE>setPauseOnException</CODE> state.
2207     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2208     * 
2209     * @param returnByValue 
2210     * Whether the result is expected to be a JSON object which should be sent by value.
2211     * Can be overriden by <CODE>serializationOptions</CODE>.
2212     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2213     * 
2214     * @param generatePreview Whether preview should be generated for the result.
2215     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2216     * 
2217     * @param userGesture Whether execution should be treated as initiated by user in the UI.
2218     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2219     * 
2220     * @param awaitPromise 
2221     * Whether execution should <CODE>await</CODE> for resulting value and return once awaited promise is
2222     * resolved.
2223     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2224     * 
2225     * @param executionContextId 
2226     * Specifies execution context which global object will be used to call function on. Either
2227     * executionContextId or objectId should be specified.
2228     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2229     * 
2230     * @param objectGroup 
2231     * Symbolic group name that can be used to release multiple objects. If objectGroup is not
2232     * specified and objectId is, objectGroup will be inherited from object.
2233     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2234     * 
2235     * @param throwOnSideEffect Whether to throw an exception if side effect cannot be ruled out during evaluation.
2236     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2237     * 
2238     * @param uniqueContextId 
2239     * An alternative way to specify the execution context to call function on.
2240     * Compared to contextId that may be reused across processes, this is guaranteed to be
2241     * system-unique, so it can be used to prevent accidental function call
2242     * in context different than intended (e.g. as a result of navigation across process
2243     * boundaries).
2244     * This is mutually exclusive with <CODE>executionContextId</CODE>.
2245     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2246     * 
2247     * @param serializationOptions 
2248     * Specifies the result serialization. If provided, overrides
2249     * <CODE>generatePreview</CODE> and <CODE>returnByValue</CODE>.
2250     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2251     * 
2252     * @return An instance of <CODE>{@link Script}&lt;{@link callFunctionOn$$RET}&gt;</CODE>
2253     * 
2254     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2255     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2256     * <CODE>&lt;{@link callFunctionOn$$RET}&gt;</CODE> will be returned
2257     *
2258     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2259     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2260     * be retrieved.</I>
2261     *
2262     * <BR /><BR /><DIV CLASS=JDHint>
2263     * This Browser Function's {@code Promise} returns:{@link callFunctionOn$$RET}
2264     * A dedicated return type implies that the browser may return more than 1 datum
2265     * </DIV>
2266     */
2267    public static Script<callFunctionOn$$RET> callFunctionOn(
2268            String functionDeclaration, String objectId, CallArgument[] arguments, Boolean silent,
2269            Boolean returnByValue, Boolean generatePreview, Boolean userGesture,
2270            Boolean awaitPromise, Integer executionContextId, String objectGroup,
2271            Boolean throwOnSideEffect, String uniqueContextId,
2272            SerializationOptions serializationOptions
2273        )
2274    {
2275        // Convert all Method Parameters into a JSON Request-Object (as a String)
2276        final String requestJSON = WriteJSON.get(
2277            RunTime$$Commands.callFunctionOn$$, "Runtime.callFunctionOn",
2278            functionDeclaration, objectId, arguments, silent, returnByValue, generatePreview,
2279            userGesture, awaitPromise, executionContextId, objectGroup, throwOnSideEffect,
2280            uniqueContextId, serializationOptions
2281        );
2282
2283        return new Script<>(
2284            Domains.RunTime, "callFunctionOn", requestJSON,
2285            callFunctionOn$$RET::fromJSON,
2286            callFunctionOn$$RET.class
2287        );
2288    }
2289
2290    /**
2291     * Compiles expression.
2292     * 
2293     * @param expression Expression to compile.
2294     * 
2295     * @param sourceURL Source url to be set for the script.
2296     * 
2297     * @param persistScript Specifies whether the compiled script should be persisted.
2298     * 
2299     * @param executionContextId 
2300     * Specifies in which execution context to perform script run. If the parameter is omitted the
2301     * evaluation will be performed in the context of the inspected page.
2302     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2303     * 
2304     * @return An instance of <CODE>{@link Script}&lt;{@link compileScript$$RET}&gt;</CODE>
2305     * 
2306     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2307     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2308     * <CODE>&lt;{@link compileScript$$RET}&gt;</CODE> will be returned
2309     *
2310     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2311     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2312     * be retrieved.</I>
2313     *
2314     * <BR /><BR /><DIV CLASS=JDHint>
2315     * This Browser Function's {@code Promise} returns:{@link compileScript$$RET}
2316     * A dedicated return type implies that the browser may return more than 1 datum
2317     * </DIV>
2318     */
2319    public static Script<compileScript$$RET> compileScript
2320        (String expression, String sourceURL, boolean persistScript, Integer executionContextId)
2321    {
2322        // Convert all Method Parameters into a JSON Request-Object (as a String)
2323        final String requestJSON = WriteJSON.get(
2324            RunTime$$Commands.compileScript$$, "Runtime.compileScript",
2325            expression, sourceURL, persistScript, executionContextId
2326        );
2327
2328        return new Script<>(
2329            Domains.RunTime, "compileScript", requestJSON,
2330            compileScript$$RET::fromJSON,
2331            compileScript$$RET.class
2332        );
2333    }
2334
2335    /**
2336     * Disables reporting of execution contexts creation.
2337     * 
2338     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2339     *
2340     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2341     * browser receives the invocation-request.
2342     *
2343     * <BR /><BR /><DIV CLASS=JDHint>
2344     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2345     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2346     * the Browser Function has run to completion.
2347     * </DIV>
2348     */
2349    public static Script<Void> disable()
2350    {
2351        // Ultra-Simple Request JSON - Because this method has no parameters
2352        final String requestJSON = "{\"method\":\"Runtime.disable\"}";
2353
2354        return Script.NO_RET(Domains.RunTime, "disable", requestJSON);
2355    }
2356
2357    /**
2358     * Discards collected exceptions and console API calls.
2359     * 
2360     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2361     *
2362     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2363     * browser receives the invocation-request.
2364     *
2365     * <BR /><BR /><DIV CLASS=JDHint>
2366     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2367     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2368     * the Browser Function has run to completion.
2369     * </DIV>
2370     */
2371    public static Script<Void> discardConsoleEntries()
2372    {
2373        // Ultra-Simple Request JSON - Because this method has no parameters
2374        final String requestJSON = "{\"method\":\"Runtime.discardConsoleEntries\"}";
2375
2376        return Script.NO_RET(Domains.RunTime, "discardConsoleEntries", requestJSON);
2377    }
2378
2379    /**
2380     * Enables reporting of execution contexts creation by means of <CODE>executionContextCreated</CODE> event.
2381     * When the reporting gets enabled the event will be sent immediately for each existing execution
2382     * context.
2383     * 
2384     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2385     *
2386     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2387     * browser receives the invocation-request.
2388     *
2389     * <BR /><BR /><DIV CLASS=JDHint>
2390     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2391     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2392     * the Browser Function has run to completion.
2393     * </DIV>
2394     */
2395    public static Script<Void> enable()
2396    {
2397        // Ultra-Simple Request JSON - Because this method has no parameters
2398        final String requestJSON = "{\"method\":\"Runtime.enable\"}";
2399
2400        return Script.NO_RET(Domains.RunTime, "enable", requestJSON);
2401    }
2402
2403    /**
2404     * Evaluates expression on global object.
2405     * 
2406     * <BR /><BR /><DIV CLASS=JDHint>
2407     * 👍 Because of the sheer number of input parameters to this method, there is a
2408     * a {@link CommandBuilder} variant to this method which may be invoked instead.
2409     * 
2410     * <BR /><BR />
2411     * Please View: {@link #evaluate()}
2412     * </DIV>
2413     * 
2414     * @param expression Expression to evaluate.
2415     * 
2416     * @param objectGroup Symbolic group name that can be used to release multiple objects.
2417     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2418     * 
2419     * @param includeCommandLineAPI Determines whether Command Line API should be available during the evaluation.
2420     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2421     * 
2422     * @param silent 
2423     * In silent mode exceptions thrown during evaluation are not reported and do not pause
2424     * execution. Overrides <CODE>setPauseOnException</CODE> state.
2425     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2426     * 
2427     * @param contextId 
2428     * Specifies in which execution context to perform evaluation. If the parameter is omitted the
2429     * evaluation will be performed in the context of the inspected page.
2430     * This is mutually exclusive with <CODE>uniqueContextId</CODE>, which offers an
2431     * alternative way to identify the execution context that is more reliable
2432     * in a multi-process environment.
2433     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2434     * 
2435     * @param returnByValue Whether the result is expected to be a JSON object that should be sent by value.
2436     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2437     * 
2438     * @param generatePreview Whether preview should be generated for the result.
2439     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2440     * 
2441     * @param userGesture Whether execution should be treated as initiated by user in the UI.
2442     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2443     * 
2444     * @param awaitPromise 
2445     * Whether execution should <CODE>await</CODE> for resulting value and return once awaited promise is
2446     * resolved.
2447     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2448     * 
2449     * @param throwOnSideEffect 
2450     * Whether to throw an exception if side effect cannot be ruled out during evaluation.
2451     * This implies <CODE>disableBreaks</CODE> below.
2452     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2453     * 
2454     * @param timeout Terminate execution after timing out (number of milliseconds).
2455     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2456     * 
2457     * @param disableBreaks Disable breakpoints during execution.
2458     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2459     * 
2460     * @param replMode 
2461     * Setting this flag to true enables <CODE>let</CODE> re-declaration and top-level <CODE>await</CODE>.
2462     * Note that <CODE>let</CODE> variables can only be re-declared if they originate from
2463     * <CODE>replMode</CODE> themselves.
2464     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2465     * 
2466     * @param allowUnsafeEvalBlockedByCSP 
2467     * The Content Security Policy (CSP) for the target might block 'unsafe-eval'
2468     * which includes eval(), Function(), setTimeout() and setInterval()
2469     * when called with non-callable arguments. This flag bypasses CSP for this
2470     * evaluation and allows unsafe-eval. Defaults to true.
2471     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2472     * 
2473     * @param uniqueContextId 
2474     * An alternative way to specify the execution context to evaluate in.
2475     * Compared to contextId that may be reused across processes, this is guaranteed to be
2476     * system-unique, so it can be used to prevent accidental evaluation of the expression
2477     * in context different than intended (e.g. as a result of navigation across process
2478     * boundaries).
2479     * This is mutually exclusive with <CODE>contextId</CODE>.
2480     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2481     * 
2482     * @param serializationOptions 
2483     * Specifies the result serialization. If provided, overrides
2484     * <CODE>generatePreview</CODE> and <CODE>returnByValue</CODE>.
2485     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2486     * 
2487     * @return An instance of <CODE>{@link Script}&lt;{@link evaluate$$RET}&gt;</CODE>
2488     * 
2489     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2490     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2491     * <CODE>&lt;{@link evaluate$$RET}&gt;</CODE> will be returned
2492     *
2493     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2494     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2495     * be retrieved.</I>
2496     *
2497     * <BR /><BR /><DIV CLASS=JDHint>
2498     * This Browser Function's {@code Promise} returns:{@link evaluate$$RET}
2499     * A dedicated return type implies that the browser may return more than 1 datum
2500     * </DIV>
2501     */
2502    public static Script<evaluate$$RET> evaluate(
2503            String expression, String objectGroup, Boolean includeCommandLineAPI, Boolean silent,
2504            Integer contextId, Boolean returnByValue, Boolean generatePreview, Boolean userGesture,
2505            Boolean awaitPromise, Boolean throwOnSideEffect, Number timeout, Boolean disableBreaks,
2506            Boolean replMode, Boolean allowUnsafeEvalBlockedByCSP, String uniqueContextId,
2507            SerializationOptions serializationOptions
2508        )
2509    {
2510        // Convert all Method Parameters into a JSON Request-Object (as a String)
2511        final String requestJSON = WriteJSON.get(
2512            RunTime$$Commands.evaluate$$, "Runtime.evaluate",
2513            expression, objectGroup, includeCommandLineAPI, silent, contextId, returnByValue,
2514            generatePreview, userGesture, awaitPromise, throwOnSideEffect, timeout, disableBreaks,
2515            replMode, allowUnsafeEvalBlockedByCSP, uniqueContextId, serializationOptions
2516        );
2517
2518        return new Script<>(
2519            Domains.RunTime, "evaluate", requestJSON,
2520            evaluate$$RET::fromJSON,
2521            evaluate$$RET.class
2522        );
2523    }
2524
2525    /**
2526     * This method tries to lookup and populate exception details for a
2527     * JavaScript Error object.
2528     * Note that the stackTrace portion of the resulting exceptionDetails will
2529     * only be populated if the RunTime domain was enabled at the time when the
2530     * Error was thrown.
2531     * 
2532     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
2533     * 
2534     * @param errorObjectId The error object for which to resolve the exception details.
2535     * 
2536     * @return An instance of <CODE>{@link Script}&lt;{@link RunTime.ExceptionDetails}&gt;</CODE>
2537     * 
2538     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2539     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2540     * <CODE>&lt;{@link RunTime.ExceptionDetails}&gt;</CODE> will be returned
2541     *
2542     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2543     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2544     * be retrieved.</I>
2545     *
2546     * <BR /><BR /><DIV CLASS=JDHint>
2547     * This Browser Function's {@code Promise} returns:
2548     * <CODE>{@link RunTime.ExceptionDetails} (<B>exceptionDetails</B>)</CODE>
2549     * </DIV>
2550     */
2551    public static Script<RunTime.ExceptionDetails> getExceptionDetails(String errorObjectId)
2552    {
2553        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
2554        final String requestJSON = WriteJSON.get(
2555            CDPTypes.STRING, "errorObjectId", false, "Runtime.getExceptionDetails",
2556            errorObjectId
2557        );
2558
2559        return new Script<>(
2560            Domains.RunTime, "getExceptionDetails", requestJSON,
2561            RunTime$$Commands::getExceptionDetails,
2562            RunTime.ExceptionDetails.class
2563        );
2564    }
2565
2566    /**
2567     * Returns the JavaScript heap usage.
2568     * It is the total usage of the corresponding isolate not scoped to a particular RunTime.
2569     * 
2570     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
2571     * 
2572     * @return An instance of <CODE>{@link Script}&lt;{@link getHeapUsage$$RET}&gt;</CODE>
2573     * 
2574     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2575     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2576     * <CODE>&lt;{@link getHeapUsage$$RET}&gt;</CODE> will be returned
2577     *
2578     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2579     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2580     * be retrieved.</I>
2581     *
2582     * <BR /><BR /><DIV CLASS=JDHint>
2583     * This Browser Function's {@code Promise} returns:{@link getHeapUsage$$RET}
2584     * A dedicated return type implies that the browser may return more than 1 datum
2585     * </DIV>
2586     */
2587    public static Script<getHeapUsage$$RET> getHeapUsage()
2588    {
2589        // Ultra-Simple Request JSON - Because this method has no parameters
2590        final String requestJSON = "{\"method\":\"Runtime.getHeapUsage\"}";
2591
2592        return new Script<>(
2593            Domains.RunTime, "getHeapUsage", requestJSON,
2594            getHeapUsage$$RET::fromJSON,
2595            getHeapUsage$$RET.class
2596        );
2597    }
2598
2599    /**
2600     * Returns the isolate id.
2601     * 
2602     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
2603     * 
2604     * @return An instance of <CODE>{@link Script}&lt;String&gt;</CODE>
2605     * 
2606     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2607     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2608     * <CODE>&lt;String&gt;</CODE> will be returned
2609     *
2610     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2611     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2612     * be retrieved.</I>
2613     *
2614     * <BR /><BR /><DIV CLASS=JDHint>
2615     * This Browser Function's {@code Promise} returns:
2616     * <CODE>String (<B>id</B>)</CODE>
2617     * <BR />
2618     * The isolate id.
2619     * </DIV>
2620     */
2621    public static Script<String> getIsolateId()
2622    {
2623        // Ultra-Simple Request JSON - Because this method has no parameters
2624        final String requestJSON = "{\"method\":\"Runtime.getIsolateId\"}";
2625
2626        return new Script<>(
2627            Domains.RunTime, "getIsolateId", requestJSON,
2628            jo -> ReadJSON.getString(jo, "id", true, false),
2629            String.class
2630        );
2631    }
2632
2633    /**
2634     * Returns properties of a given object. Object group of the result is inherited from the target
2635     * object.
2636     * 
2637     * <BR /><BR /><DIV CLASS=JDHint>
2638     * 👍 Because of the sheer number of input parameters to this method, there is a
2639     * a {@link CommandBuilder} variant to this method which may be invoked instead.
2640     * 
2641     * <BR /><BR />
2642     * Please View: {@link #getProperties()}
2643     * </DIV>
2644     * 
2645     * @param objectId Identifier of the object to return properties for.
2646     * 
2647     * @param ownProperties 
2648     * If true, returns properties belonging only to the element itself, not to its prototype
2649     * chain.
2650     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2651     * 
2652     * @param accessorPropertiesOnly 
2653     * If true, returns accessor properties (with getter/setter) only; internal properties are not
2654     * returned either.
2655     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2656     * 
2657     * @param generatePreview Whether preview should be generated for the results.
2658     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2659     * 
2660     * @param nonIndexedPropertiesOnly If true, returns non-indexed properties only.
2661     * <BR /><B CLASS=Opt-Top>OPTIONAL</B><B CLASS=Exp-Top>EXPERIMENTAL</B>
2662     * 
2663     * @return An instance of <CODE>{@link Script}&lt;{@link getProperties$$RET}&gt;</CODE>
2664     * 
2665     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2666     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2667     * <CODE>&lt;{@link getProperties$$RET}&gt;</CODE> will be returned
2668     *
2669     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2670     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2671     * be retrieved.</I>
2672     *
2673     * <BR /><BR /><DIV CLASS=JDHint>
2674     * This Browser Function's {@code Promise} returns:{@link getProperties$$RET}
2675     * A dedicated return type implies that the browser may return more than 1 datum
2676     * </DIV>
2677     */
2678    public static Script<getProperties$$RET> getProperties(
2679            String objectId, Boolean ownProperties, Boolean accessorPropertiesOnly,
2680            Boolean generatePreview, Boolean nonIndexedPropertiesOnly
2681        )
2682    {
2683        // Convert all Method Parameters into a JSON Request-Object (as a String)
2684        final String requestJSON = WriteJSON.get(
2685            RunTime$$Commands.getProperties$$, "Runtime.getProperties",
2686            objectId, ownProperties, accessorPropertiesOnly, generatePreview,
2687            nonIndexedPropertiesOnly
2688        );
2689
2690        return new Script<>(
2691            Domains.RunTime, "getProperties", requestJSON,
2692            getProperties$$RET::fromJSON,
2693            getProperties$$RET.class
2694        );
2695    }
2696
2697    /**
2698     * Returns all let, const and class variables from global scope.
2699     * 
2700     * @param executionContextId Specifies in which execution context to lookup global scope variables.
2701     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2702     * 
2703     * @return An instance of <CODE>{@link Script}&lt;String[]&gt;</CODE>
2704     * 
2705     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2706     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2707     * <CODE>&lt;String[]&gt;</CODE> will be returned
2708     *
2709     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2710     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2711     * be retrieved.</I>
2712     *
2713     * <BR /><BR /><DIV CLASS=JDHint>
2714     * This Browser Function's {@code Promise} returns:
2715     * <CODE>String[] (<B>names</B>)</CODE>
2716     * </DIV>
2717     */
2718    public static Script<String[]> globalLexicalScopeNames(Integer executionContextId)
2719    {
2720        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
2721        final String requestJSON = WriteJSON.get(
2722            CDPTypes.BOXED_INTEGER, "executionContextId", true,
2723            "Runtime.globalLexicalScopeNames", executionContextId
2724        );
2725
2726        return new Script<>(
2727            Domains.RunTime, "globalLexicalScopeNames", requestJSON,
2728            RunTime$$Commands::globalLexicalScopeNames,
2729            String[].class
2730        );
2731    }
2732
2733    /**
2734     * <CODE>[No Description Provided by Google]</CODE>
2735     * 
2736     * @param prototypeObjectId Identifier of the prototype to return objects for.
2737     * 
2738     * @param objectGroup Symbolic group name that can be used to release the results.
2739     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2740     * 
2741     * @return An instance of <CODE>{@link Script}&lt;{@link RunTime.RemoteObject}&gt;</CODE>
2742     * 
2743     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2744     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2745     * <CODE>&lt;{@link RunTime.RemoteObject}&gt;</CODE> will be returned
2746     *
2747     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2748     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2749     * be retrieved.</I>
2750     *
2751     * <BR /><BR /><DIV CLASS=JDHint>
2752     * This Browser Function's {@code Promise} returns:
2753     * <CODE>{@link RunTime.RemoteObject} (<B>objects</B>)</CODE>
2754     * <BR />
2755     * Array with objects.
2756     * </DIV>
2757     */
2758    public static Script<RunTime.RemoteObject> queryObjects
2759        (String prototypeObjectId, String objectGroup)
2760    {
2761        // Convert all Method Parameters into a JSON Request-Object (as a String)
2762        final String requestJSON = WriteJSON.get(
2763            RunTime$$Commands.queryObjects$$, "Runtime.queryObjects",
2764            prototypeObjectId, objectGroup
2765        );
2766
2767        return new Script<>(
2768            Domains.RunTime, "queryObjects", requestJSON,
2769            RunTime$$Commands::queryObjects,
2770            RunTime.RemoteObject.class
2771        );
2772    }
2773
2774    /**
2775     * Releases remote object with given id.
2776     * 
2777     * @param objectId Identifier of the object to release.
2778     * 
2779     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2780     *
2781     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2782     * browser receives the invocation-request.
2783     *
2784     * <BR /><BR /><DIV CLASS=JDHint>
2785     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2786     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2787     * the Browser Function has run to completion.
2788     * </DIV>
2789     */
2790    public static Script<Void> releaseObject(String objectId)
2791    {
2792        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
2793        final String requestJSON = WriteJSON.get
2794            (CDPTypes.STRING, "objectId", false, "Runtime.releaseObject", objectId);
2795
2796        return Script.NO_RET(Domains.RunTime, "releaseObject", requestJSON);
2797    }
2798
2799    /**
2800     * Releases all remote objects that belong to a given group.
2801     * 
2802     * @param objectGroup Symbolic object group name.
2803     * 
2804     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2805     *
2806     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2807     * browser receives the invocation-request.
2808     *
2809     * <BR /><BR /><DIV CLASS=JDHint>
2810     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2811     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2812     * the Browser Function has run to completion.
2813     * </DIV>
2814     */
2815    public static Script<Void> releaseObjectGroup(String objectGroup)
2816    {
2817        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
2818        final String requestJSON = WriteJSON.get
2819            (CDPTypes.STRING, "objectGroup", false, "Runtime.releaseObjectGroup", objectGroup);
2820
2821        return Script.NO_RET(Domains.RunTime, "releaseObjectGroup", requestJSON);
2822    }
2823
2824    /**
2825     * This method does not remove binding function from global object but
2826     * unsubscribes current runtime agent from RunTime.bindingCalled notifications.
2827     * 
2828     * @param name -
2829     * 
2830     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2831     *
2832     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2833     * browser receives the invocation-request.
2834     *
2835     * <BR /><BR /><DIV CLASS=JDHint>
2836     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2837     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2838     * the Browser Function has run to completion.
2839     * </DIV>
2840     */
2841    public static Script<Void> removeBinding(String name)
2842    {
2843        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
2844        final String requestJSON = WriteJSON.get
2845            (CDPTypes.STRING, "name", false, "Runtime.removeBinding", name);
2846
2847        return Script.NO_RET(Domains.RunTime, "removeBinding", requestJSON);
2848    }
2849
2850    /**
2851     * Tells inspected instance to run if it was waiting for debugger to attach.
2852     * 
2853     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2854     *
2855     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2856     * browser receives the invocation-request.
2857     *
2858     * <BR /><BR /><DIV CLASS=JDHint>
2859     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2860     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2861     * the Browser Function has run to completion.
2862     * </DIV>
2863     */
2864    public static Script<Void> runIfWaitingForDebugger()
2865    {
2866        // Ultra-Simple Request JSON - Because this method has no parameters
2867        final String requestJSON = "{\"method\":\"Runtime.runIfWaitingForDebugger\"}";
2868
2869        return Script.NO_RET(Domains.RunTime, "runIfWaitingForDebugger", requestJSON);
2870    }
2871
2872    /**
2873     * Runs script with given id in a given context.
2874     * 
2875     * <BR /><BR /><DIV CLASS=JDHint>
2876     * 👍 Because of the sheer number of input parameters to this method, there is a
2877     * a {@link CommandBuilder} variant to this method which may be invoked instead.
2878     * 
2879     * <BR /><BR />
2880     * Please View: {@link #runScript()}
2881     * </DIV>
2882     * 
2883     * @param scriptId Id of the script to run.
2884     * 
2885     * @param executionContextId 
2886     * Specifies in which execution context to perform script run. If the parameter is omitted the
2887     * evaluation will be performed in the context of the inspected page.
2888     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2889     * 
2890     * @param objectGroup Symbolic group name that can be used to release multiple objects.
2891     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2892     * 
2893     * @param silent 
2894     * In silent mode exceptions thrown during evaluation are not reported and do not pause
2895     * execution. Overrides <CODE>setPauseOnException</CODE> state.
2896     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2897     * 
2898     * @param includeCommandLineAPI Determines whether Command Line API should be available during the evaluation.
2899     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2900     * 
2901     * @param returnByValue Whether the result is expected to be a JSON object which should be sent by value.
2902     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2903     * 
2904     * @param generatePreview Whether preview should be generated for the result.
2905     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2906     * 
2907     * @param awaitPromise 
2908     * Whether execution should <CODE>await</CODE> for resulting value and return once awaited promise is
2909     * resolved.
2910     * <BR /><B CLASS=Opt-Top>OPTIONAL</B>
2911     * 
2912     * @return An instance of <CODE>{@link Script}&lt;{@link runScript$$RET}&gt;</CODE>
2913     * 
2914     * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using
2915     * {@link Script#exec(WebSocketSender) Script.exec}, and afterwards, a {@link Promise}
2916     * <CODE>&lt;{@link runScript$$RET}&gt;</CODE> will be returned
2917     *
2918     * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>,
2919     * using {@link Promise#await()}, <I>and the returned result of this Browser Function may
2920     * be retrieved.</I>
2921     *
2922     * <BR /><BR /><DIV CLASS=JDHint>
2923     * This Browser Function's {@code Promise} returns:{@link runScript$$RET}
2924     * A dedicated return type implies that the browser may return more than 1 datum
2925     * </DIV>
2926     */
2927    public static Script<runScript$$RET> runScript(
2928            String scriptId, Integer executionContextId, String objectGroup, Boolean silent,
2929            Boolean includeCommandLineAPI, Boolean returnByValue, Boolean generatePreview,
2930            Boolean awaitPromise
2931        )
2932    {
2933        // Convert all Method Parameters into a JSON Request-Object (as a String)
2934        final String requestJSON = WriteJSON.get(
2935            RunTime$$Commands.runScript$$, "Runtime.runScript",
2936            scriptId, executionContextId, objectGroup, silent, includeCommandLineAPI, returnByValue,
2937            generatePreview, awaitPromise
2938        );
2939
2940        return new Script<>(
2941            Domains.RunTime, "runScript", requestJSON,
2942            runScript$$RET::fromJSON,
2943            runScript$$RET.class
2944        );
2945    }
2946
2947    /**
2948     * Enables or disables async call stacks tracking.
2949     * 
2950     * @param maxDepth 
2951     * Maximum depth of async call stacks. Setting to <CODE>0</CODE> will effectively disable collecting async
2952     * call stacks (default).
2953     * 
2954     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2955     *
2956     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2957     * browser receives the invocation-request.
2958     *
2959     * <BR /><BR /><DIV CLASS=JDHint>
2960     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2961     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2962     * the Browser Function has run to completion.
2963     * </DIV>
2964     */
2965    public static Script<Void> setAsyncCallStackDepth(int maxDepth)
2966    {
2967        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
2968        final String requestJSON = WriteJSON.get(
2969            CDPTypes.PRIMITIVE_INT, "maxDepth", false, "Runtime.setAsyncCallStackDepth",
2970            maxDepth
2971        );
2972
2973        return Script.NO_RET(Domains.RunTime, "setAsyncCallStackDepth", requestJSON);
2974    }
2975
2976    /**
2977     * <CODE>[No Description Provided by Google]</CODE>
2978     * 
2979     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
2980     * 
2981     * @param enabled -
2982     * 
2983     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
2984     *
2985     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
2986     * browser receives the invocation-request.
2987     *
2988     * <BR /><BR /><DIV CLASS=JDHint>
2989     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
2990     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
2991     * the Browser Function has run to completion.
2992     * </DIV>
2993     */
2994    public static Script<Void> setCustomObjectFormatterEnabled(boolean enabled)
2995    {
2996        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
2997        final String requestJSON = WriteJSON.get(
2998            CDPTypes.PRIMITIVE_BOOLEAN, "enabled", false,
2999            "Runtime.setCustomObjectFormatterEnabled", enabled
3000        );
3001
3002        return Script.NO_RET(Domains.RunTime, "setCustomObjectFormatterEnabled", requestJSON);
3003    }
3004
3005    /**
3006     * <CODE>[No Description Provided by Google]</CODE>
3007     * 
3008     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
3009     * 
3010     * @param size -
3011     * 
3012     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
3013     *
3014     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
3015     * browser receives the invocation-request.
3016     *
3017     * <BR /><BR /><DIV CLASS=JDHint>
3018     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
3019     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
3020     * the Browser Function has run to completion.
3021     * </DIV>
3022     */
3023    public static Script<Void> setMaxCallStackSizeToCapture(int size)
3024    {
3025        // Build the JSON Request-Object (as a String); only 1 Parameter is passed
3026        final String requestJSON = WriteJSON.get
3027            (CDPTypes.PRIMITIVE_INT, "size", false, "Runtime.setMaxCallStackSizeToCapture", size);
3028
3029        return Script.NO_RET(Domains.RunTime, "setMaxCallStackSizeToCapture", requestJSON);
3030    }
3031
3032    /**
3033     * Terminate current or next JavaScript execution.
3034     * Will cancel the termination when the outer-most script execution ends.
3035     * 
3036     * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B>
3037     * 
3038     * @return An instance of <CODE>{@link Script}&lt;Void&gt;</CODE>
3039     *
3040     * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the
3041     * browser receives the invocation-request.
3042     *
3043     * <BR /><BR /><DIV CLASS=JDHint>
3044     * This Browser-Function <I>does not have</I> a return-value.  You may choose to
3045     * <B STYLE='color: red'>await</B> the {@link Promise}{@code <Void>} to ensure that
3046     * the Browser Function has run to completion.
3047     * </DIV>
3048     */
3049    public static Script<Void> terminateExecution()
3050    {
3051        // Ultra-Simple Request JSON - Because this method has no parameters
3052        final String requestJSON = "{\"method\":\"Runtime.terminateExecution\"}";
3053
3054        return Script.NO_RET(Domains.RunTime, "terminateExecution", requestJSON);
3055    }
3056
3057
3058    // ********************************************************************************************
3059    // ********************************************************************************************
3060    // CommandBuilder Getter-Methods
3061    // ********************************************************************************************
3062    // ********************************************************************************************
3063
3064
3065    /**
3066     * Creates a buider for conveniently assigning parameters to this method.
3067     * 
3068     * <BR /><BR /><DIV CLASS=JDHint>
3069     * Note that the original method expects 13 parameters, and can be cumbersome.
3070     * </DIV>
3071     * 
3072     * @return {@link CommandBuilder} instance, for assigning parameter values, one by one.
3073     * @see #callFunctionOn
3074     */
3075    public static CommandBuilder<callFunctionOn$$RET> callFunctionOn()
3076    { return CommandBuilder.builder(RunTime$$Commands.callFunctionOn$$); }
3077
3078    /**
3079     * Creates a buider for conveniently assigning parameters to this method.
3080     * 
3081     * <BR /><BR /><DIV CLASS=JDHint>
3082     * Note that the original method expects 16 parameters, and can be cumbersome.
3083     * </DIV>
3084     * 
3085     * @return {@link CommandBuilder} instance, for assigning parameter values, one by one.
3086     * @see #evaluate
3087     */
3088    public static CommandBuilder<evaluate$$RET> evaluate()
3089    { return CommandBuilder.builder(RunTime$$Commands.evaluate$$); }
3090
3091    /**
3092     * Creates a buider for conveniently assigning parameters to this method.
3093     * 
3094     * <BR /><BR /><DIV CLASS=JDHint>
3095     * Note that the original method expects 5 parameters, and can be cumbersome.
3096     * </DIV>
3097     * 
3098     * @return {@link CommandBuilder} instance, for assigning parameter values, one by one.
3099     * @see #getProperties
3100     */
3101    public static CommandBuilder<getProperties$$RET> getProperties()
3102    { return CommandBuilder.builder(RunTime$$Commands.getProperties$$); }
3103
3104    /**
3105     * Creates a buider for conveniently assigning parameters to this method.
3106     * 
3107     * <BR /><BR /><DIV CLASS=JDHint>
3108     * Note that the original method expects 8 parameters, and can be cumbersome.
3109     * </DIV>
3110     * 
3111     * @return {@link CommandBuilder} instance, for assigning parameter values, one by one.
3112     * @see #runScript
3113     */
3114    public static CommandBuilder<runScript$$RET> runScript()
3115    { return CommandBuilder.builder(RunTime$$Commands.runScript$$); }
3116
3117
3118}