Skip to content

Commit e9808a1

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent 1584a2e commit e9808a1

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

gen-src/ChromeDevtoolsProtocol/Model/Page/PrintToPDFRequest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ final class PrintToPDFRequest implements \JsonSerializable
116116
*/
117117
public $preferCSSPageSize;
118118

119+
/**
120+
* return as stream
121+
*
122+
* @var string|null
123+
*/
124+
public $transferMode;
125+
119126

120127
public static function fromJson($data)
121128
{
@@ -165,6 +172,9 @@ public static function fromJson($data)
165172
if (isset($data->preferCSSPageSize)) {
166173
$instance->preferCSSPageSize = (bool)$data->preferCSSPageSize;
167174
}
175+
if (isset($data->transferMode)) {
176+
$instance->transferMode = (string)$data->transferMode;
177+
}
168178
return $instance;
169179
}
170180

@@ -217,6 +227,9 @@ public function jsonSerialize()
217227
if ($this->preferCSSPageSize !== null) {
218228
$data->preferCSSPageSize = $this->preferCSSPageSize;
219229
}
230+
if ($this->transferMode !== null) {
231+
$data->transferMode = $this->transferMode;
232+
}
220233
return $data;
221234
}
222235

gen-src/ChromeDevtoolsProtocol/Model/Page/PrintToPDFRequestBuilder.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ final class PrintToPDFRequestBuilder
3939

4040
private $preferCSSPageSize;
4141

42+
private $transferMode;
43+
4244

4345
/**
4446
* Validate non-optional parameters and return new instance.
@@ -61,6 +63,7 @@ public function build(): PrintToPDFRequest
6163
$instance->headerTemplate = $this->headerTemplate;
6264
$instance->footerTemplate = $this->footerTemplate;
6365
$instance->preferCSSPageSize = $this->preferCSSPageSize;
66+
$instance->transferMode = $this->transferMode;
6467
return $instance;
6568
}
6669

@@ -243,4 +246,16 @@ public function setPreferCSSPageSize($preferCSSPageSize): self
243246
$this->preferCSSPageSize = $preferCSSPageSize;
244247
return $this;
245248
}
249+
250+
251+
/**
252+
* @param string|null $transferMode
253+
*
254+
* @return self
255+
*/
256+
public function setTransferMode($transferMode): self
257+
{
258+
$this->transferMode = $transferMode;
259+
return $this;
260+
}
246261
}

gen-src/ChromeDevtoolsProtocol/Model/Page/PrintToPDFResponse.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,29 @@
1212
final class PrintToPDFResponse implements \JsonSerializable
1313
{
1414
/**
15-
* Base64-encoded pdf data.
15+
* Base64-encoded pdf data. Empty if |returnAsStream| is specified.
1616
*
1717
* @var string
1818
*/
1919
public $data;
2020

21+
/**
22+
* A handle of the stream that holds resulting PDF data.
23+
*
24+
* @var string
25+
*/
26+
public $stream;
27+
2128

2229
public static function fromJson($data)
2330
{
2431
$instance = new static();
2532
if (isset($data->data)) {
2633
$instance->data = (string)$data->data;
2734
}
35+
if (isset($data->stream)) {
36+
$instance->stream = (string)$data->stream;
37+
}
2838
return $instance;
2939
}
3040

@@ -35,6 +45,9 @@ public function jsonSerialize()
3545
if ($this->data !== null) {
3646
$data->data = $this->data;
3747
}
48+
if ($this->stream !== null) {
49+
$data->stream = $this->stream;
50+
}
3851
return $data;
3952
}
4053
}

protocol.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12585,6 +12585,7 @@
1258512585
"dependencies": [
1258612586
"Debugger",
1258712587
"DOM",
12588+
"IO",
1258812589
"Network",
1258912590
"Runtime"
1259012591
],
@@ -13634,13 +13635,31 @@
1363413635
"description": "Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.",
1363513636
"optional": true,
1363613637
"type": "boolean"
13638+
},
13639+
{
13640+
"name": "transferMode",
13641+
"description": "return as stream",
13642+
"experimental": true,
13643+
"optional": true,
13644+
"type": "string",
13645+
"enum": [
13646+
"ReturnAsBase64",
13647+
"ReturnAsStream"
13648+
]
1363713649
}
1363813650
],
1363913651
"returns": [
1364013652
{
1364113653
"name": "data",
13642-
"description": "Base64-encoded pdf data.",
13654+
"description": "Base64-encoded pdf data. Empty if |returnAsStream| is specified.",
1364313655
"type": "string"
13656+
},
13657+
{
13658+
"name": "stream",
13659+
"description": "A handle of the stream that holds resulting PDF data.",
13660+
"experimental": true,
13661+
"optional": true,
13662+
"$ref": "IO.StreamHandle"
1364413663
}
1364513664
]
1364613665
},

protocol.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2797e0aaa95a346a75d0d904047e7051 protocol.json
1+
6e5e00437f38b1e44332e281f13465ea protocol.json

0 commit comments

Comments
 (0)