Skip to content

Commit 72e0417

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent 4d4e6ab commit 72e0417

File tree

7 files changed

+267
-3
lines changed

7 files changed

+267
-3
lines changed

gen-src/ChromeDevtoolsProtocol/Domain/FetchDomain.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use ChromeDevtoolsProtocol\InternalClientInterface;
77
use ChromeDevtoolsProtocol\Model\Fetch\AuthRequiredEvent;
88
use ChromeDevtoolsProtocol\Model\Fetch\ContinueRequestRequest;
9+
use ChromeDevtoolsProtocol\Model\Fetch\ContinueResponseRequest;
910
use ChromeDevtoolsProtocol\Model\Fetch\ContinueWithAuthRequest;
1011
use ChromeDevtoolsProtocol\Model\Fetch\EnableRequest;
1112
use ChromeDevtoolsProtocol\Model\Fetch\FailRequestRequest;
@@ -35,6 +36,12 @@ public function continueRequest(ContextInterface $ctx, ContinueRequestRequest $r
3536
}
3637

3738

39+
public function continueResponse(ContextInterface $ctx, ContinueResponseRequest $request): void
40+
{
41+
$this->internalClient->executeCommand($ctx, 'Fetch.continueResponse', $request);
42+
}
43+
44+
3845
public function continueWithAuth(ContextInterface $ctx, ContinueWithAuthRequest $request): void
3946
{
4047
$this->internalClient->executeCommand($ctx, 'Fetch.continueWithAuth', $request);

gen-src/ChromeDevtoolsProtocol/Domain/FetchDomainInterface.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use ChromeDevtoolsProtocol\ContextInterface;
66
use ChromeDevtoolsProtocol\Model\Fetch\AuthRequiredEvent;
77
use ChromeDevtoolsProtocol\Model\Fetch\ContinueRequestRequest;
8+
use ChromeDevtoolsProtocol\Model\Fetch\ContinueResponseRequest;
89
use ChromeDevtoolsProtocol\Model\Fetch\ContinueWithAuthRequest;
910
use ChromeDevtoolsProtocol\Model\Fetch\EnableRequest;
1011
use ChromeDevtoolsProtocol\Model\Fetch\FailRequestRequest;
@@ -36,6 +37,17 @@ interface FetchDomainInterface
3637
public function continueRequest(ContextInterface $ctx, ContinueRequestRequest $request): void;
3738

3839

40+
/**
41+
* Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present.
42+
*
43+
* @param ContextInterface $ctx
44+
* @param ContinueResponseRequest $request
45+
*
46+
* @return void
47+
*/
48+
public function continueResponse(ContextInterface $ctx, ContinueResponseRequest $request): void;
49+
50+
3951
/**
4052
* Continues a request supplying authChallengeResponse following authRequired event.
4153
*
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Fetch;
4+
5+
/**
6+
* Request for Fetch.continueResponse command.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ContinueResponseRequest implements \JsonSerializable
13+
{
14+
/**
15+
* An id the client received in requestPaused event.
16+
*
17+
* @var string
18+
*/
19+
public $requestId;
20+
21+
/**
22+
* An HTTP response code. If absent, original response code will be used.
23+
*
24+
* @var int|null
25+
*/
26+
public $responseCode;
27+
28+
/**
29+
* A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
30+
*
31+
* @var string|null
32+
*/
33+
public $responsePhrase;
34+
35+
/**
36+
* Response headers. If absent, original response headers will be used.
37+
*
38+
* @var HeaderEntry[]|null
39+
*/
40+
public $responseHeaders;
41+
42+
/**
43+
* Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON)
44+
*
45+
* @var string|null
46+
*/
47+
public $binaryResponseHeaders;
48+
49+
50+
public static function fromJson($data)
51+
{
52+
$instance = new static();
53+
if (isset($data->requestId)) {
54+
$instance->requestId = (string)$data->requestId;
55+
}
56+
if (isset($data->responseCode)) {
57+
$instance->responseCode = (int)$data->responseCode;
58+
}
59+
if (isset($data->responsePhrase)) {
60+
$instance->responsePhrase = (string)$data->responsePhrase;
61+
}
62+
if (isset($data->responseHeaders)) {
63+
$instance->responseHeaders = [];
64+
foreach ($data->responseHeaders as $item) {
65+
$instance->responseHeaders[] = HeaderEntry::fromJson($item);
66+
}
67+
}
68+
if (isset($data->binaryResponseHeaders)) {
69+
$instance->binaryResponseHeaders = (string)$data->binaryResponseHeaders;
70+
}
71+
return $instance;
72+
}
73+
74+
75+
public function jsonSerialize()
76+
{
77+
$data = new \stdClass();
78+
if ($this->requestId !== null) {
79+
$data->requestId = $this->requestId;
80+
}
81+
if ($this->responseCode !== null) {
82+
$data->responseCode = $this->responseCode;
83+
}
84+
if ($this->responsePhrase !== null) {
85+
$data->responsePhrase = $this->responsePhrase;
86+
}
87+
if ($this->responseHeaders !== null) {
88+
$data->responseHeaders = [];
89+
foreach ($this->responseHeaders as $item) {
90+
$data->responseHeaders[] = $item->jsonSerialize();
91+
}
92+
}
93+
if ($this->binaryResponseHeaders !== null) {
94+
$data->binaryResponseHeaders = $this->binaryResponseHeaders;
95+
}
96+
return $data;
97+
}
98+
99+
100+
/**
101+
* Create new instance using builder.
102+
*
103+
* @return ContinueResponseRequestBuilder
104+
*/
105+
public static function builder(): ContinueResponseRequestBuilder
106+
{
107+
return new ContinueResponseRequestBuilder();
108+
}
109+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Fetch;
4+
5+
use ChromeDevtoolsProtocol\Exception\BuilderException;
6+
7+
/**
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ContinueResponseRequestBuilder
13+
{
14+
private $requestId;
15+
private $responseCode;
16+
private $responsePhrase;
17+
private $responseHeaders;
18+
private $binaryResponseHeaders;
19+
20+
21+
/**
22+
* Validate non-optional parameters and return new instance.
23+
*/
24+
public function build(): ContinueResponseRequest
25+
{
26+
$instance = new ContinueResponseRequest();
27+
if ($this->requestId === null) {
28+
throw new BuilderException('Property [requestId] is required.');
29+
}
30+
$instance->requestId = $this->requestId;
31+
$instance->responseCode = $this->responseCode;
32+
$instance->responsePhrase = $this->responsePhrase;
33+
$instance->responseHeaders = $this->responseHeaders;
34+
$instance->binaryResponseHeaders = $this->binaryResponseHeaders;
35+
return $instance;
36+
}
37+
38+
39+
/**
40+
* @param string $requestId
41+
*
42+
* @return self
43+
*/
44+
public function setRequestId($requestId): self
45+
{
46+
$this->requestId = $requestId;
47+
return $this;
48+
}
49+
50+
51+
/**
52+
* @param int|null $responseCode
53+
*
54+
* @return self
55+
*/
56+
public function setResponseCode($responseCode): self
57+
{
58+
$this->responseCode = $responseCode;
59+
return $this;
60+
}
61+
62+
63+
/**
64+
* @param string|null $responsePhrase
65+
*
66+
* @return self
67+
*/
68+
public function setResponsePhrase($responsePhrase): self
69+
{
70+
$this->responsePhrase = $responsePhrase;
71+
return $this;
72+
}
73+
74+
75+
/**
76+
* @param HeaderEntry[]|null $responseHeaders
77+
*
78+
* @return self
79+
*/
80+
public function setResponseHeaders($responseHeaders): self
81+
{
82+
$this->responseHeaders = $responseHeaders;
83+
return $this;
84+
}
85+
86+
87+
/**
88+
* @param string|null $binaryResponseHeaders
89+
*
90+
* @return self
91+
*/
92+
public function setBinaryResponseHeaders($binaryResponseHeaders): self
93+
{
94+
$this->binaryResponseHeaders = $binaryResponseHeaders;
95+
return $this;
96+
}
97+
}

