diff --git a/generator/pom.xml b/generator/pom.xml index 0fb354bf..c910bba6 100644 --- a/generator/pom.xml +++ b/generator/pom.xml @@ -38,6 +38,6 @@ UTF-8 - 7.11.0 + 7.21.0 diff --git a/src/clients/channel-access-token/lib/Api/ChannelAccessTokenApi.php b/src/clients/channel-access-token/lib/Api/ChannelAccessTokenApi.php index 417a5bb5..feb06dfd 100644 --- a/src/clients/channel-access-token/lib/Api/ChannelAccessTokenApi.php +++ b/src/clients/channel-access-token/lib/Api/ChannelAccessTokenApi.php @@ -16,7 +16,7 @@ */ /** * ChannelAccessTokenApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Clients\ChannelAccessToken\ApiException; use LINE\Clients\ChannelAccessToken\Configuration; +use LINE\Clients\ChannelAccessToken\FormDataProcessor; use LINE\Clients\ChannelAccessToken\HeaderSelector; use LINE\Clients\ChannelAccessToken\ObjectSerializer; @@ -215,34 +218,15 @@ public function getsAllValidChannelAccessTokenKeyIdsWithHttpInfo($clientAssertio switch($statusCode) { case 200: - if ('\LINE\Clients\ChannelAccessToken\Model\ChannelAccessTokenKeyIdsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ChannelAccessToken\Model\ChannelAccessTokenKeyIdsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ChannelAccessToken\Model\ChannelAccessTokenKeyIdsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\ChannelAccessTokenKeyIdsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -256,34 +240,11 @@ public function getsAllValidChannelAccessTokenKeyIdsWithHttpInfo($clientAssertio ); } - $returnType = '\LINE\Clients\ChannelAccessToken\Model\ChannelAccessTokenKeyIdsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\ChannelAccessTokenKeyIdsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -293,8 +254,10 @@ public function getsAllValidChannelAccessTokenKeyIdsWithHttpInfo($clientAssertio $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -539,61 +502,21 @@ public function issueChannelTokenWithHttpInfo($grantType, $clientId, $clientSecr switch($statusCode) { case 200: - if ('\LINE\Clients\ChannelAccessToken\Model\IssueShortLivedChannelAccessTokenResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ChannelAccessToken\Model\IssueShortLivedChannelAccessTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ChannelAccessToken\Model\IssueShortLivedChannelAccessTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\IssueShortLivedChannelAccessTokenResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\ChannelAccessToken\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ChannelAccessToken\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ChannelAccessToken\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -607,34 +530,11 @@ public function issueChannelTokenWithHttpInfo($grantType, $clientId, $clientSecr ); } - $returnType = '\LINE\Clients\ChannelAccessToken\Model\IssueShortLivedChannelAccessTokenResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\IssueShortLivedChannelAccessTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -644,7 +544,7 @@ public function issueChannelTokenWithHttpInfo($grantType, $clientId, $clientSecr $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -652,8 +552,10 @@ public function issueChannelTokenWithHttpInfo($grantType, $clientId, $clientSecr $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -778,17 +680,16 @@ public function issueChannelTokenRequest($grantType, $clientId, $clientSecret, s // form params - if ($grantType !== null) { - $formParams['grant_type'] = ObjectSerializer::toFormValue($grantType); - } - // form params - if ($clientId !== null) { - $formParams['client_id'] = ObjectSerializer::toFormValue($clientId); - } - // form params - if ($clientSecret !== null) { - $formParams['client_secret'] = ObjectSerializer::toFormValue($clientSecret); - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'grant_type' => $grantType, + 'client_id' => $clientId, + 'client_secret' => $clientSecret, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -902,34 +803,15 @@ public function issueChannelTokenByJWTWithHttpInfo($grantType, $clientAssertionT switch($statusCode) { case 200: - if ('\LINE\Clients\ChannelAccessToken\Model\IssueChannelAccessTokenResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ChannelAccessToken\Model\IssueChannelAccessTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ChannelAccessToken\Model\IssueChannelAccessTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\IssueChannelAccessTokenResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -943,34 +825,11 @@ public function issueChannelTokenByJWTWithHttpInfo($grantType, $clientAssertionT ); } - $returnType = '\LINE\Clients\ChannelAccessToken\Model\IssueChannelAccessTokenResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\IssueChannelAccessTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -980,8 +839,10 @@ public function issueChannelTokenByJWTWithHttpInfo($grantType, $clientAssertionT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1106,17 +967,16 @@ public function issueChannelTokenByJWTRequest($grantType, $clientAssertionType, // form params - if ($grantType !== null) { - $formParams['grant_type'] = ObjectSerializer::toFormValue($grantType); - } - // form params - if ($clientAssertionType !== null) { - $formParams['client_assertion_type'] = ObjectSerializer::toFormValue($clientAssertionType); - } - // form params - if ($clientAssertion !== null) { - $formParams['client_assertion'] = ObjectSerializer::toFormValue($clientAssertion); - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'grant_type' => $grantType, + 'client_assertion_type' => $clientAssertionType, + 'client_assertion' => $clientAssertion, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -1238,34 +1098,15 @@ public function issueStatelessChannelTokenWithHttpInfo($grantType = null, $clien switch($statusCode) { case 200: - if ('\LINE\Clients\ChannelAccessToken\Model\IssueStatelessChannelAccessTokenResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ChannelAccessToken\Model\IssueStatelessChannelAccessTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ChannelAccessToken\Model\IssueStatelessChannelAccessTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\IssueStatelessChannelAccessTokenResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1279,34 +1120,11 @@ public function issueStatelessChannelTokenWithHttpInfo($grantType = null, $clien ); } - $returnType = '\LINE\Clients\ChannelAccessToken\Model\IssueStatelessChannelAccessTokenResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\IssueStatelessChannelAccessTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1316,8 +1134,10 @@ public function issueStatelessChannelTokenWithHttpInfo($grantType = null, $clien $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1436,25 +1256,18 @@ public function issueStatelessChannelTokenRequest($grantType = null, $clientAsse // form params - if ($grantType !== null) { - $formParams['grant_type'] = ObjectSerializer::toFormValue($grantType); - } - // form params - if ($clientAssertionType !== null) { - $formParams['client_assertion_type'] = ObjectSerializer::toFormValue($clientAssertionType); - } - // form params - if ($clientAssertion !== null) { - $formParams['client_assertion'] = ObjectSerializer::toFormValue($clientAssertion); - } - // form params - if ($clientId !== null) { - $formParams['client_id'] = ObjectSerializer::toFormValue($clientId); - } - // form params - if ($clientSecret !== null) { - $formParams['client_secret'] = ObjectSerializer::toFormValue($clientSecret); - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'grant_type' => $grantType, + 'client_assertion_type' => $clientAssertionType, + 'client_assertion' => $clientAssertion, + 'client_id' => $clientId, + 'client_secret' => $clientSecret, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -1562,10 +1375,11 @@ public function revokeChannelTokenWithHttpInfo($accessToken, string $contentType return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -1657,9 +1471,14 @@ public function revokeChannelTokenRequest($accessToken, string $contentType = se // form params - if ($accessToken !== null) { - $formParams['access_token'] = ObjectSerializer::toFormValue($accessToken); - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'access_token' => $accessToken, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( [], @@ -1771,10 +1590,11 @@ public function revokeChannelTokenByJWTWithHttpInfo($clientId, $clientSecret, $a return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -1886,17 +1706,16 @@ public function revokeChannelTokenByJWTRequest($clientId, $clientSecret, $access // form params - if ($clientId !== null) { - $formParams['client_id'] = ObjectSerializer::toFormValue($clientId); - } - // form params - if ($clientSecret !== null) { - $formParams['client_secret'] = ObjectSerializer::toFormValue($clientSecret); - } - // form params - if ($accessToken !== null) { - $formParams['access_token'] = ObjectSerializer::toFormValue($accessToken); - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'client_id' => $clientId, + 'client_secret' => $clientSecret, + 'access_token' => $accessToken, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( [], @@ -2006,34 +1825,15 @@ public function verifyChannelTokenWithHttpInfo($accessToken, string $contentType switch($statusCode) { case 200: - if ('\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2047,34 +1847,11 @@ public function verifyChannelTokenWithHttpInfo($accessToken, string $contentType ); } - $returnType = '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2084,8 +1861,10 @@ public function verifyChannelTokenWithHttpInfo($accessToken, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2190,9 +1969,14 @@ public function verifyChannelTokenRequest($accessToken, string $contentType = se // form params - if ($accessToken !== null) { - $formParams['access_token'] = ObjectSerializer::toFormValue($accessToken); - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'access_token' => $accessToken, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -2302,34 +2086,15 @@ public function verifyChannelTokenByJWTWithHttpInfo($accessToken, string $conten switch($statusCode) { case 200: - if ('\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2343,34 +2108,11 @@ public function verifyChannelTokenByJWTWithHttpInfo($accessToken, string $conten ); } - $returnType = '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ChannelAccessToken\Model\VerifyChannelAccessTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2380,8 +2122,10 @@ public function verifyChannelTokenByJWTWithHttpInfo($accessToken, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2564,8 +2308,59 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } /** * Issue a stateless channel access token by JWT assertion. * diff --git a/src/clients/channel-access-token/lib/ApiException.php b/src/clients/channel-access-token/lib/ApiException.php index 28545f48..1fc0d90d 100644 --- a/src/clients/channel-access-token/lib/ApiException.php +++ b/src/clients/channel-access-token/lib/ApiException.php @@ -16,7 +16,7 @@ */ /** * ApiException - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Configuration.php b/src/clients/channel-access-token/lib/Configuration.php index 5542f992..14ac0baf 100644 --- a/src/clients/channel-access-token/lib/Configuration.php +++ b/src/clients/channel-access-token/lib/Configuration.php @@ -16,7 +16,7 @@ */ /** * Configuration - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -44,7 +44,7 @@ /** * Configuration Class Doc Comment - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -138,6 +138,20 @@ class Configuration */ protected $tempFolderPath; + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -411,6 +425,49 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/src/clients/channel-access-token/lib/FormDataProcessor.php b/src/clients/channel-access-token/lib/FormDataProcessor.php new file mode 100644 index 00000000..b0f726fa --- /dev/null +++ b/src/clients/channel-access-token/lib/FormDataProcessor.php @@ -0,0 +1,261 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/clients/channel-access-token/lib/HeaderSelector.php b/src/clients/channel-access-token/lib/HeaderSelector.php index 1e88c359..8ce43a19 100644 --- a/src/clients/channel-access-token/lib/HeaderSelector.php +++ b/src/clients/channel-access-token/lib/HeaderSelector.php @@ -16,7 +16,7 @@ */ /** * HeaderSelector - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Model/ChannelAccessTokenKeyIdsResponse.php b/src/clients/channel-access-token/lib/Model/ChannelAccessTokenKeyIdsResponse.php index 8ad6df59..00a5f0d5 100644 --- a/src/clients/channel-access-token/lib/Model/ChannelAccessTokenKeyIdsResponse.php +++ b/src/clients/channel-access-token/lib/Model/ChannelAccessTokenKeyIdsResponse.php @@ -17,7 +17,7 @@ /** * ChannelAccessTokenKeyIdsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Model/ErrorResponse.php b/src/clients/channel-access-token/lib/Model/ErrorResponse.php index 702c10b0..fa23678e 100644 --- a/src/clients/channel-access-token/lib/Model/ErrorResponse.php +++ b/src/clients/channel-access-token/lib/Model/ErrorResponse.php @@ -17,7 +17,7 @@ /** * ErrorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Model/IssueChannelAccessTokenResponse.php b/src/clients/channel-access-token/lib/Model/IssueChannelAccessTokenResponse.php index b3c50e72..a88e36b8 100644 --- a/src/clients/channel-access-token/lib/Model/IssueChannelAccessTokenResponse.php +++ b/src/clients/channel-access-token/lib/Model/IssueChannelAccessTokenResponse.php @@ -17,7 +17,7 @@ /** * IssueChannelAccessTokenResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Model/IssueShortLivedChannelAccessTokenResponse.php b/src/clients/channel-access-token/lib/Model/IssueShortLivedChannelAccessTokenResponse.php index d41c2b0c..5ab59c5e 100644 --- a/src/clients/channel-access-token/lib/Model/IssueShortLivedChannelAccessTokenResponse.php +++ b/src/clients/channel-access-token/lib/Model/IssueShortLivedChannelAccessTokenResponse.php @@ -17,7 +17,7 @@ /** * IssueShortLivedChannelAccessTokenResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Model/IssueStatelessChannelAccessTokenResponse.php b/src/clients/channel-access-token/lib/Model/IssueStatelessChannelAccessTokenResponse.php index cc28f39a..62e4d4ba 100644 --- a/src/clients/channel-access-token/lib/Model/IssueStatelessChannelAccessTokenResponse.php +++ b/src/clients/channel-access-token/lib/Model/IssueStatelessChannelAccessTokenResponse.php @@ -17,7 +17,7 @@ /** * IssueStatelessChannelAccessTokenResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Model/ModelInterface.php b/src/clients/channel-access-token/lib/Model/ModelInterface.php index 2dd696e8..6dff9d7f 100644 --- a/src/clients/channel-access-token/lib/Model/ModelInterface.php +++ b/src/clients/channel-access-token/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken\Model @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/Model/VerifyChannelAccessTokenResponse.php b/src/clients/channel-access-token/lib/Model/VerifyChannelAccessTokenResponse.php index f7a63e14..ff712990 100644 --- a/src/clients/channel-access-token/lib/Model/VerifyChannelAccessTokenResponse.php +++ b/src/clients/channel-access-token/lib/Model/VerifyChannelAccessTokenResponse.php @@ -17,7 +17,7 @@ /** * VerifyChannelAccessTokenResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ChannelAccessToken @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/channel-access-token/lib/ObjectSerializer.php b/src/clients/channel-access-token/lib/ObjectSerializer.php index c79cf3ab..4ddad993 100644 --- a/src/clients/channel-access-token/lib/ObjectSerializer.php +++ b/src/clients/channel-access-token/lib/ObjectSerializer.php @@ -32,9 +32,8 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/insight/lib/Api/InsightApi.php b/src/clients/insight/lib/Api/InsightApi.php index daaa8e70..4533e4a5 100644 --- a/src/clients/insight/lib/Api/InsightApi.php +++ b/src/clients/insight/lib/Api/InsightApi.php @@ -16,7 +16,7 @@ */ /** * InsightApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Clients\Insight\ApiException; use LINE\Clients\Insight\Configuration; +use LINE\Clients\Insight\FormDataProcessor; use LINE\Clients\Insight\HeaderSelector; use LINE\Clients\Insight\ObjectSerializer; @@ -202,34 +205,15 @@ public function getFriendsDemographicsWithHttpInfo(string $contentType = self::c switch($statusCode) { case 200: - if ('\LINE\Clients\Insight\Model\GetFriendsDemographicsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\Insight\Model\GetFriendsDemographicsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\Insight\Model\GetFriendsDemographicsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetFriendsDemographicsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -243,34 +227,11 @@ public function getFriendsDemographicsWithHttpInfo(string $contentType = self::c ); } - $returnType = '\LINE\Clients\Insight\Model\GetFriendsDemographicsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetFriendsDemographicsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -280,8 +241,10 @@ public function getFriendsDemographicsWithHttpInfo(string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -492,34 +455,15 @@ public function getMessageEventWithHttpInfo($requestId, string $contentType = se switch($statusCode) { case 200: - if ('\LINE\Clients\Insight\Model\GetMessageEventResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\Insight\Model\GetMessageEventResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\Insight\Model\GetMessageEventResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetMessageEventResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -533,34 +477,11 @@ public function getMessageEventWithHttpInfo($requestId, string $contentType = se ); } - $returnType = '\LINE\Clients\Insight\Model\GetMessageEventResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetMessageEventResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -570,8 +491,10 @@ public function getMessageEventWithHttpInfo($requestId, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -808,34 +731,15 @@ public function getNumberOfFollowersWithHttpInfo($date = null, string $contentTy switch($statusCode) { case 200: - if ('\LINE\Clients\Insight\Model\GetNumberOfFollowersResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\Insight\Model\GetNumberOfFollowersResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\Insight\Model\GetNumberOfFollowersResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetNumberOfFollowersResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -849,34 +753,11 @@ public function getNumberOfFollowersWithHttpInfo($date = null, string $contentTy ); } - $returnType = '\LINE\Clients\Insight\Model\GetNumberOfFollowersResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetNumberOfFollowersResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -886,8 +767,10 @@ public function getNumberOfFollowersWithHttpInfo($date = null, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1124,34 +1007,15 @@ public function getNumberOfMessageDeliveriesWithHttpInfo($date, string $contentT switch($statusCode) { case 200: - if ('\LINE\Clients\Insight\Model\GetNumberOfMessageDeliveriesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\Insight\Model\GetNumberOfMessageDeliveriesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\Insight\Model\GetNumberOfMessageDeliveriesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetNumberOfMessageDeliveriesResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1165,34 +1029,11 @@ public function getNumberOfMessageDeliveriesWithHttpInfo($date, string $contentT ); } - $returnType = '\LINE\Clients\Insight\Model\GetNumberOfMessageDeliveriesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetNumberOfMessageDeliveriesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1202,8 +1043,10 @@ public function getNumberOfMessageDeliveriesWithHttpInfo($date, string $contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1446,34 +1289,15 @@ public function getStatisticsPerUnitWithHttpInfo($customAggregationUnit, $from, switch($statusCode) { case 200: - if ('\LINE\Clients\Insight\Model\GetStatisticsPerUnitResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\Insight\Model\GetStatisticsPerUnitResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\Insight\Model\GetStatisticsPerUnitResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetStatisticsPerUnitResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1487,34 +1311,11 @@ public function getStatisticsPerUnitWithHttpInfo($customAggregationUnit, $from, ); } - $returnType = '\LINE\Clients\Insight\Model\GetStatisticsPerUnitResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\Insight\Model\GetStatisticsPerUnitResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1524,8 +1325,10 @@ public function getStatisticsPerUnitWithHttpInfo($customAggregationUnit, $from, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1777,6 +1580,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/clients/insight/lib/ApiException.php b/src/clients/insight/lib/ApiException.php index 119884ad..5b37902c 100644 --- a/src/clients/insight/lib/ApiException.php +++ b/src/clients/insight/lib/ApiException.php @@ -16,7 +16,7 @@ */ /** * ApiException - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Configuration.php b/src/clients/insight/lib/Configuration.php index 45b6e94b..95d95d52 100644 --- a/src/clients/insight/lib/Configuration.php +++ b/src/clients/insight/lib/Configuration.php @@ -16,7 +16,7 @@ */ /** * Configuration - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -44,7 +44,7 @@ /** * Configuration Class Doc Comment - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -138,6 +138,20 @@ class Configuration */ protected $tempFolderPath; + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -411,6 +425,49 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/src/clients/insight/lib/FormDataProcessor.php b/src/clients/insight/lib/FormDataProcessor.php new file mode 100644 index 00000000..c18a579a --- /dev/null +++ b/src/clients/insight/lib/FormDataProcessor.php @@ -0,0 +1,261 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/clients/insight/lib/HeaderSelector.php b/src/clients/insight/lib/HeaderSelector.php index a4c2985b..7b2e1348 100644 --- a/src/clients/insight/lib/HeaderSelector.php +++ b/src/clients/insight/lib/HeaderSelector.php @@ -16,7 +16,7 @@ */ /** * HeaderSelector - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/AgeTile.php b/src/clients/insight/lib/Model/AgeTile.php index f2980910..b6df29ed 100644 --- a/src/clients/insight/lib/Model/AgeTile.php +++ b/src/clients/insight/lib/Model/AgeTile.php @@ -17,7 +17,7 @@ /** * AgeTile * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/AppTypeTile.php b/src/clients/insight/lib/Model/AppTypeTile.php index ba1a5991..ed7bfb8c 100644 --- a/src/clients/insight/lib/Model/AppTypeTile.php +++ b/src/clients/insight/lib/Model/AppTypeTile.php @@ -17,7 +17,7 @@ /** * AppTypeTile * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/AreaTile.php b/src/clients/insight/lib/Model/AreaTile.php index e7eb7062..83b772e0 100644 --- a/src/clients/insight/lib/Model/AreaTile.php +++ b/src/clients/insight/lib/Model/AreaTile.php @@ -17,7 +17,7 @@ /** * AreaTile * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/ErrorDetail.php b/src/clients/insight/lib/Model/ErrorDetail.php index aae43338..ead98667 100644 --- a/src/clients/insight/lib/Model/ErrorDetail.php +++ b/src/clients/insight/lib/Model/ErrorDetail.php @@ -17,7 +17,7 @@ /** * ErrorDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/ErrorResponse.php b/src/clients/insight/lib/Model/ErrorResponse.php index 426ae7a0..672ac25c 100644 --- a/src/clients/insight/lib/Model/ErrorResponse.php +++ b/src/clients/insight/lib/Model/ErrorResponse.php @@ -17,7 +17,7 @@ /** * ErrorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GenderTile.php b/src/clients/insight/lib/Model/GenderTile.php index 551db4c3..b530dde2 100644 --- a/src/clients/insight/lib/Model/GenderTile.php +++ b/src/clients/insight/lib/Model/GenderTile.php @@ -17,7 +17,7 @@ /** * GenderTile * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetFriendsDemographicsResponse.php b/src/clients/insight/lib/Model/GetFriendsDemographicsResponse.php index 6e4382b0..f04eee88 100644 --- a/src/clients/insight/lib/Model/GetFriendsDemographicsResponse.php +++ b/src/clients/insight/lib/Model/GetFriendsDemographicsResponse.php @@ -17,7 +17,7 @@ /** * GetFriendsDemographicsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetMessageEventResponse.php b/src/clients/insight/lib/Model/GetMessageEventResponse.php index 21d7fae3..2074a351 100644 --- a/src/clients/insight/lib/Model/GetMessageEventResponse.php +++ b/src/clients/insight/lib/Model/GetMessageEventResponse.php @@ -17,7 +17,7 @@ /** * GetMessageEventResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetMessageEventResponseClick.php b/src/clients/insight/lib/Model/GetMessageEventResponseClick.php index 37083e61..78022b76 100644 --- a/src/clients/insight/lib/Model/GetMessageEventResponseClick.php +++ b/src/clients/insight/lib/Model/GetMessageEventResponseClick.php @@ -17,7 +17,7 @@ /** * GetMessageEventResponseClick * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetMessageEventResponseMessage.php b/src/clients/insight/lib/Model/GetMessageEventResponseMessage.php index d254c1be..0b499c10 100644 --- a/src/clients/insight/lib/Model/GetMessageEventResponseMessage.php +++ b/src/clients/insight/lib/Model/GetMessageEventResponseMessage.php @@ -17,7 +17,7 @@ /** * GetMessageEventResponseMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetMessageEventResponseOverview.php b/src/clients/insight/lib/Model/GetMessageEventResponseOverview.php index b6473f7d..f3a9c488 100644 --- a/src/clients/insight/lib/Model/GetMessageEventResponseOverview.php +++ b/src/clients/insight/lib/Model/GetMessageEventResponseOverview.php @@ -17,7 +17,7 @@ /** * GetMessageEventResponseOverview * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetNumberOfFollowersResponse.php b/src/clients/insight/lib/Model/GetNumberOfFollowersResponse.php index e2efaf4e..eca110fd 100644 --- a/src/clients/insight/lib/Model/GetNumberOfFollowersResponse.php +++ b/src/clients/insight/lib/Model/GetNumberOfFollowersResponse.php @@ -17,7 +17,7 @@ /** * GetNumberOfFollowersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetNumberOfMessageDeliveriesResponse.php b/src/clients/insight/lib/Model/GetNumberOfMessageDeliveriesResponse.php index 3ae53160..205aa5de 100644 --- a/src/clients/insight/lib/Model/GetNumberOfMessageDeliveriesResponse.php +++ b/src/clients/insight/lib/Model/GetNumberOfMessageDeliveriesResponse.php @@ -17,7 +17,7 @@ /** * GetNumberOfMessageDeliveriesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponse.php b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponse.php index 059f634d..814867dd 100644 --- a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponse.php +++ b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponse.php @@ -17,7 +17,7 @@ /** * GetStatisticsPerUnitResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseClick.php b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseClick.php index e79f41b2..51287c83 100644 --- a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseClick.php +++ b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseClick.php @@ -17,7 +17,7 @@ /** * GetStatisticsPerUnitResponseClick * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseMessage.php b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseMessage.php index 55bc4f36..eb2f2b47 100644 --- a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseMessage.php +++ b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseMessage.php @@ -17,7 +17,7 @@ /** * GetStatisticsPerUnitResponseMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseOverview.php b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseOverview.php index 36eb9670..c8387a28 100644 --- a/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseOverview.php +++ b/src/clients/insight/lib/Model/GetStatisticsPerUnitResponseOverview.php @@ -17,7 +17,7 @@ /** * GetStatisticsPerUnitResponseOverview * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/ModelInterface.php b/src/clients/insight/lib/Model/ModelInterface.php index b0b2468c..d3b8fe5b 100644 --- a/src/clients/insight/lib/Model/ModelInterface.php +++ b/src/clients/insight/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight\Model @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/Model/SubscriptionPeriodTile.php b/src/clients/insight/lib/Model/SubscriptionPeriodTile.php index 0e92da6d..2c01f10a 100644 --- a/src/clients/insight/lib/Model/SubscriptionPeriodTile.php +++ b/src/clients/insight/lib/Model/SubscriptionPeriodTile.php @@ -17,7 +17,7 @@ /** * SubscriptionPeriodTile * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Insight @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/insight/lib/ObjectSerializer.php b/src/clients/insight/lib/ObjectSerializer.php index e31e99c4..61059cb7 100644 --- a/src/clients/insight/lib/ObjectSerializer.php +++ b/src/clients/insight/lib/ObjectSerializer.php @@ -32,9 +32,8 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/liff/lib/Api/LiffApi.php b/src/clients/liff/lib/Api/LiffApi.php index af45f2eb..eafd4833 100644 --- a/src/clients/liff/lib/Api/LiffApi.php +++ b/src/clients/liff/lib/Api/LiffApi.php @@ -16,7 +16,7 @@ */ /** * LiffApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Clients\Liff\ApiException; use LINE\Clients\Liff\Configuration; +use LINE\Clients\Liff\FormDataProcessor; use LINE\Clients\Liff\HeaderSelector; use LINE\Clients\Liff\ObjectSerializer; @@ -205,34 +208,15 @@ public function addLIFFAppWithHttpInfo($addLiffAppRequest, string $contentType = switch($statusCode) { case 200: - if ('\LINE\Clients\Liff\Model\AddLiffAppResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\Liff\Model\AddLiffAppResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\Liff\Model\AddLiffAppResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\Liff\Model\AddLiffAppResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -246,34 +230,11 @@ public function addLIFFAppWithHttpInfo($addLiffAppRequest, string $contentType = ); } - $returnType = '\LINE\Clients\Liff\Model\AddLiffAppResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\Liff\Model\AddLiffAppResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -283,8 +244,10 @@ public function addLIFFAppWithHttpInfo($addLiffAppRequest, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -514,10 +477,11 @@ public function deleteLIFFAppWithHttpInfo($liffId, string $contentType = self::c return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -735,34 +699,15 @@ public function getAllLIFFAppsWithHttpInfo(string $contentType = self::contentTy switch($statusCode) { case 200: - if ('\LINE\Clients\Liff\Model\GetAllLiffAppsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\Liff\Model\GetAllLiffAppsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\Liff\Model\GetAllLiffAppsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\Liff\Model\GetAllLiffAppsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -776,34 +721,11 @@ public function getAllLIFFAppsWithHttpInfo(string $contentType = self::contentTy ); } - $returnType = '\LINE\Clients\Liff\Model\GetAllLiffAppsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\Liff\Model\GetAllLiffAppsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -813,8 +735,10 @@ public function getAllLIFFAppsWithHttpInfo(string $contentType = self::contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1029,10 +953,11 @@ public function updateLIFFAppWithHttpInfo($liffId, $updateLiffAppRequest, string return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -1226,6 +1151,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/clients/liff/lib/ApiException.php b/src/clients/liff/lib/ApiException.php index f1e0cdac..b4701e98 100644 --- a/src/clients/liff/lib/ApiException.php +++ b/src/clients/liff/lib/ApiException.php @@ -16,7 +16,7 @@ */ /** * ApiException - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Configuration.php b/src/clients/liff/lib/Configuration.php index bf44dfe1..5ec71152 100644 --- a/src/clients/liff/lib/Configuration.php +++ b/src/clients/liff/lib/Configuration.php @@ -16,7 +16,7 @@ */ /** * Configuration - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -44,7 +44,7 @@ /** * Configuration Class Doc Comment - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -138,6 +138,20 @@ class Configuration */ protected $tempFolderPath; + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -411,6 +425,49 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/src/clients/liff/lib/FormDataProcessor.php b/src/clients/liff/lib/FormDataProcessor.php new file mode 100644 index 00000000..e93c993c --- /dev/null +++ b/src/clients/liff/lib/FormDataProcessor.php @@ -0,0 +1,261 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/clients/liff/lib/HeaderSelector.php b/src/clients/liff/lib/HeaderSelector.php index 9e4abc40..9c910a9a 100644 --- a/src/clients/liff/lib/HeaderSelector.php +++ b/src/clients/liff/lib/HeaderSelector.php @@ -16,7 +16,7 @@ */ /** * HeaderSelector - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/AddLiffAppRequest.php b/src/clients/liff/lib/Model/AddLiffAppRequest.php index 6c143970..51b57711 100644 --- a/src/clients/liff/lib/Model/AddLiffAppRequest.php +++ b/src/clients/liff/lib/Model/AddLiffAppRequest.php @@ -17,7 +17,7 @@ /** * AddLiffAppRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/AddLiffAppResponse.php b/src/clients/liff/lib/Model/AddLiffAppResponse.php index 6bc7d4d8..1194f869 100644 --- a/src/clients/liff/lib/Model/AddLiffAppResponse.php +++ b/src/clients/liff/lib/Model/AddLiffAppResponse.php @@ -17,7 +17,7 @@ /** * AddLiffAppResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/GetAllLiffAppsResponse.php b/src/clients/liff/lib/Model/GetAllLiffAppsResponse.php index 03078438..65b3be27 100644 --- a/src/clients/liff/lib/Model/GetAllLiffAppsResponse.php +++ b/src/clients/liff/lib/Model/GetAllLiffAppsResponse.php @@ -17,7 +17,7 @@ /** * GetAllLiffAppsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/LiffApp.php b/src/clients/liff/lib/Model/LiffApp.php index 5dd0f9df..7a8dcd24 100644 --- a/src/clients/liff/lib/Model/LiffApp.php +++ b/src/clients/liff/lib/Model/LiffApp.php @@ -17,7 +17,7 @@ /** * LiffApp * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/LiffBotPrompt.php b/src/clients/liff/lib/Model/LiffBotPrompt.php index dcdcb18b..c39102d7 100644 --- a/src/clients/liff/lib/Model/LiffBotPrompt.php +++ b/src/clients/liff/lib/Model/LiffBotPrompt.php @@ -17,7 +17,7 @@ /** * LiffBotPrompt * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/LiffFeatures.php b/src/clients/liff/lib/Model/LiffFeatures.php index f9e74dc8..0dd0a18e 100644 --- a/src/clients/liff/lib/Model/LiffFeatures.php +++ b/src/clients/liff/lib/Model/LiffFeatures.php @@ -17,7 +17,7 @@ /** * LiffFeatures * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/LiffScope.php b/src/clients/liff/lib/Model/LiffScope.php index 8a6799d3..a4acee50 100644 --- a/src/clients/liff/lib/Model/LiffScope.php +++ b/src/clients/liff/lib/Model/LiffScope.php @@ -17,7 +17,7 @@ /** * LiffScope * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/LiffView.php b/src/clients/liff/lib/Model/LiffView.php index c6e75fb1..c002c71e 100644 --- a/src/clients/liff/lib/Model/LiffView.php +++ b/src/clients/liff/lib/Model/LiffView.php @@ -17,7 +17,7 @@ /** * LiffView * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/ModelInterface.php b/src/clients/liff/lib/Model/ModelInterface.php index 169cc893..6d8e24b7 100644 --- a/src/clients/liff/lib/Model/ModelInterface.php +++ b/src/clients/liff/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff\Model @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/UpdateLiffAppRequest.php b/src/clients/liff/lib/Model/UpdateLiffAppRequest.php index 13ce1972..23888d45 100644 --- a/src/clients/liff/lib/Model/UpdateLiffAppRequest.php +++ b/src/clients/liff/lib/Model/UpdateLiffAppRequest.php @@ -17,7 +17,7 @@ /** * UpdateLiffAppRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/Model/UpdateLiffView.php b/src/clients/liff/lib/Model/UpdateLiffView.php index 874e7230..30b8bcd7 100644 --- a/src/clients/liff/lib/Model/UpdateLiffView.php +++ b/src/clients/liff/lib/Model/UpdateLiffView.php @@ -17,7 +17,7 @@ /** * UpdateLiffView * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\Liff @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/liff/lib/ObjectSerializer.php b/src/clients/liff/lib/ObjectSerializer.php index 0e934be7..a9723523 100644 --- a/src/clients/liff/lib/ObjectSerializer.php +++ b/src/clients/liff/lib/ObjectSerializer.php @@ -32,9 +32,8 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/manage-audience/lib/Api/ManageAudienceApi.php b/src/clients/manage-audience/lib/Api/ManageAudienceApi.php index 0997ab58..74e5a126 100644 --- a/src/clients/manage-audience/lib/Api/ManageAudienceApi.php +++ b/src/clients/manage-audience/lib/Api/ManageAudienceApi.php @@ -16,7 +16,7 @@ */ /** * ManageAudienceApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Clients\ManageAudience\ApiException; use LINE\Clients\ManageAudience\Configuration; +use LINE\Clients\ManageAudience\FormDataProcessor; use LINE\Clients\ManageAudience\HeaderSelector; use LINE\Clients\ManageAudience\ObjectSerializer; @@ -217,10 +220,11 @@ public function addAudienceToAudienceGroupWithHttpInfo($addAudienceToAudienceGro return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -431,34 +435,15 @@ public function createAudienceGroupWithHttpInfo($createAudienceGroupRequest, str switch($statusCode) { case 202: - if ('\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -472,34 +457,11 @@ public function createAudienceGroupWithHttpInfo($createAudienceGroupRequest, str ); } - $returnType = '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -509,8 +471,10 @@ public function createAudienceGroupWithHttpInfo($createAudienceGroupRequest, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -734,34 +698,15 @@ public function createClickBasedAudienceGroupWithHttpInfo($createClickBasedAudie switch($statusCode) { case 202: - if ('\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -775,34 +720,11 @@ public function createClickBasedAudienceGroupWithHttpInfo($createClickBasedAudie ); } - $returnType = '\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateClickBasedAudienceGroupResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -812,8 +734,10 @@ public function createClickBasedAudienceGroupWithHttpInfo($createClickBasedAudie $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1037,34 +961,15 @@ public function createImpBasedAudienceGroupWithHttpInfo($createImpBasedAudienceG switch($statusCode) { case 202: - if ('\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1078,34 +983,11 @@ public function createImpBasedAudienceGroupWithHttpInfo($createImpBasedAudienceG ); } - $returnType = '\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateImpBasedAudienceGroupResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -1115,8 +997,10 @@ public function createImpBasedAudienceGroupWithHttpInfo($createImpBasedAudienceG $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1338,10 +1222,11 @@ public function deleteAudienceGroupWithHttpInfo($audienceGroupId, string $conten return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -1553,61 +1438,21 @@ public function getAudienceDataWithHttpInfo($audienceGroupId, string $contentTyp switch($statusCode) { case 200: - if ('\LINE\Clients\ManageAudience\Model\GetAudienceDataResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\GetAudienceDataResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\GetAudienceDataResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetAudienceDataResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\ManageAudience\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1621,34 +1466,11 @@ public function getAudienceDataWithHttpInfo($audienceGroupId, string $contentTyp ); } - $returnType = '\LINE\Clients\ManageAudience\Model\GetAudienceDataResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetAudienceDataResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1658,7 +1480,7 @@ public function getAudienceDataWithHttpInfo($audienceGroupId, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1666,8 +1488,10 @@ public function getAudienceDataWithHttpInfo($audienceGroupId, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1902,34 +1726,15 @@ public function getAudienceGroupsWithHttpInfo($page, $description = null, $statu switch($statusCode) { case 200: - if ('\LINE\Clients\ManageAudience\Model\GetAudienceGroupsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\GetAudienceGroupsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\GetAudienceGroupsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetAudienceGroupsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1943,34 +1748,11 @@ public function getAudienceGroupsWithHttpInfo($page, $description = null, $statu ); } - $returnType = '\LINE\Clients\ManageAudience\Model\GetAudienceGroupsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetAudienceGroupsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1980,8 +1762,10 @@ public function getAudienceGroupsWithHttpInfo($page, $description = null, $statu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2278,61 +2062,21 @@ public function getSharedAudienceDataWithHttpInfo($audienceGroupId, string $cont switch($statusCode) { case 200: - if ('\LINE\Clients\ManageAudience\Model\GetSharedAudienceDataResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\GetSharedAudienceDataResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\GetSharedAudienceDataResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetSharedAudienceDataResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\ManageAudience\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2346,34 +2090,11 @@ public function getSharedAudienceDataWithHttpInfo($audienceGroupId, string $cont ); } - $returnType = '\LINE\Clients\ManageAudience\Model\GetSharedAudienceDataResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetSharedAudienceDataResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2383,7 +2104,7 @@ public function getSharedAudienceDataWithHttpInfo($audienceGroupId, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2391,8 +2112,10 @@ public function getSharedAudienceDataWithHttpInfo($audienceGroupId, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2627,34 +2350,15 @@ public function getSharedAudienceGroupsWithHttpInfo($page, $description = null, switch($statusCode) { case 200: - if ('\LINE\Clients\ManageAudience\Model\GetSharedAudienceGroupsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\GetSharedAudienceGroupsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\GetSharedAudienceGroupsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetSharedAudienceGroupsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2668,34 +2372,11 @@ public function getSharedAudienceGroupsWithHttpInfo($page, $description = null, ); } - $returnType = '\LINE\Clients\ManageAudience\Model\GetSharedAudienceGroupsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\GetSharedAudienceGroupsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2705,8 +2386,10 @@ public function getSharedAudienceGroupsWithHttpInfo($page, $description = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3003,10 +2686,11 @@ public function updateAudienceGroupDescriptionWithHttpInfo($audienceGroupId, $up return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -3196,6 +2880,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/clients/manage-audience/lib/Api/ManageAudienceBlobApi.php b/src/clients/manage-audience/lib/Api/ManageAudienceBlobApi.php index eb61999c..b547acdc 100644 --- a/src/clients/manage-audience/lib/Api/ManageAudienceBlobApi.php +++ b/src/clients/manage-audience/lib/Api/ManageAudienceBlobApi.php @@ -16,7 +16,7 @@ */ /** * ManageAudienceBlobApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Clients\ManageAudience\ApiException; use LINE\Clients\ManageAudience\Configuration; +use LINE\Clients\ManageAudience\FormDataProcessor; use LINE\Clients\ManageAudience\HeaderSelector; use LINE\Clients\ManageAudience\ObjectSerializer; @@ -209,10 +212,11 @@ public function addUserIdsToAudienceWithHttpInfo($file, $audienceGroupId = null, return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -330,25 +334,16 @@ public function addUserIdsToAudienceRequest($file, $audienceGroupId = null, $upl // form params - if ($audienceGroupId !== null) { - $formParams['audienceGroupId'] = ObjectSerializer::toFormValue($audienceGroupId); - } - // form params - if ($uploadDescription !== null) { - $formParams['uploadDescription'] = ObjectSerializer::toFormValue($uploadDescription); - } - // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'audienceGroupId' => $audienceGroupId, + 'uploadDescription' => $uploadDescription, + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $multipart = true; $headers = $this->headerSelector->selectHeaders( @@ -506,34 +501,15 @@ public function createAudienceForUploadingUserIdsWithHttpInfo($file, $descriptio switch($statusCode) { case 202: - if ('\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -547,34 +523,11 @@ public function createAudienceForUploadingUserIdsWithHttpInfo($file, $descriptio ); } - $returnType = '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\ManageAudience\Model\CreateAudienceGroupResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -584,8 +537,10 @@ public function createAudienceForUploadingUserIdsWithHttpInfo($file, $descriptio $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -723,29 +678,17 @@ public function createAudienceForUploadingUserIdsRequest($file, $description = n // form params - if ($description !== null) { - $formParams['description'] = ObjectSerializer::toFormValue($description); - } - // form params - if ($isIfaAudience !== null) { - $formParams['isIfaAudience'] = ObjectSerializer::toFormValue($isIfaAudience); - } - // form params - if ($uploadDescription !== null) { - $formParams['uploadDescription'] = ObjectSerializer::toFormValue($uploadDescription); - } - // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + 'description' => $description, + 'isIfaAudience' => $isIfaAudience, + 'uploadDescription' => $uploadDescription, + 'file' => $file, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; $multipart = true; $headers = $this->headerSelector->selectHeaders( @@ -846,6 +789,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/clients/manage-audience/lib/ApiException.php b/src/clients/manage-audience/lib/ApiException.php index eba67b16..15f8b6c7 100644 --- a/src/clients/manage-audience/lib/ApiException.php +++ b/src/clients/manage-audience/lib/ApiException.php @@ -16,7 +16,7 @@ */ /** * ApiException - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Configuration.php b/src/clients/manage-audience/lib/Configuration.php index 519420d5..95c1d388 100644 --- a/src/clients/manage-audience/lib/Configuration.php +++ b/src/clients/manage-audience/lib/Configuration.php @@ -16,7 +16,7 @@ */ /** * Configuration - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -44,7 +44,7 @@ /** * Configuration Class Doc Comment - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -138,6 +138,20 @@ class Configuration */ protected $tempFolderPath; + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -411,6 +425,49 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/src/clients/manage-audience/lib/FormDataProcessor.php b/src/clients/manage-audience/lib/FormDataProcessor.php new file mode 100644 index 00000000..10a2a304 --- /dev/null +++ b/src/clients/manage-audience/lib/FormDataProcessor.php @@ -0,0 +1,261 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/clients/manage-audience/lib/HeaderSelector.php b/src/clients/manage-audience/lib/HeaderSelector.php index e299e2a3..bbe3d3fc 100644 --- a/src/clients/manage-audience/lib/HeaderSelector.php +++ b/src/clients/manage-audience/lib/HeaderSelector.php @@ -16,7 +16,7 @@ */ /** * HeaderSelector - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/Adaccount.php b/src/clients/manage-audience/lib/Model/Adaccount.php index 09d91eef..a48a72ce 100644 --- a/src/clients/manage-audience/lib/Model/Adaccount.php +++ b/src/clients/manage-audience/lib/Model/Adaccount.php @@ -17,7 +17,7 @@ /** * Adaccount * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AddAudienceToAudienceGroupRequest.php b/src/clients/manage-audience/lib/Model/AddAudienceToAudienceGroupRequest.php index c39159e7..3f9bfbfa 100644 --- a/src/clients/manage-audience/lib/Model/AddAudienceToAudienceGroupRequest.php +++ b/src/clients/manage-audience/lib/Model/AddAudienceToAudienceGroupRequest.php @@ -17,7 +17,7 @@ /** * AddAudienceToAudienceGroupRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/Audience.php b/src/clients/manage-audience/lib/Model/Audience.php index 77a1be29..398ef244 100644 --- a/src/clients/manage-audience/lib/Model/Audience.php +++ b/src/clients/manage-audience/lib/Model/Audience.php @@ -17,7 +17,7 @@ /** * Audience * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroup.php b/src/clients/manage-audience/lib/Model/AudienceGroup.php index b99e944a..c3f97c1a 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroup.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroup.php @@ -17,7 +17,7 @@ /** * AudienceGroup * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupCreateRoute.php b/src/clients/manage-audience/lib/Model/AudienceGroupCreateRoute.php index bec2088e..c9de3238 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupCreateRoute.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupCreateRoute.php @@ -17,7 +17,7 @@ /** * AudienceGroupCreateRoute * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupFailedType.php b/src/clients/manage-audience/lib/Model/AudienceGroupFailedType.php index 5f43e2a5..ebbde65b 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupFailedType.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupFailedType.php @@ -17,7 +17,7 @@ /** * AudienceGroupFailedType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupJob.php b/src/clients/manage-audience/lib/Model/AudienceGroupJob.php index 038f0964..bd436c68 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupJob.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupJob.php @@ -17,7 +17,7 @@ /** * AudienceGroupJob * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupJobFailedType.php b/src/clients/manage-audience/lib/Model/AudienceGroupJobFailedType.php index 5d7d5822..ff88c0c5 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupJobFailedType.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupJobFailedType.php @@ -17,7 +17,7 @@ /** * AudienceGroupJobFailedType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupJobStatus.php b/src/clients/manage-audience/lib/Model/AudienceGroupJobStatus.php index 7a82b691..00c77c1d 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupJobStatus.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupJobStatus.php @@ -17,7 +17,7 @@ /** * AudienceGroupJobStatus * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupJobType.php b/src/clients/manage-audience/lib/Model/AudienceGroupJobType.php index 5e8dd989..68be7980 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupJobType.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupJobType.php @@ -17,7 +17,7 @@ /** * AudienceGroupJobType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupPermission.php b/src/clients/manage-audience/lib/Model/AudienceGroupPermission.php index 1a194971..be4145cd 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupPermission.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupPermission.php @@ -17,7 +17,7 @@ /** * AudienceGroupPermission * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupStatus.php b/src/clients/manage-audience/lib/Model/AudienceGroupStatus.php index 06442dba..2034a7ba 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupStatus.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupStatus.php @@ -17,7 +17,7 @@ /** * AudienceGroupStatus * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/AudienceGroupType.php b/src/clients/manage-audience/lib/Model/AudienceGroupType.php index c890098c..c47b3c52 100644 --- a/src/clients/manage-audience/lib/Model/AudienceGroupType.php +++ b/src/clients/manage-audience/lib/Model/AudienceGroupType.php @@ -17,7 +17,7 @@ /** * AudienceGroupType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/CreateAudienceGroupRequest.php b/src/clients/manage-audience/lib/Model/CreateAudienceGroupRequest.php index b158ed9b..7520fe88 100644 --- a/src/clients/manage-audience/lib/Model/CreateAudienceGroupRequest.php +++ b/src/clients/manage-audience/lib/Model/CreateAudienceGroupRequest.php @@ -17,7 +17,7 @@ /** * CreateAudienceGroupRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/CreateAudienceGroupResponse.php b/src/clients/manage-audience/lib/Model/CreateAudienceGroupResponse.php index 51faf498..e7f6a0b2 100644 --- a/src/clients/manage-audience/lib/Model/CreateAudienceGroupResponse.php +++ b/src/clients/manage-audience/lib/Model/CreateAudienceGroupResponse.php @@ -17,7 +17,7 @@ /** * CreateAudienceGroupResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupRequest.php b/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupRequest.php index cf4cc3cd..27484dd8 100644 --- a/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupRequest.php +++ b/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupRequest.php @@ -17,7 +17,7 @@ /** * CreateClickBasedAudienceGroupRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupResponse.php b/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupResponse.php index 73c7bd08..a1e6c00b 100644 --- a/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupResponse.php +++ b/src/clients/manage-audience/lib/Model/CreateClickBasedAudienceGroupResponse.php @@ -17,7 +17,7 @@ /** * CreateClickBasedAudienceGroupResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupRequest.php b/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupRequest.php index a72cdc27..95499771 100644 --- a/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupRequest.php +++ b/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupRequest.php @@ -17,7 +17,7 @@ /** * CreateImpBasedAudienceGroupRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupResponse.php b/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupResponse.php index 0fdc3c7b..6646fab1 100644 --- a/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupResponse.php +++ b/src/clients/manage-audience/lib/Model/CreateImpBasedAudienceGroupResponse.php @@ -17,7 +17,7 @@ /** * CreateImpBasedAudienceGroupResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/DetailedOwner.php b/src/clients/manage-audience/lib/Model/DetailedOwner.php index a70bd6ad..c8c0ee41 100644 --- a/src/clients/manage-audience/lib/Model/DetailedOwner.php +++ b/src/clients/manage-audience/lib/Model/DetailedOwner.php @@ -17,7 +17,7 @@ /** * DetailedOwner * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/ErrorDetail.php b/src/clients/manage-audience/lib/Model/ErrorDetail.php index 5ef9242c..9b2dda39 100644 --- a/src/clients/manage-audience/lib/Model/ErrorDetail.php +++ b/src/clients/manage-audience/lib/Model/ErrorDetail.php @@ -17,7 +17,7 @@ /** * ErrorDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/ErrorResponse.php b/src/clients/manage-audience/lib/Model/ErrorResponse.php index 009d8c51..03a22859 100644 --- a/src/clients/manage-audience/lib/Model/ErrorResponse.php +++ b/src/clients/manage-audience/lib/Model/ErrorResponse.php @@ -17,7 +17,7 @@ /** * ErrorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/GetAudienceDataResponse.php b/src/clients/manage-audience/lib/Model/GetAudienceDataResponse.php index 64eb8040..09d12799 100644 --- a/src/clients/manage-audience/lib/Model/GetAudienceDataResponse.php +++ b/src/clients/manage-audience/lib/Model/GetAudienceDataResponse.php @@ -17,7 +17,7 @@ /** * GetAudienceDataResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/GetAudienceGroupsResponse.php b/src/clients/manage-audience/lib/Model/GetAudienceGroupsResponse.php index 195d9a48..7fa3e7d9 100644 --- a/src/clients/manage-audience/lib/Model/GetAudienceGroupsResponse.php +++ b/src/clients/manage-audience/lib/Model/GetAudienceGroupsResponse.php @@ -17,7 +17,7 @@ /** * GetAudienceGroupsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/GetSharedAudienceDataResponse.php b/src/clients/manage-audience/lib/Model/GetSharedAudienceDataResponse.php index 4163a554..e479bf86 100644 --- a/src/clients/manage-audience/lib/Model/GetSharedAudienceDataResponse.php +++ b/src/clients/manage-audience/lib/Model/GetSharedAudienceDataResponse.php @@ -17,7 +17,7 @@ /** * GetSharedAudienceDataResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/GetSharedAudienceGroupsResponse.php b/src/clients/manage-audience/lib/Model/GetSharedAudienceGroupsResponse.php index f3368f61..a3e9995e 100644 --- a/src/clients/manage-audience/lib/Model/GetSharedAudienceGroupsResponse.php +++ b/src/clients/manage-audience/lib/Model/GetSharedAudienceGroupsResponse.php @@ -17,7 +17,7 @@ /** * GetSharedAudienceGroupsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/ModelInterface.php b/src/clients/manage-audience/lib/Model/ModelInterface.php index e9cf2b59..3c18c391 100644 --- a/src/clients/manage-audience/lib/Model/ModelInterface.php +++ b/src/clients/manage-audience/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience\Model @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/Model/UpdateAudienceGroupDescriptionRequest.php b/src/clients/manage-audience/lib/Model/UpdateAudienceGroupDescriptionRequest.php index c5d4a538..7a4613f8 100644 --- a/src/clients/manage-audience/lib/Model/UpdateAudienceGroupDescriptionRequest.php +++ b/src/clients/manage-audience/lib/Model/UpdateAudienceGroupDescriptionRequest.php @@ -17,7 +17,7 @@ /** * UpdateAudienceGroupDescriptionRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\ManageAudience @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/manage-audience/lib/ObjectSerializer.php b/src/clients/manage-audience/lib/ObjectSerializer.php index 0071b0c4..59c6864c 100644 --- a/src/clients/manage-audience/lib/ObjectSerializer.php +++ b/src/clients/manage-audience/lib/ObjectSerializer.php @@ -32,9 +32,8 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/messaging-api/lib/Api/MessagingApiApi.php b/src/clients/messaging-api/lib/Api/MessagingApiApi.php index c91d18b8..31521bc9 100644 --- a/src/clients/messaging-api/lib/Api/MessagingApiApi.php +++ b/src/clients/messaging-api/lib/Api/MessagingApiApi.php @@ -16,7 +16,7 @@ */ /** * MessagingApiApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Clients\MessagingApi\ApiException; use LINE\Clients\MessagingApi\Configuration; +use LINE\Clients\MessagingApi\FormDataProcessor; use LINE\Clients\MessagingApi\HeaderSelector; use LINE\Clients\MessagingApi\ObjectSerializer; @@ -395,142 +398,39 @@ public function broadcastWithHttpInfo($broadcastRequest, $xLineRetryKey = null, switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('object' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 403: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 409: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 429: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -544,34 +444,11 @@ public function broadcastWithHttpInfo($broadcastRequest, $xLineRetryKey = null, ); } - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -581,7 +458,7 @@ public function broadcastWithHttpInfo($broadcastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -589,7 +466,7 @@ public function broadcastWithHttpInfo($broadcastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -597,7 +474,7 @@ public function broadcastWithHttpInfo($broadcastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 409: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -605,7 +482,7 @@ public function broadcastWithHttpInfo($broadcastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -613,8 +490,10 @@ public function broadcastWithHttpInfo($broadcastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -842,10 +721,11 @@ public function cancelDefaultRichMenuWithHttpInfo(string $contentType = self::co return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -1037,7 +917,6 @@ public function closeCouponWithHttpInfo($couponId, string $contentType = self::c return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -1047,7 +926,7 @@ public function closeCouponWithHttpInfo($couponId, string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1055,7 +934,7 @@ public function closeCouponWithHttpInfo($couponId, string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 410: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1063,8 +942,10 @@ public function closeCouponWithHttpInfo($couponId, string $contentType = self::c $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1276,61 +1157,21 @@ public function createCouponWithHttpInfo($couponCreateRequest = null, string $co switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\CouponCreateResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\CouponCreateResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\CouponCreateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\CouponCreateResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1344,34 +1185,11 @@ public function createCouponWithHttpInfo($couponCreateRequest = null, string $co ); } - $returnType = '\LINE\Clients\MessagingApi\Model\CouponCreateResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\CouponCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1381,7 +1199,7 @@ public function createCouponWithHttpInfo($couponCreateRequest = null, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1389,8 +1207,10 @@ public function createCouponWithHttpInfo($couponCreateRequest = null, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1608,34 +1428,15 @@ public function createRichMenuWithHttpInfo($richMenuRequest, string $contentType switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuIdResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuIdResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1649,34 +1450,11 @@ public function createRichMenuWithHttpInfo($richMenuRequest, string $contentType ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1686,8 +1464,10 @@ public function createRichMenuWithHttpInfo($richMenuRequest, string $contentType $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1909,7 +1689,6 @@ public function createRichMenuAliasWithHttpInfo($createRichMenuAliasRequest, str return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -1919,8 +1698,10 @@ public function createRichMenuAliasWithHttpInfo($createRichMenuAliasRequest, str $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2129,10 +1910,11 @@ public function deleteRichMenuWithHttpInfo($richMenuId, string $contentType = se return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -2342,7 +2124,6 @@ public function deleteRichMenuAliasWithHttpInfo($richMenuAliasId, string $conten return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -2352,8 +2133,10 @@ public function deleteRichMenuAliasWithHttpInfo($richMenuAliasId, string $conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2567,34 +2350,15 @@ public function getAggregationUnitNameListWithHttpInfo($limit = null, $start = n switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GetAggregationUnitNameListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GetAggregationUnitNameListResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GetAggregationUnitNameListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetAggregationUnitNameListResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2608,34 +2372,11 @@ public function getAggregationUnitNameListWithHttpInfo($limit = null, $start = n ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GetAggregationUnitNameListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetAggregationUnitNameListResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2645,8 +2386,10 @@ public function getAggregationUnitNameListWithHttpInfo($limit = null, $start = n $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -2877,34 +2620,15 @@ public function getAggregationUnitUsageWithHttpInfo(string $contentType = self:: switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GetAggregationUnitUsageResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GetAggregationUnitUsageResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GetAggregationUnitUsageResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetAggregationUnitUsageResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -2918,34 +2642,11 @@ public function getAggregationUnitUsageWithHttpInfo(string $contentType = self:: ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GetAggregationUnitUsageResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetAggregationUnitUsageResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -2955,8 +2656,10 @@ public function getAggregationUnitUsageWithHttpInfo(string $contentType = self:: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3161,34 +2864,15 @@ public function getBotInfoWithHttpInfo(string $contentType = self::contentTypes[ switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\BotInfoResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\BotInfoResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\BotInfoResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\BotInfoResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3202,34 +2886,11 @@ public function getBotInfoWithHttpInfo(string $contentType = self::contentTypes[ ); } - $returnType = '\LINE\Clients\MessagingApi\Model\BotInfoResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\BotInfoResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3239,8 +2900,10 @@ public function getBotInfoWithHttpInfo(string $contentType = self::contentTypes[ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3447,88 +3110,27 @@ public function getCouponDetailWithHttpInfo($couponId, string $contentType = sel switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\CouponResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\CouponResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\CouponResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\CouponResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 404: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3542,34 +3144,11 @@ public function getCouponDetailWithHttpInfo($couponId, string $contentType = sel ); } - $returnType = '\LINE\Clients\MessagingApi\Model\CouponResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\CouponResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3579,7 +3158,7 @@ public function getCouponDetailWithHttpInfo($couponId, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3587,7 +3166,7 @@ public function getCouponDetailWithHttpInfo($couponId, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -3595,8 +3174,10 @@ public function getCouponDetailWithHttpInfo($couponId, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -3819,34 +3400,15 @@ public function getDefaultRichMenuIdWithHttpInfo(string $contentType = self::con switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuIdResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuIdResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -3860,34 +3422,11 @@ public function getDefaultRichMenuIdWithHttpInfo(string $contentType = self::con ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -3897,8 +3436,10 @@ public function getDefaultRichMenuIdWithHttpInfo(string $contentType = self::con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4107,34 +3648,15 @@ public function getFollowersWithHttpInfo($start = null, $limit = 300, string $co switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GetFollowersResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GetFollowersResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GetFollowersResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetFollowersResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4148,34 +3670,11 @@ public function getFollowersWithHttpInfo($start = null, $limit = 300, string $co ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GetFollowersResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetFollowersResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4185,8 +3684,10 @@ public function getFollowersWithHttpInfo($start = null, $limit = 300, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4422,34 +3923,15 @@ public function getGroupMemberCountWithHttpInfo($groupId, string $contentType = switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GroupMemberCountResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GroupMemberCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GroupMemberCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GroupMemberCountResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4463,34 +3945,11 @@ public function getGroupMemberCountWithHttpInfo($groupId, string $contentType = ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GroupMemberCountResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GroupMemberCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4500,8 +3959,10 @@ public function getGroupMemberCountWithHttpInfo($groupId, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -4728,34 +4189,15 @@ public function getGroupMemberProfileWithHttpInfo($groupId, $userId, string $con switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GroupUserProfileResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GroupUserProfileResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GroupUserProfileResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GroupUserProfileResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -4769,34 +4211,11 @@ public function getGroupMemberProfileWithHttpInfo($groupId, $userId, string $con ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GroupUserProfileResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GroupUserProfileResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -4806,8 +4225,10 @@ public function getGroupMemberProfileWithHttpInfo($groupId, $userId, string $con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5052,34 +4473,15 @@ public function getGroupMembersIdsWithHttpInfo($groupId, $start = null, string $ switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\MembersIdsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\MembersIdsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\MembersIdsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MembersIdsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5093,34 +4495,11 @@ public function getGroupMembersIdsWithHttpInfo($groupId, $start = null, string $ ); } - $returnType = '\LINE\Clients\MessagingApi\Model\MembersIdsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MembersIdsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5130,8 +4509,10 @@ public function getGroupMembersIdsWithHttpInfo($groupId, $start = null, string $ $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5369,34 +4750,15 @@ public function getGroupSummaryWithHttpInfo($groupId, string $contentType = self switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GroupSummaryResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GroupSummaryResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GroupSummaryResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GroupSummaryResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5410,34 +4772,11 @@ public function getGroupSummaryWithHttpInfo($groupId, string $contentType = self ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GroupSummaryResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GroupSummaryResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5447,8 +4786,10 @@ public function getGroupSummaryWithHttpInfo($groupId, string $contentType = self $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -5677,88 +5018,27 @@ public function getJoinedMembershipUsersWithHttpInfo($membershipId, $start = nul switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GetJoinedMembershipUsersResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GetJoinedMembershipUsersResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GetJoinedMembershipUsersResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetJoinedMembershipUsersResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 404: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -5772,34 +5052,11 @@ public function getJoinedMembershipUsersWithHttpInfo($membershipId, $start = nul ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GetJoinedMembershipUsersResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetJoinedMembershipUsersResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -5809,7 +5066,7 @@ public function getJoinedMembershipUsersWithHttpInfo($membershipId, $start = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5817,7 +5074,7 @@ public function getJoinedMembershipUsersWithHttpInfo($membershipId, $start = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5825,8 +5082,10 @@ public function getJoinedMembershipUsersWithHttpInfo($membershipId, $start = nul $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6081,61 +5340,21 @@ public function getMembershipListWithHttpInfo(string $contentType = self::conten switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\MembershipListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\MembershipListResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\MembershipListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MembershipListResponse', + $request, + $response, + ); case 404: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6149,34 +5368,11 @@ public function getMembershipListWithHttpInfo(string $contentType = self::conten ); } - $returnType = '\LINE\Clients\MessagingApi\Model\MembershipListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MembershipListResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6186,7 +5382,7 @@ public function getMembershipListWithHttpInfo(string $contentType = self::conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6194,8 +5390,10 @@ public function getMembershipListWithHttpInfo(string $contentType = self::conten $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6402,88 +5600,27 @@ public function getMembershipSubscriptionWithHttpInfo($userId, string $contentTy switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GetMembershipSubscriptionResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GetMembershipSubscriptionResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GetMembershipSubscriptionResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetMembershipSubscriptionResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 404: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6497,34 +5634,11 @@ public function getMembershipSubscriptionWithHttpInfo($userId, string $contentTy ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GetMembershipSubscriptionResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetMembershipSubscriptionResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6534,7 +5648,7 @@ public function getMembershipSubscriptionWithHttpInfo($userId, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6542,7 +5656,7 @@ public function getMembershipSubscriptionWithHttpInfo($userId, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6550,8 +5664,10 @@ public function getMembershipSubscriptionWithHttpInfo($userId, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -6774,34 +5890,15 @@ public function getMessageQuotaWithHttpInfo(string $contentType = self::contentT switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\MessageQuotaResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\MessageQuotaResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\MessageQuotaResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MessageQuotaResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -6815,34 +5912,11 @@ public function getMessageQuotaWithHttpInfo(string $contentType = self::contentT ); } - $returnType = '\LINE\Clients\MessagingApi\Model\MessageQuotaResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MessageQuotaResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -6852,8 +5926,10 @@ public function getMessageQuotaWithHttpInfo(string $contentType = self::contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7058,34 +6134,15 @@ public function getMessageQuotaConsumptionWithHttpInfo(string $contentType = sel switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\QuotaConsumptionResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\QuotaConsumptionResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\QuotaConsumptionResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\QuotaConsumptionResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7099,34 +6156,11 @@ public function getMessageQuotaConsumptionWithHttpInfo(string $contentType = sel ); } - $returnType = '\LINE\Clients\MessagingApi\Model\QuotaConsumptionResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\QuotaConsumptionResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7136,8 +6170,10 @@ public function getMessageQuotaConsumptionWithHttpInfo(string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7344,34 +6380,15 @@ public function getNarrowcastProgressWithHttpInfo($requestId, string $contentTyp switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\NarrowcastProgressResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\NarrowcastProgressResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\NarrowcastProgressResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NarrowcastProgressResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7385,34 +6402,11 @@ public function getNarrowcastProgressWithHttpInfo($requestId, string $contentTyp ); } - $returnType = '\LINE\Clients\MessagingApi\Model\NarrowcastProgressResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NarrowcastProgressResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7422,8 +6416,10 @@ public function getNarrowcastProgressWithHttpInfo($requestId, string $contentTyp $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7649,34 +6645,15 @@ public function getNumberOfSentBroadcastMessagesWithHttpInfo($date, string $cont switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7690,34 +6667,11 @@ public function getNumberOfSentBroadcastMessagesWithHttpInfo($date, string $cont ); } - $returnType = '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -7727,8 +6681,10 @@ public function getNumberOfSentBroadcastMessagesWithHttpInfo($date, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -7954,34 +6910,15 @@ public function getNumberOfSentMulticastMessagesWithHttpInfo($date, string $cont switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -7995,34 +6932,11 @@ public function getNumberOfSentMulticastMessagesWithHttpInfo($date, string $cont ); } - $returnType = '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8032,8 +6946,10 @@ public function getNumberOfSentMulticastMessagesWithHttpInfo($date, string $cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8259,34 +7175,15 @@ public function getNumberOfSentPushMessagesWithHttpInfo($date, string $contentTy switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8300,34 +7197,11 @@ public function getNumberOfSentPushMessagesWithHttpInfo($date, string $contentTy ); } - $returnType = '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8337,8 +7211,10 @@ public function getNumberOfSentPushMessagesWithHttpInfo($date, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8564,34 +7440,15 @@ public function getNumberOfSentReplyMessagesWithHttpInfo($date, string $contentT switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8605,34 +7462,11 @@ public function getNumberOfSentReplyMessagesWithHttpInfo($date, string $contentT ); } - $returnType = '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8642,8 +7476,10 @@ public function getNumberOfSentReplyMessagesWithHttpInfo($date, string $contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -8869,34 +7705,15 @@ public function getPNPMessageStatisticsWithHttpInfo($date, string $contentType = switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -8910,34 +7727,11 @@ public function getPNPMessageStatisticsWithHttpInfo($date, string $contentType = ); } - $returnType = '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\NumberOfMessagesResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -8947,8 +7741,10 @@ public function getPNPMessageStatisticsWithHttpInfo($date, string $contentType = $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9177,34 +7973,15 @@ public function getProfileWithHttpInfo($userId, string $contentType = self::cont switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\UserProfileResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\UserProfileResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\UserProfileResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\UserProfileResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9218,34 +7995,11 @@ public function getProfileWithHttpInfo($userId, string $contentType = self::cont ); } - $returnType = '\LINE\Clients\MessagingApi\Model\UserProfileResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\UserProfileResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9255,8 +8009,10 @@ public function getProfileWithHttpInfo($userId, string $contentType = self::cont $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9481,34 +8237,15 @@ public function getRichMenuWithHttpInfo($richMenuId, string $contentType = self: switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9522,34 +8259,11 @@ public function getRichMenuWithHttpInfo($richMenuId, string $contentType = self: ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9559,8 +8273,10 @@ public function getRichMenuWithHttpInfo($richMenuId, string $contentType = self: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -9785,34 +8501,15 @@ public function getRichMenuAliasWithHttpInfo($richMenuAliasId, string $contentTy switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuAliasResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuAliasResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuAliasResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuAliasResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -9826,34 +8523,11 @@ public function getRichMenuAliasWithHttpInfo($richMenuAliasId, string $contentTy ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuAliasResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuAliasResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -9863,8 +8537,10 @@ public function getRichMenuAliasWithHttpInfo($richMenuAliasId, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10087,34 +8763,15 @@ public function getRichMenuAliasListWithHttpInfo(string $contentType = self::con switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuAliasListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuAliasListResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuAliasListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuAliasListResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10128,34 +8785,11 @@ public function getRichMenuAliasListWithHttpInfo(string $contentType = self::con ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuAliasListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuAliasListResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10165,8 +8799,10 @@ public function getRichMenuAliasListWithHttpInfo(string $contentType = self::con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10373,34 +9009,15 @@ public function getRichMenuBatchProgressWithHttpInfo($requestId, string $content switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuBatchProgressResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuBatchProgressResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuBatchProgressResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuBatchProgressResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10414,34 +9031,11 @@ public function getRichMenuBatchProgressWithHttpInfo($requestId, string $content ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuBatchProgressResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuBatchProgressResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10451,8 +9045,10 @@ public function getRichMenuBatchProgressWithHttpInfo($requestId, string $content $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10678,34 +9274,15 @@ public function getRichMenuIdOfUserWithHttpInfo($userId, string $contentType = s switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuIdResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuIdResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -10719,34 +9296,11 @@ public function getRichMenuIdOfUserWithHttpInfo($userId, string $contentType = s ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuIdResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -10756,8 +9310,10 @@ public function getRichMenuIdOfUserWithHttpInfo($userId, string $contentType = s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -10980,34 +9536,15 @@ public function getRichMenuListWithHttpInfo(string $contentType = self::contentT switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RichMenuListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RichMenuListResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RichMenuListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuListResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11021,34 +9558,11 @@ public function getRichMenuListWithHttpInfo(string $contentType = self::contentT ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RichMenuListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RichMenuListResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11058,8 +9572,10 @@ public function getRichMenuListWithHttpInfo(string $contentType = self::contentT $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11266,34 +9782,15 @@ public function getRoomMemberCountWithHttpInfo($roomId, string $contentType = se switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RoomMemberCountResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RoomMemberCountResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RoomMemberCountResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RoomMemberCountResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11307,34 +9804,11 @@ public function getRoomMemberCountWithHttpInfo($roomId, string $contentType = se ); } - $returnType = '\LINE\Clients\MessagingApi\Model\RoomMemberCountResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RoomMemberCountResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11344,8 +9818,10 @@ public function getRoomMemberCountWithHttpInfo($roomId, string $contentType = se $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11572,34 +10048,15 @@ public function getRoomMemberProfileWithHttpInfo($roomId, $userId, string $conte switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\RoomUserProfileResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\RoomUserProfileResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\RoomUserProfileResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RoomUserProfileResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11608,39 +10065,16 @@ public function getRoomMemberProfileWithHttpInfo($roomId, $userId, string $conte (string) $request->getUri() ), $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - $returnType = '\LINE\Clients\MessagingApi\Model\RoomUserProfileResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } + $response->getHeaders(), + (string) $response->getBody() + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\RoomUserProfileResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11650,8 +10084,10 @@ public function getRoomMemberProfileWithHttpInfo($roomId, $userId, string $conte $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -11896,34 +10332,15 @@ public function getRoomMembersIdsWithHttpInfo($roomId, $start = null, string $co switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\MembersIdsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\MembersIdsResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\MembersIdsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MembersIdsResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -11937,34 +10354,11 @@ public function getRoomMembersIdsWithHttpInfo($roomId, $start = null, string $co ); } - $returnType = '\LINE\Clients\MessagingApi\Model\MembersIdsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MembersIdsResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -11974,8 +10368,10 @@ public function getRoomMembersIdsWithHttpInfo($roomId, $start = null, string $co $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12211,34 +10607,15 @@ public function getWebhookEndpointWithHttpInfo(string $contentType = self::conte switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GetWebhookEndpointResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GetWebhookEndpointResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GetWebhookEndpointResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetWebhookEndpointResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12252,34 +10629,11 @@ public function getWebhookEndpointWithHttpInfo(string $contentType = self::conte ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GetWebhookEndpointResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetWebhookEndpointResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12289,8 +10643,10 @@ public function getWebhookEndpointWithHttpInfo(string $contentType = self::conte $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12497,34 +10853,15 @@ public function issueLinkTokenWithHttpInfo($userId, string $contentType = self:: switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\IssueLinkTokenResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\IssueLinkTokenResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\IssueLinkTokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\IssueLinkTokenResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -12538,34 +10875,11 @@ public function issueLinkTokenWithHttpInfo($userId, string $contentType = self:: ); } - $returnType = '\LINE\Clients\MessagingApi\Model\IssueLinkTokenResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\IssueLinkTokenResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -12575,8 +10889,10 @@ public function issueLinkTokenWithHttpInfo($userId, string $contentType = self:: $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -12799,7 +11115,6 @@ public function leaveGroupWithHttpInfo($groupId, string $contentType = self::con return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -12809,7 +11124,7 @@ public function leaveGroupWithHttpInfo($groupId, string $contentType = self::con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -12817,8 +11132,10 @@ public function leaveGroupWithHttpInfo($groupId, string $contentType = self::con $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -13028,10 +11345,11 @@ public function leaveRoomWithHttpInfo($roomId, string $contentType = self::conte return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -13243,10 +11561,11 @@ public function linkRichMenuIdToUserWithHttpInfo($userId, $richMenuId, string $c return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -13474,10 +11793,11 @@ public function linkRichMenuIdToUsersWithHttpInfo($richMenuBulkLinkRequest, stri return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -13692,61 +12012,21 @@ public function listCouponWithHttpInfo($status = null, $start = null, $limit = 2 switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\MessagingApiPagerCouponListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\MessagingApiPagerCouponListResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\MessagingApiPagerCouponListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MessagingApiPagerCouponListResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -13760,34 +12040,11 @@ public function listCouponWithHttpInfo($status = null, $start = null, $limit = 2 ); } - $returnType = '\LINE\Clients\MessagingApi\Model\MessagingApiPagerCouponListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\MessagingApiPagerCouponListResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -13797,7 +12054,7 @@ public function listCouponWithHttpInfo($status = null, $start = null, $limit = 2 $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -13805,8 +12062,10 @@ public function listCouponWithHttpInfo($status = null, $start = null, $limit = 2 $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14056,10 +12315,11 @@ public function markMessagesAsReadWithHttpInfo($markMessagesAsReadRequest, strin return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -14268,7 +12528,6 @@ public function markMessagesAsReadByTokenWithHttpInfo($markMessagesAsReadByToken return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -14278,8 +12537,10 @@ public function markMessagesAsReadByTokenWithHttpInfo($markMessagesAsReadByToken $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14492,142 +12753,39 @@ public function multicastWithHttpInfo($multicastRequest, $xLineRetryKey = null, switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('object' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 403: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 409: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 429: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -14641,34 +12799,11 @@ public function multicastWithHttpInfo($multicastRequest, $xLineRetryKey = null, ); } - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -14678,7 +12813,7 @@ public function multicastWithHttpInfo($multicastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14686,7 +12821,7 @@ public function multicastWithHttpInfo($multicastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14694,7 +12829,7 @@ public function multicastWithHttpInfo($multicastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 409: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14702,7 +12837,7 @@ public function multicastWithHttpInfo($multicastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -14710,8 +12845,10 @@ public function multicastWithHttpInfo($multicastRequest, $xLineRetryKey = null, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -14945,142 +13082,39 @@ public function narrowcastWithHttpInfo($narrowcastRequest, $xLineRetryKey = null switch($statusCode) { case 202: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('object' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 403: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 409: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 429: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); + case 409: + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15094,34 +13128,11 @@ public function narrowcastWithHttpInfo($narrowcastRequest, $xLineRetryKey = null ); } - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -15131,7 +13142,7 @@ public function narrowcastWithHttpInfo($narrowcastRequest, $xLineRetryKey = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15139,7 +13150,7 @@ public function narrowcastWithHttpInfo($narrowcastRequest, $xLineRetryKey = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15147,7 +13158,7 @@ public function narrowcastWithHttpInfo($narrowcastRequest, $xLineRetryKey = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 409: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15155,7 +13166,7 @@ public function narrowcastWithHttpInfo($narrowcastRequest, $xLineRetryKey = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15163,8 +13174,10 @@ public function narrowcastWithHttpInfo($narrowcastRequest, $xLineRetryKey = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15398,142 +13411,39 @@ public function pushMessageWithHttpInfo($pushMessageRequest, $xLineRetryKey = nu switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\PushMessageResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\PushMessageResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\PushMessageResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\PushMessageResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 403: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 409: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 429: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -15547,34 +13457,11 @@ public function pushMessageWithHttpInfo($pushMessageRequest, $xLineRetryKey = nu ); } - $returnType = '\LINE\Clients\MessagingApi\Model\PushMessageResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\PushMessageResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -15584,7 +13471,7 @@ public function pushMessageWithHttpInfo($pushMessageRequest, $xLineRetryKey = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15592,7 +13479,7 @@ public function pushMessageWithHttpInfo($pushMessageRequest, $xLineRetryKey = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15600,7 +13487,7 @@ public function pushMessageWithHttpInfo($pushMessageRequest, $xLineRetryKey = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 409: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15608,7 +13495,7 @@ public function pushMessageWithHttpInfo($pushMessageRequest, $xLineRetryKey = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -15616,8 +13503,10 @@ public function pushMessageWithHttpInfo($pushMessageRequest, $xLineRetryKey = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -15849,7 +13738,6 @@ public function pushMessagesByPhoneWithHttpInfo($pnpMessagesRequest, $xLineDeliv return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { case 422: @@ -15859,8 +13747,10 @@ public function pushMessagesByPhoneWithHttpInfo($pnpMessagesRequest, $xLineDeliv $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16085,88 +13975,27 @@ public function replyMessageWithHttpInfo($replyMessageRequest, string $contentTy switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\ReplyMessageResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ReplyMessageResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ReplyMessageResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ReplyMessageResponse', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); case 429: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -16180,34 +14009,11 @@ public function replyMessageWithHttpInfo($replyMessageRequest, string $contentTy ); } - $returnType = '\LINE\Clients\MessagingApi\Model\ReplyMessageResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ReplyMessageResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -16217,7 +14023,7 @@ public function replyMessageWithHttpInfo($replyMessageRequest, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16225,7 +14031,7 @@ public function replyMessageWithHttpInfo($replyMessageRequest, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -16233,8 +14039,10 @@ public function replyMessageWithHttpInfo($replyMessageRequest, string $contentTy $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -16456,10 +14264,11 @@ public function richMenuBatchWithHttpInfo($richMenuBatchRequest, string $content return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -16668,10 +14477,11 @@ public function setDefaultRichMenuWithHttpInfo($richMenuId, string $contentType return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -16881,10 +14691,11 @@ public function setWebhookEndpointWithHttpInfo($setWebhookEndpointRequest, strin return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -17095,61 +14906,21 @@ public function showLoadingAnimationWithHttpInfo($showLoadingAnimationRequest, s switch($statusCode) { case 202: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('object' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); case 400: - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\ErrorResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\ErrorResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -17163,34 +14934,11 @@ public function showLoadingAnimationWithHttpInfo($showLoadingAnimationRequest, s ); } - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'object', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 202: @@ -17200,7 +14948,7 @@ public function showLoadingAnimationWithHttpInfo($showLoadingAnimationRequest, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -17208,8 +14956,10 @@ public function showLoadingAnimationWithHttpInfo($showLoadingAnimationRequest, s $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -17433,34 +15183,15 @@ public function testWebhookEndpointWithHttpInfo($testWebhookEndpointRequest = nu switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\TestWebhookEndpointResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\TestWebhookEndpointResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\TestWebhookEndpointResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\TestWebhookEndpointResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -17474,34 +15205,11 @@ public function testWebhookEndpointWithHttpInfo($testWebhookEndpointRequest = nu ); } - $returnType = '\LINE\Clients\MessagingApi\Model\TestWebhookEndpointResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\TestWebhookEndpointResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -17511,8 +15219,10 @@ public function testWebhookEndpointWithHttpInfo($testWebhookEndpointRequest = nu $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -17728,10 +15438,11 @@ public function unlinkRichMenuIdFromUserWithHttpInfo($userId, string $contentTyp return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -17941,10 +15652,11 @@ public function unlinkRichMenuIdFromUsersWithHttpInfo($richMenuBulkUnlinkRequest return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -18155,7 +15867,6 @@ public function updateRichMenuAliasWithHttpInfo($richMenuAliasId, $updateRichMen return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { case 400: @@ -18165,8 +15876,10 @@ public function updateRichMenuAliasWithHttpInfo($richMenuAliasId, $updateRichMen $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -18393,10 +16106,11 @@ public function validateBroadcastWithHttpInfo($validateMessageRequest, string $c return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -18605,10 +16319,11 @@ public function validateMulticastWithHttpInfo($validateMessageRequest, string $c return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -18817,10 +16532,11 @@ public function validateNarrowcastWithHttpInfo($validateMessageRequest, string $ return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -19029,10 +16745,11 @@ public function validatePushWithHttpInfo($validateMessageRequest, string $conten return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -19241,10 +16958,11 @@ public function validateReplyWithHttpInfo($validateMessageRequest, string $conte return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -19453,10 +17171,11 @@ public function validateRichMenuBatchRequestWithHttpInfo($richMenuBatchRequest, return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -19665,10 +17384,11 @@ public function validateRichMenuObjectWithHttpInfo($richMenuRequest, string $con return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -19840,6 +17560,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/clients/messaging-api/lib/Api/MessagingApiBlobApi.php b/src/clients/messaging-api/lib/Api/MessagingApiBlobApi.php index 26ecd31d..d7d2011b 100644 --- a/src/clients/messaging-api/lib/Api/MessagingApiBlobApi.php +++ b/src/clients/messaging-api/lib/Api/MessagingApiBlobApi.php @@ -16,7 +16,7 @@ */ /** * MessagingApiBlobApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Clients\MessagingApi\ApiException; use LINE\Clients\MessagingApi\Configuration; +use LINE\Clients\MessagingApi\FormDataProcessor; use LINE\Clients\MessagingApi\HeaderSelector; use LINE\Clients\MessagingApi\ObjectSerializer; @@ -216,34 +219,15 @@ public function getMessageContentWithHttpInfo($messageId, ?int $hostIndex = null switch($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -257,34 +241,11 @@ public function getMessageContentWithHttpInfo($messageId, ?int $hostIndex = null ); } - $returnType = '\SplFileObject'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -294,8 +255,10 @@ public function getMessageContentWithHttpInfo($messageId, ?int $hostIndex = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -575,34 +538,15 @@ public function getMessageContentPreviewWithHttpInfo($messageId, ?int $hostIndex switch($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -616,34 +560,11 @@ public function getMessageContentPreviewWithHttpInfo($messageId, ?int $hostIndex ); } - $returnType = '\SplFileObject'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -653,8 +574,10 @@ public function getMessageContentPreviewWithHttpInfo($messageId, ?int $hostIndex $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -934,34 +857,15 @@ public function getMessageContentTranscodingByMessageIdWithHttpInfo($messageId, switch($statusCode) { case 200: - if ('\LINE\Clients\MessagingApi\Model\GetMessageContentTranscodingResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\LINE\Clients\MessagingApi\Model\GetMessageContentTranscodingResponse' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\LINE\Clients\MessagingApi\Model\GetMessageContentTranscodingResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetMessageContentTranscodingResponse', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -975,34 +879,11 @@ public function getMessageContentTranscodingByMessageIdWithHttpInfo($messageId, ); } - $returnType = '\LINE\Clients\MessagingApi\Model\GetMessageContentTranscodingResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\LINE\Clients\MessagingApi\Model\GetMessageContentTranscodingResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1012,8 +893,10 @@ public function getMessageContentTranscodingByMessageIdWithHttpInfo($messageId, $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1293,34 +1176,15 @@ public function getRichMenuImageWithHttpInfo($richMenuId, ?int $hostIndex = null switch($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -1334,34 +1198,11 @@ public function getRichMenuImageWithHttpInfo($richMenuId, ?int $hostIndex = null ); } - $returnType = '\SplFileObject'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -1371,8 +1212,10 @@ public function getRichMenuImageWithHttpInfo($richMenuId, ?int $hostIndex = null $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -1652,10 +1495,11 @@ public function setRichMenuImageWithHttpInfo($richMenuId, $body, ?int $hostIndex return [null, $statusCode, $response->getHeaders()]; - } catch (ApiException $e) { switch ($e->getCode()) { } + + throw $e; } } @@ -1888,6 +1732,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/clients/messaging-api/lib/ApiException.php b/src/clients/messaging-api/lib/ApiException.php index bfe00200..f821e7d6 100644 --- a/src/clients/messaging-api/lib/ApiException.php +++ b/src/clients/messaging-api/lib/ApiException.php @@ -16,7 +16,7 @@ */ /** * ApiException - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Configuration.php b/src/clients/messaging-api/lib/Configuration.php index 974ecafc..1eb5f878 100644 --- a/src/clients/messaging-api/lib/Configuration.php +++ b/src/clients/messaging-api/lib/Configuration.php @@ -16,7 +16,7 @@ */ /** * Configuration - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -44,7 +44,7 @@ /** * Configuration Class Doc Comment - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -138,6 +138,20 @@ class Configuration */ protected $tempFolderPath; + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -411,6 +425,49 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/src/clients/messaging-api/lib/FormDataProcessor.php b/src/clients/messaging-api/lib/FormDataProcessor.php new file mode 100644 index 00000000..57b06e9e --- /dev/null +++ b/src/clients/messaging-api/lib/FormDataProcessor.php @@ -0,0 +1,261 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/clients/messaging-api/lib/HeaderSelector.php b/src/clients/messaging-api/lib/HeaderSelector.php index 00dc70e6..3fb883b6 100644 --- a/src/clients/messaging-api/lib/HeaderSelector.php +++ b/src/clients/messaging-api/lib/HeaderSelector.php @@ -16,7 +16,7 @@ */ /** * HeaderSelector - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AcquisitionConditionRequest.php b/src/clients/messaging-api/lib/Model/AcquisitionConditionRequest.php index c0baf1a5..5a1a556a 100644 --- a/src/clients/messaging-api/lib/Model/AcquisitionConditionRequest.php +++ b/src/clients/messaging-api/lib/Model/AcquisitionConditionRequest.php @@ -17,7 +17,7 @@ /** * AcquisitionConditionRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AcquisitionConditionResponse.php b/src/clients/messaging-api/lib/Model/AcquisitionConditionResponse.php index 8870e067..b2636525 100644 --- a/src/clients/messaging-api/lib/Model/AcquisitionConditionResponse.php +++ b/src/clients/messaging-api/lib/Model/AcquisitionConditionResponse.php @@ -17,7 +17,7 @@ /** * AcquisitionConditionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Action.php b/src/clients/messaging-api/lib/Model/Action.php index 45b401c8..904787d7 100644 --- a/src/clients/messaging-api/lib/Model/Action.php +++ b/src/clients/messaging-api/lib/Model/Action.php @@ -17,7 +17,7 @@ /** * Action * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AgeDemographic.php b/src/clients/messaging-api/lib/Model/AgeDemographic.php index b61efec3..a883b0dd 100644 --- a/src/clients/messaging-api/lib/Model/AgeDemographic.php +++ b/src/clients/messaging-api/lib/Model/AgeDemographic.php @@ -17,7 +17,7 @@ /** * AgeDemographic * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AgeDemographicFilter.php b/src/clients/messaging-api/lib/Model/AgeDemographicFilter.php index ad6b1758..56a001e7 100644 --- a/src/clients/messaging-api/lib/Model/AgeDemographicFilter.php +++ b/src/clients/messaging-api/lib/Model/AgeDemographicFilter.php @@ -17,7 +17,7 @@ /** * AgeDemographicFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AllMentionTarget.php b/src/clients/messaging-api/lib/Model/AllMentionTarget.php index 6da81dab..061b9fcf 100644 --- a/src/clients/messaging-api/lib/Model/AllMentionTarget.php +++ b/src/clients/messaging-api/lib/Model/AllMentionTarget.php @@ -17,7 +17,7 @@ /** * AllMentionTarget * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AltUri.php b/src/clients/messaging-api/lib/Model/AltUri.php index bb7b7f84..d43eb4d2 100644 --- a/src/clients/messaging-api/lib/Model/AltUri.php +++ b/src/clients/messaging-api/lib/Model/AltUri.php @@ -17,7 +17,7 @@ /** * AltUri * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AppTypeDemographic.php b/src/clients/messaging-api/lib/Model/AppTypeDemographic.php index df5f2607..bb18d73e 100644 --- a/src/clients/messaging-api/lib/Model/AppTypeDemographic.php +++ b/src/clients/messaging-api/lib/Model/AppTypeDemographic.php @@ -17,7 +17,7 @@ /** * AppTypeDemographic * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AppTypeDemographicFilter.php b/src/clients/messaging-api/lib/Model/AppTypeDemographicFilter.php index 68213855..2bde1cc2 100644 --- a/src/clients/messaging-api/lib/Model/AppTypeDemographicFilter.php +++ b/src/clients/messaging-api/lib/Model/AppTypeDemographicFilter.php @@ -17,7 +17,7 @@ /** * AppTypeDemographicFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AreaDemographic.php b/src/clients/messaging-api/lib/Model/AreaDemographic.php index 13510628..afa9ddc4 100644 --- a/src/clients/messaging-api/lib/Model/AreaDemographic.php +++ b/src/clients/messaging-api/lib/Model/AreaDemographic.php @@ -17,7 +17,7 @@ /** * AreaDemographic * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AreaDemographicFilter.php b/src/clients/messaging-api/lib/Model/AreaDemographicFilter.php index f41a9a1e..b4a07d67 100644 --- a/src/clients/messaging-api/lib/Model/AreaDemographicFilter.php +++ b/src/clients/messaging-api/lib/Model/AreaDemographicFilter.php @@ -17,7 +17,7 @@ /** * AreaDemographicFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AudienceRecipient.php b/src/clients/messaging-api/lib/Model/AudienceRecipient.php index a6efd5d8..4f066f60 100644 --- a/src/clients/messaging-api/lib/Model/AudienceRecipient.php +++ b/src/clients/messaging-api/lib/Model/AudienceRecipient.php @@ -17,7 +17,7 @@ /** * AudienceRecipient * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/AudioMessage.php b/src/clients/messaging-api/lib/Model/AudioMessage.php index 442dc0a8..b201bd2c 100644 --- a/src/clients/messaging-api/lib/Model/AudioMessage.php +++ b/src/clients/messaging-api/lib/Model/AudioMessage.php @@ -17,7 +17,7 @@ /** * AudioMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/BotInfoResponse.php b/src/clients/messaging-api/lib/Model/BotInfoResponse.php index 59f29839..56b88729 100644 --- a/src/clients/messaging-api/lib/Model/BotInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/BotInfoResponse.php @@ -17,7 +17,7 @@ /** * BotInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/BroadcastRequest.php b/src/clients/messaging-api/lib/Model/BroadcastRequest.php index 72d180e7..9c362d7a 100644 --- a/src/clients/messaging-api/lib/Model/BroadcastRequest.php +++ b/src/clients/messaging-api/lib/Model/BroadcastRequest.php @@ -17,7 +17,7 @@ /** * BroadcastRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ButtonsTemplate.php b/src/clients/messaging-api/lib/Model/ButtonsTemplate.php index a506778c..c36df120 100644 --- a/src/clients/messaging-api/lib/Model/ButtonsTemplate.php +++ b/src/clients/messaging-api/lib/Model/ButtonsTemplate.php @@ -17,7 +17,7 @@ /** * ButtonsTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CameraAction.php b/src/clients/messaging-api/lib/Model/CameraAction.php index 801d6548..80c1c168 100644 --- a/src/clients/messaging-api/lib/Model/CameraAction.php +++ b/src/clients/messaging-api/lib/Model/CameraAction.php @@ -17,7 +17,7 @@ /** * CameraAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CameraRollAction.php b/src/clients/messaging-api/lib/Model/CameraRollAction.php index f0e5ad38..5a01d5a2 100644 --- a/src/clients/messaging-api/lib/Model/CameraRollAction.php +++ b/src/clients/messaging-api/lib/Model/CameraRollAction.php @@ -17,7 +17,7 @@ /** * CameraRollAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CarouselColumn.php b/src/clients/messaging-api/lib/Model/CarouselColumn.php index 42369953..f5665165 100644 --- a/src/clients/messaging-api/lib/Model/CarouselColumn.php +++ b/src/clients/messaging-api/lib/Model/CarouselColumn.php @@ -17,7 +17,7 @@ /** * CarouselColumn * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CarouselTemplate.php b/src/clients/messaging-api/lib/Model/CarouselTemplate.php index 08bca6c8..d8410734 100644 --- a/src/clients/messaging-api/lib/Model/CarouselTemplate.php +++ b/src/clients/messaging-api/lib/Model/CarouselTemplate.php @@ -17,7 +17,7 @@ /** * CarouselTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoRequest.php b/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoRequest.php index 20eef6c0..84a56882 100644 --- a/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoRequest.php +++ b/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoRequest.php @@ -17,7 +17,7 @@ /** * CashBackFixedPriceInfoRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoResponse.php b/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoResponse.php index 120425bc..6881bcc8 100644 --- a/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/CashBackFixedPriceInfoResponse.php @@ -17,7 +17,7 @@ /** * CashBackFixedPriceInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoRequest.php b/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoRequest.php index 804bc62b..d80ca32b 100644 --- a/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoRequest.php +++ b/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoRequest.php @@ -17,7 +17,7 @@ /** * CashBackPercentagePriceInfoRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoResponse.php b/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoResponse.php index 5892d59b..66462ea5 100644 --- a/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/CashBackPercentagePriceInfoResponse.php @@ -17,7 +17,7 @@ /** * CashBackPercentagePriceInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CashBackPriceInfoRequest.php b/src/clients/messaging-api/lib/Model/CashBackPriceInfoRequest.php index d612c8b1..5faa91af 100644 --- a/src/clients/messaging-api/lib/Model/CashBackPriceInfoRequest.php +++ b/src/clients/messaging-api/lib/Model/CashBackPriceInfoRequest.php @@ -17,7 +17,7 @@ /** * CashBackPriceInfoRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CashBackPriceInfoResponse.php b/src/clients/messaging-api/lib/Model/CashBackPriceInfoResponse.php index 6c28d1cf..a7239b72 100644 --- a/src/clients/messaging-api/lib/Model/CashBackPriceInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/CashBackPriceInfoResponse.php @@ -17,7 +17,7 @@ /** * CashBackPriceInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ChatReference.php b/src/clients/messaging-api/lib/Model/ChatReference.php index dfb6c441..d9d09186 100644 --- a/src/clients/messaging-api/lib/Model/ChatReference.php +++ b/src/clients/messaging-api/lib/Model/ChatReference.php @@ -17,7 +17,7 @@ /** * ChatReference * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ClipboardAction.php b/src/clients/messaging-api/lib/Model/ClipboardAction.php index 28a4187b..218ca352 100644 --- a/src/clients/messaging-api/lib/Model/ClipboardAction.php +++ b/src/clients/messaging-api/lib/Model/ClipboardAction.php @@ -17,7 +17,7 @@ /** * ClipboardAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ClipboardImagemapAction.php b/src/clients/messaging-api/lib/Model/ClipboardImagemapAction.php index 9cc284ff..25f24883 100644 --- a/src/clients/messaging-api/lib/Model/ClipboardImagemapAction.php +++ b/src/clients/messaging-api/lib/Model/ClipboardImagemapAction.php @@ -17,7 +17,7 @@ /** * ClipboardImagemapAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ConfirmTemplate.php b/src/clients/messaging-api/lib/Model/ConfirmTemplate.php index dc524325..53ac78ee 100644 --- a/src/clients/messaging-api/lib/Model/ConfirmTemplate.php +++ b/src/clients/messaging-api/lib/Model/ConfirmTemplate.php @@ -17,7 +17,7 @@ /** * ConfirmTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponCashBackRewardRequest.php b/src/clients/messaging-api/lib/Model/CouponCashBackRewardRequest.php index 891ed4a9..9fbeaa41 100644 --- a/src/clients/messaging-api/lib/Model/CouponCashBackRewardRequest.php +++ b/src/clients/messaging-api/lib/Model/CouponCashBackRewardRequest.php @@ -17,7 +17,7 @@ /** * CouponCashBackRewardRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponCashBackRewardResponse.php b/src/clients/messaging-api/lib/Model/CouponCashBackRewardResponse.php index 8bff478b..c5e8ac6b 100644 --- a/src/clients/messaging-api/lib/Model/CouponCashBackRewardResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponCashBackRewardResponse.php @@ -17,7 +17,7 @@ /** * CouponCashBackRewardResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponCreateRequest.php b/src/clients/messaging-api/lib/Model/CouponCreateRequest.php index 7e3920b1..6ac385de 100644 --- a/src/clients/messaging-api/lib/Model/CouponCreateRequest.php +++ b/src/clients/messaging-api/lib/Model/CouponCreateRequest.php @@ -17,7 +17,7 @@ /** * CouponCreateRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponCreateResponse.php b/src/clients/messaging-api/lib/Model/CouponCreateResponse.php index e04b3321..32d0c096 100644 --- a/src/clients/messaging-api/lib/Model/CouponCreateResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponCreateResponse.php @@ -17,7 +17,7 @@ /** * CouponCreateResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponDiscountRewardRequest.php b/src/clients/messaging-api/lib/Model/CouponDiscountRewardRequest.php index 30c96d10..d45ddb61 100644 --- a/src/clients/messaging-api/lib/Model/CouponDiscountRewardRequest.php +++ b/src/clients/messaging-api/lib/Model/CouponDiscountRewardRequest.php @@ -17,7 +17,7 @@ /** * CouponDiscountRewardRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponDiscountRewardResponse.php b/src/clients/messaging-api/lib/Model/CouponDiscountRewardResponse.php index b7220d95..54d9e34d 100644 --- a/src/clients/messaging-api/lib/Model/CouponDiscountRewardResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponDiscountRewardResponse.php @@ -17,7 +17,7 @@ /** * CouponDiscountRewardResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponFreeRewardRequest.php b/src/clients/messaging-api/lib/Model/CouponFreeRewardRequest.php index f8533442..3600240e 100644 --- a/src/clients/messaging-api/lib/Model/CouponFreeRewardRequest.php +++ b/src/clients/messaging-api/lib/Model/CouponFreeRewardRequest.php @@ -17,7 +17,7 @@ /** * CouponFreeRewardRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponFreeRewardResponse.php b/src/clients/messaging-api/lib/Model/CouponFreeRewardResponse.php index 909b98d7..d8dd060c 100644 --- a/src/clients/messaging-api/lib/Model/CouponFreeRewardResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponFreeRewardResponse.php @@ -17,7 +17,7 @@ /** * CouponFreeRewardResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponGiftRewardRequest.php b/src/clients/messaging-api/lib/Model/CouponGiftRewardRequest.php index 0b18b2c4..23abb595 100644 --- a/src/clients/messaging-api/lib/Model/CouponGiftRewardRequest.php +++ b/src/clients/messaging-api/lib/Model/CouponGiftRewardRequest.php @@ -17,7 +17,7 @@ /** * CouponGiftRewardRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponGiftRewardResponse.php b/src/clients/messaging-api/lib/Model/CouponGiftRewardResponse.php index 9f5eec00..5731990c 100644 --- a/src/clients/messaging-api/lib/Model/CouponGiftRewardResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponGiftRewardResponse.php @@ -17,7 +17,7 @@ /** * CouponGiftRewardResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponListResponse.php b/src/clients/messaging-api/lib/Model/CouponListResponse.php index 7ec91828..7dec3f6b 100644 --- a/src/clients/messaging-api/lib/Model/CouponListResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponListResponse.php @@ -17,7 +17,7 @@ /** * CouponListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponMessage.php b/src/clients/messaging-api/lib/Model/CouponMessage.php index 82d6f52b..ebc65576 100644 --- a/src/clients/messaging-api/lib/Model/CouponMessage.php +++ b/src/clients/messaging-api/lib/Model/CouponMessage.php @@ -17,7 +17,7 @@ /** * CouponMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponOthersRewardRequest.php b/src/clients/messaging-api/lib/Model/CouponOthersRewardRequest.php index 118905e2..b9a7d7b3 100644 --- a/src/clients/messaging-api/lib/Model/CouponOthersRewardRequest.php +++ b/src/clients/messaging-api/lib/Model/CouponOthersRewardRequest.php @@ -17,7 +17,7 @@ /** * CouponOthersRewardRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponOthersRewardResponse.php b/src/clients/messaging-api/lib/Model/CouponOthersRewardResponse.php index 73a93c9a..e255bc6a 100644 --- a/src/clients/messaging-api/lib/Model/CouponOthersRewardResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponOthersRewardResponse.php @@ -17,7 +17,7 @@ /** * CouponOthersRewardResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponResponse.php b/src/clients/messaging-api/lib/Model/CouponResponse.php index 55ac780f..f8118a24 100644 --- a/src/clients/messaging-api/lib/Model/CouponResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponResponse.php @@ -17,7 +17,7 @@ /** * CouponResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponRewardRequest.php b/src/clients/messaging-api/lib/Model/CouponRewardRequest.php index b63c33bc..daa00caf 100644 --- a/src/clients/messaging-api/lib/Model/CouponRewardRequest.php +++ b/src/clients/messaging-api/lib/Model/CouponRewardRequest.php @@ -17,7 +17,7 @@ /** * CouponRewardRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CouponRewardResponse.php b/src/clients/messaging-api/lib/Model/CouponRewardResponse.php index 996d900e..be6ce6ca 100644 --- a/src/clients/messaging-api/lib/Model/CouponRewardResponse.php +++ b/src/clients/messaging-api/lib/Model/CouponRewardResponse.php @@ -17,7 +17,7 @@ /** * CouponRewardResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/CreateRichMenuAliasRequest.php b/src/clients/messaging-api/lib/Model/CreateRichMenuAliasRequest.php index 1c8be749..1fd3310f 100644 --- a/src/clients/messaging-api/lib/Model/CreateRichMenuAliasRequest.php +++ b/src/clients/messaging-api/lib/Model/CreateRichMenuAliasRequest.php @@ -17,7 +17,7 @@ /** * CreateRichMenuAliasRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DatetimePickerAction.php b/src/clients/messaging-api/lib/Model/DatetimePickerAction.php index 3767a849..5b26f189 100644 --- a/src/clients/messaging-api/lib/Model/DatetimePickerAction.php +++ b/src/clients/messaging-api/lib/Model/DatetimePickerAction.php @@ -17,7 +17,7 @@ /** * DatetimePickerAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DemographicFilter.php b/src/clients/messaging-api/lib/Model/DemographicFilter.php index 04110c69..de269990 100644 --- a/src/clients/messaging-api/lib/Model/DemographicFilter.php +++ b/src/clients/messaging-api/lib/Model/DemographicFilter.php @@ -17,7 +17,7 @@ /** * DemographicFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoRequest.php b/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoRequest.php index 97e11214..066d20f5 100644 --- a/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoRequest.php +++ b/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoRequest.php @@ -17,7 +17,7 @@ /** * DiscountExplicitPriceInfoRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoResponse.php b/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoResponse.php index 6ee96821..209555b3 100644 --- a/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/DiscountExplicitPriceInfoResponse.php @@ -17,7 +17,7 @@ /** * DiscountExplicitPriceInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoRequest.php b/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoRequest.php index e2976918..e4675937 100644 --- a/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoRequest.php +++ b/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoRequest.php @@ -17,7 +17,7 @@ /** * DiscountFixedPriceInfoRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoResponse.php b/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoResponse.php index 7b0c0abf..5e70047a 100644 --- a/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/DiscountFixedPriceInfoResponse.php @@ -17,7 +17,7 @@ /** * DiscountFixedPriceInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoRequest.php b/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoRequest.php index 554010db..317a3499 100644 --- a/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoRequest.php +++ b/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoRequest.php @@ -17,7 +17,7 @@ /** * DiscountPercentagePriceInfoRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoResponse.php b/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoResponse.php index 24fb285a..970bfd06 100644 --- a/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/DiscountPercentagePriceInfoResponse.php @@ -17,7 +17,7 @@ /** * DiscountPercentagePriceInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountPriceInfoRequest.php b/src/clients/messaging-api/lib/Model/DiscountPriceInfoRequest.php index 1cfcd750..9f42157e 100644 --- a/src/clients/messaging-api/lib/Model/DiscountPriceInfoRequest.php +++ b/src/clients/messaging-api/lib/Model/DiscountPriceInfoRequest.php @@ -17,7 +17,7 @@ /** * DiscountPriceInfoRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/DiscountPriceInfoResponse.php b/src/clients/messaging-api/lib/Model/DiscountPriceInfoResponse.php index 81655a5f..029d8f9a 100644 --- a/src/clients/messaging-api/lib/Model/DiscountPriceInfoResponse.php +++ b/src/clients/messaging-api/lib/Model/DiscountPriceInfoResponse.php @@ -17,7 +17,7 @@ /** * DiscountPriceInfoResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Emoji.php b/src/clients/messaging-api/lib/Model/Emoji.php index 2d654026..29d7bc26 100644 --- a/src/clients/messaging-api/lib/Model/Emoji.php +++ b/src/clients/messaging-api/lib/Model/Emoji.php @@ -17,7 +17,7 @@ /** * Emoji * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/EmojiSubstitutionObject.php b/src/clients/messaging-api/lib/Model/EmojiSubstitutionObject.php index 8680382e..c381e4d4 100644 --- a/src/clients/messaging-api/lib/Model/EmojiSubstitutionObject.php +++ b/src/clients/messaging-api/lib/Model/EmojiSubstitutionObject.php @@ -17,7 +17,7 @@ /** * EmojiSubstitutionObject * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ErrorDetail.php b/src/clients/messaging-api/lib/Model/ErrorDetail.php index 6168b889..2bb7923b 100644 --- a/src/clients/messaging-api/lib/Model/ErrorDetail.php +++ b/src/clients/messaging-api/lib/Model/ErrorDetail.php @@ -17,7 +17,7 @@ /** * ErrorDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ErrorResponse.php b/src/clients/messaging-api/lib/Model/ErrorResponse.php index d598f592..d934ae74 100644 --- a/src/clients/messaging-api/lib/Model/ErrorResponse.php +++ b/src/clients/messaging-api/lib/Model/ErrorResponse.php @@ -17,7 +17,7 @@ /** * ErrorResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Filter.php b/src/clients/messaging-api/lib/Model/Filter.php index b8c3171c..89daf2d0 100644 --- a/src/clients/messaging-api/lib/Model/Filter.php +++ b/src/clients/messaging-api/lib/Model/Filter.php @@ -17,7 +17,7 @@ /** * Filter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBlockStyle.php b/src/clients/messaging-api/lib/Model/FlexBlockStyle.php index f6771e1c..4a1619d7 100644 --- a/src/clients/messaging-api/lib/Model/FlexBlockStyle.php +++ b/src/clients/messaging-api/lib/Model/FlexBlockStyle.php @@ -17,7 +17,7 @@ /** * FlexBlockStyle * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBox.php b/src/clients/messaging-api/lib/Model/FlexBox.php index b496f626..badca4f3 100644 --- a/src/clients/messaging-api/lib/Model/FlexBox.php +++ b/src/clients/messaging-api/lib/Model/FlexBox.php @@ -17,7 +17,7 @@ /** * FlexBox * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBoxBackground.php b/src/clients/messaging-api/lib/Model/FlexBoxBackground.php index bb79b375..978f16ce 100644 --- a/src/clients/messaging-api/lib/Model/FlexBoxBackground.php +++ b/src/clients/messaging-api/lib/Model/FlexBoxBackground.php @@ -17,7 +17,7 @@ /** * FlexBoxBackground * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBoxBorderWidth.php b/src/clients/messaging-api/lib/Model/FlexBoxBorderWidth.php index a96d83c3..55507aee 100644 --- a/src/clients/messaging-api/lib/Model/FlexBoxBorderWidth.php +++ b/src/clients/messaging-api/lib/Model/FlexBoxBorderWidth.php @@ -17,7 +17,7 @@ /** * FlexBoxBorderWidth * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBoxCornerRadius.php b/src/clients/messaging-api/lib/Model/FlexBoxCornerRadius.php index 97a73f18..580d08e5 100644 --- a/src/clients/messaging-api/lib/Model/FlexBoxCornerRadius.php +++ b/src/clients/messaging-api/lib/Model/FlexBoxCornerRadius.php @@ -17,7 +17,7 @@ /** * FlexBoxCornerRadius * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBoxLinearGradient.php b/src/clients/messaging-api/lib/Model/FlexBoxLinearGradient.php index 891597e8..2b0c3a28 100644 --- a/src/clients/messaging-api/lib/Model/FlexBoxLinearGradient.php +++ b/src/clients/messaging-api/lib/Model/FlexBoxLinearGradient.php @@ -17,7 +17,7 @@ /** * FlexBoxLinearGradient * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBoxPadding.php b/src/clients/messaging-api/lib/Model/FlexBoxPadding.php index fe300179..90b0a86d 100644 --- a/src/clients/messaging-api/lib/Model/FlexBoxPadding.php +++ b/src/clients/messaging-api/lib/Model/FlexBoxPadding.php @@ -17,7 +17,7 @@ /** * FlexBoxPadding * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBoxSpacing.php b/src/clients/messaging-api/lib/Model/FlexBoxSpacing.php index 35909ca6..cdce6aaf 100644 --- a/src/clients/messaging-api/lib/Model/FlexBoxSpacing.php +++ b/src/clients/messaging-api/lib/Model/FlexBoxSpacing.php @@ -17,7 +17,7 @@ /** * FlexBoxSpacing * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBubble.php b/src/clients/messaging-api/lib/Model/FlexBubble.php index 5bfdf03c..6e3c53fc 100644 --- a/src/clients/messaging-api/lib/Model/FlexBubble.php +++ b/src/clients/messaging-api/lib/Model/FlexBubble.php @@ -17,7 +17,7 @@ /** * FlexBubble * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexBubbleStyles.php b/src/clients/messaging-api/lib/Model/FlexBubbleStyles.php index 66ad7b5e..25922f1d 100644 --- a/src/clients/messaging-api/lib/Model/FlexBubbleStyles.php +++ b/src/clients/messaging-api/lib/Model/FlexBubbleStyles.php @@ -17,7 +17,7 @@ /** * FlexBubbleStyles * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexButton.php b/src/clients/messaging-api/lib/Model/FlexButton.php index 8d0064b5..1b1520bb 100644 --- a/src/clients/messaging-api/lib/Model/FlexButton.php +++ b/src/clients/messaging-api/lib/Model/FlexButton.php @@ -17,7 +17,7 @@ /** * FlexButton * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexCarousel.php b/src/clients/messaging-api/lib/Model/FlexCarousel.php index e4793e59..251a8d33 100644 --- a/src/clients/messaging-api/lib/Model/FlexCarousel.php +++ b/src/clients/messaging-api/lib/Model/FlexCarousel.php @@ -17,7 +17,7 @@ /** * FlexCarousel * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexComponent.php b/src/clients/messaging-api/lib/Model/FlexComponent.php index 1c21cf20..1149cb8a 100644 --- a/src/clients/messaging-api/lib/Model/FlexComponent.php +++ b/src/clients/messaging-api/lib/Model/FlexComponent.php @@ -17,7 +17,7 @@ /** * FlexComponent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexContainer.php b/src/clients/messaging-api/lib/Model/FlexContainer.php index 6fc1fbfb..aceab315 100644 --- a/src/clients/messaging-api/lib/Model/FlexContainer.php +++ b/src/clients/messaging-api/lib/Model/FlexContainer.php @@ -17,7 +17,7 @@ /** * FlexContainer * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexFiller.php b/src/clients/messaging-api/lib/Model/FlexFiller.php index 5f5fda25..39d2f515 100644 --- a/src/clients/messaging-api/lib/Model/FlexFiller.php +++ b/src/clients/messaging-api/lib/Model/FlexFiller.php @@ -17,7 +17,7 @@ /** * FlexFiller * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexIcon.php b/src/clients/messaging-api/lib/Model/FlexIcon.php index 60689fd5..1e7fef95 100644 --- a/src/clients/messaging-api/lib/Model/FlexIcon.php +++ b/src/clients/messaging-api/lib/Model/FlexIcon.php @@ -17,7 +17,7 @@ /** * FlexIcon * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexIconSize.php b/src/clients/messaging-api/lib/Model/FlexIconSize.php index 5f04e079..fbd7376a 100644 --- a/src/clients/messaging-api/lib/Model/FlexIconSize.php +++ b/src/clients/messaging-api/lib/Model/FlexIconSize.php @@ -17,7 +17,7 @@ /** * FlexIconSize * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexImage.php b/src/clients/messaging-api/lib/Model/FlexImage.php index aec4779b..efc31a6f 100644 --- a/src/clients/messaging-api/lib/Model/FlexImage.php +++ b/src/clients/messaging-api/lib/Model/FlexImage.php @@ -17,7 +17,7 @@ /** * FlexImage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexImageSize.php b/src/clients/messaging-api/lib/Model/FlexImageSize.php index a9196906..a12f49a5 100644 --- a/src/clients/messaging-api/lib/Model/FlexImageSize.php +++ b/src/clients/messaging-api/lib/Model/FlexImageSize.php @@ -17,7 +17,7 @@ /** * FlexImageSize * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexMargin.php b/src/clients/messaging-api/lib/Model/FlexMargin.php index 7a60de67..57228ea2 100644 --- a/src/clients/messaging-api/lib/Model/FlexMargin.php +++ b/src/clients/messaging-api/lib/Model/FlexMargin.php @@ -17,7 +17,7 @@ /** * FlexMargin * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexMessage.php b/src/clients/messaging-api/lib/Model/FlexMessage.php index 547ff025..c922a8fd 100644 --- a/src/clients/messaging-api/lib/Model/FlexMessage.php +++ b/src/clients/messaging-api/lib/Model/FlexMessage.php @@ -17,7 +17,7 @@ /** * FlexMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexOffset.php b/src/clients/messaging-api/lib/Model/FlexOffset.php index 1fa46f4f..06d336b8 100644 --- a/src/clients/messaging-api/lib/Model/FlexOffset.php +++ b/src/clients/messaging-api/lib/Model/FlexOffset.php @@ -17,7 +17,7 @@ /** * FlexOffset * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexSeparator.php b/src/clients/messaging-api/lib/Model/FlexSeparator.php index b49fe114..c4ccccd6 100644 --- a/src/clients/messaging-api/lib/Model/FlexSeparator.php +++ b/src/clients/messaging-api/lib/Model/FlexSeparator.php @@ -17,7 +17,7 @@ /** * FlexSeparator * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexSpan.php b/src/clients/messaging-api/lib/Model/FlexSpan.php index c9c095da..c6628ea3 100644 --- a/src/clients/messaging-api/lib/Model/FlexSpan.php +++ b/src/clients/messaging-api/lib/Model/FlexSpan.php @@ -17,7 +17,7 @@ /** * FlexSpan * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexSpanSize.php b/src/clients/messaging-api/lib/Model/FlexSpanSize.php index c7b984a1..b66d6a61 100644 --- a/src/clients/messaging-api/lib/Model/FlexSpanSize.php +++ b/src/clients/messaging-api/lib/Model/FlexSpanSize.php @@ -17,7 +17,7 @@ /** * FlexSpanSize * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexText.php b/src/clients/messaging-api/lib/Model/FlexText.php index 10efd10a..28e14feb 100644 --- a/src/clients/messaging-api/lib/Model/FlexText.php +++ b/src/clients/messaging-api/lib/Model/FlexText.php @@ -17,7 +17,7 @@ /** * FlexText * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexTextFontSize.php b/src/clients/messaging-api/lib/Model/FlexTextFontSize.php index 69f15519..3bbc03af 100644 --- a/src/clients/messaging-api/lib/Model/FlexTextFontSize.php +++ b/src/clients/messaging-api/lib/Model/FlexTextFontSize.php @@ -17,7 +17,7 @@ /** * FlexTextFontSize * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/FlexVideo.php b/src/clients/messaging-api/lib/Model/FlexVideo.php index 448f2b2f..8f86bb68 100644 --- a/src/clients/messaging-api/lib/Model/FlexVideo.php +++ b/src/clients/messaging-api/lib/Model/FlexVideo.php @@ -17,7 +17,7 @@ /** * FlexVideo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GenderDemographic.php b/src/clients/messaging-api/lib/Model/GenderDemographic.php index 97a624b7..e00372ea 100644 --- a/src/clients/messaging-api/lib/Model/GenderDemographic.php +++ b/src/clients/messaging-api/lib/Model/GenderDemographic.php @@ -17,7 +17,7 @@ /** * GenderDemographic * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GenderDemographicFilter.php b/src/clients/messaging-api/lib/Model/GenderDemographicFilter.php index 32449ba8..62de6058 100644 --- a/src/clients/messaging-api/lib/Model/GenderDemographicFilter.php +++ b/src/clients/messaging-api/lib/Model/GenderDemographicFilter.php @@ -17,7 +17,7 @@ /** * GenderDemographicFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GetAggregationUnitNameListResponse.php b/src/clients/messaging-api/lib/Model/GetAggregationUnitNameListResponse.php index 5d5a6786..c1ba904d 100644 --- a/src/clients/messaging-api/lib/Model/GetAggregationUnitNameListResponse.php +++ b/src/clients/messaging-api/lib/Model/GetAggregationUnitNameListResponse.php @@ -17,7 +17,7 @@ /** * GetAggregationUnitNameListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GetAggregationUnitUsageResponse.php b/src/clients/messaging-api/lib/Model/GetAggregationUnitUsageResponse.php index ae9a7f2e..04f929c2 100644 --- a/src/clients/messaging-api/lib/Model/GetAggregationUnitUsageResponse.php +++ b/src/clients/messaging-api/lib/Model/GetAggregationUnitUsageResponse.php @@ -17,7 +17,7 @@ /** * GetAggregationUnitUsageResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GetFollowersResponse.php b/src/clients/messaging-api/lib/Model/GetFollowersResponse.php index d81f1aab..8fd34a6a 100644 --- a/src/clients/messaging-api/lib/Model/GetFollowersResponse.php +++ b/src/clients/messaging-api/lib/Model/GetFollowersResponse.php @@ -17,7 +17,7 @@ /** * GetFollowersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GetJoinedMembershipUsersResponse.php b/src/clients/messaging-api/lib/Model/GetJoinedMembershipUsersResponse.php index fc603d07..238014b1 100644 --- a/src/clients/messaging-api/lib/Model/GetJoinedMembershipUsersResponse.php +++ b/src/clients/messaging-api/lib/Model/GetJoinedMembershipUsersResponse.php @@ -17,7 +17,7 @@ /** * GetJoinedMembershipUsersResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GetMembershipSubscriptionResponse.php b/src/clients/messaging-api/lib/Model/GetMembershipSubscriptionResponse.php index 75e4790c..7ab35682 100644 --- a/src/clients/messaging-api/lib/Model/GetMembershipSubscriptionResponse.php +++ b/src/clients/messaging-api/lib/Model/GetMembershipSubscriptionResponse.php @@ -17,7 +17,7 @@ /** * GetMembershipSubscriptionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GetMessageContentTranscodingResponse.php b/src/clients/messaging-api/lib/Model/GetMessageContentTranscodingResponse.php index ce840a73..0c91776f 100644 --- a/src/clients/messaging-api/lib/Model/GetMessageContentTranscodingResponse.php +++ b/src/clients/messaging-api/lib/Model/GetMessageContentTranscodingResponse.php @@ -17,7 +17,7 @@ /** * GetMessageContentTranscodingResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GetWebhookEndpointResponse.php b/src/clients/messaging-api/lib/Model/GetWebhookEndpointResponse.php index 603ffd03..89044d3c 100644 --- a/src/clients/messaging-api/lib/Model/GetWebhookEndpointResponse.php +++ b/src/clients/messaging-api/lib/Model/GetWebhookEndpointResponse.php @@ -17,7 +17,7 @@ /** * GetWebhookEndpointResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GroupMemberCountResponse.php b/src/clients/messaging-api/lib/Model/GroupMemberCountResponse.php index ea8ed409..a78233eb 100644 --- a/src/clients/messaging-api/lib/Model/GroupMemberCountResponse.php +++ b/src/clients/messaging-api/lib/Model/GroupMemberCountResponse.php @@ -17,7 +17,7 @@ /** * GroupMemberCountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GroupSummaryResponse.php b/src/clients/messaging-api/lib/Model/GroupSummaryResponse.php index 85f276eb..4c69002c 100644 --- a/src/clients/messaging-api/lib/Model/GroupSummaryResponse.php +++ b/src/clients/messaging-api/lib/Model/GroupSummaryResponse.php @@ -17,7 +17,7 @@ /** * GroupSummaryResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/GroupUserProfileResponse.php b/src/clients/messaging-api/lib/Model/GroupUserProfileResponse.php index 4108454c..5598d896 100644 --- a/src/clients/messaging-api/lib/Model/GroupUserProfileResponse.php +++ b/src/clients/messaging-api/lib/Model/GroupUserProfileResponse.php @@ -17,7 +17,7 @@ /** * GroupUserProfileResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImageCarouselColumn.php b/src/clients/messaging-api/lib/Model/ImageCarouselColumn.php index 23f93211..27e864a2 100644 --- a/src/clients/messaging-api/lib/Model/ImageCarouselColumn.php +++ b/src/clients/messaging-api/lib/Model/ImageCarouselColumn.php @@ -17,7 +17,7 @@ /** * ImageCarouselColumn * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImageCarouselTemplate.php b/src/clients/messaging-api/lib/Model/ImageCarouselTemplate.php index 73a385a5..62e9814d 100644 --- a/src/clients/messaging-api/lib/Model/ImageCarouselTemplate.php +++ b/src/clients/messaging-api/lib/Model/ImageCarouselTemplate.php @@ -17,7 +17,7 @@ /** * ImageCarouselTemplate * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImageMessage.php b/src/clients/messaging-api/lib/Model/ImageMessage.php index 9128e6a0..9e98e5ab 100644 --- a/src/clients/messaging-api/lib/Model/ImageMessage.php +++ b/src/clients/messaging-api/lib/Model/ImageMessage.php @@ -17,7 +17,7 @@ /** * ImageMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImagemapAction.php b/src/clients/messaging-api/lib/Model/ImagemapAction.php index 4a0f7397..4e612ec8 100644 --- a/src/clients/messaging-api/lib/Model/ImagemapAction.php +++ b/src/clients/messaging-api/lib/Model/ImagemapAction.php @@ -17,7 +17,7 @@ /** * ImagemapAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImagemapArea.php b/src/clients/messaging-api/lib/Model/ImagemapArea.php index dd2d8251..4e7ac1e4 100644 --- a/src/clients/messaging-api/lib/Model/ImagemapArea.php +++ b/src/clients/messaging-api/lib/Model/ImagemapArea.php @@ -17,7 +17,7 @@ /** * ImagemapArea * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImagemapBaseSize.php b/src/clients/messaging-api/lib/Model/ImagemapBaseSize.php index 8e90f43b..32e8fbd2 100644 --- a/src/clients/messaging-api/lib/Model/ImagemapBaseSize.php +++ b/src/clients/messaging-api/lib/Model/ImagemapBaseSize.php @@ -17,7 +17,7 @@ /** * ImagemapBaseSize * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImagemapExternalLink.php b/src/clients/messaging-api/lib/Model/ImagemapExternalLink.php index 513d6b3b..f8f5d33f 100644 --- a/src/clients/messaging-api/lib/Model/ImagemapExternalLink.php +++ b/src/clients/messaging-api/lib/Model/ImagemapExternalLink.php @@ -17,7 +17,7 @@ /** * ImagemapExternalLink * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImagemapMessage.php b/src/clients/messaging-api/lib/Model/ImagemapMessage.php index 9e26cf1f..085dcc00 100644 --- a/src/clients/messaging-api/lib/Model/ImagemapMessage.php +++ b/src/clients/messaging-api/lib/Model/ImagemapMessage.php @@ -17,7 +17,7 @@ /** * ImagemapMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ImagemapVideo.php b/src/clients/messaging-api/lib/Model/ImagemapVideo.php index 263a875f..18975b26 100644 --- a/src/clients/messaging-api/lib/Model/ImagemapVideo.php +++ b/src/clients/messaging-api/lib/Model/ImagemapVideo.php @@ -17,7 +17,7 @@ /** * ImagemapVideo * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/IssueLinkTokenResponse.php b/src/clients/messaging-api/lib/Model/IssueLinkTokenResponse.php index 8bce73bb..582c1adc 100644 --- a/src/clients/messaging-api/lib/Model/IssueLinkTokenResponse.php +++ b/src/clients/messaging-api/lib/Model/IssueLinkTokenResponse.php @@ -17,7 +17,7 @@ /** * IssueLinkTokenResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Limit.php b/src/clients/messaging-api/lib/Model/Limit.php index 56652876..5e1a42bc 100644 --- a/src/clients/messaging-api/lib/Model/Limit.php +++ b/src/clients/messaging-api/lib/Model/Limit.php @@ -17,7 +17,7 @@ /** * Limit * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/LocationAction.php b/src/clients/messaging-api/lib/Model/LocationAction.php index 76e0cdf1..6f98b00a 100644 --- a/src/clients/messaging-api/lib/Model/LocationAction.php +++ b/src/clients/messaging-api/lib/Model/LocationAction.php @@ -17,7 +17,7 @@ /** * LocationAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/LocationMessage.php b/src/clients/messaging-api/lib/Model/LocationMessage.php index 9fb37ceb..79cc88a2 100644 --- a/src/clients/messaging-api/lib/Model/LocationMessage.php +++ b/src/clients/messaging-api/lib/Model/LocationMessage.php @@ -17,7 +17,7 @@ /** * LocationMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionRequest.php b/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionRequest.php index 70f645a3..c663a7c3 100644 --- a/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionRequest.php +++ b/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionRequest.php @@ -17,7 +17,7 @@ /** * LotteryAcquisitionConditionRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionResponse.php b/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionResponse.php index 27ebeb45..1f886dda 100644 --- a/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionResponse.php +++ b/src/clients/messaging-api/lib/Model/LotteryAcquisitionConditionResponse.php @@ -17,7 +17,7 @@ /** * LotteryAcquisitionConditionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MarkMessagesAsReadByTokenRequest.php b/src/clients/messaging-api/lib/Model/MarkMessagesAsReadByTokenRequest.php index ad886d8e..78c81fc3 100644 --- a/src/clients/messaging-api/lib/Model/MarkMessagesAsReadByTokenRequest.php +++ b/src/clients/messaging-api/lib/Model/MarkMessagesAsReadByTokenRequest.php @@ -17,7 +17,7 @@ /** * MarkMessagesAsReadByTokenRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MarkMessagesAsReadRequest.php b/src/clients/messaging-api/lib/Model/MarkMessagesAsReadRequest.php index f4062d5a..de6dd6f9 100644 --- a/src/clients/messaging-api/lib/Model/MarkMessagesAsReadRequest.php +++ b/src/clients/messaging-api/lib/Model/MarkMessagesAsReadRequest.php @@ -17,7 +17,7 @@ /** * MarkMessagesAsReadRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MembersIdsResponse.php b/src/clients/messaging-api/lib/Model/MembersIdsResponse.php index 05ff999b..1233b303 100644 --- a/src/clients/messaging-api/lib/Model/MembersIdsResponse.php +++ b/src/clients/messaging-api/lib/Model/MembersIdsResponse.php @@ -17,7 +17,7 @@ /** * MembersIdsResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Membership.php b/src/clients/messaging-api/lib/Model/Membership.php index e83143f8..a284b951 100644 --- a/src/clients/messaging-api/lib/Model/Membership.php +++ b/src/clients/messaging-api/lib/Model/Membership.php @@ -17,7 +17,7 @@ /** * Membership * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MembershipListResponse.php b/src/clients/messaging-api/lib/Model/MembershipListResponse.php index 4cdc3382..bf579692 100644 --- a/src/clients/messaging-api/lib/Model/MembershipListResponse.php +++ b/src/clients/messaging-api/lib/Model/MembershipListResponse.php @@ -17,7 +17,7 @@ /** * MembershipListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MentionSubstitutionObject.php b/src/clients/messaging-api/lib/Model/MentionSubstitutionObject.php index 711fde37..177956e4 100644 --- a/src/clients/messaging-api/lib/Model/MentionSubstitutionObject.php +++ b/src/clients/messaging-api/lib/Model/MentionSubstitutionObject.php @@ -17,7 +17,7 @@ /** * MentionSubstitutionObject * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MentionTarget.php b/src/clients/messaging-api/lib/Model/MentionTarget.php index 31383769..3eeb731b 100644 --- a/src/clients/messaging-api/lib/Model/MentionTarget.php +++ b/src/clients/messaging-api/lib/Model/MentionTarget.php @@ -17,7 +17,7 @@ /** * MentionTarget * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Message.php b/src/clients/messaging-api/lib/Model/Message.php index 52ab09fb..d01e472d 100644 --- a/src/clients/messaging-api/lib/Model/Message.php +++ b/src/clients/messaging-api/lib/Model/Message.php @@ -17,7 +17,7 @@ /** * Message * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MessageAction.php b/src/clients/messaging-api/lib/Model/MessageAction.php index 0443760a..5e38882b 100644 --- a/src/clients/messaging-api/lib/Model/MessageAction.php +++ b/src/clients/messaging-api/lib/Model/MessageAction.php @@ -17,7 +17,7 @@ /** * MessageAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MessageImagemapAction.php b/src/clients/messaging-api/lib/Model/MessageImagemapAction.php index 67d8ab78..19d80452 100644 --- a/src/clients/messaging-api/lib/Model/MessageImagemapAction.php +++ b/src/clients/messaging-api/lib/Model/MessageImagemapAction.php @@ -17,7 +17,7 @@ /** * MessageImagemapAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MessageQuotaResponse.php b/src/clients/messaging-api/lib/Model/MessageQuotaResponse.php index e8a6d798..588e42c1 100644 --- a/src/clients/messaging-api/lib/Model/MessageQuotaResponse.php +++ b/src/clients/messaging-api/lib/Model/MessageQuotaResponse.php @@ -17,7 +17,7 @@ /** * MessageQuotaResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MessagingApiPagerCouponListResponse.php b/src/clients/messaging-api/lib/Model/MessagingApiPagerCouponListResponse.php index 68004908..c7bccef7 100644 --- a/src/clients/messaging-api/lib/Model/MessagingApiPagerCouponListResponse.php +++ b/src/clients/messaging-api/lib/Model/MessagingApiPagerCouponListResponse.php @@ -17,7 +17,7 @@ /** * MessagingApiPagerCouponListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ModelInterface.php b/src/clients/messaging-api/lib/Model/ModelInterface.php index c3bfaa24..68827061 100644 --- a/src/clients/messaging-api/lib/Model/ModelInterface.php +++ b/src/clients/messaging-api/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi\Model @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/MulticastRequest.php b/src/clients/messaging-api/lib/Model/MulticastRequest.php index d8fc6037..1c661810 100644 --- a/src/clients/messaging-api/lib/Model/MulticastRequest.php +++ b/src/clients/messaging-api/lib/Model/MulticastRequest.php @@ -17,7 +17,7 @@ /** * MulticastRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/NarrowcastProgressResponse.php b/src/clients/messaging-api/lib/Model/NarrowcastProgressResponse.php index f395d226..9464fa95 100644 --- a/src/clients/messaging-api/lib/Model/NarrowcastProgressResponse.php +++ b/src/clients/messaging-api/lib/Model/NarrowcastProgressResponse.php @@ -17,7 +17,7 @@ /** * NarrowcastProgressResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/NarrowcastRequest.php b/src/clients/messaging-api/lib/Model/NarrowcastRequest.php index 2348ec22..15ed07aa 100644 --- a/src/clients/messaging-api/lib/Model/NarrowcastRequest.php +++ b/src/clients/messaging-api/lib/Model/NarrowcastRequest.php @@ -17,7 +17,7 @@ /** * NarrowcastRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionRequest.php b/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionRequest.php index 0f6b0979..4f134958 100644 --- a/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionRequest.php +++ b/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionRequest.php @@ -17,7 +17,7 @@ /** * NormalAcquisitionConditionRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionResponse.php b/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionResponse.php index 2b515573..21bfa9e8 100644 --- a/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionResponse.php +++ b/src/clients/messaging-api/lib/Model/NormalAcquisitionConditionResponse.php @@ -17,7 +17,7 @@ /** * NormalAcquisitionConditionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/NumberOfMessagesResponse.php b/src/clients/messaging-api/lib/Model/NumberOfMessagesResponse.php index e4413cec..989c5eca 100644 --- a/src/clients/messaging-api/lib/Model/NumberOfMessagesResponse.php +++ b/src/clients/messaging-api/lib/Model/NumberOfMessagesResponse.php @@ -17,7 +17,7 @@ /** * NumberOfMessagesResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/OperatorDemographicFilter.php b/src/clients/messaging-api/lib/Model/OperatorDemographicFilter.php index d23f509b..2dd10cba 100644 --- a/src/clients/messaging-api/lib/Model/OperatorDemographicFilter.php +++ b/src/clients/messaging-api/lib/Model/OperatorDemographicFilter.php @@ -17,7 +17,7 @@ /** * OperatorDemographicFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/OperatorRecipient.php b/src/clients/messaging-api/lib/Model/OperatorRecipient.php index 559f6688..b8d6dac0 100644 --- a/src/clients/messaging-api/lib/Model/OperatorRecipient.php +++ b/src/clients/messaging-api/lib/Model/OperatorRecipient.php @@ -17,7 +17,7 @@ /** * OperatorRecipient * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/PnpMessagesRequest.php b/src/clients/messaging-api/lib/Model/PnpMessagesRequest.php index 39e6ee20..9dec026f 100644 --- a/src/clients/messaging-api/lib/Model/PnpMessagesRequest.php +++ b/src/clients/messaging-api/lib/Model/PnpMessagesRequest.php @@ -17,7 +17,7 @@ /** * PnpMessagesRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/PostbackAction.php b/src/clients/messaging-api/lib/Model/PostbackAction.php index fb338466..25b53ddc 100644 --- a/src/clients/messaging-api/lib/Model/PostbackAction.php +++ b/src/clients/messaging-api/lib/Model/PostbackAction.php @@ -17,7 +17,7 @@ /** * PostbackAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/PushMessageRequest.php b/src/clients/messaging-api/lib/Model/PushMessageRequest.php index 9a2e3622..e95e8a37 100644 --- a/src/clients/messaging-api/lib/Model/PushMessageRequest.php +++ b/src/clients/messaging-api/lib/Model/PushMessageRequest.php @@ -17,7 +17,7 @@ /** * PushMessageRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/PushMessageResponse.php b/src/clients/messaging-api/lib/Model/PushMessageResponse.php index 122353d7..e7c4db80 100644 --- a/src/clients/messaging-api/lib/Model/PushMessageResponse.php +++ b/src/clients/messaging-api/lib/Model/PushMessageResponse.php @@ -17,7 +17,7 @@ /** * PushMessageResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/QuickReply.php b/src/clients/messaging-api/lib/Model/QuickReply.php index 1e4f50e6..aaf03d8c 100644 --- a/src/clients/messaging-api/lib/Model/QuickReply.php +++ b/src/clients/messaging-api/lib/Model/QuickReply.php @@ -17,7 +17,7 @@ /** * QuickReply * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/QuickReplyItem.php b/src/clients/messaging-api/lib/Model/QuickReplyItem.php index f0ebb5c3..51633fcb 100644 --- a/src/clients/messaging-api/lib/Model/QuickReplyItem.php +++ b/src/clients/messaging-api/lib/Model/QuickReplyItem.php @@ -17,7 +17,7 @@ /** * QuickReplyItem * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/QuotaConsumptionResponse.php b/src/clients/messaging-api/lib/Model/QuotaConsumptionResponse.php index fad2e7bf..3ed24e79 100644 --- a/src/clients/messaging-api/lib/Model/QuotaConsumptionResponse.php +++ b/src/clients/messaging-api/lib/Model/QuotaConsumptionResponse.php @@ -17,7 +17,7 @@ /** * QuotaConsumptionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/QuotaType.php b/src/clients/messaging-api/lib/Model/QuotaType.php index 3eeea37c..96d9c421 100644 --- a/src/clients/messaging-api/lib/Model/QuotaType.php +++ b/src/clients/messaging-api/lib/Model/QuotaType.php @@ -17,7 +17,7 @@ /** * QuotaType * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Recipient.php b/src/clients/messaging-api/lib/Model/Recipient.php index f6d923cd..629fd5a8 100644 --- a/src/clients/messaging-api/lib/Model/Recipient.php +++ b/src/clients/messaging-api/lib/Model/Recipient.php @@ -17,7 +17,7 @@ /** * Recipient * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RedeliveryRecipient.php b/src/clients/messaging-api/lib/Model/RedeliveryRecipient.php index 15e398ee..e30f7076 100644 --- a/src/clients/messaging-api/lib/Model/RedeliveryRecipient.php +++ b/src/clients/messaging-api/lib/Model/RedeliveryRecipient.php @@ -17,7 +17,7 @@ /** * RedeliveryRecipient * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ReferralAcquisitionConditionResponse.php b/src/clients/messaging-api/lib/Model/ReferralAcquisitionConditionResponse.php index ec562fb0..5205599d 100644 --- a/src/clients/messaging-api/lib/Model/ReferralAcquisitionConditionResponse.php +++ b/src/clients/messaging-api/lib/Model/ReferralAcquisitionConditionResponse.php @@ -17,7 +17,7 @@ /** * ReferralAcquisitionConditionResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ReplyMessageRequest.php b/src/clients/messaging-api/lib/Model/ReplyMessageRequest.php index d0ae82e2..57b448b5 100644 --- a/src/clients/messaging-api/lib/Model/ReplyMessageRequest.php +++ b/src/clients/messaging-api/lib/Model/ReplyMessageRequest.php @@ -17,7 +17,7 @@ /** * ReplyMessageRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ReplyMessageResponse.php b/src/clients/messaging-api/lib/Model/ReplyMessageResponse.php index e5639751..ca366012 100644 --- a/src/clients/messaging-api/lib/Model/ReplyMessageResponse.php +++ b/src/clients/messaging-api/lib/Model/ReplyMessageResponse.php @@ -17,7 +17,7 @@ /** * ReplyMessageResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuAliasListResponse.php b/src/clients/messaging-api/lib/Model/RichMenuAliasListResponse.php index c7b5be56..8076519f 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuAliasListResponse.php +++ b/src/clients/messaging-api/lib/Model/RichMenuAliasListResponse.php @@ -17,7 +17,7 @@ /** * RichMenuAliasListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuAliasResponse.php b/src/clients/messaging-api/lib/Model/RichMenuAliasResponse.php index 100b9e4f..d79185c6 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuAliasResponse.php +++ b/src/clients/messaging-api/lib/Model/RichMenuAliasResponse.php @@ -17,7 +17,7 @@ /** * RichMenuAliasResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuArea.php b/src/clients/messaging-api/lib/Model/RichMenuArea.php index 0a2da457..1340484c 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuArea.php +++ b/src/clients/messaging-api/lib/Model/RichMenuArea.php @@ -17,7 +17,7 @@ /** * RichMenuArea * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBatchLinkOperation.php b/src/clients/messaging-api/lib/Model/RichMenuBatchLinkOperation.php index 3b4c2e60..c00f0dc3 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBatchLinkOperation.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBatchLinkOperation.php @@ -17,7 +17,7 @@ /** * RichMenuBatchLinkOperation * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBatchOperation.php b/src/clients/messaging-api/lib/Model/RichMenuBatchOperation.php index a27aaacd..ad75c07c 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBatchOperation.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBatchOperation.php @@ -17,7 +17,7 @@ /** * RichMenuBatchOperation * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBatchProgressPhase.php b/src/clients/messaging-api/lib/Model/RichMenuBatchProgressPhase.php index 0aee6587..93d4f8f3 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBatchProgressPhase.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBatchProgressPhase.php @@ -17,7 +17,7 @@ /** * RichMenuBatchProgressPhase * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBatchProgressResponse.php b/src/clients/messaging-api/lib/Model/RichMenuBatchProgressResponse.php index bf211627..16e5b577 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBatchProgressResponse.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBatchProgressResponse.php @@ -17,7 +17,7 @@ /** * RichMenuBatchProgressResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBatchRequest.php b/src/clients/messaging-api/lib/Model/RichMenuBatchRequest.php index 1c568a4a..cb95a812 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBatchRequest.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBatchRequest.php @@ -17,7 +17,7 @@ /** * RichMenuBatchRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkAllOperation.php b/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkAllOperation.php index 4499bea6..3380cb1f 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkAllOperation.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkAllOperation.php @@ -17,7 +17,7 @@ /** * RichMenuBatchUnlinkAllOperation * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkOperation.php b/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkOperation.php index 4d2af846..06fb9d18 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkOperation.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBatchUnlinkOperation.php @@ -17,7 +17,7 @@ /** * RichMenuBatchUnlinkOperation * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBounds.php b/src/clients/messaging-api/lib/Model/RichMenuBounds.php index 9fbba981..ce552da0 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBounds.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBounds.php @@ -17,7 +17,7 @@ /** * RichMenuBounds * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBulkLinkRequest.php b/src/clients/messaging-api/lib/Model/RichMenuBulkLinkRequest.php index dc52a626..bf7b1202 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBulkLinkRequest.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBulkLinkRequest.php @@ -17,7 +17,7 @@ /** * RichMenuBulkLinkRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuBulkUnlinkRequest.php b/src/clients/messaging-api/lib/Model/RichMenuBulkUnlinkRequest.php index 196d1fba..b8fb3901 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuBulkUnlinkRequest.php +++ b/src/clients/messaging-api/lib/Model/RichMenuBulkUnlinkRequest.php @@ -17,7 +17,7 @@ /** * RichMenuBulkUnlinkRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuIdResponse.php b/src/clients/messaging-api/lib/Model/RichMenuIdResponse.php index 58b786a5..c3363a24 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuIdResponse.php +++ b/src/clients/messaging-api/lib/Model/RichMenuIdResponse.php @@ -17,7 +17,7 @@ /** * RichMenuIdResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuListResponse.php b/src/clients/messaging-api/lib/Model/RichMenuListResponse.php index 823cc893..af55dc48 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuListResponse.php +++ b/src/clients/messaging-api/lib/Model/RichMenuListResponse.php @@ -17,7 +17,7 @@ /** * RichMenuListResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuRequest.php b/src/clients/messaging-api/lib/Model/RichMenuRequest.php index d6a08d83..2bacdd2c 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuRequest.php +++ b/src/clients/messaging-api/lib/Model/RichMenuRequest.php @@ -17,7 +17,7 @@ /** * RichMenuRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuResponse.php b/src/clients/messaging-api/lib/Model/RichMenuResponse.php index 5a765025..77c14060 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuResponse.php +++ b/src/clients/messaging-api/lib/Model/RichMenuResponse.php @@ -17,7 +17,7 @@ /** * RichMenuResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuSize.php b/src/clients/messaging-api/lib/Model/RichMenuSize.php index f1d327f6..08a3455c 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuSize.php +++ b/src/clients/messaging-api/lib/Model/RichMenuSize.php @@ -17,7 +17,7 @@ /** * RichMenuSize * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RichMenuSwitchAction.php b/src/clients/messaging-api/lib/Model/RichMenuSwitchAction.php index def8d500..e8327499 100644 --- a/src/clients/messaging-api/lib/Model/RichMenuSwitchAction.php +++ b/src/clients/messaging-api/lib/Model/RichMenuSwitchAction.php @@ -17,7 +17,7 @@ /** * RichMenuSwitchAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RoomMemberCountResponse.php b/src/clients/messaging-api/lib/Model/RoomMemberCountResponse.php index 36c7940d..537ba3d6 100644 --- a/src/clients/messaging-api/lib/Model/RoomMemberCountResponse.php +++ b/src/clients/messaging-api/lib/Model/RoomMemberCountResponse.php @@ -17,7 +17,7 @@ /** * RoomMemberCountResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/RoomUserProfileResponse.php b/src/clients/messaging-api/lib/Model/RoomUserProfileResponse.php index 0670f8d9..a3d1baf4 100644 --- a/src/clients/messaging-api/lib/Model/RoomUserProfileResponse.php +++ b/src/clients/messaging-api/lib/Model/RoomUserProfileResponse.php @@ -17,7 +17,7 @@ /** * RoomUserProfileResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Sender.php b/src/clients/messaging-api/lib/Model/Sender.php index 3e5e0041..8153aca9 100644 --- a/src/clients/messaging-api/lib/Model/Sender.php +++ b/src/clients/messaging-api/lib/Model/Sender.php @@ -17,7 +17,7 @@ /** * Sender * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/SentMessage.php b/src/clients/messaging-api/lib/Model/SentMessage.php index ce29fa1e..0daf70da 100644 --- a/src/clients/messaging-api/lib/Model/SentMessage.php +++ b/src/clients/messaging-api/lib/Model/SentMessage.php @@ -17,7 +17,7 @@ /** * SentMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/SetWebhookEndpointRequest.php b/src/clients/messaging-api/lib/Model/SetWebhookEndpointRequest.php index 0a50b284..90a7f22c 100644 --- a/src/clients/messaging-api/lib/Model/SetWebhookEndpointRequest.php +++ b/src/clients/messaging-api/lib/Model/SetWebhookEndpointRequest.php @@ -17,7 +17,7 @@ /** * SetWebhookEndpointRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ShowLoadingAnimationRequest.php b/src/clients/messaging-api/lib/Model/ShowLoadingAnimationRequest.php index a580885c..9e89c9f1 100644 --- a/src/clients/messaging-api/lib/Model/ShowLoadingAnimationRequest.php +++ b/src/clients/messaging-api/lib/Model/ShowLoadingAnimationRequest.php @@ -17,7 +17,7 @@ /** * ShowLoadingAnimationRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/StickerMessage.php b/src/clients/messaging-api/lib/Model/StickerMessage.php index 37202088..277a2128 100644 --- a/src/clients/messaging-api/lib/Model/StickerMessage.php +++ b/src/clients/messaging-api/lib/Model/StickerMessage.php @@ -17,7 +17,7 @@ /** * StickerMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/SubscribedMembershipPlan.php b/src/clients/messaging-api/lib/Model/SubscribedMembershipPlan.php index d48b004e..55a5e771 100644 --- a/src/clients/messaging-api/lib/Model/SubscribedMembershipPlan.php +++ b/src/clients/messaging-api/lib/Model/SubscribedMembershipPlan.php @@ -17,7 +17,7 @@ /** * SubscribedMembershipPlan * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/SubscribedMembershipUser.php b/src/clients/messaging-api/lib/Model/SubscribedMembershipUser.php index c5bb10bd..86b7fd9f 100644 --- a/src/clients/messaging-api/lib/Model/SubscribedMembershipUser.php +++ b/src/clients/messaging-api/lib/Model/SubscribedMembershipUser.php @@ -17,7 +17,7 @@ /** * SubscribedMembershipUser * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Subscription.php b/src/clients/messaging-api/lib/Model/Subscription.php index 0332fb2b..20403279 100644 --- a/src/clients/messaging-api/lib/Model/Subscription.php +++ b/src/clients/messaging-api/lib/Model/Subscription.php @@ -17,7 +17,7 @@ /** * Subscription * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographic.php b/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographic.php index d88928fe..74c45586 100644 --- a/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographic.php +++ b/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographic.php @@ -17,7 +17,7 @@ /** * SubscriptionPeriodDemographic * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographicFilter.php b/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographicFilter.php index 7e43b68b..f95992ed 100644 --- a/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographicFilter.php +++ b/src/clients/messaging-api/lib/Model/SubscriptionPeriodDemographicFilter.php @@ -17,7 +17,7 @@ /** * SubscriptionPeriodDemographicFilter * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/SubstitutionObject.php b/src/clients/messaging-api/lib/Model/SubstitutionObject.php index 9d54d86c..ed9c47da 100644 --- a/src/clients/messaging-api/lib/Model/SubstitutionObject.php +++ b/src/clients/messaging-api/lib/Model/SubstitutionObject.php @@ -17,7 +17,7 @@ /** * SubstitutionObject * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/Template.php b/src/clients/messaging-api/lib/Model/Template.php index 94f3dd01..3c03cfe4 100644 --- a/src/clients/messaging-api/lib/Model/Template.php +++ b/src/clients/messaging-api/lib/Model/Template.php @@ -17,7 +17,7 @@ /** * Template * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/TemplateImageAspectRatio.php b/src/clients/messaging-api/lib/Model/TemplateImageAspectRatio.php index f702575a..c926fa3f 100644 --- a/src/clients/messaging-api/lib/Model/TemplateImageAspectRatio.php +++ b/src/clients/messaging-api/lib/Model/TemplateImageAspectRatio.php @@ -17,7 +17,7 @@ /** * TemplateImageAspectRatio * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/TemplateImageSize.php b/src/clients/messaging-api/lib/Model/TemplateImageSize.php index 233ba78a..c7510280 100644 --- a/src/clients/messaging-api/lib/Model/TemplateImageSize.php +++ b/src/clients/messaging-api/lib/Model/TemplateImageSize.php @@ -17,7 +17,7 @@ /** * TemplateImageSize * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/TemplateMessage.php b/src/clients/messaging-api/lib/Model/TemplateMessage.php index 4469e6d3..cbf25876 100644 --- a/src/clients/messaging-api/lib/Model/TemplateMessage.php +++ b/src/clients/messaging-api/lib/Model/TemplateMessage.php @@ -17,7 +17,7 @@ /** * TemplateMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/TestWebhookEndpointRequest.php b/src/clients/messaging-api/lib/Model/TestWebhookEndpointRequest.php index 206992b7..ad1c7697 100644 --- a/src/clients/messaging-api/lib/Model/TestWebhookEndpointRequest.php +++ b/src/clients/messaging-api/lib/Model/TestWebhookEndpointRequest.php @@ -17,7 +17,7 @@ /** * TestWebhookEndpointRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/TestWebhookEndpointResponse.php b/src/clients/messaging-api/lib/Model/TestWebhookEndpointResponse.php index bbcfa702..6afb2eff 100644 --- a/src/clients/messaging-api/lib/Model/TestWebhookEndpointResponse.php +++ b/src/clients/messaging-api/lib/Model/TestWebhookEndpointResponse.php @@ -17,7 +17,7 @@ /** * TestWebhookEndpointResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/TextMessage.php b/src/clients/messaging-api/lib/Model/TextMessage.php index fc80c21e..4a4e3cee 100644 --- a/src/clients/messaging-api/lib/Model/TextMessage.php +++ b/src/clients/messaging-api/lib/Model/TextMessage.php @@ -17,7 +17,7 @@ /** * TextMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/TextMessageV2.php b/src/clients/messaging-api/lib/Model/TextMessageV2.php index aa10bd64..907ec118 100644 --- a/src/clients/messaging-api/lib/Model/TextMessageV2.php +++ b/src/clients/messaging-api/lib/Model/TextMessageV2.php @@ -17,7 +17,7 @@ /** * TextMessageV2 * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/URIAction.php b/src/clients/messaging-api/lib/Model/URIAction.php index 89bd2d96..dc92131f 100644 --- a/src/clients/messaging-api/lib/Model/URIAction.php +++ b/src/clients/messaging-api/lib/Model/URIAction.php @@ -17,7 +17,7 @@ /** * URIAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/URIImagemapAction.php b/src/clients/messaging-api/lib/Model/URIImagemapAction.php index c778852d..64e48f52 100644 --- a/src/clients/messaging-api/lib/Model/URIImagemapAction.php +++ b/src/clients/messaging-api/lib/Model/URIImagemapAction.php @@ -17,7 +17,7 @@ /** * URIImagemapAction * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/UpdateRichMenuAliasRequest.php b/src/clients/messaging-api/lib/Model/UpdateRichMenuAliasRequest.php index 23bca5a9..27fbd32b 100644 --- a/src/clients/messaging-api/lib/Model/UpdateRichMenuAliasRequest.php +++ b/src/clients/messaging-api/lib/Model/UpdateRichMenuAliasRequest.php @@ -17,7 +17,7 @@ /** * UpdateRichMenuAliasRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/UserMentionTarget.php b/src/clients/messaging-api/lib/Model/UserMentionTarget.php index 1d31d9c0..9816e48c 100644 --- a/src/clients/messaging-api/lib/Model/UserMentionTarget.php +++ b/src/clients/messaging-api/lib/Model/UserMentionTarget.php @@ -17,7 +17,7 @@ /** * UserMentionTarget * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/UserProfileResponse.php b/src/clients/messaging-api/lib/Model/UserProfileResponse.php index 32e7e03d..45f4854a 100644 --- a/src/clients/messaging-api/lib/Model/UserProfileResponse.php +++ b/src/clients/messaging-api/lib/Model/UserProfileResponse.php @@ -17,7 +17,7 @@ /** * UserProfileResponse * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/ValidateMessageRequest.php b/src/clients/messaging-api/lib/Model/ValidateMessageRequest.php index 96b15da1..9b7c571a 100644 --- a/src/clients/messaging-api/lib/Model/ValidateMessageRequest.php +++ b/src/clients/messaging-api/lib/Model/ValidateMessageRequest.php @@ -17,7 +17,7 @@ /** * ValidateMessageRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/Model/VideoMessage.php b/src/clients/messaging-api/lib/Model/VideoMessage.php index 4ea3bbe0..65b8ce09 100644 --- a/src/clients/messaging-api/lib/Model/VideoMessage.php +++ b/src/clients/messaging-api/lib/Model/VideoMessage.php @@ -17,7 +17,7 @@ /** * VideoMessage * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Clients\MessagingApi @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/clients/messaging-api/lib/ObjectSerializer.php b/src/clients/messaging-api/lib/ObjectSerializer.php index 51b4df2d..a95329f1 100644 --- a/src/clients/messaging-api/lib/ObjectSerializer.php +++ b/src/clients/messaging-api/lib/ObjectSerializer.php @@ -32,9 +32,8 @@ * * The version of the OpenAPI document: 0.0.1 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/webhook/lib/Api/DummyApi.php b/src/webhook/lib/Api/DummyApi.php index 1c6488e9..4c529579 100644 --- a/src/webhook/lib/Api/DummyApi.php +++ b/src/webhook/lib/Api/DummyApi.php @@ -16,7 +16,7 @@ */ /** * DummyApi - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -49,8 +49,11 @@ use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; use LINE\Webhook\ApiException; use LINE\Webhook\Configuration; +use LINE\Webhook\FormDataProcessor; use LINE\Webhook\HeaderSelector; use LINE\Webhook\ObjectSerializer; @@ -192,34 +195,15 @@ public function callbackWithHttpInfo($callbackRequest, string $contentType = sel switch($statusCode) { case 200: - if ('string' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string' !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } + + if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( @@ -233,34 +217,11 @@ public function callbackWithHttpInfo($callbackRequest, string $contentType = sel ); } - $returnType = 'string'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - try { - $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); - } catch (\JsonException $exception) { - throw new ApiException( - sprintf( - 'Error JSON decoding server response (%s)', - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $content - ); - } - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - + return $this->handleResponseWithDataType( + 'string', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { case 200: @@ -270,8 +231,10 @@ public function callbackWithHttpInfo($callbackRequest, string $contentType = sel $e->getResponseHeaders() ); $e->setResponseObject($data); - break; + throw $e; } + + throw $e; } } @@ -452,6 +415,57 @@ protected function createHttpClientOption() } } + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + return $options; } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } } diff --git a/src/webhook/lib/ApiException.php b/src/webhook/lib/ApiException.php index a5949cbe..1c565a02 100644 --- a/src/webhook/lib/ApiException.php +++ b/src/webhook/lib/ApiException.php @@ -16,7 +16,7 @@ */ /** * ApiException - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Configuration.php b/src/webhook/lib/Configuration.php index 78e574be..b15e653f 100644 --- a/src/webhook/lib/Configuration.php +++ b/src/webhook/lib/Configuration.php @@ -16,7 +16,7 @@ */ /** * Configuration - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** @@ -44,7 +44,7 @@ /** * Configuration Class Doc Comment - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -138,6 +138,20 @@ class Configuration */ protected $tempFolderPath; + /** + * Path to a certificate file, for mTLS + * + * @var string + */ + protected $certFile; + + /** + * Path to a key file, for mTLS + * + * @var string + */ + protected $keyFile; + /** * Constructor */ @@ -411,6 +425,49 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets the certificate file path, for mTLS + * + * @return $this + */ + public function setCertFile($certFile) + { + $this->certFile = $certFile; + return $this; + } + + /** + * Gets the certificate file path, for mTLS + * + * @return string Certificate file path + */ + public function getCertFile() + { + return $this->certFile; + } + + /** + * Sets the certificate key path, for mTLS + * + * @return $this + */ + public function setKeyFile($keyFile) + { + $this->keyFile = $keyFile; + return $this; + } + + /** + * Gets the certificate key path, for mTLS + * + * @return string Certificate key path + */ + public function getKeyFile() + { + return $this->keyFile; + } + + /** * Gets the default configuration instance * diff --git a/src/webhook/lib/FormDataProcessor.php b/src/webhook/lib/FormDataProcessor.php new file mode 100644 index 00000000..45fc4d47 --- /dev/null +++ b/src/webhook/lib/FormDataProcessor.php @@ -0,0 +1,261 @@ + $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix.$key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + */ + protected function makeFormSafe($value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (strpos($type, '\SplFileObject') !== false) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/webhook/lib/HeaderSelector.php b/src/webhook/lib/HeaderSelector.php index c11b99b9..20204e01 100644 --- a/src/webhook/lib/HeaderSelector.php +++ b/src/webhook/lib/HeaderSelector.php @@ -16,7 +16,7 @@ */ /** * HeaderSelector - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/AccountLinkEvent.php b/src/webhook/lib/Model/AccountLinkEvent.php index 452d30fc..a6ee23f9 100644 --- a/src/webhook/lib/Model/AccountLinkEvent.php +++ b/src/webhook/lib/Model/AccountLinkEvent.php @@ -17,7 +17,7 @@ /** * AccountLinkEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ActivatedEvent.php b/src/webhook/lib/Model/ActivatedEvent.php index 0127a522..6083b91d 100644 --- a/src/webhook/lib/Model/ActivatedEvent.php +++ b/src/webhook/lib/Model/ActivatedEvent.php @@ -17,7 +17,7 @@ /** * ActivatedEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/AllMentionee.php b/src/webhook/lib/Model/AllMentionee.php index 137059b0..c903c743 100644 --- a/src/webhook/lib/Model/AllMentionee.php +++ b/src/webhook/lib/Model/AllMentionee.php @@ -17,7 +17,7 @@ /** * AllMentionee * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/AttachedModuleContent.php b/src/webhook/lib/Model/AttachedModuleContent.php index 8a291eca..8abc55e6 100644 --- a/src/webhook/lib/Model/AttachedModuleContent.php +++ b/src/webhook/lib/Model/AttachedModuleContent.php @@ -17,7 +17,7 @@ /** * AttachedModuleContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/AudioMessageContent.php b/src/webhook/lib/Model/AudioMessageContent.php index 9dcbcc80..7e0fec03 100644 --- a/src/webhook/lib/Model/AudioMessageContent.php +++ b/src/webhook/lib/Model/AudioMessageContent.php @@ -17,7 +17,7 @@ /** * AudioMessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/BeaconContent.php b/src/webhook/lib/Model/BeaconContent.php index d7d724a0..e6598e43 100644 --- a/src/webhook/lib/Model/BeaconContent.php +++ b/src/webhook/lib/Model/BeaconContent.php @@ -17,7 +17,7 @@ /** * BeaconContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/BeaconEvent.php b/src/webhook/lib/Model/BeaconEvent.php index 3a8249bd..4d6475ec 100644 --- a/src/webhook/lib/Model/BeaconEvent.php +++ b/src/webhook/lib/Model/BeaconEvent.php @@ -17,7 +17,7 @@ /** * BeaconEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/BotResumedEvent.php b/src/webhook/lib/Model/BotResumedEvent.php index a3c268af..3fe3b9b4 100644 --- a/src/webhook/lib/Model/BotResumedEvent.php +++ b/src/webhook/lib/Model/BotResumedEvent.php @@ -17,7 +17,7 @@ /** * BotResumedEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/BotSuspendedEvent.php b/src/webhook/lib/Model/BotSuspendedEvent.php index af7f6a34..063e2c6e 100644 --- a/src/webhook/lib/Model/BotSuspendedEvent.php +++ b/src/webhook/lib/Model/BotSuspendedEvent.php @@ -17,7 +17,7 @@ /** * BotSuspendedEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/CallbackRequest.php b/src/webhook/lib/Model/CallbackRequest.php index 44bc47e2..0ff3f43b 100644 --- a/src/webhook/lib/Model/CallbackRequest.php +++ b/src/webhook/lib/Model/CallbackRequest.php @@ -17,7 +17,7 @@ /** * CallbackRequest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ChatControl.php b/src/webhook/lib/Model/ChatControl.php index e7c6e189..06018e64 100644 --- a/src/webhook/lib/Model/ChatControl.php +++ b/src/webhook/lib/Model/ChatControl.php @@ -17,7 +17,7 @@ /** * ChatControl * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ContentProvider.php b/src/webhook/lib/Model/ContentProvider.php index 76e6a962..91d36f46 100644 --- a/src/webhook/lib/Model/ContentProvider.php +++ b/src/webhook/lib/Model/ContentProvider.php @@ -17,7 +17,7 @@ /** * ContentProvider * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/DeactivatedEvent.php b/src/webhook/lib/Model/DeactivatedEvent.php index 897d29df..b37c1e6e 100644 --- a/src/webhook/lib/Model/DeactivatedEvent.php +++ b/src/webhook/lib/Model/DeactivatedEvent.php @@ -17,7 +17,7 @@ /** * DeactivatedEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/DeliveryContext.php b/src/webhook/lib/Model/DeliveryContext.php index e28962b9..b1edf675 100644 --- a/src/webhook/lib/Model/DeliveryContext.php +++ b/src/webhook/lib/Model/DeliveryContext.php @@ -17,7 +17,7 @@ /** * DeliveryContext * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/DetachedModuleContent.php b/src/webhook/lib/Model/DetachedModuleContent.php index 78315839..46cf0282 100644 --- a/src/webhook/lib/Model/DetachedModuleContent.php +++ b/src/webhook/lib/Model/DetachedModuleContent.php @@ -17,7 +17,7 @@ /** * DetachedModuleContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/Emoji.php b/src/webhook/lib/Model/Emoji.php index dc750a7d..f87d91e9 100644 --- a/src/webhook/lib/Model/Emoji.php +++ b/src/webhook/lib/Model/Emoji.php @@ -17,7 +17,7 @@ /** * Emoji * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/Event.php b/src/webhook/lib/Model/Event.php index 2c23f5cc..ddc95689 100644 --- a/src/webhook/lib/Model/Event.php +++ b/src/webhook/lib/Model/Event.php @@ -17,7 +17,7 @@ /** * Event * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/EventMode.php b/src/webhook/lib/Model/EventMode.php index ee756e0c..e2f7f399 100644 --- a/src/webhook/lib/Model/EventMode.php +++ b/src/webhook/lib/Model/EventMode.php @@ -17,7 +17,7 @@ /** * EventMode * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/FileMessageContent.php b/src/webhook/lib/Model/FileMessageContent.php index d0b89bdb..6b4ecade 100644 --- a/src/webhook/lib/Model/FileMessageContent.php +++ b/src/webhook/lib/Model/FileMessageContent.php @@ -17,7 +17,7 @@ /** * FileMessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/FollowDetail.php b/src/webhook/lib/Model/FollowDetail.php index 97dfa957..70852ffc 100644 --- a/src/webhook/lib/Model/FollowDetail.php +++ b/src/webhook/lib/Model/FollowDetail.php @@ -17,7 +17,7 @@ /** * FollowDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/FollowEvent.php b/src/webhook/lib/Model/FollowEvent.php index 5a7c198b..261fe611 100644 --- a/src/webhook/lib/Model/FollowEvent.php +++ b/src/webhook/lib/Model/FollowEvent.php @@ -17,7 +17,7 @@ /** * FollowEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/GroupSource.php b/src/webhook/lib/Model/GroupSource.php index 025b9f1e..79c371de 100644 --- a/src/webhook/lib/Model/GroupSource.php +++ b/src/webhook/lib/Model/GroupSource.php @@ -17,7 +17,7 @@ /** * GroupSource * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ImageMessageContent.php b/src/webhook/lib/Model/ImageMessageContent.php index f7e97bdb..d9809290 100644 --- a/src/webhook/lib/Model/ImageMessageContent.php +++ b/src/webhook/lib/Model/ImageMessageContent.php @@ -17,7 +17,7 @@ /** * ImageMessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ImageSet.php b/src/webhook/lib/Model/ImageSet.php index 94c94567..35038440 100644 --- a/src/webhook/lib/Model/ImageSet.php +++ b/src/webhook/lib/Model/ImageSet.php @@ -17,7 +17,7 @@ /** * ImageSet * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/JoinEvent.php b/src/webhook/lib/Model/JoinEvent.php index c28345b3..6c56ba6c 100644 --- a/src/webhook/lib/Model/JoinEvent.php +++ b/src/webhook/lib/Model/JoinEvent.php @@ -17,7 +17,7 @@ /** * JoinEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/JoinedMembers.php b/src/webhook/lib/Model/JoinedMembers.php index 268ee4bc..6191e66a 100644 --- a/src/webhook/lib/Model/JoinedMembers.php +++ b/src/webhook/lib/Model/JoinedMembers.php @@ -17,7 +17,7 @@ /** * JoinedMembers * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/JoinedMembershipContent.php b/src/webhook/lib/Model/JoinedMembershipContent.php index 61ad269b..40c16600 100644 --- a/src/webhook/lib/Model/JoinedMembershipContent.php +++ b/src/webhook/lib/Model/JoinedMembershipContent.php @@ -17,7 +17,7 @@ /** * JoinedMembershipContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/LeaveEvent.php b/src/webhook/lib/Model/LeaveEvent.php index d6049b4b..1ee6219a 100644 --- a/src/webhook/lib/Model/LeaveEvent.php +++ b/src/webhook/lib/Model/LeaveEvent.php @@ -17,7 +17,7 @@ /** * LeaveEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/LeftMembers.php b/src/webhook/lib/Model/LeftMembers.php index 8182168d..d080c5df 100644 --- a/src/webhook/lib/Model/LeftMembers.php +++ b/src/webhook/lib/Model/LeftMembers.php @@ -17,7 +17,7 @@ /** * LeftMembers * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/LeftMembershipContent.php b/src/webhook/lib/Model/LeftMembershipContent.php index 7d0db423..9f4b32a4 100644 --- a/src/webhook/lib/Model/LeftMembershipContent.php +++ b/src/webhook/lib/Model/LeftMembershipContent.php @@ -17,7 +17,7 @@ /** * LeftMembershipContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/LinkContent.php b/src/webhook/lib/Model/LinkContent.php index 3f3146ab..743649eb 100644 --- a/src/webhook/lib/Model/LinkContent.php +++ b/src/webhook/lib/Model/LinkContent.php @@ -17,7 +17,7 @@ /** * LinkContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/LocationMessageContent.php b/src/webhook/lib/Model/LocationMessageContent.php index ac221edc..10e075c4 100644 --- a/src/webhook/lib/Model/LocationMessageContent.php +++ b/src/webhook/lib/Model/LocationMessageContent.php @@ -17,7 +17,7 @@ /** * LocationMessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/MemberJoinedEvent.php b/src/webhook/lib/Model/MemberJoinedEvent.php index 84877551..b1739828 100644 --- a/src/webhook/lib/Model/MemberJoinedEvent.php +++ b/src/webhook/lib/Model/MemberJoinedEvent.php @@ -17,7 +17,7 @@ /** * MemberJoinedEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/MemberLeftEvent.php b/src/webhook/lib/Model/MemberLeftEvent.php index 5634f732..380af6a3 100644 --- a/src/webhook/lib/Model/MemberLeftEvent.php +++ b/src/webhook/lib/Model/MemberLeftEvent.php @@ -17,7 +17,7 @@ /** * MemberLeftEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/MembershipContent.php b/src/webhook/lib/Model/MembershipContent.php index 5a1b7646..65a07120 100644 --- a/src/webhook/lib/Model/MembershipContent.php +++ b/src/webhook/lib/Model/MembershipContent.php @@ -17,7 +17,7 @@ /** * MembershipContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/MembershipEvent.php b/src/webhook/lib/Model/MembershipEvent.php index 38f7d2c2..419ffdbd 100644 --- a/src/webhook/lib/Model/MembershipEvent.php +++ b/src/webhook/lib/Model/MembershipEvent.php @@ -17,7 +17,7 @@ /** * MembershipEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/Mention.php b/src/webhook/lib/Model/Mention.php index 922bedf8..7546f6c2 100644 --- a/src/webhook/lib/Model/Mention.php +++ b/src/webhook/lib/Model/Mention.php @@ -17,7 +17,7 @@ /** * Mention * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/Mentionee.php b/src/webhook/lib/Model/Mentionee.php index 2d57fd72..9377f0d6 100644 --- a/src/webhook/lib/Model/Mentionee.php +++ b/src/webhook/lib/Model/Mentionee.php @@ -17,7 +17,7 @@ /** * Mentionee * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/MessageContent.php b/src/webhook/lib/Model/MessageContent.php index 2e6f411e..c0b47c32 100644 --- a/src/webhook/lib/Model/MessageContent.php +++ b/src/webhook/lib/Model/MessageContent.php @@ -17,7 +17,7 @@ /** * MessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/MessageEvent.php b/src/webhook/lib/Model/MessageEvent.php index b666db6c..9e066669 100644 --- a/src/webhook/lib/Model/MessageEvent.php +++ b/src/webhook/lib/Model/MessageEvent.php @@ -17,7 +17,7 @@ /** * MessageEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ModelInterface.php b/src/webhook/lib/Model/ModelInterface.php index 2662c3d6..d5eebf76 100644 --- a/src/webhook/lib/Model/ModelInterface.php +++ b/src/webhook/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ /** * ModelInterface * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook\Model @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ModuleContent.php b/src/webhook/lib/Model/ModuleContent.php index 428c0580..29db8b4f 100644 --- a/src/webhook/lib/Model/ModuleContent.php +++ b/src/webhook/lib/Model/ModuleContent.php @@ -17,7 +17,7 @@ /** * ModuleContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/ModuleEvent.php b/src/webhook/lib/Model/ModuleEvent.php index 9acc474a..88c1803f 100644 --- a/src/webhook/lib/Model/ModuleEvent.php +++ b/src/webhook/lib/Model/ModuleEvent.php @@ -17,7 +17,7 @@ /** * ModuleEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/PnpDelivery.php b/src/webhook/lib/Model/PnpDelivery.php index 21f69b59..ffe34bbf 100644 --- a/src/webhook/lib/Model/PnpDelivery.php +++ b/src/webhook/lib/Model/PnpDelivery.php @@ -17,7 +17,7 @@ /** * PnpDelivery * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/PnpDeliveryCompletionEvent.php b/src/webhook/lib/Model/PnpDeliveryCompletionEvent.php index 10db402b..4ebacbd7 100644 --- a/src/webhook/lib/Model/PnpDeliveryCompletionEvent.php +++ b/src/webhook/lib/Model/PnpDeliveryCompletionEvent.php @@ -17,7 +17,7 @@ /** * PnpDeliveryCompletionEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/PostbackContent.php b/src/webhook/lib/Model/PostbackContent.php index 80881a5f..a3b51175 100644 --- a/src/webhook/lib/Model/PostbackContent.php +++ b/src/webhook/lib/Model/PostbackContent.php @@ -17,7 +17,7 @@ /** * PostbackContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/PostbackEvent.php b/src/webhook/lib/Model/PostbackEvent.php index e1a1ab39..d01a986a 100644 --- a/src/webhook/lib/Model/PostbackEvent.php +++ b/src/webhook/lib/Model/PostbackEvent.php @@ -17,7 +17,7 @@ /** * PostbackEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/RenewedMembershipContent.php b/src/webhook/lib/Model/RenewedMembershipContent.php index 1b8e28c3..88a45144 100644 --- a/src/webhook/lib/Model/RenewedMembershipContent.php +++ b/src/webhook/lib/Model/RenewedMembershipContent.php @@ -17,7 +17,7 @@ /** * RenewedMembershipContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/RoomSource.php b/src/webhook/lib/Model/RoomSource.php index b320882f..a65b3a1d 100644 --- a/src/webhook/lib/Model/RoomSource.php +++ b/src/webhook/lib/Model/RoomSource.php @@ -17,7 +17,7 @@ /** * RoomSource * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/Source.php b/src/webhook/lib/Model/Source.php index 72ea9e86..6cbb37f9 100644 --- a/src/webhook/lib/Model/Source.php +++ b/src/webhook/lib/Model/Source.php @@ -17,7 +17,7 @@ /** * Source * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/StickerMessageContent.php b/src/webhook/lib/Model/StickerMessageContent.php index bbcaf112..d758339c 100644 --- a/src/webhook/lib/Model/StickerMessageContent.php +++ b/src/webhook/lib/Model/StickerMessageContent.php @@ -17,7 +17,7 @@ /** * StickerMessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/TextMessageContent.php b/src/webhook/lib/Model/TextMessageContent.php index 9c3296dd..0e97ab33 100644 --- a/src/webhook/lib/Model/TextMessageContent.php +++ b/src/webhook/lib/Model/TextMessageContent.php @@ -17,7 +17,7 @@ /** * TextMessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/UnfollowEvent.php b/src/webhook/lib/Model/UnfollowEvent.php index 8da8b5d9..d9812372 100644 --- a/src/webhook/lib/Model/UnfollowEvent.php +++ b/src/webhook/lib/Model/UnfollowEvent.php @@ -17,7 +17,7 @@ /** * UnfollowEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/UnsendDetail.php b/src/webhook/lib/Model/UnsendDetail.php index 2eaba78f..dde2aadb 100644 --- a/src/webhook/lib/Model/UnsendDetail.php +++ b/src/webhook/lib/Model/UnsendDetail.php @@ -17,7 +17,7 @@ /** * UnsendDetail * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/UnsendEvent.php b/src/webhook/lib/Model/UnsendEvent.php index 29ca7eb9..45a771f6 100644 --- a/src/webhook/lib/Model/UnsendEvent.php +++ b/src/webhook/lib/Model/UnsendEvent.php @@ -17,7 +17,7 @@ /** * UnsendEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/UserMentionee.php b/src/webhook/lib/Model/UserMentionee.php index b514c613..83d60a3b 100644 --- a/src/webhook/lib/Model/UserMentionee.php +++ b/src/webhook/lib/Model/UserMentionee.php @@ -17,7 +17,7 @@ /** * UserMentionee * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/UserSource.php b/src/webhook/lib/Model/UserSource.php index de1752b7..37d87179 100644 --- a/src/webhook/lib/Model/UserSource.php +++ b/src/webhook/lib/Model/UserSource.php @@ -17,7 +17,7 @@ /** * UserSource * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/VideoMessageContent.php b/src/webhook/lib/Model/VideoMessageContent.php index 5c0d6f7c..9eac8fa7 100644 --- a/src/webhook/lib/Model/VideoMessageContent.php +++ b/src/webhook/lib/Model/VideoMessageContent.php @@ -17,7 +17,7 @@ /** * VideoMessageContent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/VideoPlayComplete.php b/src/webhook/lib/Model/VideoPlayComplete.php index 95a05dff..14ec6e99 100644 --- a/src/webhook/lib/Model/VideoPlayComplete.php +++ b/src/webhook/lib/Model/VideoPlayComplete.php @@ -17,7 +17,7 @@ /** * VideoPlayComplete * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/Model/VideoPlayCompleteEvent.php b/src/webhook/lib/Model/VideoPlayCompleteEvent.php index ab003f0e..415d1b0c 100644 --- a/src/webhook/lib/Model/VideoPlayCompleteEvent.php +++ b/src/webhook/lib/Model/VideoPlayCompleteEvent.php @@ -17,7 +17,7 @@ /** * VideoPlayCompleteEvent * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/lib/ObjectSerializer.php b/src/webhook/lib/ObjectSerializer.php index 462b4c32..2013d726 100644 --- a/src/webhook/lib/ObjectSerializer.php +++ b/src/webhook/lib/ObjectSerializer.php @@ -32,9 +32,8 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ - /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/webhook/test/Api/DummyApiTest.php b/src/webhook/test/Api/DummyApiTest.php index da7d72b5..6de31e18 100644 --- a/src/webhook/test/Api/DummyApiTest.php +++ b/src/webhook/test/Api/DummyApiTest.php @@ -16,7 +16,7 @@ */ /** * DummyApiTest - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -31,7 +31,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/AccountLinkEventTest.php b/src/webhook/test/Model/AccountLinkEventTest.php index 7c2f5686..1f8c036a 100644 --- a/src/webhook/test/Model/AccountLinkEventTest.php +++ b/src/webhook/test/Model/AccountLinkEventTest.php @@ -17,7 +17,7 @@ /** * AccountLinkEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/ActivatedEventTest.php b/src/webhook/test/Model/ActivatedEventTest.php index fd1891ae..311cd51b 100644 --- a/src/webhook/test/Model/ActivatedEventTest.php +++ b/src/webhook/test/Model/ActivatedEventTest.php @@ -17,7 +17,7 @@ /** * ActivatedEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/AllMentioneeTest.php b/src/webhook/test/Model/AllMentioneeTest.php index 6de9d90b..9f135eee 100644 --- a/src/webhook/test/Model/AllMentioneeTest.php +++ b/src/webhook/test/Model/AllMentioneeTest.php @@ -17,7 +17,7 @@ /** * AllMentioneeTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/AttachedModuleContentTest.php b/src/webhook/test/Model/AttachedModuleContentTest.php index 00d38f6e..e92434c4 100644 --- a/src/webhook/test/Model/AttachedModuleContentTest.php +++ b/src/webhook/test/Model/AttachedModuleContentTest.php @@ -17,7 +17,7 @@ /** * AttachedModuleContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/AudioMessageContentTest.php b/src/webhook/test/Model/AudioMessageContentTest.php index 769a29b3..0dad388f 100644 --- a/src/webhook/test/Model/AudioMessageContentTest.php +++ b/src/webhook/test/Model/AudioMessageContentTest.php @@ -17,7 +17,7 @@ /** * AudioMessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/BeaconContentTest.php b/src/webhook/test/Model/BeaconContentTest.php index 38754343..3de5c881 100644 --- a/src/webhook/test/Model/BeaconContentTest.php +++ b/src/webhook/test/Model/BeaconContentTest.php @@ -17,7 +17,7 @@ /** * BeaconContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/BeaconEventTest.php b/src/webhook/test/Model/BeaconEventTest.php index c9d2cf04..cb38d128 100644 --- a/src/webhook/test/Model/BeaconEventTest.php +++ b/src/webhook/test/Model/BeaconEventTest.php @@ -17,7 +17,7 @@ /** * BeaconEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/BotResumedEventTest.php b/src/webhook/test/Model/BotResumedEventTest.php index f2e4317b..70b661ea 100644 --- a/src/webhook/test/Model/BotResumedEventTest.php +++ b/src/webhook/test/Model/BotResumedEventTest.php @@ -17,7 +17,7 @@ /** * BotResumedEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/BotSuspendedEventTest.php b/src/webhook/test/Model/BotSuspendedEventTest.php index 62bab715..e48ad52e 100644 --- a/src/webhook/test/Model/BotSuspendedEventTest.php +++ b/src/webhook/test/Model/BotSuspendedEventTest.php @@ -17,7 +17,7 @@ /** * BotSuspendedEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/CallbackRequestTest.php b/src/webhook/test/Model/CallbackRequestTest.php index b6f4b776..8489fc8a 100644 --- a/src/webhook/test/Model/CallbackRequestTest.php +++ b/src/webhook/test/Model/CallbackRequestTest.php @@ -17,7 +17,7 @@ /** * CallbackRequestTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/ChatControlTest.php b/src/webhook/test/Model/ChatControlTest.php index 4aea45d4..98ef72c1 100644 --- a/src/webhook/test/Model/ChatControlTest.php +++ b/src/webhook/test/Model/ChatControlTest.php @@ -17,7 +17,7 @@ /** * ChatControlTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/ContentProviderTest.php b/src/webhook/test/Model/ContentProviderTest.php index 090ae0a0..60950429 100644 --- a/src/webhook/test/Model/ContentProviderTest.php +++ b/src/webhook/test/Model/ContentProviderTest.php @@ -17,7 +17,7 @@ /** * ContentProviderTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/DeactivatedEventTest.php b/src/webhook/test/Model/DeactivatedEventTest.php index 549cf378..c0f3a23d 100644 --- a/src/webhook/test/Model/DeactivatedEventTest.php +++ b/src/webhook/test/Model/DeactivatedEventTest.php @@ -17,7 +17,7 @@ /** * DeactivatedEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/DeliveryContextTest.php b/src/webhook/test/Model/DeliveryContextTest.php index 8bfec599..602d1857 100644 --- a/src/webhook/test/Model/DeliveryContextTest.php +++ b/src/webhook/test/Model/DeliveryContextTest.php @@ -17,7 +17,7 @@ /** * DeliveryContextTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/DetachedModuleContentTest.php b/src/webhook/test/Model/DetachedModuleContentTest.php index 87c3d38b..aa623380 100644 --- a/src/webhook/test/Model/DetachedModuleContentTest.php +++ b/src/webhook/test/Model/DetachedModuleContentTest.php @@ -17,7 +17,7 @@ /** * DetachedModuleContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/EmojiTest.php b/src/webhook/test/Model/EmojiTest.php index a66ec830..8149c38a 100644 --- a/src/webhook/test/Model/EmojiTest.php +++ b/src/webhook/test/Model/EmojiTest.php @@ -17,7 +17,7 @@ /** * EmojiTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/EventModeTest.php b/src/webhook/test/Model/EventModeTest.php index ea1263d8..23307800 100644 --- a/src/webhook/test/Model/EventModeTest.php +++ b/src/webhook/test/Model/EventModeTest.php @@ -17,7 +17,7 @@ /** * EventModeTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/EventTest.php b/src/webhook/test/Model/EventTest.php index 0af79c03..f659339d 100644 --- a/src/webhook/test/Model/EventTest.php +++ b/src/webhook/test/Model/EventTest.php @@ -17,7 +17,7 @@ /** * EventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/FileMessageContentTest.php b/src/webhook/test/Model/FileMessageContentTest.php index 4aa1a511..5fc47fa1 100644 --- a/src/webhook/test/Model/FileMessageContentTest.php +++ b/src/webhook/test/Model/FileMessageContentTest.php @@ -17,7 +17,7 @@ /** * FileMessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/FollowDetailTest.php b/src/webhook/test/Model/FollowDetailTest.php index 5f6a7d92..ed5a1747 100644 --- a/src/webhook/test/Model/FollowDetailTest.php +++ b/src/webhook/test/Model/FollowDetailTest.php @@ -17,7 +17,7 @@ /** * FollowDetailTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/FollowEventTest.php b/src/webhook/test/Model/FollowEventTest.php index 5c0b1ed7..c40e3ae3 100644 --- a/src/webhook/test/Model/FollowEventTest.php +++ b/src/webhook/test/Model/FollowEventTest.php @@ -17,7 +17,7 @@ /** * FollowEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/GroupSourceTest.php b/src/webhook/test/Model/GroupSourceTest.php index d438f6ca..af18861e 100644 --- a/src/webhook/test/Model/GroupSourceTest.php +++ b/src/webhook/test/Model/GroupSourceTest.php @@ -17,7 +17,7 @@ /** * GroupSourceTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/ImageMessageContentTest.php b/src/webhook/test/Model/ImageMessageContentTest.php index 5621250e..b1ec117a 100644 --- a/src/webhook/test/Model/ImageMessageContentTest.php +++ b/src/webhook/test/Model/ImageMessageContentTest.php @@ -17,7 +17,7 @@ /** * ImageMessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/ImageSetTest.php b/src/webhook/test/Model/ImageSetTest.php index 253dbc6c..aeaf4980 100644 --- a/src/webhook/test/Model/ImageSetTest.php +++ b/src/webhook/test/Model/ImageSetTest.php @@ -17,7 +17,7 @@ /** * ImageSetTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/JoinEventTest.php b/src/webhook/test/Model/JoinEventTest.php index bd9ef8b4..2287dbbb 100644 --- a/src/webhook/test/Model/JoinEventTest.php +++ b/src/webhook/test/Model/JoinEventTest.php @@ -17,7 +17,7 @@ /** * JoinEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/JoinedMembersTest.php b/src/webhook/test/Model/JoinedMembersTest.php index 5b5ab271..9ea153ec 100644 --- a/src/webhook/test/Model/JoinedMembersTest.php +++ b/src/webhook/test/Model/JoinedMembersTest.php @@ -17,7 +17,7 @@ /** * JoinedMembersTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/JoinedMembershipContentTest.php b/src/webhook/test/Model/JoinedMembershipContentTest.php index 22e5c4bc..571f601d 100644 --- a/src/webhook/test/Model/JoinedMembershipContentTest.php +++ b/src/webhook/test/Model/JoinedMembershipContentTest.php @@ -17,7 +17,7 @@ /** * JoinedMembershipContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/LeaveEventTest.php b/src/webhook/test/Model/LeaveEventTest.php index f67f7142..e0a53b21 100644 --- a/src/webhook/test/Model/LeaveEventTest.php +++ b/src/webhook/test/Model/LeaveEventTest.php @@ -17,7 +17,7 @@ /** * LeaveEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/LeftMembersTest.php b/src/webhook/test/Model/LeftMembersTest.php index f26c1662..53bdd6bd 100644 --- a/src/webhook/test/Model/LeftMembersTest.php +++ b/src/webhook/test/Model/LeftMembersTest.php @@ -17,7 +17,7 @@ /** * LeftMembersTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/LeftMembershipContentTest.php b/src/webhook/test/Model/LeftMembershipContentTest.php index c0de8656..e3d46e0a 100644 --- a/src/webhook/test/Model/LeftMembershipContentTest.php +++ b/src/webhook/test/Model/LeftMembershipContentTest.php @@ -17,7 +17,7 @@ /** * LeftMembershipContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/LinkContentTest.php b/src/webhook/test/Model/LinkContentTest.php index 7bfb9910..9bd875f9 100644 --- a/src/webhook/test/Model/LinkContentTest.php +++ b/src/webhook/test/Model/LinkContentTest.php @@ -17,7 +17,7 @@ /** * LinkContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/LocationMessageContentTest.php b/src/webhook/test/Model/LocationMessageContentTest.php index 25d02d7e..5a29604e 100644 --- a/src/webhook/test/Model/LocationMessageContentTest.php +++ b/src/webhook/test/Model/LocationMessageContentTest.php @@ -17,7 +17,7 @@ /** * LocationMessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MemberJoinedEventTest.php b/src/webhook/test/Model/MemberJoinedEventTest.php index 3d14aeb2..a457fa86 100644 --- a/src/webhook/test/Model/MemberJoinedEventTest.php +++ b/src/webhook/test/Model/MemberJoinedEventTest.php @@ -17,7 +17,7 @@ /** * MemberJoinedEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MemberLeftEventTest.php b/src/webhook/test/Model/MemberLeftEventTest.php index 74897a80..28c49bf3 100644 --- a/src/webhook/test/Model/MemberLeftEventTest.php +++ b/src/webhook/test/Model/MemberLeftEventTest.php @@ -17,7 +17,7 @@ /** * MemberLeftEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MembershipContentTest.php b/src/webhook/test/Model/MembershipContentTest.php index 365b47f9..61582608 100644 --- a/src/webhook/test/Model/MembershipContentTest.php +++ b/src/webhook/test/Model/MembershipContentTest.php @@ -17,7 +17,7 @@ /** * MembershipContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MembershipEventTest.php b/src/webhook/test/Model/MembershipEventTest.php index 66800505..3ced4451 100644 --- a/src/webhook/test/Model/MembershipEventTest.php +++ b/src/webhook/test/Model/MembershipEventTest.php @@ -17,7 +17,7 @@ /** * MembershipEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MentionTest.php b/src/webhook/test/Model/MentionTest.php index 5def60a9..db07cea2 100644 --- a/src/webhook/test/Model/MentionTest.php +++ b/src/webhook/test/Model/MentionTest.php @@ -17,7 +17,7 @@ /** * MentionTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MentioneeTest.php b/src/webhook/test/Model/MentioneeTest.php index 89ecef93..4e133a55 100644 --- a/src/webhook/test/Model/MentioneeTest.php +++ b/src/webhook/test/Model/MentioneeTest.php @@ -17,7 +17,7 @@ /** * MentioneeTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MessageContentTest.php b/src/webhook/test/Model/MessageContentTest.php index a80e904e..ef19d4cd 100644 --- a/src/webhook/test/Model/MessageContentTest.php +++ b/src/webhook/test/Model/MessageContentTest.php @@ -17,7 +17,7 @@ /** * MessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/MessageEventTest.php b/src/webhook/test/Model/MessageEventTest.php index 2328d58c..f166d0ea 100644 --- a/src/webhook/test/Model/MessageEventTest.php +++ b/src/webhook/test/Model/MessageEventTest.php @@ -17,7 +17,7 @@ /** * MessageEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/ModuleContentTest.php b/src/webhook/test/Model/ModuleContentTest.php index 4fdb0956..674da03a 100644 --- a/src/webhook/test/Model/ModuleContentTest.php +++ b/src/webhook/test/Model/ModuleContentTest.php @@ -17,7 +17,7 @@ /** * ModuleContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/ModuleEventTest.php b/src/webhook/test/Model/ModuleEventTest.php index c16a98a2..aaf68046 100644 --- a/src/webhook/test/Model/ModuleEventTest.php +++ b/src/webhook/test/Model/ModuleEventTest.php @@ -17,7 +17,7 @@ /** * ModuleEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/PnpDeliveryCompletionEventTest.php b/src/webhook/test/Model/PnpDeliveryCompletionEventTest.php index 41623548..44a7d2c7 100644 --- a/src/webhook/test/Model/PnpDeliveryCompletionEventTest.php +++ b/src/webhook/test/Model/PnpDeliveryCompletionEventTest.php @@ -17,7 +17,7 @@ /** * PnpDeliveryCompletionEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/PnpDeliveryTest.php b/src/webhook/test/Model/PnpDeliveryTest.php index 8cb40b53..c963602a 100644 --- a/src/webhook/test/Model/PnpDeliveryTest.php +++ b/src/webhook/test/Model/PnpDeliveryTest.php @@ -17,7 +17,7 @@ /** * PnpDeliveryTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/PostbackContentTest.php b/src/webhook/test/Model/PostbackContentTest.php index e4a268b8..0b5f2848 100644 --- a/src/webhook/test/Model/PostbackContentTest.php +++ b/src/webhook/test/Model/PostbackContentTest.php @@ -17,7 +17,7 @@ /** * PostbackContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/PostbackEventTest.php b/src/webhook/test/Model/PostbackEventTest.php index 0f722c54..dd070734 100644 --- a/src/webhook/test/Model/PostbackEventTest.php +++ b/src/webhook/test/Model/PostbackEventTest.php @@ -17,7 +17,7 @@ /** * PostbackEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/RenewedMembershipContentTest.php b/src/webhook/test/Model/RenewedMembershipContentTest.php index 6fa7ca27..bafe4535 100644 --- a/src/webhook/test/Model/RenewedMembershipContentTest.php +++ b/src/webhook/test/Model/RenewedMembershipContentTest.php @@ -17,7 +17,7 @@ /** * RenewedMembershipContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/RoomSourceTest.php b/src/webhook/test/Model/RoomSourceTest.php index 08ac70ac..2ebabe83 100644 --- a/src/webhook/test/Model/RoomSourceTest.php +++ b/src/webhook/test/Model/RoomSourceTest.php @@ -17,7 +17,7 @@ /** * RoomSourceTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/SourceTest.php b/src/webhook/test/Model/SourceTest.php index 48289c4a..b308a35c 100644 --- a/src/webhook/test/Model/SourceTest.php +++ b/src/webhook/test/Model/SourceTest.php @@ -17,7 +17,7 @@ /** * SourceTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/StickerMessageContentTest.php b/src/webhook/test/Model/StickerMessageContentTest.php index f5a3c9c7..22485755 100644 --- a/src/webhook/test/Model/StickerMessageContentTest.php +++ b/src/webhook/test/Model/StickerMessageContentTest.php @@ -17,7 +17,7 @@ /** * StickerMessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/TextMessageContentTest.php b/src/webhook/test/Model/TextMessageContentTest.php index d0497bea..9bf632a3 100644 --- a/src/webhook/test/Model/TextMessageContentTest.php +++ b/src/webhook/test/Model/TextMessageContentTest.php @@ -17,7 +17,7 @@ /** * TextMessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/UnfollowEventTest.php b/src/webhook/test/Model/UnfollowEventTest.php index 4f458fd4..b66466c4 100644 --- a/src/webhook/test/Model/UnfollowEventTest.php +++ b/src/webhook/test/Model/UnfollowEventTest.php @@ -17,7 +17,7 @@ /** * UnfollowEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/UnsendDetailTest.php b/src/webhook/test/Model/UnsendDetailTest.php index 0142fe40..00591a65 100644 --- a/src/webhook/test/Model/UnsendDetailTest.php +++ b/src/webhook/test/Model/UnsendDetailTest.php @@ -17,7 +17,7 @@ /** * UnsendDetailTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/UnsendEventTest.php b/src/webhook/test/Model/UnsendEventTest.php index e44439e1..7b84dbd1 100644 --- a/src/webhook/test/Model/UnsendEventTest.php +++ b/src/webhook/test/Model/UnsendEventTest.php @@ -17,7 +17,7 @@ /** * UnsendEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/UserMentioneeTest.php b/src/webhook/test/Model/UserMentioneeTest.php index 2f5fe7a4..af45873d 100644 --- a/src/webhook/test/Model/UserMentioneeTest.php +++ b/src/webhook/test/Model/UserMentioneeTest.php @@ -17,7 +17,7 @@ /** * UserMentioneeTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/UserSourceTest.php b/src/webhook/test/Model/UserSourceTest.php index 889a0d53..25794929 100644 --- a/src/webhook/test/Model/UserSourceTest.php +++ b/src/webhook/test/Model/UserSourceTest.php @@ -17,7 +17,7 @@ /** * UserSourceTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/VideoMessageContentTest.php b/src/webhook/test/Model/VideoMessageContentTest.php index 90f58eae..70a80e36 100644 --- a/src/webhook/test/Model/VideoMessageContentTest.php +++ b/src/webhook/test/Model/VideoMessageContentTest.php @@ -17,7 +17,7 @@ /** * VideoMessageContentTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/VideoPlayCompleteEventTest.php b/src/webhook/test/Model/VideoPlayCompleteEventTest.php index 08648161..16415a71 100644 --- a/src/webhook/test/Model/VideoPlayCompleteEventTest.php +++ b/src/webhook/test/Model/VideoPlayCompleteEventTest.php @@ -17,7 +17,7 @@ /** * VideoPlayCompleteEventTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/src/webhook/test/Model/VideoPlayCompleteTest.php b/src/webhook/test/Model/VideoPlayCompleteTest.php index c0e3f57e..e2ead9c3 100644 --- a/src/webhook/test/Model/VideoPlayCompleteTest.php +++ b/src/webhook/test/Model/VideoPlayCompleteTest.php @@ -17,7 +17,7 @@ /** * VideoPlayCompleteTest * - * PHP version 7.4 + * PHP version 8.1 * * @category Class * @package LINE\Webhook @@ -32,7 +32,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * Generator version: 7.11.0 + * Generator version: 7.21.0 */ /** diff --git a/tools/custom-template/api.mustache b/tools/custom-template/api.mustache new file mode 100644 index 00000000..7d25f0d8 --- /dev/null +++ b/tools/custom-template/api.mustache @@ -0,0 +1,891 @@ +partial_header}} + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace {{apiPackage}}; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use {{invokerPackage}}\ApiException; +use {{invokerPackage}}\Configuration; +use {{invokerPackage}}\FormDataProcessor; +use {{invokerPackage}}\HeaderSelector; +use {{invokerPackage}}\ObjectSerializer; + +/** + * {{classname}} Class Doc Comment + * + * @category Class + * @package {{invokerPackage}} + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +{{#operations}}class {{classname}} +{ + /** + * @var ClientInterface + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @var int Host index + */ + protected $hostIndex; + + /** @var string[] $contentTypes **/ + public const contentTypes = [{{#operation}} + '{{{operationId}}}' => [{{#consumes}} + '{{{mediaType}}}',{{/consumes}} + {{^consumes}} + 'application/json', +{{/consumes}} ],{{/operation}} + ]; + + /** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + +{{#operation}} + /** + * Operation {{{operationId}}} +{{#summary}} + * + * {{.}} +{{/summary}} + * +{{#description}} + * {{.}} + * +{{/description}} +{{#exts.x-group-parameters}} + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * +{{/exts.x-group-parameters}} +{{#servers}} +{{#-first}} + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. +{{/-first}} + * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} +{{#-last}} + * +{{/-last}} +{{/servers}} +{{#allParams}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} +{{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation + * + * @throws \{{invokerPackage}}\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}void{{/returnType}} + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + public function {{operationId}}({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) + { + {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}});{{#returnType}} + return $response;{{/returnType}} + } + + /** + * Operation {{{operationId}}}WithHttpInfo +{{#summary}} + * + * {{.}} +{{/summary}} + * +{{#description}} + * {{.}} + * +{{/description}} +{{#exts.x-group-parameters}} + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * +{{/exts.x-group-parameters}} +{{#servers}} +{{#-first}} + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. +{{/-first}} + * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} +{{#-last}} + * +{{/-last}} +{{/servers}} +{{#allParams}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} +{{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation + * + * @throws \{{invokerPackage}}\ApiException on non-2xx response or if the response body is not in the expected format + * @throws \InvalidArgumentException + * @return array of {{#returnType}}{{#responses}}{{#dataType}}{{^-first}}|{{/-first}}{{/dataType}}{{{dataType}}}{{/responses}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings) + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + public function {{operationId}}WithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) + { + $request = $this->{{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + {{#returnType}} + {{#responses}} + {{#-first}} + + switch($statusCode) { + {{/-first}} + {{#dataType}} + {{^isRange}}{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + return $this->handleResponseWithDataType( + '{{{dataType}}}', + $request, + $response, + );{{/isRange}} + {{/dataType}} + {{#-last}} + } + {{/-last}} + {{/responses}} + + {{#responses}}{{#dataType}}{{#isRange}}{{^isWildcard}}if ($this->responseWithinRangeCode('{{code}}', $statusCode)) { + return $this->handleResponseWithDataType( + '{{{dataType}}}', + $request, + $response, + ); + }{{/isWildcard}}{{/isRange}}{{/dataType}}{{/responses}} + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '{{{returnType}}}', + $request, + $response, + ); + {{/returnType}} + {{^returnType}} + + return [null, $statusCode, $response->getHeaders()]; + {{/returnType}} + } catch (ApiException $e) { + switch ($e->getCode()) { + {{#responses}} + {{#dataType}} + {{^isRange}}{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}} + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '{{{dataType}}}', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e;{{/isRange}} + {{/dataType}} + {{/responses}} + } + {{#responses}}{{#dataType}}{{#isRange}}{{^isWildcard}} + if ($this->responseWithinRangeCode('{{code}}', $e->getCode())) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '{{{dataType}}}', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + }{{/isWildcard}}{{/isRange}}{{/dataType}}{{/responses}} + + throw $e; + } + } + + /** + * Operation {{{operationId}}}Async + * +{{#summary}} + * {{.}} + * +{{/summary}} +{{#description}} + * {{.}} + * +{{/description}} +{{#exts.x-group-parameters}} + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * +{{/exts.x-group-parameters}} +{{#servers}} +{{#-first}} + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. +{{/-first}} + * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} +{{#-last}} + * +{{/-last}} +{{/servers}} +{{#allParams}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} +{{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + public function {{operationId}}Async({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) + { + return $this->{{operationId}}AsyncWithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation {{{operationId}}}AsyncWithHttpInfo + * +{{#summary}} + * {{.}} + * +{{/summary}} +{{#description}} + * {{.}} + * +{{/description}} +{{#exts.x-group-parameters}} + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * +{{/exts.x-group-parameters}} +{{#servers}} +{{#-first}} + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. +{{/-first}} + * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} +{{#-last}} + * +{{/-last}} +{{/servers}} +{{#allParams}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} +{{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + public function {{operationId}}AsyncWithHttpInfo({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) + { + $returnType = '{{{returnType}}}'; + $request = $this->{{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + {{#returnType}} + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + {{/returnType}} + {{^returnType}} + return [null, $response->getStatusCode(), $response->getHeaders()]; + {{/returnType}} + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation '{{{operationId}}}' + * +{{#exts.x-group-parameters}} + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * +{{/exts.x-group-parameters}} +{{#servers}} +{{#-first}} + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. +{{/-first}} + * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} +{{#-last}} + * +{{/-last}} +{{/servers}} +{{#allParams}} + * @param {{{dataType}}}{{#notRequiredOrIsNullable}}|null{{/notRequiredOrIsNullable}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} +{{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['{{{operationId}}}'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} + */ + public function {{operationId}}Request({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}{{#servers}}{{#-first}}?int $hostIndex = null, array $variables = [], {{/-first}}{{/servers}}string $contentType = self::contentTypes['{{{operationId}}}'][0]{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associative_array{{/exts.x-group-parameters}}) + { + {{#exts.x-group-parameters}} + // unbox the parameters from the associative array +{{#allParams}} + ${{paramName}} = array_key_exists('{{paramName}}', $associative_array) ? $associative_array['{{paramName}}'] : {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}; +{{/allParams}}{{#servers.0}} + $hostIndex = $associative_array['hostIndex']; + $variables = array_key_exists('variables', $associative_array) ? $associative_array['variables'] : []; +{{/servers.0}} + $contentType = $associative_array['contentType'] ?? self::contentTypes['{{{operationId}}}'][0]; + {{/exts.x-group-parameters}}{{#allParams}} + {{#required}} + // verify the required parameter '{{paramName}}' is set + if (${{paramName}} === null || (is_array(${{paramName}}) && count(${{paramName}}) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter ${{paramName}} when calling {{operationId}}' + ); + } + {{/required}} + {{#hasValidation}} + {{#maxLength}} + if ({{^required}}${{paramName}} !== null && {{/required}}strlen(${{paramName}}) > {{maxLength}}) { + throw new \InvalidArgumentException('invalid length for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); + } + {{/maxLength}} + {{#minLength}} + if ({{^required}}${{paramName}} !== null && {{/required}}strlen(${{paramName}}) < {{minLength}}) { + throw new \InvalidArgumentException('invalid length for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); + } + {{/minLength}} + {{#maximum}} + if ({{^required}}${{paramName}} !== null && {{/required}}${{paramName}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}) { + throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.'); + } + {{/maximum}} + {{#minimum}} + if ({{^required}}${{paramName}} !== null && {{/required}}${{paramName}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}) { + throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.'); + } + {{/minimum}} + {{#pattern}} + if ({{^required}}${{paramName}} !== null && {{/required}}!preg_match("{{{pattern}}}", ${{paramName}})) { + throw new \InvalidArgumentException("invalid value for \"{{paramName}}\" when calling {{classname}}.{{operationId}}, must conform to the pattern {{{pattern}}}."); + } + {{/pattern}} + {{#maxItems}} + if ({{^required}}${{paramName}} !== null && {{/required}}count(${{paramName}}) > {{maxItems}}) { + throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, number of items must be less than or equal to {{maxItems}}.'); + } + {{/maxItems}} + {{#minItems}} + if ({{^required}}${{paramName}} !== null && {{/required}}count(${{paramName}}) < {{minItems}}) { + throw new \InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{minItems}}.'); + } + {{/minItems}} + {{/hasValidation}}{{/allParams}} + + $resourcePath = '{{{path}}}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + {{#queryParams}} + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + ${{paramName}}, + '{{baseName}}', // param base name + '{{#schema}}{{openApiType}}{{/schema}}', // openApiType + '{{style}}', // style + {{#isExplode}}true{{/isExplode}}{{^isExplode}}false{{/isExplode}}, // explode + {{required}} // required + ) ?? []); + {{/queryParams}} + + {{#headerParams}} + // header params + {{#collectionFormat}} + if (is_array(${{paramName}})) { + ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{collectionFormat}}'); + } + {{/collectionFormat}} + if (${{paramName}} !== null) { + $headerParams['{{baseName}}'] = ObjectSerializer::toHeaderValue(${{paramName}}); + } + {{/headerParams}} + + {{#pathParams}} + // path params + {{#collectionFormat}} + if (is_array(${{paramName}})) { + ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{collectionFormat}}'); + } + {{/collectionFormat}} + if (${{paramName}} !== null) { + $resourcePath = str_replace( + '{' . '{{baseName}}' . '}', + ObjectSerializer::toPathValue(${{paramName}}), + $resourcePath + ); + } + {{/pathParams}} + + {{#formParams}} + {{#-first}} + // form params + $formDataProcessor = new FormDataProcessor(); + + $formData = $formDataProcessor->prepare([ + {{/-first}} + '{{baseName}}' => ${{paramName}}, + {{#-last}} + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; + {{/-last}} + {{/formParams}} + + {{#isMultipart}} + $multipart = true; + {{/isMultipart}} + $headers = $this->headerSelector->selectHeaders( + [{{#produces}}'{{{mediaType}}}', {{/produces}}], + $contentType, + $multipart + ); + + // for model (json/xml) + {{#bodyParams}} + if (isset(${{paramName}})) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization(${{paramName}})); + } else { + $httpBody = ${{paramName}}; + } + } elseif (count($formParams) > 0) { + {{/bodyParams}} + {{^bodyParams}} + if (count($formParams) > 0) { + {{/bodyParams}} + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + {{#authMethods}} + {{#isApiKey}} + {{^isKeyInCookie}} + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('{{keyParamName}}'); + if ($apiKey !== null) { + {{#isKeyInHeader}}$headers['{{keyParamName}}'] = $apiKey;{{/isKeyInHeader}}{{#isKeyInQuery}}$queryParams['{{keyParamName}}'] = $apiKey;{{/isKeyInQuery}} + } + {{/isKeyInCookie}} + {{/isApiKey}} + {{#isBasic}} + {{#isBasicBasic}} + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + {{/isBasicBasic}} + {{#isBasicBearer}} + // this endpoint requires Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + {{/isBasicBearer}} + {{/isBasic}} + {{#isOAuth}} + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + {{/isOAuth}} + {{/authMethods}} + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + {{#servers.0}} + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFor{{operationId}}(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + {{/servers.0}} + {{^servers.0}} + $operationHost = $this->config->getHost(); + {{/servers.0}} + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + '{{httpMethod}}', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + {{#servers.0}} + /** + * Returns an array of host settings for Operation {{operationId}} + * + * @return array an array of host settings + */ + protected function getHostSettingsFor{{operationId}}(): array + { + return [ + {{#servers}} + [ + "url" => "{{{url}}}", + "description" => "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + "variables" => [ + {{/-first}} + "{{{name}}}" => [ + "description" => "{{{description}}}{{^description}}No description provided{{/description}}", + "default_value" => "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + "enum_values" => [ + {{/-first}} + "{{{.}}}", + {{#-last}} + ] + {{/-last}} + {{/enumValues}} + ]{{^-last}},{{/-last}} + {{#-last}} + ] + {{/-last}} + {{/variables}} + ]{{^-last}},{{/-last}} + {{/servers}} + ]; + } + + {{/servers.0}} + {{/operation}} + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + if ($this->config->getCertFile()) { + $options[RequestOptions::CERT] = $this->config->getCertFile(); + } + + if ($this->config->getKeyFile()) { + $options[RequestOptions::SSL_KEY] = $this->config->getKeyFile(); + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response + ): array { + if ($dataType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} +{{/operations}}