-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathAttributionReportingIssueDetails.php
More file actions
72 lines (62 loc) · 1.75 KB
/
AttributionReportingIssueDetails.php
File metadata and controls
72 lines (62 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
<?php
namespace ChromeDevtoolsProtocol\Model\Audits;
/**
* Details for issues around "Attribution Reporting API" usage. Explainer: https://github.com/WICG/conversion-measurement-api
*
* @generated This file has been auto-generated, do not edit.
*
* @author Jakub Kulhan <jakub.kulhan@gmail.com>
*/
final class AttributionReportingIssueDetails implements \JsonSerializable
{
/** @var string */
public $violationType;
/** @var AffectedFrame|null */
public $frame;
/** @var AffectedRequest|null */
public $request;
/** @var int */
public $violatingNodeId;
/** @var string|null */
public $invalidParameter;
public static function fromJson($data)
{
$instance = new static();
if (isset($data->violationType)) {
$instance->violationType = (string)$data->violationType;
}
if (isset($data->frame)) {
$instance->frame = AffectedFrame::fromJson($data->frame);
}
if (isset($data->request)) {
$instance->request = AffectedRequest::fromJson($data->request);
}
if (isset($data->violatingNodeId)) {
$instance->violatingNodeId = (int)$data->violatingNodeId;
}
if (isset($data->invalidParameter)) {
$instance->invalidParameter = (string)$data->invalidParameter;
}
return $instance;
}
public function jsonSerialize(): mixed
{
$data = new \stdClass();
if ($this->violationType !== null) {
$data->violationType = $this->violationType;
}
if ($this->frame !== null) {
$data->frame = $this->frame->jsonSerialize();
}
if ($this->request !== null) {
$data->request = $this->request->jsonSerialize();
}
if ($this->violatingNodeId !== null) {
$data->violatingNodeId = $this->violatingNodeId;
}
if ($this->invalidParameter !== null) {
$data->invalidParameter = $this->invalidParameter;
}
return $data;
}
}