-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathGetFullAXTreeRequest.php
More file actions
88 lines (76 loc) · 1.75 KB
/
GetFullAXTreeRequest.php
File metadata and controls
88 lines (76 loc) · 1.75 KB
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
<?php
namespace ChromeDevtoolsProtocol\Model\Accessibility;
/**
* Request for Accessibility.getFullAXTree command.
*
* @generated This file has been auto-generated, do not edit.
*
* @author Jakub Kulhan <jakub.kulhan@gmail.com>
*/
final class GetFullAXTreeRequest implements \JsonSerializable
{
/**
* The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
*
* @var int|null
*/
public $depth;
/**
* Deprecated. This parameter has been renamed to `depth`. If depth is not provided, max_depth will be used.
*
* @var int|null
*/
public $max_depth;
/**
* The frame for whose document the AX tree should be retrieved. If omited, the root frame is used.
*
* @var string
*/
public $frameId;
public static function fromJson($data)
{
$instance = new static();
if (isset($data->depth)) {
$instance->depth = (int)$data->depth;
}
if (isset($data->max_depth)) {
$instance->max_depth = (int)$data->max_depth;
}
if (isset($data->frameId)) {
$instance->frameId = (string)$data->frameId;
}
return $instance;
}
public function jsonSerialize(): mixed
{
$data = new \stdClass();
if ($this->depth !== null) {
$data->depth = $this->depth;
}
if ($this->max_depth !== null) {
$data->max_depth = $this->max_depth;
}
if ($this->frameId !== null) {
$data->frameId = $this->frameId;
}
return $data;
}
/**
* Create new instance using builder.
*
* @return GetFullAXTreeRequestBuilder
*/
public static function builder(): GetFullAXTreeRequestBuilder
{
return new GetFullAXTreeRequestBuilder();
}
/**
* Create new empty instance.
*
* @return self
*/
public static function make(): self
{
return static::builder()->build();
}
}