forked from loafle/openapi-generator-original
[PHP] minor code enhancement (#9009)
* minor code enhancement * remove unused files
This commit is contained in:
@@ -265,11 +265,11 @@ class ObjectSerializer
|
||||
|
||||
if (strcasecmp(substr($class, -2), '[]') === 0) {
|
||||
$data = is_string($data) ? json_decode($data) : $data;
|
||||
|
||||
|
||||
if (!is_array($data)) {
|
||||
throw new \InvalidArgumentException("Invalid array '$class'");
|
||||
}
|
||||
|
||||
|
||||
$subClass = substr($class, 0, -2);
|
||||
$values = [];
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
@@ -82,7 +82,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* Operation {{{operationId}}}
|
||||
{{#summary}}
|
||||
*
|
||||
* {{{summary}}}
|
||||
* {{.}}
|
||||
{{/summary}}
|
||||
*
|
||||
{{#description}}
|
||||
@@ -148,7 +148,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* Operation {{{operationId}}}WithHttpInfo
|
||||
{{#summary}}
|
||||
*
|
||||
* {{{summary}}}
|
||||
* {{.}}
|
||||
{{/summary}}
|
||||
*
|
||||
{{#description}}
|
||||
@@ -187,7 +187,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -200,26 +200,25 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
{{#returnType}}
|
||||
{{#responses}}
|
||||
{{#responses}}
|
||||
{{#-first}}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
{{/-first}}
|
||||
{{#dataType}}
|
||||
{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}}
|
||||
if ('{{{dataType}}}' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -231,14 +230,13 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
{{#-last}}
|
||||
}
|
||||
{{/-last}}
|
||||
{{/responses}}
|
||||
{{/responses}}
|
||||
|
||||
$returnType = '{{{returnType}}}';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -274,8 +272,10 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
/**
|
||||
* Operation {{{operationId}}}Async
|
||||
*
|
||||
* {{{summary}}}
|
||||
{{#summary}}
|
||||
* {{.}}
|
||||
*
|
||||
{{/summary}}
|
||||
{{#description}}
|
||||
* {{.}}
|
||||
*
|
||||
@@ -313,8 +313,10 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
/**
|
||||
* Operation {{{operationId}}}AsyncWithHttpInfo
|
||||
*
|
||||
* {{{summary}}}
|
||||
{{#summary}}
|
||||
* {{.}}
|
||||
*
|
||||
{{/summary}}
|
||||
{{#description}}
|
||||
* {{.}}
|
||||
*
|
||||
@@ -349,11 +351,10 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
{{#returnType}}
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -364,7 +365,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
{{/returnType}}
|
||||
{{^returnType}}
|
||||
return [null, $response->getStatusCode(), $response->getHeaders()];
|
||||
{{/returnType}}
|
||||
{{/returnType}}
|
||||
},
|
||||
function ($exception) {
|
||||
$response = $exception->getResponse();
|
||||
@@ -377,7 +378,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -41,7 +41,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
||||
{{^isEnum}}
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
{{/isEnum}}
|
||||
*/
|
||||
{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess, \JsonSerializable{{/parentSchema}}
|
||||
class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess, \JsonSerializable{{/parentSchema}}
|
||||
{
|
||||
public const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}};
|
||||
|
||||
@@ -123,10 +123,18 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
{{#vars}}{{#isEnum}}{{#allowableValues}}{{#enumVars}}const {{enumName}}_{{{name}}} = {{{value}}};
|
||||
{{/enumVars}}{{/allowableValues}}{{/isEnum}}{{/vars}}
|
||||
{{#vars}}
|
||||
{{#isEnum}}
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
const {{enumName}}_{{{name}}} = {{{value}}};
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
||||
|
||||
{{#vars}}{{#isEnum}}
|
||||
{{#vars}}
|
||||
{{#isEnum}}
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -139,8 +147,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
||||
{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||
];
|
||||
}
|
||||
{{/isEnum}}{{/vars}}
|
||||
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
||||
{{^parentSchema}}
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -7,8 +7,12 @@
|
||||
* {{{appDescription}}}
|
||||
*
|
||||
{{/appDescription}}
|
||||
* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
|
||||
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||
{{#version}}
|
||||
* The version of the OpenAPI document: {{{version}}}
|
||||
{{/version}}
|
||||
{{#infoEmail}}
|
||||
* Contact: {{{infoEmail}}}
|
||||
{{/infoEmail}}
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: {{{generatorVersion}}}
|
||||
*/
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # AdditionalPropertiesAnyType
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # AdditionalPropertiesArray
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # AdditionalPropertiesBoolean
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # AdditionalPropertiesInteger
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # AdditionalPropertiesNumber
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # AdditionalPropertiesObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # AdditionalPropertiesString
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# # BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**kind** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# # InlineObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **string** | Updated name of the pet | [optional]
|
||||
**status** | **string** | Updated status of the pet | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -1,10 +0,0 @@
|
||||
# # InlineObject1
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additional_metadata** | **string** | Additional data to pass to server | [optional]
|
||||
**file** | [**\SplFileObject**](\SplFileObject.md) | file to upload | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -1,10 +0,0 @@
|
||||
# # InlineObject2
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enum_form_string_array** | **string[]** | Form parameter enum test (string array) | [optional]
|
||||
**enum_form_string** | **string** | Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -1,22 +0,0 @@
|
||||
# # InlineObject3
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **int** | None | [optional]
|
||||
**int32** | **int** | None | [optional]
|
||||
**int64** | **int** | None | [optional]
|
||||
**number** | **float** | None |
|
||||
**float** | **float** | None | [optional]
|
||||
**double** | **double** | None |
|
||||
**string** | **string** | None | [optional]
|
||||
**pattern_without_delimiter** | **string** | None |
|
||||
**byte** | **string** | None |
|
||||
**binary** | [**\SplFileObject**](\SplFileObject.md) | None | [optional]
|
||||
**date** | [**\DateTime**](\DateTime.md) | None | [optional]
|
||||
**date_time** | [**\DateTime**](\DateTime.md) | None | [optional]
|
||||
**password** | **string** | None | [optional]
|
||||
**callback** | **string** | None | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -1,10 +0,0 @@
|
||||
# # InlineObject4
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**param** | **string** | field1 |
|
||||
**param2** | **string** | field2 |
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -1,10 +0,0 @@
|
||||
# # InlineObject5
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additional_metadata** | **string** | Additional data to pass to server | [optional]
|
||||
**required_file** | [**\SplFileObject**](\SplFileObject.md) | file to upload |
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -1,15 +0,0 @@
|
||||
# # TypeHolderDefault
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string_item** | **string** | | [default to 'what']
|
||||
**number_item** | **float** | |
|
||||
**integer_item** | **int** | |
|
||||
**bool_item** | **bool** | | [default to true]
|
||||
**array_item** | **int[]** | |
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# # TypeHolderExample
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string_item** | **string** | |
|
||||
**number_item** | **float** | |
|
||||
**float_item** | **float** | |
|
||||
**integer_item** | **int** | |
|
||||
**bool_item** | **bool** | |
|
||||
**array_item** | **int[]** | |
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# # XmlItem
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**attribute_string** | **string** | | [optional]
|
||||
**attribute_number** | **float** | | [optional]
|
||||
**attribute_integer** | **int** | | [optional]
|
||||
**attribute_boolean** | **bool** | | [optional]
|
||||
**wrapped_array** | **int[]** | | [optional]
|
||||
**name_string** | **string** | | [optional]
|
||||
**name_number** | **float** | | [optional]
|
||||
**name_integer** | **int** | | [optional]
|
||||
**name_boolean** | **bool** | | [optional]
|
||||
**name_array** | **int[]** | | [optional]
|
||||
**name_wrapped_array** | **int[]** | | [optional]
|
||||
**prefix_string** | **string** | | [optional]
|
||||
**prefix_number** | **float** | | [optional]
|
||||
**prefix_integer** | **int** | | [optional]
|
||||
**prefix_boolean** | **bool** | | [optional]
|
||||
**prefix_array** | **int[]** | | [optional]
|
||||
**prefix_wrapped_array** | **int[]** | | [optional]
|
||||
**namespace_string** | **string** | | [optional]
|
||||
**namespace_number** | **float** | | [optional]
|
||||
**namespace_integer** | **int** | | [optional]
|
||||
**namespace_boolean** | **bool** | | [optional]
|
||||
**namespace_array** | **int[]** | | [optional]
|
||||
**namespace_wrapped_array** | **int[]** | | [optional]
|
||||
**prefix_ns_string** | **string** | | [optional]
|
||||
**prefix_ns_number** | **float** | | [optional]
|
||||
**prefix_ns_integer** | **int** | | [optional]
|
||||
**prefix_ns_boolean** | **bool** | | [optional]
|
||||
**prefix_ns_array** | **int[]** | | [optional]
|
||||
**prefix_ns_wrapped_array** | **int[]** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -92,7 +91,7 @@ class AnotherFakeApi
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -154,7 +153,7 @@ class AnotherFakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -167,21 +166,20 @@ class AnotherFakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Client' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -192,11 +190,10 @@ class AnotherFakeApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Client';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -259,11 +256,10 @@ class AnotherFakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -283,7 +279,7 @@ class AnotherFakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -92,7 +91,7 @@ class DefaultApi
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -148,7 +147,7 @@ class DefaultApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -161,21 +160,20 @@ class DefaultApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
default:
|
||||
if ('\OpenAPI\Client\Model\InlineResponseDefault' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -186,11 +184,10 @@ class DefaultApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\InlineResponseDefault';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -217,8 +214,6 @@ class DefaultApi
|
||||
/**
|
||||
* Operation fooGetAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
@@ -236,8 +231,6 @@ class DefaultApi
|
||||
/**
|
||||
* Operation fooGetAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
@@ -251,11 +244,10 @@ class DefaultApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -275,7 +267,7 @@ class DefaultApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -92,7 +91,7 @@ class FakeApi
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -152,7 +151,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -165,21 +164,20 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\HealthCheckResult' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -190,11 +188,10 @@ class FakeApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\HealthCheckResult';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -255,11 +252,10 @@ class FakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -279,7 +275,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -405,7 +401,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -418,11 +414,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -491,7 +487,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -640,7 +636,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -653,21 +649,20 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('bool' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -678,11 +673,10 @@ class FakeApi
|
||||
}
|
||||
|
||||
$returnType = 'bool';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -709,8 +703,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterBooleanSerializeAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param bool $body Input boolean as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -729,8 +721,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterBooleanSerializeAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param bool $body Input boolean as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -745,11 +735,10 @@ class FakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -769,7 +758,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -895,7 +884,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -908,21 +897,20 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\OuterComposite' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -933,11 +921,10 @@ class FakeApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\OuterComposite';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -964,8 +951,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterCompositeSerializeAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\OuterComposite $outer_composite Input composite as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -984,8 +969,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterCompositeSerializeAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\OuterComposite $outer_composite Input composite as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1000,11 +983,10 @@ class FakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1024,7 +1006,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1150,7 +1132,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1163,21 +1145,20 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('float' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1188,11 +1169,10 @@ class FakeApi
|
||||
}
|
||||
|
||||
$returnType = 'float';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1219,8 +1199,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterNumberSerializeAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param float $body Input number as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1239,8 +1217,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterNumberSerializeAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param float $body Input number as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1255,11 +1231,10 @@ class FakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1279,7 +1254,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1405,7 +1380,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1418,21 +1393,20 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('string' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1443,11 +1417,10 @@ class FakeApi
|
||||
}
|
||||
|
||||
$returnType = 'string';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1474,8 +1447,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterStringSerializeAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param string $body Input string as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1494,8 +1465,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakeOuterStringSerializeAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param string $body Input string as post body (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1510,11 +1479,10 @@ class FakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1534,7 +1502,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1660,7 +1628,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1673,21 +1641,20 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\OuterObjectWithEnumProperty' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1698,11 +1665,10 @@ class FakeApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\OuterObjectWithEnumProperty';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1729,8 +1695,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakePropertyEnumIntegerSerializeAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\OuterObjectWithEnumProperty $outer_object_with_enum_property Input enum (int) as post body (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1749,8 +1713,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation fakePropertyEnumIntegerSerializeAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\OuterObjectWithEnumProperty $outer_object_with_enum_property Input enum (int) as post body (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1765,11 +1727,10 @@ class FakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1789,7 +1750,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1920,7 +1881,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1933,11 +1894,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1953,8 +1914,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation testBodyWithFileSchemaAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\FileSchemaTestClass $file_schema_test_class (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -1973,8 +1932,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation testBodyWithFileSchemaAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\FileSchemaTestClass $file_schema_test_class (required)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
@@ -2002,7 +1959,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -2135,7 +2092,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -2148,11 +2105,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2168,8 +2125,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation testBodyWithQueryParamsAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param string $query (required)
|
||||
* @param \OpenAPI\Client\Model\User $user (required)
|
||||
*
|
||||
@@ -2189,8 +2144,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation testBodyWithQueryParamsAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param string $query (required)
|
||||
* @param \OpenAPI\Client\Model\User $user (required)
|
||||
*
|
||||
@@ -2219,7 +2172,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -2337,7 +2290,7 @@ class FakeApi
|
||||
/**
|
||||
* Operation testClientModel
|
||||
*
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Client $client client model (required)
|
||||
*
|
||||
@@ -2354,7 +2307,7 @@ class FakeApi
|
||||
/**
|
||||
* Operation testClientModelWithHttpInfo
|
||||
*
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Client $client client model (required)
|
||||
*
|
||||
@@ -2373,7 +2326,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -2386,21 +2339,20 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Client' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2411,11 +2363,10 @@ class FakeApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Client';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2442,7 +2393,7 @@ class FakeApi
|
||||
/**
|
||||
* Operation testClientModelAsync
|
||||
*
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Client $client client model (required)
|
||||
*
|
||||
@@ -2462,7 +2413,7 @@ class FakeApi
|
||||
/**
|
||||
* Operation testClientModelAsyncWithHttpInfo
|
||||
*
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Client $client client model (required)
|
||||
*
|
||||
@@ -2478,11 +2429,10 @@ class FakeApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2502,7 +2452,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -2663,7 +2613,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -2676,11 +2626,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2771,7 +2721,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -3060,7 +3010,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -3073,11 +3023,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3156,7 +3106,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -3363,7 +3313,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -3376,11 +3326,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3459,7 +3409,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -3671,7 +3621,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -3684,11 +3634,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3753,7 +3703,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -3890,7 +3840,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -3903,11 +3853,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3974,7 +3924,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -4122,7 +4072,7 @@ class FakeApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -4135,11 +4085,11 @@ class FakeApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4155,8 +4105,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation testQueryParameterCollectionFormatAsync
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param string[] $pipe (required)
|
||||
* @param string[] $ioutil (required)
|
||||
* @param string[] $http (required)
|
||||
@@ -4179,8 +4127,6 @@ class FakeApi
|
||||
/**
|
||||
* Operation testQueryParameterCollectionFormatAsyncWithHttpInfo
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param string[] $pipe (required)
|
||||
* @param string[] $ioutil (required)
|
||||
* @param string[] $http (required)
|
||||
@@ -4212,7 +4158,7 @@ class FakeApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -92,7 +91,7 @@ class FakeClassnameTags123Api
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -154,7 +153,7 @@ class FakeClassnameTags123Api
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -167,21 +166,20 @@ class FakeClassnameTags123Api
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Client' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -192,11 +190,10 @@ class FakeClassnameTags123Api
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Client';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -259,11 +256,10 @@ class FakeClassnameTags123Api
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -283,7 +279,7 @@ class FakeClassnameTags123Api
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -92,7 +91,7 @@ class PetApi
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -161,7 +160,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -174,11 +173,11 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -251,7 +250,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -402,7 +401,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -415,11 +414,11 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -486,7 +485,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -633,7 +632,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -646,21 +645,20 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Pet[]' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -671,11 +669,10 @@ class PetApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Pet[]';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -738,11 +735,10 @@ class PetApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -762,7 +758,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -903,7 +899,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -916,21 +912,20 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Pet[]' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -941,11 +936,10 @@ class PetApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Pet[]';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1008,11 +1002,10 @@ class PetApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1032,7 +1025,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1174,7 +1167,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1187,21 +1180,20 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Pet' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1212,11 +1204,10 @@ class PetApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Pet';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1279,11 +1270,10 @@ class PetApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1303,7 +1293,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1453,7 +1443,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1466,11 +1456,11 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1543,7 +1533,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1696,7 +1686,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1709,11 +1699,11 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1782,7 +1772,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1938,7 +1928,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1951,21 +1941,20 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\ApiResponse' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1976,11 +1965,10 @@ class PetApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\ApiResponse';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2047,11 +2035,10 @@ class PetApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2071,7 +2058,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -2235,7 +2222,7 @@ class PetApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -2248,21 +2235,20 @@ class PetApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\ApiResponse' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2273,11 +2259,10 @@ class PetApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\ApiResponse';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2344,11 +2329,10 @@ class PetApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -2368,7 +2352,7 @@ class PetApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -92,7 +91,7 @@ class StoreApi
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -153,7 +152,7 @@ class StoreApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -166,11 +165,11 @@ class StoreApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -235,7 +234,7 @@ class StoreApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -371,7 +370,7 @@ class StoreApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -384,21 +383,20 @@ class StoreApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('array<string,int>' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -409,11 +407,10 @@ class StoreApi
|
||||
}
|
||||
|
||||
$returnType = 'array<string,int>';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -474,11 +471,10 @@ class StoreApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -498,7 +494,7 @@ class StoreApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -626,7 +622,7 @@ class StoreApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -639,21 +635,20 @@ class StoreApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Order' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -664,11 +659,10 @@ class StoreApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Order';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -731,11 +725,10 @@ class StoreApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -755,7 +748,7 @@ class StoreApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -900,7 +893,7 @@ class StoreApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -913,21 +906,20 @@ class StoreApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\Order' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -938,11 +930,10 @@ class StoreApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\Order';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1005,11 +996,10 @@ class StoreApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1029,7 +1019,7 @@ class StoreApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -92,7 +91,7 @@ class UserApi
|
||||
*
|
||||
* @param int $hostIndex Host index (required)
|
||||
*/
|
||||
public function setHostIndex($hostIndex)
|
||||
public function setHostIndex($hostIndex): void
|
||||
{
|
||||
$this->hostIndex = $hostIndex;
|
||||
}
|
||||
@@ -153,7 +152,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -166,11 +165,11 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -235,7 +234,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -370,7 +369,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -383,11 +382,11 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -452,7 +451,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -587,7 +586,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -600,11 +599,11 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -669,7 +668,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -804,7 +803,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -817,11 +816,11 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -886,7 +885,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1024,7 +1023,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1037,21 +1036,20 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('\OpenAPI\Client\Model\User' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1062,11 +1060,10 @@ class UserApi
|
||||
}
|
||||
|
||||
$returnType = '\OpenAPI\Client\Model\User';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1129,11 +1126,10 @@ class UserApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1153,7 +1149,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1293,7 +1289,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1306,21 +1302,20 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
$responseBody = $response->getBody();
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
if ('string' === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1331,11 +1326,10 @@ class UserApi
|
||||
}
|
||||
|
||||
$returnType = 'string';
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1400,11 +1394,10 @@ class UserApi
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
$responseBody = $response->getBody();
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $responseBody; //stream goes to serializer
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $responseBody;
|
||||
$content = (string) $response->getBody();
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -1424,7 +1417,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1580,7 +1573,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1593,11 +1586,11 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1660,7 +1653,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1784,7 +1777,7 @@ class UserApi
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
$e->getCode(),
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
@@ -1797,11 +1790,11 @@ class UserApi
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$request->getUri()
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1868,7 +1861,7 @@ class UserApi
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
$response->getBody()
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesAnyType
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesAnyType Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AdditionalPropertiesAnyType implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AdditionalPropertiesAnyType';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesArray
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesArray Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AdditionalPropertiesArray implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AdditionalPropertiesArray';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesBoolean
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesBoolean Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AdditionalPropertiesBoolean implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AdditionalPropertiesBoolean';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class AdditionalPropertiesClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -168,9 +167,6 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess, \JsonSer
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesInteger
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesInteger Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AdditionalPropertiesInteger implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AdditionalPropertiesInteger';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesNumber
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesNumber Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AdditionalPropertiesNumber implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AdditionalPropertiesNumber';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesObject
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesObject Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AdditionalPropertiesObject implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AdditionalPropertiesObject';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesString
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesString Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class AdditionalPropertiesString implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'AdditionalPropertiesString';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Animal implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -168,9 +167,6 @@ class Animal implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ApiResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -173,9 +172,6 @@ class ApiResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSeri
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSerializabl
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -173,9 +172,6 @@ class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -1,337 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* BigCat
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BigCat Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BigCat extends Cat
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BigCat';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'kind' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'kind' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'kind' => 'kind'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'kind' => 'setKind'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'kind' => 'getKind'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const KIND_LIONS = 'lions';
|
||||
const KIND_TIGERS = 'tigers';
|
||||
const KIND_LEOPARDS = 'leopards';
|
||||
const KIND_JAGUARS = 'jaguars';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getKindAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::KIND_LIONS,
|
||||
self::KIND_TIGERS,
|
||||
self::KIND_LEOPARDS,
|
||||
self::KIND_JAGUARS,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
$this->container['kind'] = isset($data['kind']) ? $data['kind'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
$allowedValues = $this->getKindAllowableValues();
|
||||
if (!is_null($this->container['kind']) && !in_array($this->container['kind'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'kind', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets kind
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getKind()
|
||||
{
|
||||
return $this->container['kind'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets kind
|
||||
*
|
||||
* @param string|null $kind kind
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setKind($kind)
|
||||
{
|
||||
$allowedValues = $this->getKindAllowableValues();
|
||||
if (!is_null($kind) && !in_array($kind, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'kind', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['kind'] = $kind;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,343 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* BigCatAllOf
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* BigCatAllOf Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class BigCatAllOf implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'BigCat_allOf';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'kind' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'kind' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'kind' => 'kind'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'kind' => 'setKind'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'kind' => 'getKind'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const KIND_LIONS = 'lions';
|
||||
const KIND_TIGERS = 'tigers';
|
||||
const KIND_LEOPARDS = 'leopards';
|
||||
const KIND_JAGUARS = 'jaguars';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getKindAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::KIND_LIONS,
|
||||
self::KIND_TIGERS,
|
||||
self::KIND_LEOPARDS,
|
||||
self::KIND_JAGUARS,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['kind'] = isset($data['kind']) ? $data['kind'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getKindAllowableValues();
|
||||
if (!is_null($this->container['kind']) && !in_array($this->container['kind'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value for 'kind', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets kind
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getKind()
|
||||
{
|
||||
return $this->container['kind'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets kind
|
||||
*
|
||||
* @param string|null $kind kind
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setKind($kind)
|
||||
{
|
||||
$allowedValues = $this->getKindAllowableValues();
|
||||
if (!is_null($kind) && !in_array($kind, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'kind', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['kind'] = $kind;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -188,9 +187,6 @@ class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -39,9 +38,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Cat extends Animal
|
||||
class Cat extends Animal
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -161,9 +160,6 @@ class Cat extends Animal
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class CatAllOf implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class CatAllOf implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -168,9 +167,6 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -42,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ClassModel implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -164,9 +163,6 @@ class ClassModel implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Client implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class Client implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -39,9 +38,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Dog extends Animal
|
||||
class Dog extends Animal
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -161,9 +160,6 @@ class Dog extends Animal
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class DogAllOf implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class DogAllOf implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -172,9 +171,7 @@ class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
const JUST_SYMBOL_DOLLAR = '$';
|
||||
const ARRAY_ENUM_FISH = 'fish';
|
||||
const ARRAY_ENUM_CRAB = 'crab';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -187,7 +184,7 @@ class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::JUST_SYMBOL_DOLLAR,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -200,7 +197,6 @@ class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::ARRAY_ENUM_CRAB,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -208,9 +207,7 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
const ENUM_INTEGER_MINUS_1 = -1;
|
||||
const ENUM_NUMBER_1_DOT_1 = 1.1;
|
||||
const ENUM_NUMBER_MINUS_1_DOT_2 = -1.2;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -224,7 +221,7 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::ENUM_STRING_EMPTY,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -238,7 +235,7 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::ENUM_STRING_REQUIRED_EMPTY,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -251,7 +248,7 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::ENUM_INTEGER_MINUS_1,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -264,7 +261,6 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::ENUM_NUMBER_MINUS_1_DOT_2,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -42,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class File implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -164,9 +163,6 @@ class File implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class FileSchemaTestClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -168,9 +167,6 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess, \JsonSerializa
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Foo implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class Foo implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -238,9 +237,6 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class HasOnlyReadOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -168,9 +167,6 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -42,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class HealthCheckResult implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -164,9 +163,6 @@ class HealthCheckResult implements ModelInterface, ArrayAccess, \JsonSerializabl
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -1,354 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObject
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* InlineObject Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'inline_object';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'name' => 'string',
|
||||
'status' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'name' => null,
|
||||
'status' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'name' => 'name',
|
||||
'status' => 'status'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'name' => 'setName',
|
||||
'status' => 'setStatus'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'name' => 'getName',
|
||||
'status' => 'getStatus'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['name'] = $data['name'] ?? null;
|
||||
$this->container['status'] = $data['status'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name Updated name of the pet
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status
|
||||
*
|
||||
* @param string|null $status Updated status of the pet
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$this->container['status'] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,354 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObject1
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* InlineObject1 Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject1 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'inline_object_1';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'additional_metadata' => 'string',
|
||||
'file' => '\SplFileObject'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'additional_metadata' => null,
|
||||
'file' => 'binary'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'additional_metadata' => 'additionalMetadata',
|
||||
'file' => 'file'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'additional_metadata' => 'setAdditionalMetadata',
|
||||
'file' => 'setFile'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'additional_metadata' => 'getAdditionalMetadata',
|
||||
'file' => 'getFile'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['additional_metadata'] = $data['additional_metadata'] ?? null;
|
||||
$this->container['file'] = $data['file'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets additional_metadata
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getAdditionalMetadata()
|
||||
{
|
||||
return $this->container['additional_metadata'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets additional_metadata
|
||||
*
|
||||
* @param string|null $additional_metadata Additional data to pass to server
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setAdditionalMetadata($additional_metadata)
|
||||
{
|
||||
$this->container['additional_metadata'] = $additional_metadata;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets file
|
||||
*
|
||||
* @return \SplFileObject|null
|
||||
*/
|
||||
public function getFile()
|
||||
{
|
||||
return $this->container['file'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets file
|
||||
*
|
||||
* @param \SplFileObject|null $file file to upload
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFile($file)
|
||||
{
|
||||
$this->container['file'] = $file;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,414 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObject2
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* InlineObject2 Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject2 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'inline_object_2';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'enum_form_string_array' => 'string[]',
|
||||
'enum_form_string' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'enum_form_string_array' => null,
|
||||
'enum_form_string' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'enum_form_string_array' => 'enum_form_string_array',
|
||||
'enum_form_string' => 'enum_form_string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'enum_form_string_array' => 'setEnumFormStringArray',
|
||||
'enum_form_string' => 'setEnumFormString'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'enum_form_string_array' => 'getEnumFormStringArray',
|
||||
'enum_form_string' => 'getEnumFormString'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
const ENUM_FORM_STRING_ARRAY_GREATER_THAN = '>';
|
||||
const ENUM_FORM_STRING_ARRAY_DOLLAR = '$';
|
||||
const ENUM_FORM_STRING_ABC = '_abc';
|
||||
const ENUM_FORM_STRING_EFG = '-efg';
|
||||
const ENUM_FORM_STRING_XYZ = '(xyz)';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getEnumFormStringArrayAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::ENUM_FORM_STRING_ARRAY_GREATER_THAN,
|
||||
self::ENUM_FORM_STRING_ARRAY_DOLLAR,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getEnumFormStringAllowableValues()
|
||||
{
|
||||
return [
|
||||
self::ENUM_FORM_STRING_ABC,
|
||||
self::ENUM_FORM_STRING_EFG,
|
||||
self::ENUM_FORM_STRING_XYZ,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['enum_form_string_array'] = $data['enum_form_string_array'] ?? null;
|
||||
$this->container['enum_form_string'] = $data['enum_form_string'] ?? '-efg';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
$allowedValues = $this->getEnumFormStringAllowableValues();
|
||||
if (!is_null($this->container['enum_form_string']) && !in_array($this->container['enum_form_string'], $allowedValues, true)) {
|
||||
$invalidProperties[] = sprintf(
|
||||
"invalid value '%s' for 'enum_form_string', must be one of '%s'",
|
||||
$this->container['enum_form_string'],
|
||||
implode("', '", $allowedValues)
|
||||
);
|
||||
}
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets enum_form_string_array
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getEnumFormStringArray()
|
||||
{
|
||||
return $this->container['enum_form_string_array'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets enum_form_string_array
|
||||
*
|
||||
* @param string[]|null $enum_form_string_array Form parameter enum test (string array)
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setEnumFormStringArray($enum_form_string_array)
|
||||
{
|
||||
$allowedValues = $this->getEnumFormStringArrayAllowableValues();
|
||||
if (!is_null($enum_form_string_array) && array_diff($enum_form_string_array, $allowedValues)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'enum_form_string_array', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['enum_form_string_array'] = $enum_form_string_array;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets enum_form_string
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEnumFormString()
|
||||
{
|
||||
return $this->container['enum_form_string'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets enum_form_string
|
||||
*
|
||||
* @param string|null $enum_form_string Form parameter enum test (string)
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setEnumFormString($enum_form_string)
|
||||
{
|
||||
$allowedValues = $this->getEnumFormStringAllowableValues();
|
||||
if (!is_null($enum_form_string) && !in_array($enum_form_string, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value '%s' for 'enum_form_string', must be one of '%s'",
|
||||
$enum_form_string,
|
||||
implode("', '", $allowedValues)
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->container['enum_form_string'] = $enum_form_string;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,832 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObject3
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* InlineObject3 Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject3 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'inline_object_3';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'integer' => 'int',
|
||||
'int32' => 'int',
|
||||
'int64' => 'int',
|
||||
'number' => 'float',
|
||||
'float' => 'float',
|
||||
'double' => 'double',
|
||||
'string' => 'string',
|
||||
'pattern_without_delimiter' => 'string',
|
||||
'byte' => 'string',
|
||||
'binary' => '\SplFileObject',
|
||||
'date' => '\DateTime',
|
||||
'date_time' => '\DateTime',
|
||||
'password' => 'string',
|
||||
'callback' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'integer' => null,
|
||||
'int32' => 'int32',
|
||||
'int64' => 'int64',
|
||||
'number' => null,
|
||||
'float' => 'float',
|
||||
'double' => 'double',
|
||||
'string' => null,
|
||||
'pattern_without_delimiter' => null,
|
||||
'byte' => 'byte',
|
||||
'binary' => 'binary',
|
||||
'date' => 'date',
|
||||
'date_time' => 'date-time',
|
||||
'password' => 'password',
|
||||
'callback' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'integer' => 'integer',
|
||||
'int32' => 'int32',
|
||||
'int64' => 'int64',
|
||||
'number' => 'number',
|
||||
'float' => 'float',
|
||||
'double' => 'double',
|
||||
'string' => 'string',
|
||||
'pattern_without_delimiter' => 'pattern_without_delimiter',
|
||||
'byte' => 'byte',
|
||||
'binary' => 'binary',
|
||||
'date' => 'date',
|
||||
'date_time' => 'dateTime',
|
||||
'password' => 'password',
|
||||
'callback' => 'callback'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'integer' => 'setInteger',
|
||||
'int32' => 'setInt32',
|
||||
'int64' => 'setInt64',
|
||||
'number' => 'setNumber',
|
||||
'float' => 'setFloat',
|
||||
'double' => 'setDouble',
|
||||
'string' => 'setString',
|
||||
'pattern_without_delimiter' => 'setPatternWithoutDelimiter',
|
||||
'byte' => 'setByte',
|
||||
'binary' => 'setBinary',
|
||||
'date' => 'setDate',
|
||||
'date_time' => 'setDateTime',
|
||||
'password' => 'setPassword',
|
||||
'callback' => 'setCallback'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'integer' => 'getInteger',
|
||||
'int32' => 'getInt32',
|
||||
'int64' => 'getInt64',
|
||||
'number' => 'getNumber',
|
||||
'float' => 'getFloat',
|
||||
'double' => 'getDouble',
|
||||
'string' => 'getString',
|
||||
'pattern_without_delimiter' => 'getPatternWithoutDelimiter',
|
||||
'byte' => 'getByte',
|
||||
'binary' => 'getBinary',
|
||||
'date' => 'getDate',
|
||||
'date_time' => 'getDateTime',
|
||||
'password' => 'getPassword',
|
||||
'callback' => 'getCallback'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['integer'] = $data['integer'] ?? null;
|
||||
$this->container['int32'] = $data['int32'] ?? null;
|
||||
$this->container['int64'] = $data['int64'] ?? null;
|
||||
$this->container['number'] = $data['number'] ?? null;
|
||||
$this->container['float'] = $data['float'] ?? null;
|
||||
$this->container['double'] = $data['double'] ?? null;
|
||||
$this->container['string'] = $data['string'] ?? null;
|
||||
$this->container['pattern_without_delimiter'] = $data['pattern_without_delimiter'] ?? null;
|
||||
$this->container['byte'] = $data['byte'] ?? null;
|
||||
$this->container['binary'] = $data['binary'] ?? null;
|
||||
$this->container['date'] = $data['date'] ?? null;
|
||||
$this->container['date_time'] = $data['date_time'] ?? null;
|
||||
$this->container['password'] = $data['password'] ?? null;
|
||||
$this->container['callback'] = $data['callback'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if (!is_null($this->container['integer']) && ($this->container['integer'] > 100)) {
|
||||
$invalidProperties[] = "invalid value for 'integer', must be smaller than or equal to 100.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['integer']) && ($this->container['integer'] < 10)) {
|
||||
$invalidProperties[] = "invalid value for 'integer', must be bigger than or equal to 10.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['int32']) && ($this->container['int32'] > 200)) {
|
||||
$invalidProperties[] = "invalid value for 'int32', must be smaller than or equal to 200.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['int32']) && ($this->container['int32'] < 20)) {
|
||||
$invalidProperties[] = "invalid value for 'int32', must be bigger than or equal to 20.";
|
||||
}
|
||||
|
||||
if ($this->container['number'] === null) {
|
||||
$invalidProperties[] = "'number' can't be null";
|
||||
}
|
||||
if (($this->container['number'] > 543.2)) {
|
||||
$invalidProperties[] = "invalid value for 'number', must be smaller than or equal to 543.2.";
|
||||
}
|
||||
|
||||
if (($this->container['number'] < 32.1)) {
|
||||
$invalidProperties[] = "invalid value for 'number', must be bigger than or equal to 32.1.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['float']) && ($this->container['float'] > 987.6)) {
|
||||
$invalidProperties[] = "invalid value for 'float', must be smaller than or equal to 987.6.";
|
||||
}
|
||||
|
||||
if ($this->container['double'] === null) {
|
||||
$invalidProperties[] = "'double' can't be null";
|
||||
}
|
||||
if (($this->container['double'] > 123.4)) {
|
||||
$invalidProperties[] = "invalid value for 'double', must be smaller than or equal to 123.4.";
|
||||
}
|
||||
|
||||
if (($this->container['double'] < 67.8)) {
|
||||
$invalidProperties[] = "invalid value for 'double', must be bigger than or equal to 67.8.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['string']) && !preg_match("/[a-z]/i", $this->container['string'])) {
|
||||
$invalidProperties[] = "invalid value for 'string', must be conform to the pattern /[a-z]/i.";
|
||||
}
|
||||
|
||||
if ($this->container['pattern_without_delimiter'] === null) {
|
||||
$invalidProperties[] = "'pattern_without_delimiter' can't be null";
|
||||
}
|
||||
if (!preg_match("/^[A-Z].*/", $this->container['pattern_without_delimiter'])) {
|
||||
$invalidProperties[] = "invalid value for 'pattern_without_delimiter', must be conform to the pattern /^[A-Z].*/.";
|
||||
}
|
||||
|
||||
if ($this->container['byte'] === null) {
|
||||
$invalidProperties[] = "'byte' can't be null";
|
||||
}
|
||||
if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 64)) {
|
||||
$invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 64.";
|
||||
}
|
||||
|
||||
if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) < 10)) {
|
||||
$invalidProperties[] = "invalid value for 'password', the character length must be bigger than or equal to 10.";
|
||||
}
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets integer
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getInteger()
|
||||
{
|
||||
return $this->container['integer'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets integer
|
||||
*
|
||||
* @param int|null $integer None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setInteger($integer)
|
||||
{
|
||||
|
||||
if (!is_null($integer) && ($integer > 100)) {
|
||||
throw new \InvalidArgumentException('invalid value for $integer when calling InlineObject3., must be smaller than or equal to 100.');
|
||||
}
|
||||
if (!is_null($integer) && ($integer < 10)) {
|
||||
throw new \InvalidArgumentException('invalid value for $integer when calling InlineObject3., must be bigger than or equal to 10.');
|
||||
}
|
||||
|
||||
$this->container['integer'] = $integer;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets int32
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getInt32()
|
||||
{
|
||||
return $this->container['int32'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets int32
|
||||
*
|
||||
* @param int|null $int32 None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setInt32($int32)
|
||||
{
|
||||
|
||||
if (!is_null($int32) && ($int32 > 200)) {
|
||||
throw new \InvalidArgumentException('invalid value for $int32 when calling InlineObject3., must be smaller than or equal to 200.');
|
||||
}
|
||||
if (!is_null($int32) && ($int32 < 20)) {
|
||||
throw new \InvalidArgumentException('invalid value for $int32 when calling InlineObject3., must be bigger than or equal to 20.');
|
||||
}
|
||||
|
||||
$this->container['int32'] = $int32;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets int64
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getInt64()
|
||||
{
|
||||
return $this->container['int64'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets int64
|
||||
*
|
||||
* @param int|null $int64 None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setInt64($int64)
|
||||
{
|
||||
$this->container['int64'] = $int64;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets number
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
return $this->container['number'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets number
|
||||
*
|
||||
* @param float $number None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setNumber($number)
|
||||
{
|
||||
|
||||
if (($number > 543.2)) {
|
||||
throw new \InvalidArgumentException('invalid value for $number when calling InlineObject3., must be smaller than or equal to 543.2.');
|
||||
}
|
||||
if (($number < 32.1)) {
|
||||
throw new \InvalidArgumentException('invalid value for $number when calling InlineObject3., must be bigger than or equal to 32.1.');
|
||||
}
|
||||
|
||||
$this->container['number'] = $number;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets float
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getFloat()
|
||||
{
|
||||
return $this->container['float'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets float
|
||||
*
|
||||
* @param float|null $float None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFloat($float)
|
||||
{
|
||||
|
||||
if (!is_null($float) && ($float > 987.6)) {
|
||||
throw new \InvalidArgumentException('invalid value for $float when calling InlineObject3., must be smaller than or equal to 987.6.');
|
||||
}
|
||||
|
||||
$this->container['float'] = $float;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets double
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public function getDouble()
|
||||
{
|
||||
return $this->container['double'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets double
|
||||
*
|
||||
* @param double $double None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDouble($double)
|
||||
{
|
||||
|
||||
if (($double > 123.4)) {
|
||||
throw new \InvalidArgumentException('invalid value for $double when calling InlineObject3., must be smaller than or equal to 123.4.');
|
||||
}
|
||||
if (($double < 67.8)) {
|
||||
throw new \InvalidArgumentException('invalid value for $double when calling InlineObject3., must be bigger than or equal to 67.8.');
|
||||
}
|
||||
|
||||
$this->container['double'] = $double;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets string
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getString()
|
||||
{
|
||||
return $this->container['string'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets string
|
||||
*
|
||||
* @param string|null $string None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setString($string)
|
||||
{
|
||||
|
||||
if (!is_null($string) && (!preg_match("/[a-z]/i", $string))) {
|
||||
throw new \InvalidArgumentException("invalid value for $string when calling InlineObject3., must conform to the pattern /[a-z]/i.");
|
||||
}
|
||||
|
||||
$this->container['string'] = $string;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets pattern_without_delimiter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPatternWithoutDelimiter()
|
||||
{
|
||||
return $this->container['pattern_without_delimiter'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets pattern_without_delimiter
|
||||
*
|
||||
* @param string $pattern_without_delimiter None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setPatternWithoutDelimiter($pattern_without_delimiter)
|
||||
{
|
||||
|
||||
if ((!preg_match("/^[A-Z].*/", $pattern_without_delimiter))) {
|
||||
throw new \InvalidArgumentException("invalid value for $pattern_without_delimiter when calling InlineObject3., must conform to the pattern /^[A-Z].*/.");
|
||||
}
|
||||
|
||||
$this->container['pattern_without_delimiter'] = $pattern_without_delimiter;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets byte
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getByte()
|
||||
{
|
||||
return $this->container['byte'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets byte
|
||||
*
|
||||
* @param string $byte None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setByte($byte)
|
||||
{
|
||||
$this->container['byte'] = $byte;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets binary
|
||||
*
|
||||
* @return \SplFileObject|null
|
||||
*/
|
||||
public function getBinary()
|
||||
{
|
||||
return $this->container['binary'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets binary
|
||||
*
|
||||
* @param \SplFileObject|null $binary None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setBinary($binary)
|
||||
{
|
||||
$this->container['binary'] = $binary;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets date
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->container['date'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets date
|
||||
*
|
||||
* @param \DateTime|null $date None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDate($date)
|
||||
{
|
||||
$this->container['date'] = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets date_time
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getDateTime()
|
||||
{
|
||||
return $this->container['date_time'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets date_time
|
||||
*
|
||||
* @param \DateTime|null $date_time None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDateTime($date_time)
|
||||
{
|
||||
$this->container['date_time'] = $date_time;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets password
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->container['password'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets password
|
||||
*
|
||||
* @param string|null $password None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setPassword($password)
|
||||
{
|
||||
if (!is_null($password) && (mb_strlen($password) > 64)) {
|
||||
throw new \InvalidArgumentException('invalid length for $password when calling InlineObject3., must be smaller than or equal to 64.');
|
||||
}
|
||||
if (!is_null($password) && (mb_strlen($password) < 10)) {
|
||||
throw new \InvalidArgumentException('invalid length for $password when calling InlineObject3., must be bigger than or equal to 10.');
|
||||
}
|
||||
|
||||
$this->container['password'] = $password;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets callback
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getCallback()
|
||||
{
|
||||
return $this->container['callback'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets callback
|
||||
*
|
||||
* @param string|null $callback None
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setCallback($callback)
|
||||
{
|
||||
$this->container['callback'] = $callback;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,360 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObject4
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* InlineObject4 Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject4 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'inline_object_4';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'param' => 'string',
|
||||
'param2' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'param' => null,
|
||||
'param2' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'param' => 'param',
|
||||
'param2' => 'param2'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'param' => 'setParam',
|
||||
'param2' => 'setParam2'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'param' => 'getParam',
|
||||
'param2' => 'getParam2'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['param'] = $data['param'] ?? null;
|
||||
$this->container['param2'] = $data['param2'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['param'] === null) {
|
||||
$invalidProperties[] = "'param' can't be null";
|
||||
}
|
||||
if ($this->container['param2'] === null) {
|
||||
$invalidProperties[] = "'param2' can't be null";
|
||||
}
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets param
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getParam()
|
||||
{
|
||||
return $this->container['param'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets param
|
||||
*
|
||||
* @param string $param field1
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setParam($param)
|
||||
{
|
||||
$this->container['param'] = $param;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets param2
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getParam2()
|
||||
{
|
||||
return $this->container['param2'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets param2
|
||||
*
|
||||
* @param string $param2 field2
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setParam2($param2)
|
||||
{
|
||||
$this->container['param2'] = $param2;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,357 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObject5
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* InlineObject5 Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineObject5 implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'inline_object_5';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'additional_metadata' => 'string',
|
||||
'required_file' => '\SplFileObject'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'additional_metadata' => null,
|
||||
'required_file' => 'binary'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'additional_metadata' => 'additionalMetadata',
|
||||
'required_file' => 'requiredFile'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'additional_metadata' => 'setAdditionalMetadata',
|
||||
'required_file' => 'setRequiredFile'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'additional_metadata' => 'getAdditionalMetadata',
|
||||
'required_file' => 'getRequiredFile'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['additional_metadata'] = $data['additional_metadata'] ?? null;
|
||||
$this->container['required_file'] = $data['required_file'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['required_file'] === null) {
|
||||
$invalidProperties[] = "'required_file' can't be null";
|
||||
}
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets additional_metadata
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getAdditionalMetadata()
|
||||
{
|
||||
return $this->container['additional_metadata'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets additional_metadata
|
||||
*
|
||||
* @param string|null $additional_metadata Additional data to pass to server
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setAdditionalMetadata($additional_metadata)
|
||||
{
|
||||
$this->container['additional_metadata'] = $additional_metadata;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets required_file
|
||||
*
|
||||
* @return \SplFileObject
|
||||
*/
|
||||
public function getRequiredFile()
|
||||
{
|
||||
return $this->container['required_file'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets required_file
|
||||
*
|
||||
* @param \SplFileObject $required_file file to upload
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setRequiredFile($required_file)
|
||||
{
|
||||
$this->container['required_file'] = $required_file;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class InlineResponseDefault implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class InlineResponseDefault implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -180,9 +179,7 @@ class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
|
||||
const MAP_OF_ENUM_STRING_UPPER = 'UPPER';
|
||||
const MAP_OF_ENUM_STRING_LOWER = 'lower';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -195,7 +192,6 @@ class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::MAP_OF_ENUM_STRING_LOWER,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -173,9 +172,6 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -42,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Model200Response implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -169,9 +168,6 @@ class Model200Response implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ModelList implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class ModelList implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -42,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ModelReturn implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -164,9 +163,6 @@ class ModelReturn implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -42,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Name implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -179,9 +178,6 @@ class Name implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -218,9 +217,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class NumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class NumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Order implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -191,9 +190,7 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
const STATUS_PLACED = 'placed';
|
||||
const STATUS_APPROVED = 'approved';
|
||||
const STATUS_DELIVERED = 'delivered';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -207,7 +204,6 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::STATUS_DELIVERED,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class OuterComposite implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -173,9 +172,6 @@ class OuterComposite implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class OuterObjectWithEnumProperty implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class OuterObjectWithEnumProperty implements ModelInterface, ArrayAccess, \JsonS
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -191,9 +190,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
const STATUS_AVAILABLE = 'available';
|
||||
const STATUS_PENDING = 'pending';
|
||||
const STATUS_SOLD = 'sold';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
*
|
||||
@@ -207,7 +204,6 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
self::STATUS_SOLD,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class ReadOnlyFirst implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -168,9 +167,6 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class SpecialModelName implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -163,9 +162,6 @@ class SpecialModelName implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -168,9 +167,6 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
@@ -1,442 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* TypeHolderDefault
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* TypeHolderDefault Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class TypeHolderDefault implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'TypeHolderDefault';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'string_item' => 'string',
|
||||
'number_item' => 'float',
|
||||
'integer_item' => 'int',
|
||||
'bool_item' => 'bool',
|
||||
'array_item' => 'int[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'string_item' => null,
|
||||
'number_item' => null,
|
||||
'integer_item' => null,
|
||||
'bool_item' => null,
|
||||
'array_item' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'string_item' => 'string_item',
|
||||
'number_item' => 'number_item',
|
||||
'integer_item' => 'integer_item',
|
||||
'bool_item' => 'bool_item',
|
||||
'array_item' => 'array_item'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'string_item' => 'setStringItem',
|
||||
'number_item' => 'setNumberItem',
|
||||
'integer_item' => 'setIntegerItem',
|
||||
'bool_item' => 'setBoolItem',
|
||||
'array_item' => 'setArrayItem'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'string_item' => 'getStringItem',
|
||||
'number_item' => 'getNumberItem',
|
||||
'integer_item' => 'getIntegerItem',
|
||||
'bool_item' => 'getBoolItem',
|
||||
'array_item' => 'getArrayItem'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['string_item'] = isset($data['string_item']) ? $data['string_item'] : 'what';
|
||||
$this->container['number_item'] = isset($data['number_item']) ? $data['number_item'] : null;
|
||||
$this->container['integer_item'] = isset($data['integer_item']) ? $data['integer_item'] : null;
|
||||
$this->container['bool_item'] = isset($data['bool_item']) ? $data['bool_item'] : true;
|
||||
$this->container['array_item'] = isset($data['array_item']) ? $data['array_item'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['string_item'] === null) {
|
||||
$invalidProperties[] = "'string_item' can't be null";
|
||||
}
|
||||
if ($this->container['number_item'] === null) {
|
||||
$invalidProperties[] = "'number_item' can't be null";
|
||||
}
|
||||
if ($this->container['integer_item'] === null) {
|
||||
$invalidProperties[] = "'integer_item' can't be null";
|
||||
}
|
||||
if ($this->container['bool_item'] === null) {
|
||||
$invalidProperties[] = "'bool_item' can't be null";
|
||||
}
|
||||
if ($this->container['array_item'] === null) {
|
||||
$invalidProperties[] = "'array_item' can't be null";
|
||||
}
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets string_item
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getStringItem()
|
||||
{
|
||||
return $this->container['string_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets string_item
|
||||
*
|
||||
* @param string $string_item string_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStringItem($string_item)
|
||||
{
|
||||
$this->container['string_item'] = $string_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets number_item
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getNumberItem()
|
||||
{
|
||||
return $this->container['number_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets number_item
|
||||
*
|
||||
* @param float $number_item number_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumberItem($number_item)
|
||||
{
|
||||
$this->container['number_item'] = $number_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets integer_item
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getIntegerItem()
|
||||
{
|
||||
return $this->container['integer_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets integer_item
|
||||
*
|
||||
* @param int $integer_item integer_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setIntegerItem($integer_item)
|
||||
{
|
||||
$this->container['integer_item'] = $integer_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bool_item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getBoolItem()
|
||||
{
|
||||
return $this->container['bool_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bool_item
|
||||
*
|
||||
* @param bool $bool_item bool_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBoolItem($bool_item)
|
||||
{
|
||||
$this->container['bool_item'] = $bool_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets array_item
|
||||
*
|
||||
* @return int[]
|
||||
*/
|
||||
public function getArrayItem()
|
||||
{
|
||||
return $this->container['array_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets array_item
|
||||
*
|
||||
* @param int[] $array_item array_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayItem($array_item)
|
||||
{
|
||||
$this->container['array_item'] = $array_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,475 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* TypeHolderExample
|
||||
*
|
||||
* PHP version 7.2
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* TypeHolderExample Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class TypeHolderExample implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'TypeHolderExample';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'string_item' => 'string',
|
||||
'number_item' => 'float',
|
||||
'float_item' => 'float',
|
||||
'integer_item' => 'int',
|
||||
'bool_item' => 'bool',
|
||||
'array_item' => 'int[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'string_item' => null,
|
||||
'number_item' => null,
|
||||
'float_item' => 'float',
|
||||
'integer_item' => null,
|
||||
'bool_item' => null,
|
||||
'array_item' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'string_item' => 'string_item',
|
||||
'number_item' => 'number_item',
|
||||
'float_item' => 'float_item',
|
||||
'integer_item' => 'integer_item',
|
||||
'bool_item' => 'bool_item',
|
||||
'array_item' => 'array_item'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'string_item' => 'setStringItem',
|
||||
'number_item' => 'setNumberItem',
|
||||
'float_item' => 'setFloatItem',
|
||||
'integer_item' => 'setIntegerItem',
|
||||
'bool_item' => 'setBoolItem',
|
||||
'array_item' => 'setArrayItem'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'string_item' => 'getStringItem',
|
||||
'number_item' => 'getNumberItem',
|
||||
'float_item' => 'getFloatItem',
|
||||
'integer_item' => 'getIntegerItem',
|
||||
'bool_item' => 'getBoolItem',
|
||||
'array_item' => 'getArrayItem'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['string_item'] = isset($data['string_item']) ? $data['string_item'] : null;
|
||||
$this->container['number_item'] = isset($data['number_item']) ? $data['number_item'] : null;
|
||||
$this->container['float_item'] = isset($data['float_item']) ? $data['float_item'] : null;
|
||||
$this->container['integer_item'] = isset($data['integer_item']) ? $data['integer_item'] : null;
|
||||
$this->container['bool_item'] = isset($data['bool_item']) ? $data['bool_item'] : null;
|
||||
$this->container['array_item'] = isset($data['array_item']) ? $data['array_item'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['string_item'] === null) {
|
||||
$invalidProperties[] = "'string_item' can't be null";
|
||||
}
|
||||
if ($this->container['number_item'] === null) {
|
||||
$invalidProperties[] = "'number_item' can't be null";
|
||||
}
|
||||
if ($this->container['float_item'] === null) {
|
||||
$invalidProperties[] = "'float_item' can't be null";
|
||||
}
|
||||
if ($this->container['integer_item'] === null) {
|
||||
$invalidProperties[] = "'integer_item' can't be null";
|
||||
}
|
||||
if ($this->container['bool_item'] === null) {
|
||||
$invalidProperties[] = "'bool_item' can't be null";
|
||||
}
|
||||
if ($this->container['array_item'] === null) {
|
||||
$invalidProperties[] = "'array_item' can't be null";
|
||||
}
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets string_item
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getStringItem()
|
||||
{
|
||||
return $this->container['string_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets string_item
|
||||
*
|
||||
* @param string $string_item string_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setStringItem($string_item)
|
||||
{
|
||||
$this->container['string_item'] = $string_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets number_item
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getNumberItem()
|
||||
{
|
||||
return $this->container['number_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets number_item
|
||||
*
|
||||
* @param float $number_item number_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumberItem($number_item)
|
||||
{
|
||||
$this->container['number_item'] = $number_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets float_item
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getFloatItem()
|
||||
{
|
||||
return $this->container['float_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets float_item
|
||||
*
|
||||
* @param float $float_item float_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setFloatItem($float_item)
|
||||
{
|
||||
$this->container['float_item'] = $float_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets integer_item
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getIntegerItem()
|
||||
{
|
||||
return $this->container['integer_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets integer_item
|
||||
*
|
||||
* @param int $integer_item integer_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setIntegerItem($integer_item)
|
||||
{
|
||||
$this->container['integer_item'] = $integer_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bool_item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getBoolItem()
|
||||
{
|
||||
return $this->container['bool_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bool_item
|
||||
*
|
||||
* @param bool $bool_item bool_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBoolItem($bool_item)
|
||||
{
|
||||
$this->container['bool_item'] = $bool_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets array_item
|
||||
*
|
||||
* @return int[]
|
||||
*/
|
||||
public function getArrayItem()
|
||||
{
|
||||
return $this->container['array_item'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets array_item
|
||||
*
|
||||
* @param int[] $array_item array_item
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayItem($array_item)
|
||||
{
|
||||
$this->container['array_item'] = $array_item;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -41,7 +40,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<TKey, TValue>
|
||||
* @template TKey int|null
|
||||
* @template TValue mixed|null
|
||||
* @template TValue mixed|null
|
||||
*/
|
||||
class User implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
@@ -198,9 +197,6 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,6 @@
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 5.1.1-SNAPSHOT
|
||||
*/
|
||||
@@ -275,11 +274,11 @@ class ObjectSerializer
|
||||
|
||||
if (strcasecmp(substr($class, -2), '[]') === 0) {
|
||||
$data = is_string($data) ? json_decode($data) : $data;
|
||||
|
||||
|
||||
if (!is_array($data)) {
|
||||
throw new \InvalidArgumentException("Invalid array '$class'");
|
||||
}
|
||||
|
||||
|
||||
$subClass = substr($class, 0, -2);
|
||||
$values = [];
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
Reference in New Issue
Block a user