[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,20 +21,23 @@
namespace {{modelPackage}}; namespace {{modelPackage}};
{{^isEnum}} {{^isEnum}}
{{^parentSchema}}
use \ArrayAccess; use \ArrayAccess;
{{/parentSchema}}
{{/isEnum}} {{/isEnum}}
use \{{invokerPackage}}\ObjectSerializer;
/** /**
* {{classname}} Class Doc Comment * {{classname}} Class Doc Comment
* *
* @category Class * @category Class
{{#description}} {{#description}}
* @description {{description}} * @description {{description}}
{{/description}} {{/description}}
* @package {{invokerPackage}} * @package {{invokerPackage}}
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}} {{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}}
{{/model}}{{/models}} {{/model}}{{/models}}

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}}; const DISCRIMINATOR = {{#discriminator}}'{{discriminator}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}};
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = '{{name}}'; protected static $swaggerModelName = '{{name}}';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -19,6 +21,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -57,6 +62,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -66,6 +72,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -119,6 +127,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
{{#vars}}{{#isEnum}} {{#vars}}{{#isEnum}}
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function {{getter}}AllowableValues() public function {{getter}}AllowableValues()
@ -130,15 +139,20 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
} }
{{/isEnum}}{{/vars}} {{/isEnum}}{{/vars}}
{{^parentSchema}}
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
{{/parentSchema}}
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -165,25 +179,25 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
public function listInvalidProperties() public function listInvalidProperties()
{ {
{{#parent}} {{#parent}}
$invalid_properties = parent::listInvalidProperties(); $invalidProperties = parent::listInvalidProperties();
{{/parent}} {{/parent}}
{{^parent}} {{^parent}}
$invalid_properties = []; $invalidProperties = [];
{{/parent}} {{/parent}}
{{#vars}} {{#vars}}
{{#required}} {{#required}}
if ($this->container['{{name}}'] === null) { if ($this->container['{{name}}'] === null) {
$invalid_properties[] = "'{{name}}' can't be null"; $invalidProperties[] = "'{{name}}' can't be null";
} }
{{/required}} {{/required}}
{{#isEnum}} {{#isEnum}}
{{^isContainer}} {{^isContainer}}
$allowed_values = $this->{{getter}}AllowableValues(); $allowedValues = $this->{{getter}}AllowableValues();
if (!in_array($this->container['{{name}}'], $allowed_values)) { if (!in_array($this->container['{{name}}'], $allowedValues)) {
$invalid_properties[] = sprintf( $invalidProperties[] = sprintf(
"invalid value for '{{name}}', must be one of '%s'", "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}} {{#hasValidation}}
{{#maxLength}} {{#maxLength}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(strlen($this->container['{{name}}']) > {{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}} {{/maxLength}}
{{#minLength}} {{#minLength}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(strlen($this->container['{{name}}']) < {{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}} {{/minLength}}
{{#maximum}} {{#maximum}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{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}} {{/maximum}}
{{#minimum}} {{#minimum}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{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}} {{/minimum}}
{{#pattern}} {{#pattern}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}!preg_match("{{{pattern}}}", $this->container['{{name}}'])) { 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}} {{/pattern}}
{{#maxItems}} {{#maxItems}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(count($this->container['{{name}}']) > {{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}} {{/maxItems}}
{{#minItems}} {{#minItems}}
if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(count($this->container['{{name}}']) < {{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}} {{/minItems}}
{{/hasValidation}} {{/hasValidation}}
{{/vars}} {{/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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -259,8 +273,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
{{/required}} {{/required}}
{{#isEnum}} {{#isEnum}}
{{^isContainer}} {{^isContainer}}
$allowed_values = $this->{{getter}}AllowableValues(); $allowedValues = $this->{{getter}}AllowableValues();
if (!in_array($this->container['{{name}}'], $allowed_values)) { if (!in_array($this->container['{{name}}'], $allowedValues)) {
return false; return false;
} }
{{/isContainer}} {{/isContainer}}
@ -310,6 +324,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Gets {{name}} * Gets {{name}}
*
* @return {{datatype}} * @return {{datatype}}
*/ */
public function {{getter}}() public function {{getter}}()
@ -319,29 +334,31 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Sets {{name}} * Sets {{name}}
*
* @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}} * @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}
*
* @return $this * @return $this
*/ */
public function {{setter}}(${{name}}) public function {{setter}}(${{name}})
{ {
{{#isEnum}} {{#isEnum}}
$allowed_values = $this->{{getter}}AllowableValues(); $allowedValues = $this->{{getter}}AllowableValues();
{{^isContainer}} {{^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( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for '{{name}}', must be one of '%s'", "Invalid value for '{{name}}', must be one of '%s'",
implode("', '", $allowed_values) implode("', '", $allowedValues)
) )
); );
} }
{{/isContainer}} {{/isContainer}}
{{#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( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for '{{name}}', must be one of '%s'", "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}} {{/vars}}
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -399,7 +418,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -409,8 +430,10 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -424,7 +447,9 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -434,14 +459,18 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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}} * {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
* Generated by: https://github.com/swagger-api/swagger-codegen.git * 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 * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git * 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 * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git * 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 * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git * 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 * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git * 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 * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,15 +29,16 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ModelReturn Class Doc Comment * ModelReturn Class Doc Comment
* *
* @category Class * @category Class
* @description Model for testing reserved words *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r * @description Model for testing reserved words *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ModelReturn implements ModelInterface, ArrayAccess class ModelReturn implements ModelInterface, ArrayAccess
{ {
@ -46,12 +46,14 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Return'; protected static $swaggerModelName = 'Return';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -96,6 +101,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -104,6 +110,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -156,13 +164,16 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -176,13 +187,13 @@ class ModelReturn implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -196,6 +207,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Gets return * Gets return
*
* @return int * @return int
*/ */
public function getReturn() public function getReturn()
@ -205,7 +217,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Sets return * Sets return
*
* @param int $return property description *_/ ' \" =end -- \\r\\n \\n \\r * @param int $return property description *_/ ' \" =end -- \\r\\n \\n \\r
*
* @return $this * @return $this
*/ */
public function setReturn($return) public function setReturn($return)
@ -216,7 +230,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -226,7 +242,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -236,8 +254,10 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -251,7 +271,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -261,15 +283,19 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git * 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 $number = 3.4; // float | None
$double = 1.2; // double | None $double = 1.2; // double | None
$pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None $pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None
$byte = "byte_example"; // string | None $byte = "B"; // string | None
$integer = 56; // int | None $integer = 56; // int | None
$int32 = 56; // int | None $int32 = 56; // int | None
$int64 = 789; // int | None $int64 = 789; // int | None

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* AdditionalPropertiesClass Class Doc Comment * AdditionalPropertiesClass Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class AdditionalPropertiesClass implements ModelInterface, ArrayAccess class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'AdditionalPropertiesClass'; protected static $swaggerModelName = 'AdditionalPropertiesClass';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -160,13 +168,16 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -181,13 +192,13 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -201,6 +212,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Gets map_property * Gets map_property
*
* @return map[string,string] * @return map[string,string]
*/ */
public function getMapProperty() public function getMapProperty()
@ -210,7 +222,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Sets map_property * Sets map_property
*
* @param map[string,string] $map_property * @param map[string,string] $map_property
*
* @return $this * @return $this
*/ */
public function setMapProperty($map_property) public function setMapProperty($map_property)
@ -222,6 +236,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Gets map_of_map_property * Gets map_of_map_property
*
* @return map[string,map[string,string]] * @return map[string,map[string,string]]
*/ */
public function getMapOfMapProperty() public function getMapOfMapProperty()
@ -231,7 +246,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Sets map_of_map_property * Sets map_of_map_property
*
* @param map[string,map[string,string]] $map_of_map_property * @param map[string,map[string,string]] $map_of_map_property
*
* @return $this * @return $this
*/ */
public function setMapOfMapProperty($map_of_map_property) public function setMapOfMapProperty($map_of_map_property)
@ -242,7 +259,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -252,7 +271,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -262,8 +283,10 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -287,15 +312,19 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Animal Class Doc Comment * Animal Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Animal implements ModelInterface, ArrayAccess class Animal implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Animal'; protected static $swaggerModelName = 'Animal';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -160,13 +168,16 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -185,16 +196,16 @@ class Animal implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() public function listInvalidProperties()
{ {
$invalid_properties = []; $invalidProperties = [];
if ($this->container['class_name'] === null) { 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -211,6 +222,7 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Gets class_name * Gets class_name
*
* @return string * @return string
*/ */
public function getClassName() public function getClassName()
@ -220,7 +232,9 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Sets class_name * Sets class_name
*
* @param string $class_name * @param string $class_name
*
* @return $this * @return $this
*/ */
public function setClassName($class_name) public function setClassName($class_name)
@ -232,6 +246,7 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Gets color * Gets color
*
* @return string * @return string
*/ */
public function getColor() public function getColor()
@ -241,7 +256,9 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Sets color * Sets color
*
* @param string $color * @param string $color
*
* @return $this * @return $this
*/ */
public function setColor($color) public function setColor($color)
@ -252,7 +269,9 @@ class Animal implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -262,7 +281,9 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -272,8 +293,10 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -287,7 +310,9 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -297,15 +322,19 @@ class Animal implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* AnimalFarm Class Doc Comment * AnimalFarm Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class AnimalFarm implements ModelInterface, ArrayAccess class AnimalFarm implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'AnimalFarm'; protected static $swaggerModelName = 'AnimalFarm';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -174,13 +185,13 @@ class AnimalFarm implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -196,7 +207,9 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -206,7 +219,9 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -216,8 +231,10 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -231,7 +248,9 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -241,15 +260,19 @@ class AnimalFarm implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ApiResponse Class Doc Comment * ApiResponse Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ApiResponse implements ModelInterface, ArrayAccess class ApiResponse implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'ApiResponse'; protected static $swaggerModelName = 'ApiResponse';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -101,6 +106,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -111,6 +117,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -165,13 +173,16 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -187,13 +198,13 @@ class ApiResponse implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -207,6 +218,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Gets code * Gets code
*
* @return int * @return int
*/ */
public function getCode() public function getCode()
@ -216,7 +228,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Sets code * Sets code
*
* @param int $code * @param int $code
*
* @return $this * @return $this
*/ */
public function setCode($code) public function setCode($code)
@ -228,6 +242,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Gets type * Gets type
*
* @return string * @return string
*/ */
public function getType() public function getType()
@ -237,7 +252,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Sets type * Sets type
*
* @param string $type * @param string $type
*
* @return $this * @return $this
*/ */
public function setType($type) public function setType($type)
@ -249,6 +266,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Gets message * Gets message
*
* @return string * @return string
*/ */
public function getMessage() public function getMessage()
@ -258,7 +276,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Sets message * Sets message
*
* @param string $message * @param string $message
*
* @return $this * @return $this
*/ */
public function setMessage($message) public function setMessage($message)
@ -269,7 +289,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -279,7 +301,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -289,8 +313,10 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -314,15 +342,19 @@ class ApiResponse implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ArrayOfArrayOfNumberOnly Class Doc Comment * ArrayOfArrayOfNumberOnly Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'ArrayOfArrayOfNumberOnly'; protected static $swaggerModelName = 'ArrayOfArrayOfNumberOnly';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -175,13 +186,13 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -195,6 +206,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets array_array_number * Gets array_array_number
*
* @return float[][] * @return float[][]
*/ */
public function getArrayArrayNumber() public function getArrayArrayNumber()
@ -204,7 +216,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Sets array_array_number * Sets array_array_number
*
* @param float[][] $array_array_number * @param float[][] $array_array_number
*
* @return $this * @return $this
*/ */
public function setArrayArrayNumber($array_array_number) public function setArrayArrayNumber($array_array_number)
@ -215,7 +229,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -225,7 +241,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -235,8 +253,10 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -260,15 +282,19 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ArrayOfNumberOnly Class Doc Comment * ArrayOfNumberOnly Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ArrayOfNumberOnly implements ModelInterface, ArrayAccess class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'ArrayOfNumberOnly'; protected static $swaggerModelName = 'ArrayOfNumberOnly';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -175,13 +186,13 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -195,6 +206,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets array_number * Gets array_number
*
* @return float[] * @return float[]
*/ */
public function getArrayNumber() public function getArrayNumber()
@ -204,7 +216,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Sets array_number * Sets array_number
*
* @param float[] $array_number * @param float[] $array_number
*
* @return $this * @return $this
*/ */
public function setArrayNumber($array_number) public function setArrayNumber($array_number)
@ -215,7 +229,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -225,7 +241,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -235,8 +253,10 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -260,15 +282,19 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ArrayTest Class Doc Comment * ArrayTest Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ArrayTest implements ModelInterface, ArrayAccess class ArrayTest implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'ArrayTest'; protected static $swaggerModelName = 'ArrayTest';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -101,6 +106,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -111,6 +117,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -165,13 +173,16 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -187,13 +198,13 @@ class ArrayTest implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -207,6 +218,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Gets array_of_string * Gets array_of_string
*
* @return string[] * @return string[]
*/ */
public function getArrayOfString() public function getArrayOfString()
@ -216,7 +228,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Sets array_of_string * Sets array_of_string
*
* @param string[] $array_of_string * @param string[] $array_of_string
*
* @return $this * @return $this
*/ */
public function setArrayOfString($array_of_string) public function setArrayOfString($array_of_string)
@ -228,6 +242,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Gets array_array_of_integer * Gets array_array_of_integer
*
* @return int[][] * @return int[][]
*/ */
public function getArrayArrayOfInteger() public function getArrayArrayOfInteger()
@ -237,7 +252,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Sets array_array_of_integer * Sets array_array_of_integer
*
* @param int[][] $array_array_of_integer * @param int[][] $array_array_of_integer
*
* @return $this * @return $this
*/ */
public function setArrayArrayOfInteger($array_array_of_integer) public function setArrayArrayOfInteger($array_array_of_integer)
@ -249,6 +266,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Gets array_array_of_model * Gets array_array_of_model
*
* @return \Swagger\Client\Model\ReadOnlyFirst[][] * @return \Swagger\Client\Model\ReadOnlyFirst[][]
*/ */
public function getArrayArrayOfModel() public function getArrayArrayOfModel()
@ -258,7 +276,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Sets array_array_of_model * Sets array_array_of_model
*
* @param \Swagger\Client\Model\ReadOnlyFirst[][] $array_array_of_model * @param \Swagger\Client\Model\ReadOnlyFirst[][] $array_array_of_model
*
* @return $this * @return $this
*/ */
public function setArrayArrayOfModel($array_array_of_model) public function setArrayArrayOfModel($array_array_of_model)
@ -269,7 +289,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -279,7 +301,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -289,8 +313,10 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -314,15 +342,19 @@ class ArrayTest implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Capitalization Class Doc Comment * Capitalization Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Capitalization implements ModelInterface, ArrayAccess class Capitalization implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Capitalization'; protected static $swaggerModelName = 'Capitalization';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -64,6 +66,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -110,6 +115,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -123,6 +129,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -180,13 +188,16 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -205,13 +216,13 @@ class Capitalization implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -225,6 +236,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets small_camel * Gets small_camel
*
* @return string * @return string
*/ */
public function getSmallCamel() public function getSmallCamel()
@ -234,7 +246,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Sets small_camel * Sets small_camel
*
* @param string $small_camel * @param string $small_camel
*
* @return $this * @return $this
*/ */
public function setSmallCamel($small_camel) public function setSmallCamel($small_camel)
@ -246,6 +260,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets capital_camel * Gets capital_camel
*
* @return string * @return string
*/ */
public function getCapitalCamel() public function getCapitalCamel()
@ -255,7 +270,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Sets capital_camel * Sets capital_camel
*
* @param string $capital_camel * @param string $capital_camel
*
* @return $this * @return $this
*/ */
public function setCapitalCamel($capital_camel) public function setCapitalCamel($capital_camel)
@ -267,6 +284,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets small_snake * Gets small_snake
*
* @return string * @return string
*/ */
public function getSmallSnake() public function getSmallSnake()
@ -276,7 +294,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Sets small_snake * Sets small_snake
*
* @param string $small_snake * @param string $small_snake
*
* @return $this * @return $this
*/ */
public function setSmallSnake($small_snake) public function setSmallSnake($small_snake)
@ -288,6 +308,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets capital_snake * Gets capital_snake
*
* @return string * @return string
*/ */
public function getCapitalSnake() public function getCapitalSnake()
@ -297,7 +318,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Sets capital_snake * Sets capital_snake
*
* @param string $capital_snake * @param string $capital_snake
*
* @return $this * @return $this
*/ */
public function setCapitalSnake($capital_snake) public function setCapitalSnake($capital_snake)
@ -309,6 +332,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets sca_eth_flow_points * Gets sca_eth_flow_points
*
* @return string * @return string
*/ */
public function getScaEthFlowPoints() public function getScaEthFlowPoints()
@ -318,7 +342,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Sets sca_eth_flow_points * Sets sca_eth_flow_points
*
* @param string $sca_eth_flow_points * @param string $sca_eth_flow_points
*
* @return $this * @return $this
*/ */
public function setScaEthFlowPoints($sca_eth_flow_points) public function setScaEthFlowPoints($sca_eth_flow_points)
@ -330,6 +356,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets att_name * Gets att_name
*
* @return string * @return string
*/ */
public function getAttName() public function getAttName()
@ -339,7 +366,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Sets att_name * Sets att_name
*
* @param string $att_name Name of the pet * @param string $att_name Name of the pet
*
* @return $this * @return $this
*/ */
public function setAttName($att_name) public function setAttName($att_name)
@ -350,7 +379,9 @@ class Capitalization implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -360,7 +391,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -370,8 +403,10 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -385,7 +420,9 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -395,15 +432,19 @@ class Capitalization implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -28,29 +27,30 @@
*/ */
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \Swagger\Client\ObjectSerializer;
use \ArrayAccess;
/** /**
* Cat Class Doc Comment * Cat Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Cat extends Animal implements ModelInterface, ArrayAccess class Cat extends Animal
{ {
const DISCRIMINATOR = null; const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Cat'; protected static $swaggerModelName = 'Cat';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +59,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +98,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +107,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -153,15 +159,12 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
* @var mixed[]
*/
protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -177,13 +180,13 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -200,6 +203,7 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Gets declawed * Gets declawed
*
* @return bool * @return bool
*/ */
public function getDeclawed() public function getDeclawed()
@ -209,7 +213,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Sets declawed * Sets declawed
*
* @param bool $declawed * @param bool $declawed
*
* @return $this * @return $this
*/ */
public function setDeclawed($declawed) public function setDeclawed($declawed)
@ -220,7 +226,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -230,7 +238,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -240,8 +250,10 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -255,7 +267,9 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -265,15 +279,19 @@ class Cat extends Animal implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Category Class Doc Comment * Category Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Category implements ModelInterface, ArrayAccess class Category implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Category'; protected static $swaggerModelName = 'Category';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -160,13 +168,16 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -181,13 +192,13 @@ class Category implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -201,6 +212,7 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Gets id * Gets id
*
* @return int * @return int
*/ */
public function getId() public function getId()
@ -210,7 +222,9 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Sets id * Sets id
*
* @param int $id * @param int $id
*
* @return $this * @return $this
*/ */
public function setId($id) public function setId($id)
@ -222,6 +236,7 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Gets name * Gets name
*
* @return string * @return string
*/ */
public function getName() public function getName()
@ -231,7 +246,9 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Sets name * Sets name
*
* @param string $name * @param string $name
*
* @return $this * @return $this
*/ */
public function setName($name) public function setName($name)
@ -242,7 +259,9 @@ class Category implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -252,7 +271,9 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -262,8 +283,10 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -287,15 +312,19 @@ class Category implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,15 +29,16 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ClassModel Class Doc Comment * ClassModel Class Doc Comment
* *
* @category Class * @category Class
* @description Model for testing model with \&quot;_class\&quot; property * @description Model for testing model with \&quot;_class\&quot; property
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ClassModel implements ModelInterface, ArrayAccess class ClassModel implements ModelInterface, ArrayAccess
{ {
@ -46,12 +46,14 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'ClassModel'; protected static $swaggerModelName = 'ClassModel';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -96,6 +101,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -104,6 +110,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -156,13 +164,16 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -176,13 +187,13 @@ class ClassModel implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -196,6 +207,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Gets _class * Gets _class
*
* @return string * @return string
*/ */
public function getClass() public function getClass()
@ -205,7 +217,9 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Sets _class * Sets _class
*
* @param string $_class * @param string $_class
*
* @return $this * @return $this
*/ */
public function setClass($_class) public function setClass($_class)
@ -216,7 +230,9 @@ class ClassModel implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -226,7 +242,9 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -236,8 +254,10 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -251,7 +271,9 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -261,15 +283,19 @@ class ClassModel implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Client Class Doc Comment * Client Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Client implements ModelInterface, ArrayAccess class Client implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Client'; protected static $swaggerModelName = 'Client';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -175,13 +186,13 @@ class Client implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -195,6 +206,7 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Gets client * Gets client
*
* @return string * @return string
*/ */
public function getClient() public function getClient()
@ -204,7 +216,9 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Sets client * Sets client
*
* @param string $client * @param string $client
*
* @return $this * @return $this
*/ */
public function setClient($client) public function setClient($client)
@ -215,7 +229,9 @@ class Client implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -225,7 +241,9 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -235,8 +253,10 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -260,15 +282,19 @@ class Client implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -28,29 +27,30 @@
*/ */
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \Swagger\Client\ObjectSerializer;
use \ArrayAccess;
/** /**
* Dog Class Doc Comment * Dog Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Dog extends Animal implements ModelInterface, ArrayAccess class Dog extends Animal
{ {
const DISCRIMINATOR = null; const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Dog'; protected static $swaggerModelName = 'Dog';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +59,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +98,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +107,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -153,15 +159,12 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/**
* Associative array for storing property values
* @var mixed[]
*/
protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -177,13 +180,13 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -200,6 +203,7 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Gets breed * Gets breed
*
* @return string * @return string
*/ */
public function getBreed() public function getBreed()
@ -209,7 +213,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Sets breed * Sets breed
*
* @param string $breed * @param string $breed
*
* @return $this * @return $this
*/ */
public function setBreed($breed) public function setBreed($breed)
@ -220,7 +226,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -230,7 +238,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -240,8 +250,10 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -255,7 +267,9 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -265,15 +279,19 @@ class Dog extends Animal implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* EnumArrays Class Doc Comment * EnumArrays Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class EnumArrays implements ModelInterface, ArrayAccess class EnumArrays implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'EnumArrays'; protected static $swaggerModelName = 'EnumArrays';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -163,6 +171,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getJustSymbolAllowableValues() public function getJustSymbolAllowableValues()
@ -175,6 +184,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getArrayEnumAllowableValues() public function getArrayEnumAllowableValues()
@ -188,13 +198,16 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -209,21 +222,21 @@ class EnumArrays implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() public function listInvalidProperties()
{ {
$invalid_properties = []; $invalidProperties = [];
$allowed_values = $this->getJustSymbolAllowableValues(); $allowedValues = $this->getJustSymbolAllowableValues();
if (!in_array($this->container['just_symbol'], $allowed_values)) { if (!in_array($this->container['just_symbol'], $allowedValues)) {
$invalid_properties[] = sprintf( $invalidProperties[] = sprintf(
"invalid value for 'just_symbol', must be one of '%s'", "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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -231,8 +244,8 @@ class EnumArrays implements ModelInterface, ArrayAccess
public function valid() public function valid()
{ {
$allowed_values = $this->getJustSymbolAllowableValues(); $allowedValues = $this->getJustSymbolAllowableValues();
if (!in_array($this->container['just_symbol'], $allowed_values)) { if (!in_array($this->container['just_symbol'], $allowedValues)) {
return false; return false;
} }
return true; return true;
@ -241,6 +254,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Gets just_symbol * Gets just_symbol
*
* @return string * @return string
*/ */
public function getJustSymbol() public function getJustSymbol()
@ -250,17 +264,19 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Sets just_symbol * Sets just_symbol
*
* @param string $just_symbol * @param string $just_symbol
*
* @return $this * @return $this
*/ */
public function setJustSymbol($just_symbol) public function setJustSymbol($just_symbol)
{ {
$allowed_values = $this->getJustSymbolAllowableValues(); $allowedValues = $this->getJustSymbolAllowableValues();
if (!is_null($just_symbol) && !in_array($just_symbol, $allowed_values)) { if (!is_null($just_symbol) && !in_array($just_symbol, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'just_symbol', must be one of '%s'", "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 * Gets array_enum
*
* @return string[] * @return string[]
*/ */
public function getArrayEnum() public function getArrayEnum()
@ -280,17 +297,19 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Sets array_enum * Sets array_enum
*
* @param string[] $array_enum * @param string[] $array_enum
*
* @return $this * @return $this
*/ */
public function setArrayEnum($array_enum) public function setArrayEnum($array_enum)
{ {
$allowed_values = $this->getArrayEnumAllowableValues(); $allowedValues = $this->getArrayEnumAllowableValues();
if (!is_null($array_enum) && array_diff($array_enum, $allowed_values)) { if (!is_null($array_enum) && array_diff($array_enum, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'array_enum', must be one of '%s'", "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. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -310,7 +331,9 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -320,8 +343,10 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -335,7 +360,9 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -345,15 +372,19 @@ class EnumArrays implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -28,14 +27,15 @@
*/ */
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \Swagger\Client\ObjectSerializer;
/** /**
* EnumClass Class Doc Comment * EnumClass Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class EnumClass class EnumClass
{ {

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* EnumTest Class Doc Comment * EnumTest Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class EnumTest implements ModelInterface, ArrayAccess class EnumTest implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Enum_Test'; protected static $swaggerModelName = 'Enum_Test';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -62,6 +64,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -104,6 +109,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -115,6 +121,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -176,6 +184,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getEnumStringAllowableValues() public function getEnumStringAllowableValues()
@ -189,6 +198,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getEnumIntegerAllowableValues() public function getEnumIntegerAllowableValues()
@ -201,6 +211,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getEnumNumberAllowableValues() public function getEnumNumberAllowableValues()
@ -214,13 +225,16 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -237,37 +251,37 @@ class EnumTest implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() public function listInvalidProperties()
{ {
$invalid_properties = []; $invalidProperties = [];
$allowed_values = $this->getEnumStringAllowableValues(); $allowedValues = $this->getEnumStringAllowableValues();
if (!in_array($this->container['enum_string'], $allowed_values)) { if (!in_array($this->container['enum_string'], $allowedValues)) {
$invalid_properties[] = sprintf( $invalidProperties[] = sprintf(
"invalid value for 'enum_string', must be one of '%s'", "invalid value for 'enum_string', must be one of '%s'",
implode("', '", $allowed_values) implode("', '", $allowedValues)
); );
} }
$allowed_values = $this->getEnumIntegerAllowableValues(); $allowedValues = $this->getEnumIntegerAllowableValues();
if (!in_array($this->container['enum_integer'], $allowed_values)) { if (!in_array($this->container['enum_integer'], $allowedValues)) {
$invalid_properties[] = sprintf( $invalidProperties[] = sprintf(
"invalid value for 'enum_integer', must be one of '%s'", "invalid value for 'enum_integer', must be one of '%s'",
implode("', '", $allowed_values) implode("', '", $allowedValues)
); );
} }
$allowed_values = $this->getEnumNumberAllowableValues(); $allowedValues = $this->getEnumNumberAllowableValues();
if (!in_array($this->container['enum_number'], $allowed_values)) { if (!in_array($this->container['enum_number'], $allowedValues)) {
$invalid_properties[] = sprintf( $invalidProperties[] = sprintf(
"invalid value for 'enum_number', must be one of '%s'", "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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -275,16 +289,16 @@ class EnumTest implements ModelInterface, ArrayAccess
public function valid() public function valid()
{ {
$allowed_values = $this->getEnumStringAllowableValues(); $allowedValues = $this->getEnumStringAllowableValues();
if (!in_array($this->container['enum_string'], $allowed_values)) { if (!in_array($this->container['enum_string'], $allowedValues)) {
return false; return false;
} }
$allowed_values = $this->getEnumIntegerAllowableValues(); $allowedValues = $this->getEnumIntegerAllowableValues();
if (!in_array($this->container['enum_integer'], $allowed_values)) { if (!in_array($this->container['enum_integer'], $allowedValues)) {
return false; return false;
} }
$allowed_values = $this->getEnumNumberAllowableValues(); $allowedValues = $this->getEnumNumberAllowableValues();
if (!in_array($this->container['enum_number'], $allowed_values)) { if (!in_array($this->container['enum_number'], $allowedValues)) {
return false; return false;
} }
return true; return true;
@ -293,6 +307,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Gets enum_string * Gets enum_string
*
* @return string * @return string
*/ */
public function getEnumString() public function getEnumString()
@ -302,17 +317,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Sets enum_string * Sets enum_string
*
* @param string $enum_string * @param string $enum_string
*
* @return $this * @return $this
*/ */
public function setEnumString($enum_string) public function setEnumString($enum_string)
{ {
$allowed_values = $this->getEnumStringAllowableValues(); $allowedValues = $this->getEnumStringAllowableValues();
if (!is_null($enum_string) && !in_array($enum_string, $allowed_values)) { if (!is_null($enum_string) && !in_array($enum_string, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'enum_string', must be one of '%s'", "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 * Gets enum_integer
*
* @return int * @return int
*/ */
public function getEnumInteger() public function getEnumInteger()
@ -332,17 +350,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Sets enum_integer * Sets enum_integer
*
* @param int $enum_integer * @param int $enum_integer
*
* @return $this * @return $this
*/ */
public function setEnumInteger($enum_integer) public function setEnumInteger($enum_integer)
{ {
$allowed_values = $this->getEnumIntegerAllowableValues(); $allowedValues = $this->getEnumIntegerAllowableValues();
if (!is_null($enum_integer) && !in_array($enum_integer, $allowed_values)) { if (!is_null($enum_integer) && !in_array($enum_integer, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'enum_integer', must be one of '%s'", "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 * Gets enum_number
*
* @return double * @return double
*/ */
public function getEnumNumber() public function getEnumNumber()
@ -362,17 +383,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Sets enum_number * Sets enum_number
*
* @param double $enum_number * @param double $enum_number
*
* @return $this * @return $this
*/ */
public function setEnumNumber($enum_number) public function setEnumNumber($enum_number)
{ {
$allowed_values = $this->getEnumNumberAllowableValues(); $allowedValues = $this->getEnumNumberAllowableValues();
if (!is_null($enum_number) && !in_array($enum_number, $allowed_values)) { if (!is_null($enum_number) && !in_array($enum_number, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'enum_number', must be one of '%s'", "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 * Gets outer_enum
*
* @return \Swagger\Client\Model\OuterEnum * @return \Swagger\Client\Model\OuterEnum
*/ */
public function getOuterEnum() public function getOuterEnum()
@ -392,7 +416,9 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Sets outer_enum * Sets outer_enum
*
* @param \Swagger\Client\Model\OuterEnum $outer_enum * @param \Swagger\Client\Model\OuterEnum $outer_enum
*
* @return $this * @return $this
*/ */
public function setOuterEnum($outer_enum) public function setOuterEnum($outer_enum)
@ -403,7 +429,9 @@ class EnumTest implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -413,7 +441,9 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -423,8 +453,10 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -438,7 +470,9 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -448,15 +482,19 @@ class EnumTest implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* FormatTest Class Doc Comment * FormatTest Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class FormatTest implements ModelInterface, ArrayAccess class FormatTest implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'format_test'; protected static $swaggerModelName = 'format_test';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -71,6 +73,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -131,6 +136,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -151,6 +157,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -215,13 +223,16 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -247,81 +258,77 @@ class FormatTest implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() public function listInvalidProperties()
{ {
$invalid_properties = []; $invalidProperties = [];
if (!is_null($this->container['integer']) && ($this->container['integer'] > 100)) { 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)) { 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)) { 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)) { 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) { if ($this->container['number'] === null) {
$invalid_properties[] = "'number' can't be null"; $invalidProperties[] = "'number' can't be null";
} }
if (($this->container['number'] > 543.2)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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'])) { 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) { 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) { if ($this->container['date'] === null) {
$invalid_properties[] = "'date' can't be null"; $invalidProperties[] = "'date' can't be null";
} }
if ($this->container['password'] === 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)) { 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)) { 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -368,9 +375,6 @@ class FormatTest implements ModelInterface, ArrayAccess
if ($this->container['byte'] === null) { if ($this->container['byte'] === null) {
return false; 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) { if ($this->container['date'] === null) {
return false; return false;
} }
@ -389,6 +393,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets integer * Gets integer
*
* @return int * @return int
*/ */
public function getInteger() public function getInteger()
@ -398,7 +403,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets integer * Sets integer
*
* @param int $integer * @param int $integer
*
* @return $this * @return $this
*/ */
public function setInteger($integer) public function setInteger($integer)
@ -418,6 +425,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets int32 * Gets int32
*
* @return int * @return int
*/ */
public function getInt32() public function getInt32()
@ -427,7 +435,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets int32 * Sets int32
*
* @param int $int32 * @param int $int32
*
* @return $this * @return $this
*/ */
public function setInt32($int32) public function setInt32($int32)
@ -447,6 +457,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets int64 * Gets int64
*
* @return int * @return int
*/ */
public function getInt64() public function getInt64()
@ -456,7 +467,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets int64 * Sets int64
*
* @param int $int64 * @param int $int64
*
* @return $this * @return $this
*/ */
public function setInt64($int64) public function setInt64($int64)
@ -468,6 +481,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets number * Gets number
*
* @return float * @return float
*/ */
public function getNumber() public function getNumber()
@ -477,7 +491,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets number * Sets number
*
* @param float $number * @param float $number
*
* @return $this * @return $this
*/ */
public function setNumber($number) public function setNumber($number)
@ -497,6 +513,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets float * Gets float
*
* @return float * @return float
*/ */
public function getFloat() public function getFloat()
@ -506,7 +523,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets float * Sets float
*
* @param float $float * @param float $float
*
* @return $this * @return $this
*/ */
public function setFloat($float) public function setFloat($float)
@ -526,6 +545,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets double * Gets double
*
* @return double * @return double
*/ */
public function getDouble() public function getDouble()
@ -535,7 +555,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets double * Sets double
*
* @param double $double * @param double $double
*
* @return $this * @return $this
*/ */
public function setDouble($double) public function setDouble($double)
@ -555,6 +577,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets string * Gets string
*
* @return string * @return string
*/ */
public function getString() public function getString()
@ -564,7 +587,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets string * Sets string
*
* @param string $string * @param string $string
*
* @return $this * @return $this
*/ */
public function setString($string) public function setString($string)
@ -581,6 +606,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets byte * Gets byte
*
* @return string * @return string
*/ */
public function getByte() public function getByte()
@ -590,16 +616,13 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets byte * Sets byte
*
* @param string $byte * @param string $byte
*
* @return $this * @return $this
*/ */
public function setByte($byte) 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; $this->container['byte'] = $byte;
return $this; return $this;
@ -607,6 +630,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets binary * Gets binary
*
* @return string * @return string
*/ */
public function getBinary() public function getBinary()
@ -616,7 +640,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets binary * Sets binary
*
* @param string $binary * @param string $binary
*
* @return $this * @return $this
*/ */
public function setBinary($binary) public function setBinary($binary)
@ -628,6 +654,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets date * Gets date
*
* @return \DateTime * @return \DateTime
*/ */
public function getDate() public function getDate()
@ -637,7 +664,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets date * Sets date
*
* @param \DateTime $date * @param \DateTime $date
*
* @return $this * @return $this
*/ */
public function setDate($date) public function setDate($date)
@ -649,6 +678,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets date_time * Gets date_time
*
* @return \DateTime * @return \DateTime
*/ */
public function getDateTime() public function getDateTime()
@ -658,7 +688,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets date_time * Sets date_time
*
* @param \DateTime $date_time * @param \DateTime $date_time
*
* @return $this * @return $this
*/ */
public function setDateTime($date_time) public function setDateTime($date_time)
@ -670,6 +702,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets uuid * Gets uuid
*
* @return string * @return string
*/ */
public function getUuid() public function getUuid()
@ -679,7 +712,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets uuid * Sets uuid
*
* @param string $uuid * @param string $uuid
*
* @return $this * @return $this
*/ */
public function setUuid($uuid) public function setUuid($uuid)
@ -691,6 +726,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets password * Gets password
*
* @return string * @return string
*/ */
public function getPassword() public function getPassword()
@ -700,7 +736,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets password * Sets password
*
* @param string $password * @param string $password
*
* @return $this * @return $this
*/ */
public function setPassword($password) public function setPassword($password)
@ -718,7 +756,9 @@ class FormatTest implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -728,7 +768,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -738,8 +780,10 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -753,7 +797,9 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -763,15 +809,19 @@ class FormatTest implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* HasOnlyReadOnly Class Doc Comment * HasOnlyReadOnly Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class HasOnlyReadOnly implements ModelInterface, ArrayAccess class HasOnlyReadOnly implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'hasOnlyReadOnly'; protected static $swaggerModelName = 'hasOnlyReadOnly';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -160,13 +168,16 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -181,13 +192,13 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -201,6 +212,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Gets bar * Gets bar
*
* @return string * @return string
*/ */
public function getBar() public function getBar()
@ -210,7 +222,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Sets bar * Sets bar
*
* @param string $bar * @param string $bar
*
* @return $this * @return $this
*/ */
public function setBar($bar) public function setBar($bar)
@ -222,6 +236,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Gets foo * Gets foo
*
* @return string * @return string
*/ */
public function getFoo() public function getFoo()
@ -231,7 +246,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Sets foo * Sets foo
*
* @param string $foo * @param string $foo
*
* @return $this * @return $this
*/ */
public function setFoo($foo) public function setFoo($foo)
@ -242,7 +259,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -252,7 +271,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -262,8 +283,10 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -287,15 +312,19 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* MapTest Class Doc Comment * MapTest Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class MapTest implements ModelInterface, ArrayAccess class MapTest implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'MapTest'; protected static $swaggerModelName = 'MapTest';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -161,6 +169,7 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getMapOfEnumStringAllowableValues() public function getMapOfEnumStringAllowableValues()
@ -174,13 +183,16 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -195,13 +207,13 @@ class MapTest implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -215,6 +227,7 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Gets map_map_of_string * Gets map_map_of_string
*
* @return map[string,map[string,string]] * @return map[string,map[string,string]]
*/ */
public function getMapMapOfString() public function getMapMapOfString()
@ -224,7 +237,9 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Sets map_map_of_string * Sets map_map_of_string
*
* @param map[string,map[string,string]] $map_map_of_string * @param map[string,map[string,string]] $map_map_of_string
*
* @return $this * @return $this
*/ */
public function setMapMapOfString($map_map_of_string) public function setMapMapOfString($map_map_of_string)
@ -236,6 +251,7 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Gets map_of_enum_string * Gets map_of_enum_string
*
* @return map[string,string] * @return map[string,string]
*/ */
public function getMapOfEnumString() public function getMapOfEnumString()
@ -245,17 +261,19 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Sets map_of_enum_string * Sets map_of_enum_string
*
* @param map[string,string] $map_of_enum_string * @param map[string,string] $map_of_enum_string
*
* @return $this * @return $this
*/ */
public function setMapOfEnumString($map_of_enum_string) public function setMapOfEnumString($map_of_enum_string)
{ {
$allowed_values = $this->getMapOfEnumStringAllowableValues(); $allowedValues = $this->getMapOfEnumStringAllowableValues();
if (!is_null($map_of_enum_string) && array_diff($map_of_enum_string, $allowed_values)) { if (!is_null($map_of_enum_string) && array_diff($map_of_enum_string, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'map_of_enum_string', must be one of '%s'", "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. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -275,7 +295,9 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -285,8 +307,10 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -300,7 +324,9 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -310,15 +336,19 @@ class MapTest implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* MixedPropertiesAndAdditionalPropertiesClass Class Doc Comment * MixedPropertiesAndAdditionalPropertiesClass Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'MixedPropertiesAndAdditionalPropertiesClass'; protected static $swaggerModelName = 'MixedPropertiesAndAdditionalPropertiesClass';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -101,6 +106,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -111,6 +117,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -165,13 +173,16 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -187,13 +198,13 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -207,6 +218,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Gets uuid * Gets uuid
*
* @return string * @return string
*/ */
public function getUuid() public function getUuid()
@ -216,7 +228,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Sets uuid * Sets uuid
*
* @param string $uuid * @param string $uuid
*
* @return $this * @return $this
*/ */
public function setUuid($uuid) public function setUuid($uuid)
@ -228,6 +242,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Gets date_time * Gets date_time
*
* @return \DateTime * @return \DateTime
*/ */
public function getDateTime() public function getDateTime()
@ -237,7 +252,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Sets date_time * Sets date_time
*
* @param \DateTime $date_time * @param \DateTime $date_time
*
* @return $this * @return $this
*/ */
public function setDateTime($date_time) public function setDateTime($date_time)
@ -249,6 +266,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Gets map * Gets map
*
* @return map[string,\Swagger\Client\Model\Animal] * @return map[string,\Swagger\Client\Model\Animal]
*/ */
public function getMap() public function getMap()
@ -258,7 +276,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Sets map * Sets map
*
* @param map[string,\Swagger\Client\Model\Animal] $map * @param map[string,\Swagger\Client\Model\Animal] $map
*
* @return $this * @return $this
*/ */
public function setMap($map) public function setMap($map)
@ -269,7 +289,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -279,7 +301,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -289,8 +313,10 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -314,15 +342,19 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,15 +29,16 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Model200Response Class Doc Comment * Model200Response Class Doc Comment
* *
* @category Class * @category Class
* @description Model for testing model name starting with number * @description Model for testing model name starting with number
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Model200Response implements ModelInterface, ArrayAccess class Model200Response implements ModelInterface, ArrayAccess
{ {
@ -46,12 +46,14 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = '200_response'; protected static $swaggerModelName = '200_response';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -99,6 +104,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -108,6 +114,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -161,13 +169,16 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -182,13 +193,13 @@ class Model200Response implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -202,6 +213,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Gets name * Gets name
*
* @return int * @return int
*/ */
public function getName() public function getName()
@ -211,7 +223,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Sets name * Sets name
*
* @param int $name * @param int $name
*
* @return $this * @return $this
*/ */
public function setName($name) public function setName($name)
@ -223,6 +237,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Gets class * Gets class
*
* @return string * @return string
*/ */
public function getClass() public function getClass()
@ -232,7 +247,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Sets class * Sets class
*
* @param string $class * @param string $class
*
* @return $this * @return $this
*/ */
public function setClass($class) public function setClass($class)
@ -243,7 +260,9 @@ class Model200Response implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -253,7 +272,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -263,8 +284,10 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -278,7 +301,9 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -288,15 +313,19 @@ class Model200Response implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ModelList Class Doc Comment * ModelList Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ModelList implements ModelInterface, ArrayAccess class ModelList implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'List'; protected static $swaggerModelName = 'List';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -175,13 +186,13 @@ class ModelList implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -195,6 +206,7 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Gets _123_list * Gets _123_list
*
* @return string * @return string
*/ */
public function get123List() public function get123List()
@ -204,7 +216,9 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Sets _123_list * Sets _123_list
*
* @param string $_123_list * @param string $_123_list
*
* @return $this * @return $this
*/ */
public function set123List($_123_list) public function set123List($_123_list)
@ -215,7 +229,9 @@ class ModelList implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -225,7 +241,9 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -235,8 +253,10 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -260,15 +282,19 @@ class ModelList implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,15 +29,16 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ModelReturn Class Doc Comment * ModelReturn Class Doc Comment
* *
* @category Class * @category Class
* @description Model for testing reserved words * @description Model for testing reserved words
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ModelReturn implements ModelInterface, ArrayAccess class ModelReturn implements ModelInterface, ArrayAccess
{ {
@ -46,12 +46,14 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Return'; protected static $swaggerModelName = 'Return';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -96,6 +101,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -104,6 +110,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -156,13 +164,16 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -176,13 +187,13 @@ class ModelReturn implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -196,6 +207,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Gets return * Gets return
*
* @return int * @return int
*/ */
public function getReturn() public function getReturn()
@ -205,7 +217,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Sets return * Sets return
*
* @param int $return * @param int $return
*
* @return $this * @return $this
*/ */
public function setReturn($return) public function setReturn($return)
@ -216,7 +230,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -226,7 +242,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -236,8 +254,10 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -251,7 +271,9 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -261,15 +283,19 @@ class ModelReturn implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,15 +29,16 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Name Class Doc Comment * Name Class Doc Comment
* *
* @category Class * @category Class
* @description Model for testing model name same as property name * @description Model for testing model name same as property name
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Name implements ModelInterface, ArrayAccess class Name implements ModelInterface, ArrayAccess
{ {
@ -46,12 +46,14 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Name'; protected static $swaggerModelName = 'Name';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -63,6 +65,7 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -105,6 +110,7 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -116,6 +122,7 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -171,13 +179,16 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -194,16 +205,16 @@ class Name implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() public function listInvalidProperties()
{ {
$invalid_properties = []; $invalidProperties = [];
if ($this->container['name'] === null) { 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -220,6 +231,7 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Gets name * Gets name
*
* @return int * @return int
*/ */
public function getName() public function getName()
@ -229,7 +241,9 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Sets name * Sets name
*
* @param int $name * @param int $name
*
* @return $this * @return $this
*/ */
public function setName($name) public function setName($name)
@ -241,6 +255,7 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Gets snake_case * Gets snake_case
*
* @return int * @return int
*/ */
public function getSnakeCase() public function getSnakeCase()
@ -250,7 +265,9 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Sets snake_case * Sets snake_case
*
* @param int $snake_case * @param int $snake_case
*
* @return $this * @return $this
*/ */
public function setSnakeCase($snake_case) public function setSnakeCase($snake_case)
@ -262,6 +279,7 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Gets property * Gets property
*
* @return string * @return string
*/ */
public function getProperty() public function getProperty()
@ -271,7 +289,9 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Sets property * Sets property
*
* @param string $property * @param string $property
*
* @return $this * @return $this
*/ */
public function setProperty($property) public function setProperty($property)
@ -283,6 +303,7 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Gets _123_number * Gets _123_number
*
* @return int * @return int
*/ */
public function get123Number() public function get123Number()
@ -292,7 +313,9 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Sets _123_number * Sets _123_number
*
* @param int $_123_number * @param int $_123_number
*
* @return $this * @return $this
*/ */
public function set123Number($_123_number) public function set123Number($_123_number)
@ -303,7 +326,9 @@ class Name implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -313,7 +338,9 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -323,8 +350,10 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -338,7 +367,9 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -348,15 +379,19 @@ class Name implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* NumberOnly Class Doc Comment * NumberOnly Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class NumberOnly implements ModelInterface, ArrayAccess class NumberOnly implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'NumberOnly'; protected static $swaggerModelName = 'NumberOnly';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -175,13 +186,13 @@ class NumberOnly implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -195,6 +206,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets just_number * Gets just_number
*
* @return float * @return float
*/ */
public function getJustNumber() public function getJustNumber()
@ -204,7 +216,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Sets just_number * Sets just_number
*
* @param float $just_number * @param float $just_number
*
* @return $this * @return $this
*/ */
public function setJustNumber($just_number) public function setJustNumber($just_number)
@ -215,7 +229,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -225,7 +241,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -235,8 +253,10 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -260,15 +282,19 @@ class NumberOnly implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Order Class Doc Comment * Order Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Order implements ModelInterface, ArrayAccess class Order implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Order'; protected static $swaggerModelName = 'Order';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -64,6 +66,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -110,6 +115,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -123,6 +129,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -182,6 +190,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getStatusAllowableValues() public function getStatusAllowableValues()
@ -196,13 +205,16 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -221,21 +233,21 @@ class Order implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() public function listInvalidProperties()
{ {
$invalid_properties = []; $invalidProperties = [];
$allowed_values = $this->getStatusAllowableValues(); $allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) { if (!in_array($this->container['status'], $allowedValues)) {
$invalid_properties[] = sprintf( $invalidProperties[] = sprintf(
"invalid value for 'status', must be one of '%s'", "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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -243,8 +255,8 @@ class Order implements ModelInterface, ArrayAccess
public function valid() public function valid()
{ {
$allowed_values = $this->getStatusAllowableValues(); $allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) { if (!in_array($this->container['status'], $allowedValues)) {
return false; return false;
} }
return true; return true;
@ -253,6 +265,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets id * Gets id
*
* @return int * @return int
*/ */
public function getId() public function getId()
@ -262,7 +275,9 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Sets id * Sets id
*
* @param int $id * @param int $id
*
* @return $this * @return $this
*/ */
public function setId($id) public function setId($id)
@ -274,6 +289,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets pet_id * Gets pet_id
*
* @return int * @return int
*/ */
public function getPetId() public function getPetId()
@ -283,7 +299,9 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Sets pet_id * Sets pet_id
*
* @param int $pet_id * @param int $pet_id
*
* @return $this * @return $this
*/ */
public function setPetId($pet_id) public function setPetId($pet_id)
@ -295,6 +313,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets quantity * Gets quantity
*
* @return int * @return int
*/ */
public function getQuantity() public function getQuantity()
@ -304,7 +323,9 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Sets quantity * Sets quantity
*
* @param int $quantity * @param int $quantity
*
* @return $this * @return $this
*/ */
public function setQuantity($quantity) public function setQuantity($quantity)
@ -316,6 +337,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets ship_date * Gets ship_date
*
* @return \DateTime * @return \DateTime
*/ */
public function getShipDate() public function getShipDate()
@ -325,7 +347,9 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Sets ship_date * Sets ship_date
*
* @param \DateTime $ship_date * @param \DateTime $ship_date
*
* @return $this * @return $this
*/ */
public function setShipDate($ship_date) public function setShipDate($ship_date)
@ -337,6 +361,7 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets status * Gets status
*
* @return string * @return string
*/ */
public function getStatus() public function getStatus()
@ -346,17 +371,19 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Sets status * Sets status
*
* @param string $status Order Status * @param string $status Order Status
*
* @return $this * @return $this
*/ */
public function setStatus($status) public function setStatus($status)
{ {
$allowed_values = $this->getStatusAllowableValues(); $allowedValues = $this->getStatusAllowableValues();
if (!is_null($status) && !in_array($status, $allowed_values)) { if (!is_null($status) && !in_array($status, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'status', must be one of '%s'", "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 * Gets complete
*
* @return bool * @return bool
*/ */
public function getComplete() public function getComplete()
@ -376,7 +404,9 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Sets complete * Sets complete
*
* @param bool $complete * @param bool $complete
*
* @return $this * @return $this
*/ */
public function setComplete($complete) public function setComplete($complete)
@ -387,7 +417,9 @@ class Order implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -397,7 +429,9 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -407,8 +441,10 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -422,7 +458,9 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -432,15 +470,19 @@ class Order implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* OuterBoolean Class Doc Comment * OuterBoolean Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class OuterBoolean implements ModelInterface, ArrayAccess class OuterBoolean implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'OuterBoolean'; protected static $swaggerModelName = 'OuterBoolean';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -174,13 +185,13 @@ class OuterBoolean implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -193,7 +204,9 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -203,7 +216,9 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -213,8 +228,10 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -228,7 +245,9 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -238,15 +257,19 @@ class OuterBoolean implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* OuterComposite Class Doc Comment * OuterComposite Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class OuterComposite implements ModelInterface, ArrayAccess class OuterComposite implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'OuterComposite'; protected static $swaggerModelName = 'OuterComposite';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -61,6 +63,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -101,6 +106,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -111,6 +117,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -165,13 +173,16 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -187,13 +198,13 @@ class OuterComposite implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -207,6 +218,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Gets my_number * Gets my_number
*
* @return \Swagger\Client\Model\OuterNumber * @return \Swagger\Client\Model\OuterNumber
*/ */
public function getMyNumber() public function getMyNumber()
@ -216,7 +228,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Sets my_number * Sets my_number
*
* @param \Swagger\Client\Model\OuterNumber $my_number * @param \Swagger\Client\Model\OuterNumber $my_number
*
* @return $this * @return $this
*/ */
public function setMyNumber($my_number) public function setMyNumber($my_number)
@ -228,6 +242,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Gets my_string * Gets my_string
*
* @return \Swagger\Client\Model\OuterString * @return \Swagger\Client\Model\OuterString
*/ */
public function getMyString() public function getMyString()
@ -237,7 +252,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Sets my_string * Sets my_string
*
* @param \Swagger\Client\Model\OuterString $my_string * @param \Swagger\Client\Model\OuterString $my_string
*
* @return $this * @return $this
*/ */
public function setMyString($my_string) public function setMyString($my_string)
@ -249,6 +266,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Gets my_boolean * Gets my_boolean
*
* @return \Swagger\Client\Model\OuterBoolean * @return \Swagger\Client\Model\OuterBoolean
*/ */
public function getMyBoolean() public function getMyBoolean()
@ -258,7 +276,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Sets my_boolean * Sets my_boolean
*
* @param \Swagger\Client\Model\OuterBoolean $my_boolean * @param \Swagger\Client\Model\OuterBoolean $my_boolean
*
* @return $this * @return $this
*/ */
public function setMyBoolean($my_boolean) public function setMyBoolean($my_boolean)
@ -269,7 +289,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -279,7 +301,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -289,8 +313,10 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -304,7 +330,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -314,15 +342,19 @@ class OuterComposite implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -28,14 +27,15 @@
*/ */
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \Swagger\Client\ObjectSerializer;
/** /**
* OuterEnum Class Doc Comment * OuterEnum Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class OuterEnum class OuterEnum
{ {

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* OuterNumber Class Doc Comment * OuterNumber Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class OuterNumber implements ModelInterface, ArrayAccess class OuterNumber implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'OuterNumber'; protected static $swaggerModelName = 'OuterNumber';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -174,13 +185,13 @@ class OuterNumber implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -193,7 +204,9 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -203,7 +216,9 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -213,8 +228,10 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -228,7 +245,9 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -238,15 +257,19 @@ class OuterNumber implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* OuterString Class Doc Comment * OuterString Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class OuterString implements ModelInterface, ArrayAccess class OuterString implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'OuterString'; protected static $swaggerModelName = 'OuterString';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -174,13 +185,13 @@ class OuterString implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -193,7 +204,9 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -203,7 +216,9 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -213,8 +228,10 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -228,7 +245,9 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -238,15 +257,19 @@ class OuterString implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Pet Class Doc Comment * Pet Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Pet implements ModelInterface, ArrayAccess class Pet implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Pet'; protected static $swaggerModelName = 'Pet';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -64,6 +66,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -110,6 +115,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -123,6 +129,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -182,6 +190,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets allowable values of the enum * Gets allowable values of the enum
*
* @return string[] * @return string[]
*/ */
public function getStatusAllowableValues() public function getStatusAllowableValues()
@ -196,13 +205,16 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -221,27 +233,27 @@ class Pet implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() public function listInvalidProperties()
{ {
$invalid_properties = []; $invalidProperties = [];
if ($this->container['name'] === null) { if ($this->container['name'] === null) {
$invalid_properties[] = "'name' can't be null"; $invalidProperties[] = "'name' can't be null";
} }
if ($this->container['photo_urls'] === 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(); $allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) { if (!in_array($this->container['status'], $allowedValues)) {
$invalid_properties[] = sprintf( $invalidProperties[] = sprintf(
"invalid value for 'status', must be one of '%s'", "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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -255,8 +267,8 @@ class Pet implements ModelInterface, ArrayAccess
if ($this->container['photo_urls'] === null) { if ($this->container['photo_urls'] === null) {
return false; return false;
} }
$allowed_values = $this->getStatusAllowableValues(); $allowedValues = $this->getStatusAllowableValues();
if (!in_array($this->container['status'], $allowed_values)) { if (!in_array($this->container['status'], $allowedValues)) {
return false; return false;
} }
return true; return true;
@ -265,6 +277,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets id * Gets id
*
* @return int * @return int
*/ */
public function getId() public function getId()
@ -274,7 +287,9 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Sets id * Sets id
*
* @param int $id * @param int $id
*
* @return $this * @return $this
*/ */
public function setId($id) public function setId($id)
@ -286,6 +301,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets category * Gets category
*
* @return \Swagger\Client\Model\Category * @return \Swagger\Client\Model\Category
*/ */
public function getCategory() public function getCategory()
@ -295,7 +311,9 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Sets category * Sets category
*
* @param \Swagger\Client\Model\Category $category * @param \Swagger\Client\Model\Category $category
*
* @return $this * @return $this
*/ */
public function setCategory($category) public function setCategory($category)
@ -307,6 +325,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets name * Gets name
*
* @return string * @return string
*/ */
public function getName() public function getName()
@ -316,7 +335,9 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Sets name * Sets name
*
* @param string $name * @param string $name
*
* @return $this * @return $this
*/ */
public function setName($name) public function setName($name)
@ -328,6 +349,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets photo_urls * Gets photo_urls
*
* @return string[] * @return string[]
*/ */
public function getPhotoUrls() public function getPhotoUrls()
@ -337,7 +359,9 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Sets photo_urls * Sets photo_urls
*
* @param string[] $photo_urls * @param string[] $photo_urls
*
* @return $this * @return $this
*/ */
public function setPhotoUrls($photo_urls) public function setPhotoUrls($photo_urls)
@ -349,6 +373,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets tags * Gets tags
*
* @return \Swagger\Client\Model\Tag[] * @return \Swagger\Client\Model\Tag[]
*/ */
public function getTags() public function getTags()
@ -358,7 +383,9 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Sets tags * Sets tags
*
* @param \Swagger\Client\Model\Tag[] $tags * @param \Swagger\Client\Model\Tag[] $tags
*
* @return $this * @return $this
*/ */
public function setTags($tags) public function setTags($tags)
@ -370,6 +397,7 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets status * Gets status
*
* @return string * @return string
*/ */
public function getStatus() public function getStatus()
@ -379,17 +407,19 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Sets status * Sets status
*
* @param string $status pet status in the store * @param string $status pet status in the store
*
* @return $this * @return $this
*/ */
public function setStatus($status) public function setStatus($status)
{ {
$allowed_values = $this->getStatusAllowableValues(); $allowedValues = $this->getStatusAllowableValues();
if (!is_null($status) && !in_array($status, $allowed_values)) { if (!is_null($status) && !in_array($status, $allowedValues)) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
sprintf( sprintf(
"Invalid value for 'status', must be one of '%s'", "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. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -409,7 +441,9 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -419,8 +453,10 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -434,7 +470,9 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -444,15 +482,19 @@ class Pet implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* ReadOnlyFirst Class Doc Comment * ReadOnlyFirst Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class ReadOnlyFirst implements ModelInterface, ArrayAccess class ReadOnlyFirst implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'ReadOnlyFirst'; protected static $swaggerModelName = 'ReadOnlyFirst';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -160,13 +168,16 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -181,13 +192,13 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -201,6 +212,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Gets bar * Gets bar
*
* @return string * @return string
*/ */
public function getBar() public function getBar()
@ -210,7 +222,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Sets bar * Sets bar
*
* @param string $bar * @param string $bar
*
* @return $this * @return $this
*/ */
public function setBar($bar) public function setBar($bar)
@ -222,6 +236,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Gets baz * Gets baz
*
* @return string * @return string
*/ */
public function getBaz() public function getBaz()
@ -231,7 +246,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Sets baz * Sets baz
*
* @param string $baz * @param string $baz
*
* @return $this * @return $this
*/ */
public function setBaz($baz) public function setBaz($baz)
@ -242,7 +259,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -252,7 +271,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -262,8 +283,10 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -287,15 +312,19 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* SpecialModelName Class Doc Comment * SpecialModelName Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class SpecialModelName implements ModelInterface, ArrayAccess class SpecialModelName implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = '$special[model.name]'; protected static $swaggerModelName = '$special[model.name]';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -59,6 +61,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -95,6 +100,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -103,6 +109,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -155,13 +163,16 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -175,13 +186,13 @@ class SpecialModelName implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -195,6 +206,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Gets special_property_name * Gets special_property_name
*
* @return int * @return int
*/ */
public function getSpecialPropertyName() public function getSpecialPropertyName()
@ -204,7 +216,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Sets special_property_name * Sets special_property_name
*
* @param int $special_property_name * @param int $special_property_name
*
* @return $this * @return $this
*/ */
public function setSpecialPropertyName($special_property_name) public function setSpecialPropertyName($special_property_name)
@ -215,7 +229,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -225,7 +241,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -235,8 +253,10 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -250,7 +270,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -260,15 +282,19 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* Tag Class Doc Comment * Tag Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class Tag implements ModelInterface, ArrayAccess class Tag implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'Tag'; protected static $swaggerModelName = 'Tag';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -60,6 +62,7 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -98,6 +103,7 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -107,6 +113,7 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -160,13 +168,16 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -181,13 +192,13 @@ class Tag implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -201,6 +212,7 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Gets id * Gets id
*
* @return int * @return int
*/ */
public function getId() public function getId()
@ -210,7 +222,9 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Sets id * Sets id
*
* @param int $id * @param int $id
*
* @return $this * @return $this
*/ */
public function setId($id) public function setId($id)
@ -222,6 +236,7 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Gets name * Gets name
*
* @return string * @return string
*/ */
public function getName() public function getName()
@ -231,7 +246,9 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Sets name * Sets name
*
* @param string $name * @param string $name
*
* @return $this * @return $this
*/ */
public function setName($name) public function setName($name)
@ -242,7 +259,9 @@ class Tag implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -252,7 +271,9 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -262,8 +283,10 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -277,7 +300,9 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -287,15 +312,19 @@ class Tag implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**
@ -30,14 +29,15 @@
namespace Swagger\Client\Model; namespace Swagger\Client\Model;
use \ArrayAccess; use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/** /**
* User Class Doc Comment * User Class Doc Comment
* *
* @category Class * @category Class
* @package Swagger\Client * @package Swagger\Client
* @author Swagger Codegen team * @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen * @link https://github.com/swagger-api/swagger-codegen
*/ */
class User implements ModelInterface, ArrayAccess class User implements ModelInterface, ArrayAccess
{ {
@ -45,12 +45,14 @@ class User implements ModelInterface, ArrayAccess
/** /**
* The original name of the model. * The original name of the model.
*
* @var string * @var string
*/ */
protected static $swaggerModelName = 'User'; protected static $swaggerModelName = 'User';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerTypes = [ protected static $swaggerTypes = [
@ -66,6 +68,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
*
* @var string[] * @var string[]
*/ */
protected static $swaggerFormats = [ 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[] * @var string[]
*/ */
protected static $attributeMap = [ protected static $attributeMap = [
@ -116,6 +121,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to setter functions (for deserialization of responses) * Array of attributes to setter functions (for deserialization of responses)
*
* @var string[] * @var string[]
*/ */
protected static $setters = [ protected static $setters = [
@ -131,6 +137,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Array of attributes to getter functions (for serialization of requests) * Array of attributes to getter functions (for serialization of requests)
*
* @var string[] * @var string[]
*/ */
protected static $getters = [ 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 * @return array
*/ */
@ -190,13 +198,16 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Associative array for storing property values * Associative array for storing property values
*
* @var mixed[] * @var mixed[]
*/ */
protected $container = []; protected $container = [];
/** /**
* Constructor * 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) public function __construct(array $data = null)
{ {
@ -217,13 +228,13 @@ class User implements ModelInterface, ArrayAccess
*/ */
public function listInvalidProperties() 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 true if all passed
* *
* @return bool True if all properties are valid * @return bool True if all properties are valid
@ -237,6 +248,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets id * Gets id
*
* @return int * @return int
*/ */
public function getId() public function getId()
@ -246,7 +258,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets id * Sets id
*
* @param int $id * @param int $id
*
* @return $this * @return $this
*/ */
public function setId($id) public function setId($id)
@ -258,6 +272,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets username * Gets username
*
* @return string * @return string
*/ */
public function getUsername() public function getUsername()
@ -267,7 +282,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets username * Sets username
*
* @param string $username * @param string $username
*
* @return $this * @return $this
*/ */
public function setUsername($username) public function setUsername($username)
@ -279,6 +296,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets first_name * Gets first_name
*
* @return string * @return string
*/ */
public function getFirstName() public function getFirstName()
@ -288,7 +306,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets first_name * Sets first_name
*
* @param string $first_name * @param string $first_name
*
* @return $this * @return $this
*/ */
public function setFirstName($first_name) public function setFirstName($first_name)
@ -300,6 +320,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets last_name * Gets last_name
*
* @return string * @return string
*/ */
public function getLastName() public function getLastName()
@ -309,7 +330,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets last_name * Sets last_name
*
* @param string $last_name * @param string $last_name
*
* @return $this * @return $this
*/ */
public function setLastName($last_name) public function setLastName($last_name)
@ -321,6 +344,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets email * Gets email
*
* @return string * @return string
*/ */
public function getEmail() public function getEmail()
@ -330,7 +354,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets email * Sets email
*
* @param string $email * @param string $email
*
* @return $this * @return $this
*/ */
public function setEmail($email) public function setEmail($email)
@ -342,6 +368,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets password * Gets password
*
* @return string * @return string
*/ */
public function getPassword() public function getPassword()
@ -351,7 +378,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets password * Sets password
*
* @param string $password * @param string $password
*
* @return $this * @return $this
*/ */
public function setPassword($password) public function setPassword($password)
@ -363,6 +392,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets phone * Gets phone
*
* @return string * @return string
*/ */
public function getPhone() public function getPhone()
@ -372,7 +402,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets phone * Sets phone
*
* @param string $phone * @param string $phone
*
* @return $this * @return $this
*/ */
public function setPhone($phone) public function setPhone($phone)
@ -384,6 +416,7 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets user_status * Gets user_status
*
* @return int * @return int
*/ */
public function getUserStatus() public function getUserStatus()
@ -393,7 +426,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets user_status * Sets user_status
*
* @param int $user_status User Status * @param int $user_status User Status
*
* @return $this * @return $this
*/ */
public function setUserStatus($user_status) public function setUserStatus($user_status)
@ -404,7 +439,9 @@ class User implements ModelInterface, ArrayAccess
} }
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return boolean * @return boolean
*/ */
public function offsetExists($offset) public function offsetExists($offset)
@ -414,7 +451,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets offset. * Gets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return mixed * @return mixed
*/ */
public function offsetGet($offset) public function offsetGet($offset)
@ -424,8 +463,10 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Sets value based on offset. * Sets value based on offset.
* @param integer $offset Offset *
* @param mixed $value Value to be set * @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void * @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@ -439,7 +480,9 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Unsets offset. * Unsets offset.
* @param integer $offset Offset *
* @param integer $offset Offset
*
* @return void * @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset)
@ -449,15 +492,19 @@ class User implements ModelInterface, ArrayAccess
/** /**
* Gets the string presentation of the object * Gets the string presentation of the object
*
* @return string * @return string
*/ */
public function __toString() public function __toString()
{ {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print 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 * OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io * Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/ */
/** /**