feat(php-nextgen-client): add support for streaming (#19192)

Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
This commit is contained in:
Emilien Escalle
2024-07-31 11:32:10 +02:00
committed by GitHub
parent 4874a0bce7
commit 7f551bb9a0
91 changed files with 21287 additions and 171 deletions

View File

@@ -199,7 +199,7 @@ class AuthApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -228,7 +228,7 @@ class AuthApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -313,7 +313,7 @@ class AuthApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -500,7 +500,7 @@ class AuthApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -529,7 +529,7 @@ class AuthApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -614,7 +614,7 @@ class AuthApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();

View File

@@ -223,7 +223,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('\SplFileObject' === '\SplFileObject') {
if (in_array('\SplFileObject', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -252,7 +252,7 @@ class BodyApi
}
$returnType = '\SplFileObject';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -337,7 +337,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -524,7 +524,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -553,7 +553,7 @@ class BodyApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -642,7 +642,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -839,7 +839,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -868,7 +868,7 @@ class BodyApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -957,7 +957,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1028,10 +1028,12 @@ class BodyApi
$formParams['files'] = [];
$paramFiles = is_array($files) ? $files : [$files];
foreach ($paramFiles as $paramFile) {
$formParams['files'][] = \GuzzleHttp\Psr7\Utils::tryFopen(
ObjectSerializer::toFormValue($paramFile),
'rb'
);
$formParams['files'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface
? $paramFile
: \GuzzleHttp\Psr7\Utils::tryFopen(
ObjectSerializer::toFormValue($paramFile),
'rb'
);
}
}
@@ -1165,7 +1167,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1194,7 +1196,7 @@ class BodyApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1283,7 +1285,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1348,10 +1350,12 @@ class BodyApi
$formParams['my-file'] = [];
$paramFiles = is_array($my_file) ? $my_file : [$my_file];
foreach ($paramFiles as $paramFile) {
$formParams['my-file'][] = \GuzzleHttp\Psr7\Utils::tryFopen(
ObjectSerializer::toFormValue($paramFile),
'rb'
);
$formParams['my-file'][] = $paramFile instanceof \Psr\Http\Message\StreamInterface
? $paramFile
: \GuzzleHttp\Psr7\Utils::tryFopen(
ObjectSerializer::toFormValue($paramFile),
'rb'
);
}
}
@@ -1485,7 +1489,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('\OpenAPI\Client\Model\Pet' === '\SplFileObject') {
if (in_array('\OpenAPI\Client\Model\Pet', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1514,7 +1518,7 @@ class BodyApi
}
$returnType = '\OpenAPI\Client\Model\Pet';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1603,7 +1607,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1800,7 +1804,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1829,7 +1833,7 @@ class BodyApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1918,7 +1922,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2115,7 +2119,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('\OpenAPI\Client\Model\Pet' === '\SplFileObject') {
if (in_array('\OpenAPI\Client\Model\Pet', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2144,7 +2148,7 @@ class BodyApi
}
$returnType = '\OpenAPI\Client\Model\Pet';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2233,7 +2237,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2430,7 +2434,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2459,7 +2463,7 @@ class BodyApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2548,7 +2552,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2745,7 +2749,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('\OpenAPI\Client\Model\StringEnumRef' === '\SplFileObject') {
if (in_array('\OpenAPI\Client\Model\StringEnumRef', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2774,7 +2778,7 @@ class BodyApi
}
$returnType = '\OpenAPI\Client\Model\StringEnumRef';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2863,7 +2867,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -3060,7 +3064,7 @@ class BodyApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -3089,7 +3093,7 @@ class BodyApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -3178,7 +3182,7 @@ class BodyApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();

View File

@@ -214,7 +214,7 @@ class FormApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -243,7 +243,7 @@ class FormApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -340,7 +340,7 @@ class FormApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -548,7 +548,7 @@ class FormApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -577,7 +577,7 @@ class FormApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -666,7 +666,7 @@ class FormApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -886,7 +886,7 @@ class FormApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -915,7 +915,7 @@ class FormApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1024,7 +1024,7 @@ class FormApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();

View File

@@ -216,7 +216,7 @@ class HeaderApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -245,7 +245,7 @@ class HeaderApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -350,7 +350,7 @@ class HeaderApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();

View File

@@ -212,7 +212,7 @@ class PathApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -241,7 +241,7 @@ class PathApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -342,7 +342,7 @@ class PathApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();

View File

@@ -231,7 +231,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -260,7 +260,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -353,7 +353,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -572,7 +572,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -601,7 +601,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -698,7 +698,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -929,7 +929,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -958,7 +958,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1055,7 +1055,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1278,7 +1278,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1307,7 +1307,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1396,7 +1396,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1595,7 +1595,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1624,7 +1624,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1713,7 +1713,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1912,7 +1912,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -1941,7 +1941,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2030,7 +2030,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2229,7 +2229,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2258,7 +2258,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2347,7 +2347,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2546,7 +2546,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2575,7 +2575,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2664,7 +2664,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2863,7 +2863,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2892,7 +2892,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -2981,7 +2981,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -3180,7 +3180,7 @@ class QueryApi
switch($statusCode) {
case 200:
if ('string' === '\SplFileObject') {
if (in_array('string', ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -3209,7 +3209,7 @@ class QueryApi
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
@@ -3298,7 +3298,7 @@ class QueryApi
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
if ($returnType === '\SplFileObject') {
if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();