[PHP] Improve Model template (#6460)

* Update samples

./bin/php-petstore.sh

* Remove unnecessary implements entry

ModelInterface, ArrayAccess are already implemented in parent

* Remove field `container` which is already defined in parent

* Change snake case to lower camel case

- invalid_properties
- allowed_values

* Improve doc commenct style

* Improve description length

* Improve length

* Doc comment short description must start with a capital letter

* Add a line between @param and @return

* Delete an additinal blank line at end of doc comment

* Udpate petstore-security-test
This commit is contained in:
Akihito Nakano 2017-09-23 22:36:05 +09:00 committed by wing328
parent 4a89d23619
commit 8f8515486f
56 changed files with 1872 additions and 806 deletions

View File

@ -21,9 +21,12 @@
namespace {{modelPackage}};
{{^isEnum}}
{{^parentSchema}}
use \ArrayAccess;
{{/parentSchema}}
{{/isEnum}}
use \{{invokerPackage}}\ObjectSerializer;
/**
* {{classname}} Class Doc Comment

View File

@ -1,15 +1,17 @@
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}implements ModelInterface, ArrayAccess
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}}
{
const DISCRIMINATOR = {{#discriminator}}'{{discriminator}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}};
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = '{{name}}';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -19,6 +21,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -47,7 +50,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -57,6 +62,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -66,6 +72,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -74,7 +81,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -119,6 +127,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
{{#vars}}{{#isEnum}}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function {{getter}}AllowableValues()
@ -130,15 +139,20 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
}
{{/isEnum}}{{/vars}}
{{^parentSchema}}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
{{/parentSchema}}
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -165,25 +179,25 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
public function listInvalidProperties()
{
{{#parent}}
$invalid_properties = parent::listInvalidProperties();
$invalidProperties = parent::listInvalidProperties();
{{/parent}}
{{^parent}}
$invalid_properties = [];
$invalidProperties = [];
{{/parent}}
{{#vars}}
{{#required}}
if ($this->container['{{name}}'] === null) {
$invalid_properties[] = "'{{name}}' can't be null";
$invalidProperties[] = "'{{name}}' can't be null";
}
{{/required}}
{{#isEnum}}
{{^isContainer}}
$allowed_values = $this->{{getter}}AllowableValues();
if (!in_array($this->container['{{name}}'], $allowed_values)) {
$invalid_properties[] = sprintf(
$allowedValues = $this->{{getter}}AllowableValues();
if (!in_array($this->container['{{name}}'], $allowedValues)) {
$invalidProperties[] = sprintf(
"invalid value for '{{name}}', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
);
}
@ -192,53 +206,53 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
{{#hasValidation}}
{{#maxLength}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(strlen($this->container['{{name}}']) > {{maxLength}})) {
$invalid_properties[] = "invalid value for '{{name}}', the character length must be smaller than or equal to {{{maxLength}}}.";
$invalidProperties[] = "invalid value for '{{name}}', the character length must be smaller than or equal to {{{maxLength}}}.";
}
{{/maxLength}}
{{#minLength}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(strlen($this->container['{{name}}']) < {{minLength}})) {
$invalid_properties[] = "invalid value for '{{name}}', the character length must be bigger than or equal to {{{minLength}}}.";
$invalidProperties[] = "invalid value for '{{name}}', the character length must be bigger than or equal to {{{minLength}}}.";
}
{{/minLength}}
{{#maximum}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) {
$invalid_properties[] = "invalid value for '{{name}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.";
$invalidProperties[] = "invalid value for '{{name}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.";
}
{{/maximum}}
{{#minimum}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) {
$invalid_properties[] = "invalid value for '{{name}}', must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.";
$invalidProperties[] = "invalid value for '{{name}}', must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.";
}
{{/minimum}}
{{#pattern}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}!preg_match("{{{pattern}}}", $this->container['{{name}}'])) {
$invalid_properties[] = "invalid value for '{{name}}', must be conform to the pattern {{{pattern}}}.";
$invalidProperties[] = "invalid value for '{{name}}', must be conform to the pattern {{{pattern}}}.";
}
{{/pattern}}
{{#maxItems}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(count($this->container['{{name}}']) > {{maxItems}})) {
$invalid_properties[] = "invalid value for '{{name}}', number of items must be less than or equal to {{{maxItems}}}.";
$invalidProperties[] = "invalid value for '{{name}}', number of items must be less than or equal to {{{maxItems}}}.";
}
{{/maxItems}}
{{#minItems}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(count($this->container['{{name}}']) < {{minItems}})) {
$invalid_properties[] = "invalid value for '{{name}}', number of items must be greater than or equal to {{{minItems}}}.";
$invalidProperties[] = "invalid value for '{{name}}', number of items must be greater than or equal to {{{minItems}}}.";
}
{{/minItems}}
{{/hasValidation}}
{{/vars}}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -259,8 +273,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
{{/required}}
{{#isEnum}}
{{^isContainer}}
$allowed_values = $this->{{getter}}AllowableValues();
if (!in_array($this->container['{{name}}'], $allowed_values)) {
$allowedValues = $this->{{getter}}AllowableValues();
if (!in_array($this->container['{{name}}'], $allowedValues)) {
return false;
}
{{/isContainer}}
@ -310,6 +324,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Gets {{name}}
*
* @return {{datatype}}
*/
public function {{getter}}()
@ -319,29 +334,31 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Sets {{name}}
*
* @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}
*
* @return $this
*/
public function {{setter}}(${{name}})
{
{{#isEnum}}
$allowed_values = $this->{{getter}}AllowableValues();
$allowedValues = $this->{{getter}}AllowableValues();
{{^isContainer}}
if ({{^required}}!is_null(${{name}}) && {{/required}}!in_array(${{{name}}}, $allowed_values)) {
if ({{^required}}!is_null(${{name}}) && {{/required}}!in_array(${{{name}}}, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for '{{name}}', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
{{/isContainer}}
{{#isContainer}}
if ({{^required}}!is_null(${{name}}) && {{/required}}array_diff(${{{name}}}, $allowed_values)) {
if ({{^required}}!is_null(${{name}}) && {{/required}}array_diff(${{{name}}}, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for '{{name}}', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -389,7 +406,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
{{/vars}}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -399,7 +418,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -409,8 +430,10 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -424,7 +447,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -434,14 +459,18 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\{{invokerPackage}}\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\{{invokerPackage}}\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -10,5 +10,4 @@
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ModelReturn Class Doc Comment
@ -46,12 +46,14 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Return';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -87,7 +90,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -96,6 +101,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -104,6 +110,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -111,7 +118,8 @@ class ModelReturn implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -156,13 +164,16 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -176,13 +187,13 @@ class ModelReturn implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -196,6 +207,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Gets return
*
* @return int
*/
public function getReturn()
@ -205,7 +217,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Sets return
*
* @param int $return property description *_/ ' \" =end -- \\r\\n \\n \\r
*
* @return $this
*/
public function setReturn($return)
@ -216,7 +230,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -226,7 +242,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -236,8 +254,10 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -251,7 +271,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -261,15 +283,19 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -259,7 +259,7 @@ $api_instance = new Swagger\Client\Api\FakeApi(new \Http\Adapter\Guzzle6\Client(
$number = 3.4; // float | None
$double = 1.2; // double | None
$pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None
$byte = "byte_example"; // string | None
$byte = "B"; // string | None
$integer = 56; // int | None
$int32 = 56; // int | None
$int64 = 789; // int | None

View File

@ -87,7 +87,7 @@ This endpoint does not need any parameter.
### Return type
**map[string,int]**
[**map[string,int]**](../Model/map.md)
### Authorization

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -1380,8 +1379,8 @@ class FakeApi
if ($pattern_without_delimiter === null) {
throw new \InvalidArgumentException('Missing the required parameter $pattern_without_delimiter when calling testEndpointParameters');
}
if (!preg_match("/^[A-Z].*/", $pattern_without_delimiter)) {
throw new \InvalidArgumentException("invalid value for \"pattern_without_delimiter\" when calling FakeApi.testEndpointParameters, must conform to the pattern /^[A-Z].*/.");
if (!preg_match("/^[A-Z].*_/", $pattern_without_delimiter)) {
throw new \InvalidArgumentException("invalid value for \"pattern_without_delimiter\" when calling FakeApi.testEndpointParameters, must conform to the pattern /^[A-Z].*_/.");
}
// verify the required parameter 'byte' is set

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* AdditionalPropertiesClass Class Doc Comment
@ -45,12 +45,14 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'AdditionalPropertiesClass';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -160,13 +168,16 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -181,13 +192,13 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -201,6 +212,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Gets map_property
*
* @return map[string,string]
*/
public function getMapProperty()
@ -210,7 +222,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Sets map_property
*
* @param map[string,string] $map_property
*
* @return $this
*/
public function setMapProperty($map_property)
@ -222,6 +236,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Gets map_of_map_property
*
* @return map[string,map[string,string]]
*/
public function getMapOfMapProperty()
@ -231,7 +246,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Sets map_of_map_property
*
* @param map[string,map[string,string]] $map_of_map_property
*
* @return $this
*/
public function setMapOfMapProperty($map_of_map_property)
@ -242,7 +259,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -252,7 +271,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -262,8 +283,10 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -287,15 +312,19 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Animal Class Doc Comment
@ -45,12 +45,14 @@ class Animal implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Animal';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class Animal implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class Animal implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -160,13 +168,16 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -185,16 +196,16 @@ class Animal implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
if ($this->container['class_name'] === null) {
$invalid_properties[] = "'class_name' can't be null";
$invalidProperties[] = "'class_name' can't be null";
}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -211,6 +222,7 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Gets class_name
*
* @return string
*/
public function getClassName()
@ -220,7 +232,9 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Sets class_name
*
* @param string $class_name
*
* @return $this
*/
public function setClassName($class_name)
@ -232,6 +246,7 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Gets color
*
* @return string
*/
public function getColor()
@ -241,7 +256,9 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Sets color
*
* @param string $color
*
* @return $this
*/
public function setColor($color)
@ -252,7 +269,9 @@ class Animal implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -262,7 +281,9 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -272,8 +293,10 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -287,7 +310,9 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -297,15 +322,19 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* AnimalFarm Class Doc Comment
@ -45,12 +45,14 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'AnimalFarm';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class AnimalFarm implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class AnimalFarm implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -174,13 +185,13 @@ class AnimalFarm implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = parent::listInvalidProperties();
$invalidProperties = parent::listInvalidProperties();
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -196,7 +207,9 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -206,7 +219,9 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -216,8 +231,10 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -231,7 +248,9 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -241,15 +260,19 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ApiResponse Class Doc Comment
@ -45,12 +45,14 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ApiResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -90,7 +93,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -101,6 +106,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -111,6 +117,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -120,7 +127,8 @@ class ApiResponse implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -165,13 +173,16 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -187,13 +198,13 @@ class ApiResponse implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -207,6 +218,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Gets code
*
* @return int
*/
public function getCode()
@ -216,7 +228,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Sets code
*
* @param int $code
*
* @return $this
*/
public function setCode($code)
@ -228,6 +242,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Gets type
*
* @return string
*/
public function getType()
@ -237,7 +252,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Sets type
*
* @param string $type
*
* @return $this
*/
public function setType($type)
@ -249,6 +266,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Gets message
*
* @return string
*/
public function getMessage()
@ -258,7 +276,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Sets message
*
* @param string $message
*
* @return $this
*/
public function setMessage($message)
@ -269,7 +289,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -279,7 +301,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -289,8 +313,10 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -314,15 +342,19 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ArrayOfArrayOfNumberOnly Class Doc Comment
@ -45,12 +45,14 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ArrayOfArrayOfNumberOnly';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -175,13 +186,13 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -195,6 +206,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Gets array_array_number
*
* @return float[][]
*/
public function getArrayArrayNumber()
@ -204,7 +216,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Sets array_array_number
*
* @param float[][] $array_array_number
*
* @return $this
*/
public function setArrayArrayNumber($array_array_number)
@ -215,7 +229,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -225,7 +241,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -235,8 +253,10 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -260,15 +282,19 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ArrayOfNumberOnly Class Doc Comment
@ -45,12 +45,14 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ArrayOfNumberOnly';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -175,13 +186,13 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -195,6 +206,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Gets array_number
*
* @return float[]
*/
public function getArrayNumber()
@ -204,7 +216,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Sets array_number
*
* @param float[] $array_number
*
* @return $this
*/
public function setArrayNumber($array_number)
@ -215,7 +229,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -225,7 +241,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -235,8 +253,10 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -260,15 +282,19 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ArrayTest Class Doc Comment
@ -45,12 +45,14 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ArrayTest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -90,7 +93,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -101,6 +106,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -111,6 +117,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -120,7 +127,8 @@ class ArrayTest implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -165,13 +173,16 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -187,13 +198,13 @@ class ArrayTest implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -207,6 +218,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Gets array_of_string
*
* @return string[]
*/
public function getArrayOfString()
@ -216,7 +228,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Sets array_of_string
*
* @param string[] $array_of_string
*
* @return $this
*/
public function setArrayOfString($array_of_string)
@ -228,6 +242,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Gets array_array_of_integer
*
* @return int[][]
*/
public function getArrayArrayOfInteger()
@ -237,7 +252,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Sets array_array_of_integer
*
* @param int[][] $array_array_of_integer
*
* @return $this
*/
public function setArrayArrayOfInteger($array_array_of_integer)
@ -249,6 +266,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Gets array_array_of_model
*
* @return \Swagger\Client\Model\ReadOnlyFirst[][]
*/
public function getArrayArrayOfModel()
@ -258,7 +276,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Sets array_array_of_model
*
* @param \Swagger\Client\Model\ReadOnlyFirst[][] $array_array_of_model
*
* @return $this
*/
public function setArrayArrayOfModel($array_array_of_model)
@ -269,7 +289,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -279,7 +301,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -289,8 +313,10 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -314,15 +342,19 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Capitalization Class Doc Comment
@ -45,12 +45,14 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Capitalization';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -64,6 +66,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -96,7 +99,9 @@ class Capitalization implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -110,6 +115,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -123,6 +129,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -135,7 +142,8 @@ class Capitalization implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -180,13 +188,16 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -205,13 +216,13 @@ class Capitalization implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -225,6 +236,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets small_camel
*
* @return string
*/
public function getSmallCamel()
@ -234,7 +246,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets small_camel
*
* @param string $small_camel
*
* @return $this
*/
public function setSmallCamel($small_camel)
@ -246,6 +260,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets capital_camel
*
* @return string
*/
public function getCapitalCamel()
@ -255,7 +270,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets capital_camel
*
* @param string $capital_camel
*
* @return $this
*/
public function setCapitalCamel($capital_camel)
@ -267,6 +284,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets small_snake
*
* @return string
*/
public function getSmallSnake()
@ -276,7 +294,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets small_snake
*
* @param string $small_snake
*
* @return $this
*/
public function setSmallSnake($small_snake)
@ -288,6 +308,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets capital_snake
*
* @return string
*/
public function getCapitalSnake()
@ -297,7 +318,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets capital_snake
*
* @param string $capital_snake
*
* @return $this
*/
public function setCapitalSnake($capital_snake)
@ -309,6 +332,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets sca_eth_flow_points
*
* @return string
*/
public function getScaEthFlowPoints()
@ -318,7 +342,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets sca_eth_flow_points
*
* @param string $sca_eth_flow_points
*
* @return $this
*/
public function setScaEthFlowPoints($sca_eth_flow_points)
@ -330,6 +356,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets att_name
*
* @return string
*/
public function getAttName()
@ -339,7 +366,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets att_name
*
* @param string $att_name Name of the pet
*
* @return $this
*/
public function setAttName($att_name)
@ -350,7 +379,9 @@ class Capitalization implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -360,7 +391,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -370,8 +403,10 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -385,7 +420,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -395,15 +432,19 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -28,8 +27,7 @@
*/
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Cat Class Doc Comment
@ -39,18 +37,20 @@ use \ArrayAccess;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Cat extends Animal implements ModelInterface, ArrayAccess
class Cat extends Animal
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Cat';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +59,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +87,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +98,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +107,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +115,8 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -153,15 +159,12 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -177,13 +180,13 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = parent::listInvalidProperties();
$invalidProperties = parent::listInvalidProperties();
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -200,6 +203,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Gets declawed
*
* @return bool
*/
public function getDeclawed()
@ -209,7 +213,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Sets declawed
*
* @param bool $declawed
*
* @return $this
*/
public function setDeclawed($declawed)
@ -220,7 +226,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -230,7 +238,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -240,8 +250,10 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -255,7 +267,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -265,15 +279,19 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Category Class Doc Comment
@ -45,12 +45,14 @@ class Category implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Category';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class Category implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class Category implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -160,13 +168,16 @@ class Category implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -181,13 +192,13 @@ class Category implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -201,6 +212,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Gets id
*
* @return int
*/
public function getId()
@ -210,7 +222,9 @@ class Category implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
*
* @return $this
*/
public function setId($id)
@ -222,6 +236,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Gets name
*
* @return string
*/
public function getName()
@ -231,7 +246,9 @@ class Category implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param string $name
*
* @return $this
*/
public function setName($name)
@ -242,7 +259,9 @@ class Category implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -252,7 +271,9 @@ class Category implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -262,8 +283,10 @@ class Category implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class Category implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -287,15 +312,19 @@ class Category implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ClassModel Class Doc Comment
@ -46,12 +46,14 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ClassModel';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -87,7 +90,9 @@ class ClassModel implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -96,6 +101,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -104,6 +110,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -111,7 +118,8 @@ class ClassModel implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -156,13 +164,16 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -176,13 +187,13 @@ class ClassModel implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -196,6 +207,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Gets _class
*
* @return string
*/
public function getClass()
@ -205,7 +217,9 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Sets _class
*
* @param string $_class
*
* @return $this
*/
public function setClass($_class)
@ -216,7 +230,9 @@ class ClassModel implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -226,7 +242,9 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -236,8 +254,10 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -251,7 +271,9 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -261,15 +283,19 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Client Class Doc Comment
@ -45,12 +45,14 @@ class Client implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Client';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class Client implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class Client implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class Client implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class Client implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class Client implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class Client implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -175,13 +186,13 @@ class Client implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -195,6 +206,7 @@ class Client implements ModelInterface, ArrayAccess
/**
* Gets client
*
* @return string
*/
public function getClient()
@ -204,7 +216,9 @@ class Client implements ModelInterface, ArrayAccess
/**
* Sets client
*
* @param string $client
*
* @return $this
*/
public function setClient($client)
@ -215,7 +229,9 @@ class Client implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -225,7 +241,9 @@ class Client implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -235,8 +253,10 @@ class Client implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class Client implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -260,15 +282,19 @@ class Client implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -28,8 +27,7 @@
*/
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Dog Class Doc Comment
@ -39,18 +37,20 @@ use \ArrayAccess;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Dog extends Animal implements ModelInterface, ArrayAccess
class Dog extends Animal
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Dog';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +59,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +87,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +98,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +107,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +115,8 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -153,15 +159,12 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -177,13 +180,13 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = parent::listInvalidProperties();
$invalidProperties = parent::listInvalidProperties();
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -200,6 +203,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Gets breed
*
* @return string
*/
public function getBreed()
@ -209,7 +213,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Sets breed
*
* @param string $breed
*
* @return $this
*/
public function setBreed($breed)
@ -220,7 +226,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -230,7 +238,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -240,8 +250,10 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -255,7 +267,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -265,15 +279,19 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* EnumArrays Class Doc Comment
@ -45,12 +45,14 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'EnumArrays';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class EnumArrays implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class EnumArrays implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -163,6 +171,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getJustSymbolAllowableValues()
@ -175,6 +184,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getArrayEnumAllowableValues()
@ -188,13 +198,16 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -209,21 +222,21 @@ class EnumArrays implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
$allowed_values = $this->getJustSymbolAllowableValues();
if (!in_array($this->container['just_symbol'], $allowed_values)) {
$invalid_properties[] = sprintf(
$allowedValues = $this->getJustSymbolAllowableValues();
if (!in_array($this->container['just_symbol'], $allowedValues)) {
$invalidProperties[] = sprintf(
"invalid value for 'just_symbol', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
);
}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -231,8 +244,8 @@ class EnumArrays implements ModelInterface, ArrayAccess
public function valid()
{
$allowed_values = $this->getJustSymbolAllowableValues();
if (!in_array($this->container['just_symbol'], $allowed_values)) {
$allowedValues = $this->getJustSymbolAllowableValues();
if (!in_array($this->container['just_symbol'], $allowedValues)) {
return false;
}
return true;
@ -241,6 +254,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Gets just_symbol
*
* @return string
*/
public function getJustSymbol()
@ -250,17 +264,19 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Sets just_symbol
*
* @param string $just_symbol
*
* @return $this
*/
public function setJustSymbol($just_symbol)
{
$allowed_values = $this->getJustSymbolAllowableValues();
if (!is_null($just_symbol) && !in_array($just_symbol, $allowed_values)) {
$allowedValues = $this->getJustSymbolAllowableValues();
if (!is_null($just_symbol) && !in_array($just_symbol, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'just_symbol', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -271,6 +287,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Gets array_enum
*
* @return string[]
*/
public function getArrayEnum()
@ -280,17 +297,19 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Sets array_enum
*
* @param string[] $array_enum
*
* @return $this
*/
public function setArrayEnum($array_enum)
{
$allowed_values = $this->getArrayEnumAllowableValues();
if (!is_null($array_enum) && array_diff($array_enum, $allowed_values)) {
$allowedValues = $this->getArrayEnumAllowableValues();
if (!is_null($array_enum) && array_diff($array_enum, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'array_enum', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -300,7 +319,9 @@ class EnumArrays implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -310,7 +331,9 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -320,8 +343,10 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -335,7 +360,9 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -345,15 +372,19 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -28,6 +27,7 @@
*/
namespace Swagger\Client\Model;
use \Swagger\Client\ObjectSerializer;
/**
* EnumClass Class Doc Comment

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* EnumTest Class Doc Comment
@ -45,12 +45,14 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Enum_Test';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -62,6 +64,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -92,7 +95,9 @@ class EnumTest implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -104,6 +109,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -115,6 +121,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -125,7 +132,8 @@ class EnumTest implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -176,6 +184,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEnumStringAllowableValues()
@ -189,6 +198,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEnumIntegerAllowableValues()
@ -201,6 +211,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEnumNumberAllowableValues()
@ -214,13 +225,16 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -237,37 +251,37 @@ class EnumTest implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
$allowed_values = $this->getEnumStringAllowableValues();
if (!in_array($this->container['enum_string'], $allowed_values)) {
$invalid_properties[] = sprintf(
$allowedValues = $this->getEnumStringAllowableValues();
if (!in_array($this->container['enum_string'], $allowedValues)) {
$invalidProperties[] = sprintf(
"invalid value for 'enum_string', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
);
}
$allowed_values = $this->getEnumIntegerAllowableValues();
if (!in_array($this->container['enum_integer'], $allowed_values)) {
$invalid_properties[] = sprintf(
$allowedValues = $this->getEnumIntegerAllowableValues();
if (!in_array($this->container['enum_integer'], $allowedValues)) {
$invalidProperties[] = sprintf(
"invalid value for 'enum_integer', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
);
}
$allowed_values = $this->getEnumNumberAllowableValues();
if (!in_array($this->container['enum_number'], $allowed_values)) {
$invalid_properties[] = sprintf(
$allowedValues = $this->getEnumNumberAllowableValues();
if (!in_array($this->container['enum_number'], $allowedValues)) {
$invalidProperties[] = sprintf(
"invalid value for 'enum_number', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
);
}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -275,16 +289,16 @@ class EnumTest implements ModelInterface, ArrayAccess
public function valid()
{
$allowed_values = $this->getEnumStringAllowableValues();
if (!in_array($this->container['enum_string'], $allowed_values)) {
$allowedValues = $this->getEnumStringAllowableValues();
if (!in_array($this->container['enum_string'], $allowedValues)) {
return false;
}
$allowed_values = $this->getEnumIntegerAllowableValues();
if (!in_array($this->container['enum_integer'], $allowed_values)) {
$allowedValues = $this->getEnumIntegerAllowableValues();
if (!in_array($this->container['enum_integer'], $allowedValues)) {
return false;
}
$allowed_values = $this->getEnumNumberAllowableValues();
if (!in_array($this->container['enum_number'], $allowed_values)) {
$allowedValues = $this->getEnumNumberAllowableValues();
if (!in_array($this->container['enum_number'], $allowedValues)) {
return false;
}
return true;
@ -293,6 +307,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets enum_string
*
* @return string
*/
public function getEnumString()
@ -302,17 +317,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets enum_string
*
* @param string $enum_string
*
* @return $this
*/
public function setEnumString($enum_string)
{
$allowed_values = $this->getEnumStringAllowableValues();
if (!is_null($enum_string) && !in_array($enum_string, $allowed_values)) {
$allowedValues = $this->getEnumStringAllowableValues();
if (!is_null($enum_string) && !in_array($enum_string, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'enum_string', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -323,6 +340,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets enum_integer
*
* @return int
*/
public function getEnumInteger()
@ -332,17 +350,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets enum_integer
*
* @param int $enum_integer
*
* @return $this
*/
public function setEnumInteger($enum_integer)
{
$allowed_values = $this->getEnumIntegerAllowableValues();
if (!is_null($enum_integer) && !in_array($enum_integer, $allowed_values)) {
$allowedValues = $this->getEnumIntegerAllowableValues();
if (!is_null($enum_integer) && !in_array($enum_integer, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'enum_integer', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -353,6 +373,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets enum_number
*
* @return double
*/
public function getEnumNumber()
@ -362,17 +383,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets enum_number
*
* @param double $enum_number
*
* @return $this
*/
public function setEnumNumber($enum_number)
{
$allowed_values = $this->getEnumNumberAllowableValues();
if (!is_null($enum_number) && !in_array($enum_number, $allowed_values)) {
$allowedValues = $this->getEnumNumberAllowableValues();
if (!is_null($enum_number) && !in_array($enum_number, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'enum_number', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -383,6 +406,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets outer_enum
*
* @return \Swagger\Client\Model\OuterEnum
*/
public function getOuterEnum()
@ -392,7 +416,9 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets outer_enum
*
* @param \Swagger\Client\Model\OuterEnum $outer_enum
*
* @return $this
*/
public function setOuterEnum($outer_enum)
@ -403,7 +429,9 @@ class EnumTest implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -413,7 +441,9 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -423,8 +453,10 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -438,7 +470,9 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -448,15 +482,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* FormatTest Class Doc Comment
@ -45,12 +45,14 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'format_test';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -71,6 +73,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -110,7 +113,9 @@ class FormatTest implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -131,6 +136,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -151,6 +157,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -170,7 +177,8 @@ class FormatTest implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -215,13 +223,16 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -247,81 +258,77 @@ class FormatTest implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
if (!is_null($this->container['integer']) && ($this->container['integer'] > 100)) {
$invalid_properties[] = "invalid value for 'integer', must be smaller than or equal to 100.";
$invalidProperties[] = "invalid value for 'integer', must be smaller than or equal to 100.";
}
if (!is_null($this->container['integer']) && ($this->container['integer'] < 10)) {
$invalid_properties[] = "invalid value for 'integer', must be bigger than or equal to 10.";
$invalidProperties[] = "invalid value for 'integer', must be bigger than or equal to 10.";
}
if (!is_null($this->container['int32']) && ($this->container['int32'] > 200)) {
$invalid_properties[] = "invalid value for 'int32', must be smaller than or equal to 200.";
$invalidProperties[] = "invalid value for 'int32', must be smaller than or equal to 200.";
}
if (!is_null($this->container['int32']) && ($this->container['int32'] < 20)) {
$invalid_properties[] = "invalid value for 'int32', must be bigger than or equal to 20.";
$invalidProperties[] = "invalid value for 'int32', must be bigger than or equal to 20.";
}
if ($this->container['number'] === null) {
$invalid_properties[] = "'number' can't be null";
$invalidProperties[] = "'number' can't be null";
}
if (($this->container['number'] > 543.2)) {
$invalid_properties[] = "invalid value for 'number', must be smaller than or equal to 543.2.";
$invalidProperties[] = "invalid value for 'number', must be smaller than or equal to 543.2.";
}
if (($this->container['number'] < 32.1)) {
$invalid_properties[] = "invalid value for 'number', must be bigger than or equal to 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)) {
$invalid_properties[] = "invalid value for 'float', must be smaller than or equal to 987.6.";
$invalidProperties[] = "invalid value for 'float', must be smaller than or equal to 987.6.";
}
if (!is_null($this->container['float']) && ($this->container['float'] < 54.3)) {
$invalid_properties[] = "invalid value for 'float', must be bigger than or equal to 54.3.";
$invalidProperties[] = "invalid value for 'float', must be bigger than or equal to 54.3.";
}
if (!is_null($this->container['double']) && ($this->container['double'] > 123.4)) {
$invalid_properties[] = "invalid value for 'double', must be smaller than or equal to 123.4.";
$invalidProperties[] = "invalid value for 'double', must be smaller than or equal to 123.4.";
}
if (!is_null($this->container['double']) && ($this->container['double'] < 67.8)) {
$invalid_properties[] = "invalid value for 'double', must be bigger than or equal to 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'])) {
$invalid_properties[] = "invalid value for 'string', must be conform to the pattern /[a-z]/i.";
$invalidProperties[] = "invalid value for 'string', must be conform to the pattern /[a-z]/i.";
}
if ($this->container['byte'] === null) {
$invalid_properties[] = "'byte' can't be null";
$invalidProperties[] = "'byte' can't be null";
}
if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['byte'])) {
$invalid_properties[] = "invalid value for 'byte', must be conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.";
}
if ($this->container['date'] === null) {
$invalid_properties[] = "'date' can't be null";
$invalidProperties[] = "'date' can't be null";
}
if ($this->container['password'] === null) {
$invalid_properties[] = "'password' can't be null";
$invalidProperties[] = "'password' can't be null";
}
if ((strlen($this->container['password']) > 64)) {
$invalid_properties[] = "invalid value for 'password', the character length must be smaller than or equal to 64.";
$invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 64.";
}
if ((strlen($this->container['password']) < 10)) {
$invalid_properties[] = "invalid value for 'password', the character length must be bigger than or equal to 10.";
$invalidProperties[] = "invalid value for 'password', the character length must be bigger than or equal to 10.";
}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -368,9 +375,6 @@ class FormatTest implements ModelInterface, ArrayAccess
if ($this->container['byte'] === null) {
return false;
}
if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['byte'])) {
return false;
}
if ($this->container['date'] === null) {
return false;
}
@ -389,6 +393,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets integer
*
* @return int
*/
public function getInteger()
@ -398,7 +403,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets integer
*
* @param int $integer
*
* @return $this
*/
public function setInteger($integer)
@ -418,6 +425,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets int32
*
* @return int
*/
public function getInt32()
@ -427,7 +435,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets int32
*
* @param int $int32
*
* @return $this
*/
public function setInt32($int32)
@ -447,6 +457,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets int64
*
* @return int
*/
public function getInt64()
@ -456,7 +467,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets int64
*
* @param int $int64
*
* @return $this
*/
public function setInt64($int64)
@ -468,6 +481,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets number
*
* @return float
*/
public function getNumber()
@ -477,7 +491,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets number
*
* @param float $number
*
* @return $this
*/
public function setNumber($number)
@ -497,6 +513,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets float
*
* @return float
*/
public function getFloat()
@ -506,7 +523,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets float
*
* @param float $float
*
* @return $this
*/
public function setFloat($float)
@ -526,6 +545,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets double
*
* @return double
*/
public function getDouble()
@ -535,7 +555,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets double
*
* @param double $double
*
* @return $this
*/
public function setDouble($double)
@ -555,6 +577,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets string
*
* @return string
*/
public function getString()
@ -564,7 +587,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets string
*
* @param string $string
*
* @return $this
*/
public function setString($string)
@ -581,6 +606,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets byte
*
* @return string
*/
public function getByte()
@ -590,16 +616,13 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets byte
*
* @param string $byte
*
* @return $this
*/
public function setByte($byte)
{
if ((!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $byte))) {
throw new \InvalidArgumentException("invalid value for $byte when calling FormatTest., must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.");
}
$this->container['byte'] = $byte;
return $this;
@ -607,6 +630,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets binary
*
* @return string
*/
public function getBinary()
@ -616,7 +640,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets binary
*
* @param string $binary
*
* @return $this
*/
public function setBinary($binary)
@ -628,6 +654,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets date
*
* @return \DateTime
*/
public function getDate()
@ -637,7 +664,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets date
*
* @param \DateTime $date
*
* @return $this
*/
public function setDate($date)
@ -649,6 +678,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets date_time
*
* @return \DateTime
*/
public function getDateTime()
@ -658,7 +688,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets date_time
*
* @param \DateTime $date_time
*
* @return $this
*/
public function setDateTime($date_time)
@ -670,6 +702,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets uuid
*
* @return string
*/
public function getUuid()
@ -679,7 +712,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets uuid
*
* @param string $uuid
*
* @return $this
*/
public function setUuid($uuid)
@ -691,6 +726,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets password
*
* @return string
*/
public function getPassword()
@ -700,7 +736,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets password
*
* @param string $password
*
* @return $this
*/
public function setPassword($password)
@ -718,7 +756,9 @@ class FormatTest implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -728,7 +768,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -738,8 +780,10 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -753,7 +797,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -763,15 +809,19 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* HasOnlyReadOnly Class Doc Comment
@ -45,12 +45,14 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'hasOnlyReadOnly';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -160,13 +168,16 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -181,13 +192,13 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -201,6 +212,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Gets bar
*
* @return string
*/
public function getBar()
@ -210,7 +222,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Sets bar
*
* @param string $bar
*
* @return $this
*/
public function setBar($bar)
@ -222,6 +236,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Gets foo
*
* @return string
*/
public function getFoo()
@ -231,7 +246,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Sets foo
*
* @param string $foo
*
* @return $this
*/
public function setFoo($foo)
@ -242,7 +259,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -252,7 +271,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -262,8 +283,10 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -287,15 +312,19 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* MapTest Class Doc Comment
@ -45,12 +45,14 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'MapTest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class MapTest implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class MapTest implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -161,6 +169,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getMapOfEnumStringAllowableValues()
@ -174,13 +183,16 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -195,13 +207,13 @@ class MapTest implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -215,6 +227,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Gets map_map_of_string
*
* @return map[string,map[string,string]]
*/
public function getMapMapOfString()
@ -224,7 +237,9 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Sets map_map_of_string
*
* @param map[string,map[string,string]] $map_map_of_string
*
* @return $this
*/
public function setMapMapOfString($map_map_of_string)
@ -236,6 +251,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Gets map_of_enum_string
*
* @return map[string,string]
*/
public function getMapOfEnumString()
@ -245,17 +261,19 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Sets map_of_enum_string
*
* @param map[string,string] $map_of_enum_string
*
* @return $this
*/
public function setMapOfEnumString($map_of_enum_string)
{
$allowed_values = $this->getMapOfEnumStringAllowableValues();
if (!is_null($map_of_enum_string) && array_diff($map_of_enum_string, $allowed_values)) {
$allowedValues = $this->getMapOfEnumStringAllowableValues();
if (!is_null($map_of_enum_string) && array_diff($map_of_enum_string, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'map_of_enum_string', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -265,7 +283,9 @@ class MapTest implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -275,7 +295,9 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -285,8 +307,10 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -300,7 +324,9 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -310,15 +336,19 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* MixedPropertiesAndAdditionalPropertiesClass Class Doc Comment
@ -45,12 +45,14 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'MixedPropertiesAndAdditionalPropertiesClass';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -90,7 +93,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -101,6 +106,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -111,6 +117,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -120,7 +127,8 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -165,13 +173,16 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -187,13 +198,13 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -207,6 +218,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Gets uuid
*
* @return string
*/
public function getUuid()
@ -216,7 +228,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Sets uuid
*
* @param string $uuid
*
* @return $this
*/
public function setUuid($uuid)
@ -228,6 +242,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Gets date_time
*
* @return \DateTime
*/
public function getDateTime()
@ -237,7 +252,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Sets date_time
*
* @param \DateTime $date_time
*
* @return $this
*/
public function setDateTime($date_time)
@ -249,6 +266,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Gets map
*
* @return map[string,\Swagger\Client\Model\Animal]
*/
public function getMap()
@ -258,7 +276,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Sets map
*
* @param map[string,\Swagger\Client\Model\Animal] $map
*
* @return $this
*/
public function setMap($map)
@ -269,7 +289,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -279,7 +301,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -289,8 +313,10 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -314,15 +342,19 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Model200Response Class Doc Comment
@ -46,12 +46,14 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = '200_response';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -89,7 +92,9 @@ class Model200Response implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -99,6 +104,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -108,6 +114,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -116,7 +123,8 @@ class Model200Response implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -161,13 +169,16 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -182,13 +193,13 @@ class Model200Response implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -202,6 +213,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Gets name
*
* @return int
*/
public function getName()
@ -211,7 +223,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param int $name
*
* @return $this
*/
public function setName($name)
@ -223,6 +237,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Gets class
*
* @return string
*/
public function getClass()
@ -232,7 +247,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Sets class
*
* @param string $class
*
* @return $this
*/
public function setClass($class)
@ -243,7 +260,9 @@ class Model200Response implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -253,7 +272,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -263,8 +284,10 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -278,7 +301,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -288,15 +313,19 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ModelList Class Doc Comment
@ -45,12 +45,14 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'List';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class ModelList implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class ModelList implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -175,13 +186,13 @@ class ModelList implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -195,6 +206,7 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Gets _123_list
*
* @return string
*/
public function get123List()
@ -204,7 +216,9 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Sets _123_list
*
* @param string $_123_list
*
* @return $this
*/
public function set123List($_123_list)
@ -215,7 +229,9 @@ class ModelList implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -225,7 +241,9 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -235,8 +253,10 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -260,15 +282,19 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ModelReturn Class Doc Comment
@ -46,12 +46,14 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Return';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -87,7 +90,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -96,6 +101,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -104,6 +110,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -111,7 +118,8 @@ class ModelReturn implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -156,13 +164,16 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -176,13 +187,13 @@ class ModelReturn implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -196,6 +207,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Gets return
*
* @return int
*/
public function getReturn()
@ -205,7 +217,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Sets return
*
* @param int $return
*
* @return $this
*/
public function setReturn($return)
@ -216,7 +230,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -226,7 +242,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -236,8 +254,10 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -251,7 +271,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -261,15 +283,19 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Name Class Doc Comment
@ -46,12 +46,14 @@ class Name implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Name';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -63,6 +65,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -93,7 +96,9 @@ class Name implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -105,6 +110,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -116,6 +122,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -126,7 +133,8 @@ class Name implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -171,13 +179,16 @@ class Name implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -194,16 +205,16 @@ class Name implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
if ($this->container['name'] === null) {
$invalid_properties[] = "'name' can't be null";
$invalidProperties[] = "'name' can't be null";
}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -220,6 +231,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Gets name
*
* @return int
*/
public function getName()
@ -229,7 +241,9 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param int $name
*
* @return $this
*/
public function setName($name)
@ -241,6 +255,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Gets snake_case
*
* @return int
*/
public function getSnakeCase()
@ -250,7 +265,9 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets snake_case
*
* @param int $snake_case
*
* @return $this
*/
public function setSnakeCase($snake_case)
@ -262,6 +279,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Gets property
*
* @return string
*/
public function getProperty()
@ -271,7 +289,9 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets property
*
* @param string $property
*
* @return $this
*/
public function setProperty($property)
@ -283,6 +303,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Gets _123_number
*
* @return int
*/
public function get123Number()
@ -292,7 +313,9 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets _123_number
*
* @param int $_123_number
*
* @return $this
*/
public function set123Number($_123_number)
@ -303,7 +326,9 @@ class Name implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -313,7 +338,9 @@ class Name implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -323,8 +350,10 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -338,7 +367,9 @@ class Name implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -348,15 +379,19 @@ class Name implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* NumberOnly Class Doc Comment
@ -45,12 +45,14 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'NumberOnly';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class NumberOnly implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -175,13 +186,13 @@ class NumberOnly implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -195,6 +206,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Gets just_number
*
* @return float
*/
public function getJustNumber()
@ -204,7 +216,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Sets just_number
*
* @param float $just_number
*
* @return $this
*/
public function setJustNumber($just_number)
@ -215,7 +229,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -225,7 +241,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -235,8 +253,10 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -260,15 +282,19 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Order Class Doc Comment
@ -45,12 +45,14 @@ class Order implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Order';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -64,6 +66,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -96,7 +99,9 @@ class Order implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -110,6 +115,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -123,6 +129,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -135,7 +142,8 @@ class Order implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -182,6 +190,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getStatusAllowableValues()
@ -196,13 +205,16 @@ class Order implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -221,21 +233,21 @@ class Order implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
$allowed_values = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) {
$invalid_properties[] = sprintf(
$allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowedValues)) {
$invalidProperties[] = sprintf(
"invalid value for 'status', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
);
}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -243,8 +255,8 @@ class Order implements ModelInterface, ArrayAccess
public function valid()
{
$allowed_values = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) {
$allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowedValues)) {
return false;
}
return true;
@ -253,6 +265,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets id
*
* @return int
*/
public function getId()
@ -262,7 +275,9 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
*
* @return $this
*/
public function setId($id)
@ -274,6 +289,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets pet_id
*
* @return int
*/
public function getPetId()
@ -283,7 +299,9 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets pet_id
*
* @param int $pet_id
*
* @return $this
*/
public function setPetId($pet_id)
@ -295,6 +313,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets quantity
*
* @return int
*/
public function getQuantity()
@ -304,7 +323,9 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets quantity
*
* @param int $quantity
*
* @return $this
*/
public function setQuantity($quantity)
@ -316,6 +337,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets ship_date
*
* @return \DateTime
*/
public function getShipDate()
@ -325,7 +347,9 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets ship_date
*
* @param \DateTime $ship_date
*
* @return $this
*/
public function setShipDate($ship_date)
@ -337,6 +361,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets status
*
* @return string
*/
public function getStatus()
@ -346,17 +371,19 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets status
*
* @param string $status Order Status
*
* @return $this
*/
public function setStatus($status)
{
$allowed_values = $this->getStatusAllowableValues();
if (!is_null($status) && !in_array($status, $allowed_values)) {
$allowedValues = $this->getStatusAllowableValues();
if (!is_null($status) && !in_array($status, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'status', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -367,6 +394,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets complete
*
* @return bool
*/
public function getComplete()
@ -376,7 +404,9 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets complete
*
* @param bool $complete
*
* @return $this
*/
public function setComplete($complete)
@ -387,7 +417,9 @@ class Order implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -397,7 +429,9 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -407,8 +441,10 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -422,7 +458,9 @@ class Order implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -432,15 +470,19 @@ class Order implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* OuterBoolean Class Doc Comment
@ -45,12 +45,14 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'OuterBoolean';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class OuterBoolean implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class OuterBoolean implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -174,13 +185,13 @@ class OuterBoolean implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -193,7 +204,9 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -203,7 +216,9 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -213,8 +228,10 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -228,7 +245,9 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -238,15 +257,19 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* OuterComposite Class Doc Comment
@ -45,12 +45,14 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'OuterComposite';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -90,7 +93,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -101,6 +106,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -111,6 +117,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -120,7 +127,8 @@ class OuterComposite implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -165,13 +173,16 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -187,13 +198,13 @@ class OuterComposite implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -207,6 +218,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Gets my_number
*
* @return \Swagger\Client\Model\OuterNumber
*/
public function getMyNumber()
@ -216,7 +228,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_number
*
* @param \Swagger\Client\Model\OuterNumber $my_number
*
* @return $this
*/
public function setMyNumber($my_number)
@ -228,6 +242,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Gets my_string
*
* @return \Swagger\Client\Model\OuterString
*/
public function getMyString()
@ -237,7 +252,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_string
*
* @param \Swagger\Client\Model\OuterString $my_string
*
* @return $this
*/
public function setMyString($my_string)
@ -249,6 +266,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Gets my_boolean
*
* @return \Swagger\Client\Model\OuterBoolean
*/
public function getMyBoolean()
@ -258,7 +276,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_boolean
*
* @param \Swagger\Client\Model\OuterBoolean $my_boolean
*
* @return $this
*/
public function setMyBoolean($my_boolean)
@ -269,7 +289,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -279,7 +301,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -289,8 +313,10 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -314,15 +342,19 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -28,6 +27,7 @@
*/
namespace Swagger\Client\Model;
use \Swagger\Client\ObjectSerializer;
/**
* OuterEnum Class Doc Comment

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* OuterNumber Class Doc Comment
@ -45,12 +45,14 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'OuterNumber';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class OuterNumber implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class OuterNumber implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -174,13 +185,13 @@ class OuterNumber implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -193,7 +204,9 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -203,7 +216,9 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -213,8 +228,10 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -228,7 +245,9 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -238,15 +257,19 @@ class OuterNumber implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* OuterString Class Doc Comment
@ -45,12 +45,14 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'OuterString';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class OuterString implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class OuterString implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -174,13 +185,13 @@ class OuterString implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -193,7 +204,9 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -203,7 +216,9 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -213,8 +228,10 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -228,7 +245,9 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -238,15 +257,19 @@ class OuterString implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Pet Class Doc Comment
@ -45,12 +45,14 @@ class Pet implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Pet';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -64,6 +66,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -96,7 +99,9 @@ class Pet implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -110,6 +115,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -123,6 +129,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -135,7 +142,8 @@ class Pet implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -182,6 +190,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getStatusAllowableValues()
@ -196,13 +205,16 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -221,27 +233,27 @@ class Pet implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
if ($this->container['name'] === null) {
$invalid_properties[] = "'name' can't be null";
$invalidProperties[] = "'name' can't be null";
}
if ($this->container['photo_urls'] === null) {
$invalid_properties[] = "'photo_urls' can't be null";
$invalidProperties[] = "'photo_urls' can't be null";
}
$allowed_values = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) {
$invalid_properties[] = sprintf(
$allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowedValues)) {
$invalidProperties[] = sprintf(
"invalid value for 'status', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
);
}
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -255,8 +267,8 @@ class Pet implements ModelInterface, ArrayAccess
if ($this->container['photo_urls'] === null) {
return false;
}
$allowed_values = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) {
$allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowedValues)) {
return false;
}
return true;
@ -265,6 +277,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets id
*
* @return int
*/
public function getId()
@ -274,7 +287,9 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
*
* @return $this
*/
public function setId($id)
@ -286,6 +301,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets category
*
* @return \Swagger\Client\Model\Category
*/
public function getCategory()
@ -295,7 +311,9 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets category
*
* @param \Swagger\Client\Model\Category $category
*
* @return $this
*/
public function setCategory($category)
@ -307,6 +325,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets name
*
* @return string
*/
public function getName()
@ -316,7 +335,9 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param string $name
*
* @return $this
*/
public function setName($name)
@ -328,6 +349,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets photo_urls
*
* @return string[]
*/
public function getPhotoUrls()
@ -337,7 +359,9 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets photo_urls
*
* @param string[] $photo_urls
*
* @return $this
*/
public function setPhotoUrls($photo_urls)
@ -349,6 +373,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets tags
*
* @return \Swagger\Client\Model\Tag[]
*/
public function getTags()
@ -358,7 +383,9 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets tags
*
* @param \Swagger\Client\Model\Tag[] $tags
*
* @return $this
*/
public function setTags($tags)
@ -370,6 +397,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets status
*
* @return string
*/
public function getStatus()
@ -379,17 +407,19 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets status
*
* @param string $status pet status in the store
*
* @return $this
*/
public function setStatus($status)
{
$allowed_values = $this->getStatusAllowableValues();
if (!is_null($status) && !in_array($status, $allowed_values)) {
$allowedValues = $this->getStatusAllowableValues();
if (!is_null($status) && !in_array($status, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'status', must be one of '%s'",
implode("', '", $allowed_values)
implode("', '", $allowedValues)
)
);
}
@ -399,7 +429,9 @@ class Pet implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -409,7 +441,9 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -419,8 +453,10 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -434,7 +470,9 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -444,15 +482,19 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* ReadOnlyFirst Class Doc Comment
@ -45,12 +45,14 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'ReadOnlyFirst';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -160,13 +168,16 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -181,13 +192,13 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -201,6 +212,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Gets bar
*
* @return string
*/
public function getBar()
@ -210,7 +222,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Sets bar
*
* @param string $bar
*
* @return $this
*/
public function setBar($bar)
@ -222,6 +236,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Gets baz
*
* @return string
*/
public function getBaz()
@ -231,7 +246,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Sets baz
*
* @param string $baz
*
* @return $this
*/
public function setBaz($baz)
@ -242,7 +259,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -252,7 +271,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -262,8 +283,10 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -287,15 +312,19 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* SpecialModelName Class Doc Comment
@ -45,12 +45,14 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = '$special[model.name]';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -86,7 +89,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -95,6 +100,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -103,6 +109,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -110,7 +117,8 @@ class SpecialModelName implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -155,13 +163,16 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -175,13 +186,13 @@ class SpecialModelName implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -195,6 +206,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Gets special_property_name
*
* @return int
*/
public function getSpecialPropertyName()
@ -204,7 +216,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Sets special_property_name
*
* @param int $special_property_name
*
* @return $this
*/
public function setSpecialPropertyName($special_property_name)
@ -215,7 +229,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -225,7 +241,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -235,8 +253,10 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -260,15 +282,19 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* Tag Class Doc Comment
@ -45,12 +45,14 @@ class Tag implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'Tag';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -88,7 +91,9 @@ class Tag implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -98,6 +103,7 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -107,6 +113,7 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -115,7 +122,8 @@ class Tag implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -160,13 +168,16 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -181,13 +192,13 @@ class Tag implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -201,6 +212,7 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Gets id
*
* @return int
*/
public function getId()
@ -210,7 +222,9 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
*
* @return $this
*/
public function setId($id)
@ -222,6 +236,7 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Gets name
*
* @return string
*/
public function getName()
@ -231,7 +246,9 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param string $name
*
* @return $this
*/
public function setName($name)
@ -242,7 +259,9 @@ class Tag implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -252,7 +271,9 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -262,8 +283,10 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -287,15 +312,19 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -30,6 +29,7 @@
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* User Class Doc Comment
@ -45,12 +45,14 @@ class User implements ModelInterface, ArrayAccess
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'User';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
@ -66,6 +68,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
@ -100,7 +103,9 @@ class User implements ModelInterface, ArrayAccess
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
@ -116,6 +121,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
@ -131,6 +137,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
@ -145,7 +152,8 @@ class User implements ModelInterface, ArrayAccess
];
/**
* Array of attributes where the key is the local name, and the value is the original name
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
@ -190,13 +198,16 @@ class User implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
@ -217,13 +228,13 @@ class User implements ModelInterface, ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = [];
$invalidProperties = [];
return $invalid_properties;
return $invalidProperties;
}
/**
* validate all the properties in the model
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
@ -237,6 +248,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets id
*
* @return int
*/
public function getId()
@ -246,7 +258,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
*
* @return $this
*/
public function setId($id)
@ -258,6 +272,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets username
*
* @return string
*/
public function getUsername()
@ -267,7 +282,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets username
*
* @param string $username
*
* @return $this
*/
public function setUsername($username)
@ -279,6 +296,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets first_name
*
* @return string
*/
public function getFirstName()
@ -288,7 +306,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets first_name
*
* @param string $first_name
*
* @return $this
*/
public function setFirstName($first_name)
@ -300,6 +320,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets last_name
*
* @return string
*/
public function getLastName()
@ -309,7 +330,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets last_name
*
* @param string $last_name
*
* @return $this
*/
public function setLastName($last_name)
@ -321,6 +344,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets email
*
* @return string
*/
public function getEmail()
@ -330,7 +354,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets email
*
* @param string $email
*
* @return $this
*/
public function setEmail($email)
@ -342,6 +368,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets password
*
* @return string
*/
public function getPassword()
@ -351,7 +378,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets password
*
* @param string $password
*
* @return $this
*/
public function setPassword($password)
@ -363,6 +392,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets phone
*
* @return string
*/
public function getPhone()
@ -372,7 +402,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets phone
*
* @param string $phone
*
* @return $this
*/
public function setPhone($phone)
@ -384,6 +416,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets user_status
*
* @return int
*/
public function getUserStatus()
@ -393,7 +426,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets user_status
*
* @param int $user_status User Status
*
* @return $this
*/
public function setUserStatus($user_status)
@ -404,7 +439,9 @@ class User implements ModelInterface, ArrayAccess
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
@ -414,7 +451,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
@ -424,8 +463,10 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
@ -439,7 +480,9 @@ class User implements ModelInterface, ArrayAccess
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
@ -449,15 +492,19 @@ class User implements ModelInterface, ArrayAccess
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**