rustenium-cdp-definitions 0.1.1

Generated Chrome DevTools Protocol type definitions for Rustenium
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
use serde::{Deserialize, Serialize};
#[doc = "Add handler to promise with given promise object id.\n[awaitPromise](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AwaitPromiseParams {
    #[doc = "Identifier of the promise."]
    #[serde(rename = "promiseObjectId")]
    pub promise_object_id: super::types::RemoteObjectId,
    #[doc = "Whether the result is expected to be a JSON object that should be sent by value."]
    #[serde(rename = "returnByValue")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub return_by_value: Option<bool>,
    #[doc = "Whether preview should be generated for the result."]
    #[serde(rename = "generatePreview")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub generate_preview: Option<bool>,
}
impl AwaitPromiseParams {
    pub fn new(promise_object_id: impl Into<super::types::RemoteObjectId>) -> Self {
        Self {
            promise_object_id: promise_object_id.into(),
            return_by_value: None,
            generate_preview: None,
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum AwaitPromiseMethod {
    #[serde(rename = "Runtime.awaitPromise")]
    AwaitPromise,
}
#[doc = "Add handler to promise with given promise object id.\n[awaitPromise](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AwaitPromise {
    pub method: AwaitPromiseMethod,
    pub params: AwaitPromiseParams,
}
impl AwaitPromise {
    pub const IDENTIFIER: &'static str = "Runtime.awaitPromise";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for AwaitPromise {
    type Result = super::results::AwaitPromiseResult;
}
#[doc = "Calls function with given declaration on the given object. Object group of the result is\ninherited from the target object.\n[callFunctionOn](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CallFunctionOnParams {
    #[doc = "Declaration of the function to call."]
    #[serde(rename = "functionDeclaration")]
    pub function_declaration: String,
    #[doc = "Identifier of the object to call function on. Either objectId or executionContextId should\nbe specified."]
    #[serde(rename = "objectId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub object_id: Option<super::types::RemoteObjectId>,
    #[doc = "Call arguments. All call arguments must belong to the same JavaScript world as the target\nobject."]
    #[serde(rename = "arguments")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub arguments: Option<Vec<super::types::CallArgument>>,
    #[doc = "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state."]
    #[serde(rename = "silent")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub silent: Option<bool>,
    #[doc = "Whether the result is expected to be a JSON object which should be sent by value.\nCan be overriden by `serializationOptions`."]
    #[serde(rename = "returnByValue")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub return_by_value: Option<bool>,
    #[doc = "Whether preview should be generated for the result."]
    #[serde(rename = "generatePreview")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub generate_preview: Option<bool>,
    #[doc = "Whether execution should be treated as initiated by user in the UI."]
    #[serde(rename = "userGesture")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub user_gesture: Option<bool>,
    #[doc = "Whether execution should `await` for resulting value and return once awaited promise is\nresolved."]
    #[serde(rename = "awaitPromise")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub await_promise: Option<bool>,
    #[doc = "Specifies execution context which global object will be used to call function on. Either\nexecutionContextId or objectId should be specified."]
    #[serde(rename = "executionContextId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub execution_context_id: Option<super::types::ExecutionContextId>,
    #[doc = "Symbolic group name that can be used to release multiple objects. If objectGroup is not\nspecified and objectId is, objectGroup will be inherited from object."]
    #[serde(rename = "objectGroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub object_group: Option<String>,
    #[doc = "Whether to throw an exception if side effect cannot be ruled out during evaluation."]
    #[serde(rename = "throwOnSideEffect")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub throw_on_side_effect: Option<bool>,
    #[doc = "An alternative way to specify the execution context to call function on.\nCompared to contextId that may be reused across processes, this is guaranteed to be\nsystem-unique, so it can be used to prevent accidental function call\nin context different than intended (e.g. as a result of navigation across process\nboundaries).\nThis is mutually exclusive with `executionContextId`."]
    #[serde(rename = "uniqueContextId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub unique_context_id: Option<String>,
    #[doc = "Specifies the result serialization. If provided, overrides\n`generatePreview` and `returnByValue`."]
    #[serde(rename = "serializationOptions")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub serialization_options: Option<super::types::SerializationOptions>,
}
impl CallFunctionOnParams {
    pub fn new(function_declaration: impl Into<String>) -> Self {
        Self {
            function_declaration: function_declaration.into(),
            object_id: None,
            arguments: None,
            silent: None,
            return_by_value: None,
            generate_preview: None,
            user_gesture: None,
            await_promise: None,
            execution_context_id: None,
            object_group: None,
            throw_on_side_effect: None,
            unique_context_id: None,
            serialization_options: None,
        }
    }
}
impl<T: Into<String>> From<T> for CallFunctionOnParams {
    fn from(url: T) -> Self {
        CallFunctionOnParams::new(url)
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum CallFunctionOnMethod {
    #[serde(rename = "Runtime.callFunctionOn")]
    CallFunctionOn,
}
#[doc = "Calls function with given declaration on the given object. Object group of the result is\ninherited from the target object.\n[callFunctionOn](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CallFunctionOn {
    pub method: CallFunctionOnMethod,
    pub params: CallFunctionOnParams,
}
impl CallFunctionOn {
    pub const IDENTIFIER: &'static str = "Runtime.callFunctionOn";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for CallFunctionOn {
    type Result = super::results::CallFunctionOnResult;
}
#[doc = "Compiles expression.\n[compileScript](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CompileScriptParams {
    #[doc = "Expression to compile."]
    #[serde(rename = "expression")]
    pub expression: String,
    #[doc = "Source url to be set for the script."]
    #[serde(rename = "sourceURL")]
    pub source_url: String,
    #[doc = "Specifies whether the compiled script should be persisted."]
    #[serde(rename = "persistScript")]
    pub persist_script: bool,
    #[doc = "Specifies in which execution context to perform script run. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page."]
    #[serde(rename = "executionContextId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub execution_context_id: Option<super::types::ExecutionContextId>,
}
impl CompileScriptParams {
    pub fn new(
        expression: impl Into<String>,
        source_url: impl Into<String>,
        persist_script: impl Into<bool>,
    ) -> Self {
        Self {
            expression: expression.into(),
            source_url: source_url.into(),
            persist_script: persist_script.into(),
            execution_context_id: None,
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum CompileScriptMethod {
    #[serde(rename = "Runtime.compileScript")]
    CompileScript,
}
#[doc = "Compiles expression.\n[compileScript](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CompileScript {
    pub method: CompileScriptMethod,
    pub params: CompileScriptParams,
}
impl CompileScript {
    pub const IDENTIFIER: &'static str = "Runtime.compileScript";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for CompileScript {
    type Result = super::results::CompileScriptResult;
}
#[doc = "Disables reporting of execution contexts creation.\n[disable](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-disable)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DisableParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DisableMethod {
    #[serde(rename = "Runtime.disable")]
    Disable,
}
#[doc = "Disables reporting of execution contexts creation.\n[disable](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-disable)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Disable {
    pub method: DisableMethod,
    pub params: DisableParams,
}
impl Disable {
    pub const IDENTIFIER: &'static str = "Runtime.disable";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for Disable {
    type Result = super::results::DisableResult;
}
#[doc = "Discards collected exceptions and console API calls.\n[discardConsoleEntries](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-discardConsoleEntries)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DiscardConsoleEntriesParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum DiscardConsoleEntriesMethod {
    #[serde(rename = "Runtime.discardConsoleEntries")]
    DiscardConsoleEntries,
}
#[doc = "Discards collected exceptions and console API calls.\n[discardConsoleEntries](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-discardConsoleEntries)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DiscardConsoleEntries {
    pub method: DiscardConsoleEntriesMethod,
    pub params: DiscardConsoleEntriesParams,
}
impl DiscardConsoleEntries {
    pub const IDENTIFIER: &'static str = "Runtime.discardConsoleEntries";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for DiscardConsoleEntries {
    type Result = super::results::DiscardConsoleEntriesResult;
}
#[doc = "Enables reporting of execution contexts creation by means of `executionContextCreated` event.\nWhen the reporting gets enabled the event will be sent immediately for each existing execution\ncontext.\n[enable](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-enable)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EnableParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum EnableMethod {
    #[serde(rename = "Runtime.enable")]
    Enable,
}
#[doc = "Enables reporting of execution contexts creation by means of `executionContextCreated` event.\nWhen the reporting gets enabled the event will be sent immediately for each existing execution\ncontext.\n[enable](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-enable)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Enable {
    pub method: EnableMethod,
    pub params: EnableParams,
}
impl Enable {
    pub const IDENTIFIER: &'static str = "Runtime.enable";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for Enable {
    type Result = super::results::EnableResult;
}
#[doc = "Evaluates expression on global object.\n[evaluate](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EvaluateParams {
    #[doc = "Expression to evaluate."]
    #[serde(rename = "expression")]
    pub expression: String,
    #[doc = "Symbolic group name that can be used to release multiple objects."]
    #[serde(rename = "objectGroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub object_group: Option<String>,
    #[doc = "Determines whether Command Line API should be available during the evaluation."]
    #[serde(rename = "includeCommandLineAPI")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub include_command_line_api: Option<bool>,
    #[doc = "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state."]
    #[serde(rename = "silent")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub silent: Option<bool>,
    #[doc = "Specifies in which execution context to perform evaluation. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page.\nThis is mutually exclusive with `uniqueContextId`, which offers an\nalternative way to identify the execution context that is more reliable\nin a multi-process environment."]
    #[serde(rename = "contextId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub context_id: Option<super::types::ExecutionContextId>,
    #[doc = "Whether the result is expected to be a JSON object that should be sent by value."]
    #[serde(rename = "returnByValue")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub return_by_value: Option<bool>,
    #[doc = "Whether preview should be generated for the result."]
    #[serde(rename = "generatePreview")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub generate_preview: Option<bool>,
    #[doc = "Whether execution should be treated as initiated by user in the UI."]
    #[serde(rename = "userGesture")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub user_gesture: Option<bool>,
    #[doc = "Whether execution should `await` for resulting value and return once awaited promise is\nresolved."]
    #[serde(rename = "awaitPromise")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub await_promise: Option<bool>,
    #[doc = "Whether to throw an exception if side effect cannot be ruled out during evaluation.\nThis implies `disableBreaks` below."]
    #[serde(rename = "throwOnSideEffect")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub throw_on_side_effect: Option<bool>,
    #[doc = "Terminate execution after timing out (number of milliseconds)."]
    #[serde(rename = "timeout")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub timeout: Option<super::types::TimeDelta>,
    #[doc = "Disable breakpoints during execution."]
    #[serde(rename = "disableBreaks")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub disable_breaks: Option<bool>,
    #[doc = "Setting this flag to true enables `let` re-declaration and top-level `await`.\nNote that `let` variables can only be re-declared if they originate from\n`replMode` themselves."]
    #[serde(rename = "replMode")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub repl_mode: Option<bool>,
    #[doc = "The Content Security Policy (CSP) for the target might block 'unsafe-eval'\nwhich includes eval(), Function(), setTimeout() and setInterval()\nwhen called with non-callable arguments. This flag bypasses CSP for this\nevaluation and allows unsafe-eval. Defaults to true."]
    #[serde(rename = "allowUnsafeEvalBlockedByCSP")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub allow_unsafe_eval_blocked_by_csp: Option<bool>,
    #[doc = "An alternative way to specify the execution context to evaluate in.\nCompared to contextId that may be reused across processes, this is guaranteed to be\nsystem-unique, so it can be used to prevent accidental evaluation of the expression\nin context different than intended (e.g. as a result of navigation across process\nboundaries).\nThis is mutually exclusive with `contextId`."]
    #[serde(rename = "uniqueContextId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub unique_context_id: Option<String>,
    #[doc = "Specifies the result serialization. If provided, overrides\n`generatePreview` and `returnByValue`."]
    #[serde(rename = "serializationOptions")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub serialization_options: Option<super::types::SerializationOptions>,
}
impl EvaluateParams {
    pub fn new(expression: impl Into<String>) -> Self {
        Self {
            expression: expression.into(),
            object_group: None,
            include_command_line_api: None,
            silent: None,
            context_id: None,
            return_by_value: None,
            generate_preview: None,
            user_gesture: None,
            await_promise: None,
            throw_on_side_effect: None,
            timeout: None,
            disable_breaks: None,
            repl_mode: None,
            allow_unsafe_eval_blocked_by_csp: None,
            unique_context_id: None,
            serialization_options: None,
        }
    }
}
impl<T: Into<String>> From<T> for EvaluateParams {
    fn from(url: T) -> Self {
        EvaluateParams::new(url)
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum EvaluateMethod {
    #[serde(rename = "Runtime.evaluate")]
    Evaluate,
}
#[doc = "Evaluates expression on global object.\n[evaluate](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Evaluate {
    pub method: EvaluateMethod,
    pub params: EvaluateParams,
}
impl Evaluate {
    pub const IDENTIFIER: &'static str = "Runtime.evaluate";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for Evaluate {
    type Result = super::results::EvaluateResult;
}
#[doc = "Returns the isolate id.\n[getIsolateId](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getIsolateId)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetIsolateIdParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum GetIsolateIdMethod {
    #[serde(rename = "Runtime.getIsolateId")]
    GetIsolateId,
}
#[doc = "Returns the isolate id.\n[getIsolateId](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getIsolateId)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetIsolateId {
    pub method: GetIsolateIdMethod,
    pub params: GetIsolateIdParams,
}
impl GetIsolateId {
    pub const IDENTIFIER: &'static str = "Runtime.getIsolateId";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for GetIsolateId {
    type Result = super::results::GetIsolateIdResult;
}
#[doc = "Returns the JavaScript heap usage.\nIt is the total usage of the corresponding isolate not scoped to a particular Runtime.\n[getHeapUsage](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getHeapUsage)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetHeapUsageParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum GetHeapUsageMethod {
    #[serde(rename = "Runtime.getHeapUsage")]
    GetHeapUsage,
}
#[doc = "Returns the JavaScript heap usage.\nIt is the total usage of the corresponding isolate not scoped to a particular Runtime.\n[getHeapUsage](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getHeapUsage)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetHeapUsage {
    pub method: GetHeapUsageMethod,
    pub params: GetHeapUsageParams,
}
impl GetHeapUsage {
    pub const IDENTIFIER: &'static str = "Runtime.getHeapUsage";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for GetHeapUsage {
    type Result = super::results::GetHeapUsageResult;
}
#[doc = "Returns properties of a given object. Object group of the result is inherited from the target\nobject.\n[getProperties](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetPropertiesParams {
    #[doc = "Identifier of the object to return properties for."]
    #[serde(rename = "objectId")]
    pub object_id: super::types::RemoteObjectId,
    #[doc = "If true, returns properties belonging only to the element itself, not to its prototype\nchain."]
    #[serde(rename = "ownProperties")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub own_properties: Option<bool>,
    #[doc = "If true, returns accessor properties (with getter/setter) only; internal properties are not\nreturned either."]
    #[serde(rename = "accessorPropertiesOnly")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub accessor_properties_only: Option<bool>,
    #[doc = "Whether preview should be generated for the results."]
    #[serde(rename = "generatePreview")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub generate_preview: Option<bool>,
    #[doc = "If true, returns non-indexed properties only."]
    #[serde(rename = "nonIndexedPropertiesOnly")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub non_indexed_properties_only: Option<bool>,
}
impl GetPropertiesParams {
    pub fn new(object_id: impl Into<super::types::RemoteObjectId>) -> Self {
        Self {
            object_id: object_id.into(),
            own_properties: None,
            accessor_properties_only: None,
            generate_preview: None,
            non_indexed_properties_only: None,
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum GetPropertiesMethod {
    #[serde(rename = "Runtime.getProperties")]
    GetProperties,
}
#[doc = "Returns properties of a given object. Object group of the result is inherited from the target\nobject.\n[getProperties](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetProperties {
    pub method: GetPropertiesMethod,
    pub params: GetPropertiesParams,
}
impl GetProperties {
    pub const IDENTIFIER: &'static str = "Runtime.getProperties";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for GetProperties {
    type Result = super::results::GetPropertiesResult;
}
#[doc = "Returns all let, const and class variables from global scope.\n[globalLexicalScopeNames](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames)"]
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct GlobalLexicalScopeNamesParams {
    #[doc = "Specifies in which execution context to lookup global scope variables."]
    #[serde(rename = "executionContextId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub execution_context_id: Option<super::types::ExecutionContextId>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum GlobalLexicalScopeNamesMethod {
    #[serde(rename = "Runtime.globalLexicalScopeNames")]
    GlobalLexicalScopeNames,
}
#[doc = "Returns all let, const and class variables from global scope.\n[globalLexicalScopeNames](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GlobalLexicalScopeNames {
    pub method: GlobalLexicalScopeNamesMethod,
    pub params: GlobalLexicalScopeNamesParams,
}
impl GlobalLexicalScopeNames {
    pub const IDENTIFIER: &'static str = "Runtime.globalLexicalScopeNames";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for GlobalLexicalScopeNames {
    type Result = super::results::GlobalLexicalScopeNamesResult;
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct QueryObjectsParams {
    #[doc = "Identifier of the prototype to return objects for."]
    #[serde(rename = "prototypeObjectId")]
    pub prototype_object_id: super::types::RemoteObjectId,
    #[doc = "Symbolic group name that can be used to release the results."]
    #[serde(rename = "objectGroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub object_group: Option<String>,
}
impl QueryObjectsParams {
    pub fn new(prototype_object_id: impl Into<super::types::RemoteObjectId>) -> Self {
        Self {
            prototype_object_id: prototype_object_id.into(),
            object_group: None,
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum QueryObjectsMethod {
    #[serde(rename = "Runtime.queryObjects")]
    QueryObjects,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct QueryObjects {
    pub method: QueryObjectsMethod,
    pub params: QueryObjectsParams,
}
impl QueryObjects {
    pub const IDENTIFIER: &'static str = "Runtime.queryObjects";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for QueryObjects {
    type Result = super::results::QueryObjectsResult;
}
#[doc = "Releases remote object with given id.\n[releaseObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReleaseObjectParams {
    #[doc = "Identifier of the object to release."]
    #[serde(rename = "objectId")]
    pub object_id: super::types::RemoteObjectId,
}
impl ReleaseObjectParams {
    pub fn new(object_id: impl Into<super::types::RemoteObjectId>) -> Self {
        Self {
            object_id: object_id.into(),
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ReleaseObjectMethod {
    #[serde(rename = "Runtime.releaseObject")]
    ReleaseObject,
}
#[doc = "Releases remote object with given id.\n[releaseObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReleaseObject {
    pub method: ReleaseObjectMethod,
    pub params: ReleaseObjectParams,
}
impl ReleaseObject {
    pub const IDENTIFIER: &'static str = "Runtime.releaseObject";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for ReleaseObject {
    type Result = super::results::ReleaseObjectResult;
}
#[doc = "Releases all remote objects that belong to a given group.\n[releaseObjectGroup](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObjectGroup)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReleaseObjectGroupParams {
    #[doc = "Symbolic object group name."]
    #[serde(rename = "objectGroup")]
    pub object_group: String,
}
impl ReleaseObjectGroupParams {
    pub fn new(object_group: impl Into<String>) -> Self {
        Self {
            object_group: object_group.into(),
        }
    }
}
impl<T: Into<String>> From<T> for ReleaseObjectGroupParams {
    fn from(url: T) -> Self {
        ReleaseObjectGroupParams::new(url)
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ReleaseObjectGroupMethod {
    #[serde(rename = "Runtime.releaseObjectGroup")]
    ReleaseObjectGroup,
}
#[doc = "Releases all remote objects that belong to a given group.\n[releaseObjectGroup](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObjectGroup)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ReleaseObjectGroup {
    pub method: ReleaseObjectGroupMethod,
    pub params: ReleaseObjectGroupParams,
}
impl ReleaseObjectGroup {
    pub const IDENTIFIER: &'static str = "Runtime.releaseObjectGroup";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for ReleaseObjectGroup {
    type Result = super::results::ReleaseObjectGroupResult;
}
#[doc = "Tells inspected instance to run if it was waiting for debugger to attach.\n[runIfWaitingForDebugger](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runIfWaitingForDebugger)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RunIfWaitingForDebuggerParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum RunIfWaitingForDebuggerMethod {
    #[serde(rename = "Runtime.runIfWaitingForDebugger")]
    RunIfWaitingForDebugger,
}
#[doc = "Tells inspected instance to run if it was waiting for debugger to attach.\n[runIfWaitingForDebugger](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runIfWaitingForDebugger)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RunIfWaitingForDebugger {
    pub method: RunIfWaitingForDebuggerMethod,
    pub params: RunIfWaitingForDebuggerParams,
}
impl RunIfWaitingForDebugger {
    pub const IDENTIFIER: &'static str = "Runtime.runIfWaitingForDebugger";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for RunIfWaitingForDebugger {
    type Result = super::results::RunIfWaitingForDebuggerResult;
}
#[doc = "Runs script with given id in a given context.\n[runScript](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RunScriptParams {
    #[doc = "Id of the script to run."]
    #[serde(rename = "scriptId")]
    pub script_id: super::types::ScriptId,
    #[doc = "Specifies in which execution context to perform script run. If the parameter is omitted the\nevaluation will be performed in the context of the inspected page."]
    #[serde(rename = "executionContextId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub execution_context_id: Option<super::types::ExecutionContextId>,
    #[doc = "Symbolic group name that can be used to release multiple objects."]
    #[serde(rename = "objectGroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub object_group: Option<String>,
    #[doc = "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state."]
    #[serde(rename = "silent")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub silent: Option<bool>,
    #[doc = "Determines whether Command Line API should be available during the evaluation."]
    #[serde(rename = "includeCommandLineAPI")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub include_command_line_api: Option<bool>,
    #[doc = "Whether the result is expected to be a JSON object which should be sent by value."]
    #[serde(rename = "returnByValue")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub return_by_value: Option<bool>,
    #[doc = "Whether preview should be generated for the result."]
    #[serde(rename = "generatePreview")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub generate_preview: Option<bool>,
    #[doc = "Whether execution should `await` for resulting value and return once awaited promise is\nresolved."]
    #[serde(rename = "awaitPromise")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub await_promise: Option<bool>,
}
impl RunScriptParams {
    pub fn new(script_id: impl Into<super::types::ScriptId>) -> Self {
        Self {
            script_id: script_id.into(),
            execution_context_id: None,
            object_group: None,
            silent: None,
            include_command_line_api: None,
            return_by_value: None,
            generate_preview: None,
            await_promise: None,
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum RunScriptMethod {
    #[serde(rename = "Runtime.runScript")]
    RunScript,
}
#[doc = "Runs script with given id in a given context.\n[runScript](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RunScript {
    pub method: RunScriptMethod,
    pub params: RunScriptParams,
}
impl RunScript {
    pub const IDENTIFIER: &'static str = "Runtime.runScript";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for RunScript {
    type Result = super::results::RunScriptResult;
}
#[doc = "Enables or disables async call stacks tracking.\n[setAsyncCallStackDepth](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setAsyncCallStackDepth)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetAsyncCallStackDepthParams {
    #[doc = "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async\ncall stacks (default)."]
    #[serde(rename = "maxDepth")]
    pub max_depth: i64,
}
impl SetAsyncCallStackDepthParams {
    pub fn new(max_depth: impl Into<i64>) -> Self {
        Self {
            max_depth: max_depth.into(),
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum SetAsyncCallStackDepthMethod {
    #[serde(rename = "Runtime.setAsyncCallStackDepth")]
    SetAsyncCallStackDepth,
}
#[doc = "Enables or disables async call stacks tracking.\n[setAsyncCallStackDepth](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setAsyncCallStackDepth)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetAsyncCallStackDepth {
    pub method: SetAsyncCallStackDepthMethod,
    pub params: SetAsyncCallStackDepthParams,
}
impl SetAsyncCallStackDepth {
    pub const IDENTIFIER: &'static str = "Runtime.setAsyncCallStackDepth";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for SetAsyncCallStackDepth {
    type Result = super::results::SetAsyncCallStackDepthResult;
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetCustomObjectFormatterEnabledParams {
    #[serde(rename = "enabled")]
    pub enabled: bool,
}
impl SetCustomObjectFormatterEnabledParams {
    pub fn new(enabled: impl Into<bool>) -> Self {
        Self {
            enabled: enabled.into(),
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum SetCustomObjectFormatterEnabledMethod {
    #[serde(rename = "Runtime.setCustomObjectFormatterEnabled")]
    SetCustomObjectFormatterEnabled,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetCustomObjectFormatterEnabled {
    pub method: SetCustomObjectFormatterEnabledMethod,
    pub params: SetCustomObjectFormatterEnabledParams,
}
impl SetCustomObjectFormatterEnabled {
    pub const IDENTIFIER: &'static str = "Runtime.setCustomObjectFormatterEnabled";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for SetCustomObjectFormatterEnabled {
    type Result = super::results::SetCustomObjectFormatterEnabledResult;
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetMaxCallStackSizeToCaptureParams {
    #[serde(rename = "size")]
    pub size: i64,
}
impl SetMaxCallStackSizeToCaptureParams {
    pub fn new(size: impl Into<i64>) -> Self {
        Self { size: size.into() }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum SetMaxCallStackSizeToCaptureMethod {
    #[serde(rename = "Runtime.setMaxCallStackSizeToCapture")]
    SetMaxCallStackSizeToCapture,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SetMaxCallStackSizeToCapture {
    pub method: SetMaxCallStackSizeToCaptureMethod,
    pub params: SetMaxCallStackSizeToCaptureParams,
}
impl SetMaxCallStackSizeToCapture {
    pub const IDENTIFIER: &'static str = "Runtime.setMaxCallStackSizeToCapture";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for SetMaxCallStackSizeToCapture {
    type Result = super::results::SetMaxCallStackSizeToCaptureResult;
}
#[doc = "Terminate current or next JavaScript execution.\nWill cancel the termination when the outer-most script execution ends.\n[terminateExecution](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-terminateExecution)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TerminateExecutionParams {}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum TerminateExecutionMethod {
    #[serde(rename = "Runtime.terminateExecution")]
    TerminateExecution,
}
#[doc = "Terminate current or next JavaScript execution.\nWill cancel the termination when the outer-most script execution ends.\n[terminateExecution](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-terminateExecution)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TerminateExecution {
    pub method: TerminateExecutionMethod,
    pub params: TerminateExecutionParams,
}
impl TerminateExecution {
    pub const IDENTIFIER: &'static str = "Runtime.terminateExecution";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for TerminateExecution {
    type Result = super::results::TerminateExecutionResult;
}
#[doc = "If executionContextId is empty, adds binding with the given name on the\nglobal objects of all inspected contexts, including those created later,\nbindings survive reloads.\nBinding function takes exactly one argument, this argument should be string,\nin case of any other input, function throws an exception.\nEach binding function call produces Runtime.bindingCalled notification.\n[addBinding](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-addBinding)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AddBindingParams {
    #[serde(rename = "name")]
    pub name: String,
    #[doc = "If specified, the binding is exposed to the executionContext with\nmatching name, even for contexts created after the binding is added.\nSee also `ExecutionContext.name` and `worldName` parameter to\n`Page.addScriptToEvaluateOnNewDocument`.\nThis parameter is mutually exclusive with `executionContextId`."]
    #[serde(rename = "executionContextName")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(default)]
    pub execution_context_name: Option<String>,
}
impl AddBindingParams {
    pub fn new(name: impl Into<String>) -> Self {
        Self {
            name: name.into(),
            execution_context_name: None,
        }
    }
}
impl<T: Into<String>> From<T> for AddBindingParams {
    fn from(url: T) -> Self {
        AddBindingParams::new(url)
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum AddBindingMethod {
    #[serde(rename = "Runtime.addBinding")]
    AddBinding,
}
#[doc = "If executionContextId is empty, adds binding with the given name on the\nglobal objects of all inspected contexts, including those created later,\nbindings survive reloads.\nBinding function takes exactly one argument, this argument should be string,\nin case of any other input, function throws an exception.\nEach binding function call produces Runtime.bindingCalled notification.\n[addBinding](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-addBinding)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AddBinding {
    pub method: AddBindingMethod,
    pub params: AddBindingParams,
}
impl AddBinding {
    pub const IDENTIFIER: &'static str = "Runtime.addBinding";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for AddBinding {
    type Result = super::results::AddBindingResult;
}
#[doc = "This method does not remove binding function from global object but\nunsubscribes current runtime agent from Runtime.bindingCalled notifications.\n[removeBinding](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-removeBinding)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RemoveBindingParams {
    #[serde(rename = "name")]
    pub name: String,
}
impl RemoveBindingParams {
    pub fn new(name: impl Into<String>) -> Self {
        Self { name: name.into() }
    }
}
impl<T: Into<String>> From<T> for RemoveBindingParams {
    fn from(url: T) -> Self {
        RemoveBindingParams::new(url)
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum RemoveBindingMethod {
    #[serde(rename = "Runtime.removeBinding")]
    RemoveBinding,
}
#[doc = "This method does not remove binding function from global object but\nunsubscribes current runtime agent from Runtime.bindingCalled notifications.\n[removeBinding](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-removeBinding)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RemoveBinding {
    pub method: RemoveBindingMethod,
    pub params: RemoveBindingParams,
}
impl RemoveBinding {
    pub const IDENTIFIER: &'static str = "Runtime.removeBinding";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for RemoveBinding {
    type Result = super::results::RemoveBindingResult;
}
#[doc = "This method tries to lookup and populate exception details for a\nJavaScript Error object.\nNote that the stackTrace portion of the resulting exceptionDetails will\nonly be populated if the Runtime domain was enabled at the time when the\nError was thrown.\n[getExceptionDetails](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getExceptionDetails)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetExceptionDetailsParams {
    #[doc = "The error object for which to resolve the exception details."]
    #[serde(rename = "errorObjectId")]
    pub error_object_id: super::types::RemoteObjectId,
}
impl GetExceptionDetailsParams {
    pub fn new(error_object_id: impl Into<super::types::RemoteObjectId>) -> Self {
        Self {
            error_object_id: error_object_id.into(),
        }
    }
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum GetExceptionDetailsMethod {
    #[serde(rename = "Runtime.getExceptionDetails")]
    GetExceptionDetails,
}
#[doc = "This method tries to lookup and populate exception details for a\nJavaScript Error object.\nNote that the stackTrace portion of the resulting exceptionDetails will\nonly be populated if the Runtime domain was enabled at the time when the\nError was thrown.\n[getExceptionDetails](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getExceptionDetails)"]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GetExceptionDetails {
    pub method: GetExceptionDetailsMethod,
    pub params: GetExceptionDetailsParams,
}
impl GetExceptionDetails {
    pub const IDENTIFIER: &'static str = "Runtime.getExceptionDetails";
    pub fn identifier(&self) -> &'static str {
        Self::IDENTIFIER
    }
}
impl crate::CommandResult for GetExceptionDetails {
    type Result = super::results::GetExceptionDetailsResult;
}
group_enum ! (RuntimeCommands { AwaitPromise (AwaitPromise) , CallFunctionOn (CallFunctionOn) , CompileScript (CompileScript) , Disable (Disable) , DiscardConsoleEntries (DiscardConsoleEntries) , Enable (Enable) , Evaluate (Evaluate) , GetIsolateId (GetIsolateId) , GetHeapUsage (GetHeapUsage) , GetProperties (GetProperties) , GlobalLexicalScopeNames (GlobalLexicalScopeNames) , QueryObjects (QueryObjects) , ReleaseObject (ReleaseObject) , ReleaseObjectGroup (ReleaseObjectGroup) , RunIfWaitingForDebugger (RunIfWaitingForDebugger) , RunScript (RunScript) , SetAsyncCallStackDepth (SetAsyncCallStackDepth) , SetCustomObjectFormatterEnabled (SetCustomObjectFormatterEnabled) , SetMaxCallStackSizeToCapture (SetMaxCallStackSizeToCapture) , TerminateExecution (TerminateExecution) , AddBinding (AddBinding) , RemoveBinding (RemoveBinding) , GetExceptionDetails (GetExceptionDetails) } + identifiable);