gen-src/ChromeDevtoolsProtocol/Model/Fetch/FulfillRequestRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class FulfillRequestRequest implements \JsonSerializable
4040
public $binaryResponseHeaders;
4141

4242
/**
43-
* A response body. (Encoded as a base64 string when passed over JSON)
43+
* A response body. If absent, original response body will be used if the request is intercepted at the response stage and empty body will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)
4444
*
4545
* @var string|null
4646
*/

protocol.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9519,6 +9519,45 @@
95199519
}
95209520
]
95219521
},
9522+
{
9523+
"name": "continueResponse",
9524+
"description": "Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present.",
9525+
"experimental": true,
9526+
"parameters": [
9527+
{
9528+
"name": "requestId",
9529+
"description": "An id the client received in requestPaused event.",
9530+
"$ref": "RequestId"
9531+
},
9532+
{
9533+
"name": "responseCode",
9534+
"description": "An HTTP response code. If absent, original response code will be used.",
9535+
"optional": true,
9536+
"type": "integer"
9537+
},
9538+
{
9539+
"name": "responsePhrase",
9540+
"description": "A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.",
9541+
"optional": true,
9542+
"type": "string"
9543+
},
9544+
{
9545+
"name": "responseHeaders",
9546+
"description": "Response headers. If absent, original response headers will be used.",
9547+
"optional": true,
9548+
"type": "array",
9549+
"items": {
9550+
"$ref": "HeaderEntry"
9551+
}
9552+
},
9553+
{
9554+
"name": "binaryResponseHeaders",
9555+
"description": "Alternative way of specifying response headers as a \\0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON)",
9556+
"optional": true,
9557+
"type": "string"
9558+
}
9559+
]
9560+
},
95229561
{
95239562
"name": "continueWithAuth",
95249563
"description": "Continues a request supplying authChallengeResponse following authRequired event.",
@@ -9607,7 +9646,7 @@
96079646
},
96089647
{
96099648
"name": "body",
9610-
"description": "A response body. (Encoded as a base64 string when passed over JSON)",
9649+
"description": "A response body. If absent, original response body will be used if the request is intercepted at the response stage and empty body will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)",
96119650
"optional": true,
96129651
"type": "string"
96139652
},

protocol.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
552e5db11b125809468d52560dd6ae06 protocol.json
1+
86d8fa2e5a6f770501be7a84b1ce4d8d protocol.json

0 commit comments

Comments
 (0)