forked from loafle/openapi-generator-original
Merge branch 'arnested-php-fix-array-handling-2'
This commit is contained in:
commit
b5dba68dfa
@ -36,6 +36,7 @@
|
||||
namespace {{modelPackage}};
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* {{classname}} Class Doc Comment
|
||||
*
|
||||
@ -126,13 +127,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array({{#vars}}
|
||||
/**
|
||||
* $container['{{{name}}}']{{#description}} {{{description}}}{{/description}}
|
||||
* @var {{datatype}}
|
||||
*/
|
||||
'{{{name}}}' => {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}},
|
||||
{{/vars}});
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -140,19 +135,19 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
{{#parentSchema}}parent::__construct($data);{{/parentSchema}}
|
||||
{{#discriminator}}// Initialize discriminator property with the model name.
|
||||
{{#parentSchema}}
|
||||
parent::__construct($data);
|
||||
|
||||
{{/parentSchema}}
|
||||
{{#vars}}
|
||||
$this->container['{{name}}'] = isset($data['{{name}}']) ? $data['{{name}}'] : {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}};
|
||||
{{/vars}}
|
||||
{{#discriminator}}
|
||||
|
||||
// Initialize discriminator property with the model name.
|
||||
$discrimintor = array_search('{{discriminator}}', self::$attributeMap);
|
||||
$this->container[$discrimintor] = static::$swaggerModelName;
|
||||
{{/discriminator}}
|
||||
|
||||
if ($data != null) {
|
||||
{{#vars}}
|
||||
if (isset($data["{{name}}"])) {
|
||||
$this->container['{{name}}'] = $data["{{name}}"];
|
||||
}{{#hasMore}}{{/hasMore}}
|
||||
{{/vars}}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -258,6 +253,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
||||
}
|
||||
|
||||
{{#vars}}
|
||||
|
||||
/**
|
||||
* Gets {{name}}
|
||||
* @return {{datatype}}
|
||||
|
@ -850,6 +850,9 @@ definitions:
|
||||
properties:
|
||||
className:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
default: 'red'
|
||||
AnimalFarm:
|
||||
type: array
|
||||
items:
|
||||
|
@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-05-09T16:31:19.614+08:00
|
||||
- Build date: 2016-05-10T00:30:19.190+08:00
|
||||
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
@ -1,10 +0,0 @@
|
||||
# 200Response
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**class_name** | **string** | |
|
||||
**color** | **string** | | [optional] [default to 'red']
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
# InlineResponse200
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
|
||||
**id** | **int** | |
|
||||
**category** | **object** | | [optional]
|
||||
**status** | **string** | pet status in the store | [optional]
|
||||
**name** | **string** | | [optional]
|
||||
**photo_urls** | **string[]** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Animal Class Doc Comment
|
||||
*
|
||||
@ -57,7 +58,8 @@ class Animal implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $swaggerTypes = array(
|
||||
'class_name' => 'string'
|
||||
'class_name' => 'string',
|
||||
'color' => 'string'
|
||||
);
|
||||
|
||||
static function swaggerTypes() {
|
||||
@ -69,7 +71,8 @@ class Animal implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $attributeMap = array(
|
||||
'class_name' => 'className'
|
||||
'class_name' => 'className',
|
||||
'color' => 'color'
|
||||
);
|
||||
|
||||
static function attributeMap() {
|
||||
@ -81,7 +84,8 @@ class Animal implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $setters = array(
|
||||
'class_name' => 'setClassName'
|
||||
'class_name' => 'setClassName',
|
||||
'color' => 'setColor'
|
||||
);
|
||||
|
||||
static function setters() {
|
||||
@ -93,7 +97,8 @@ class Animal implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $getters = array(
|
||||
'class_name' => 'getClassName'
|
||||
'class_name' => 'getClassName',
|
||||
'color' => 'getColor'
|
||||
);
|
||||
|
||||
static function getters() {
|
||||
@ -108,13 +113,7 @@ class Animal implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['class_name']
|
||||
* @var string
|
||||
*/
|
||||
'class_name' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -122,16 +121,12 @@ class Animal implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['class_name'] = isset($data['class_name']) ? $data['class_name'] : null;
|
||||
$this->container['color'] = isset($data['color']) ? $data['color'] : 'red';
|
||||
|
||||
// Initialize discriminator property with the model name.
|
||||
$discrimintor = array_search('className', self::$attributeMap);
|
||||
$this->container[$discrimintor] = static::$swaggerModelName;
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["class_name"])) {
|
||||
$this->container['class_name'] = $data["class_name"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -162,6 +157,7 @@ class Animal implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets class_name
|
||||
* @return string
|
||||
@ -182,6 +178,27 @@ class Animal implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets color
|
||||
* @return string
|
||||
*/
|
||||
public function getColor()
|
||||
{
|
||||
return $this->container['color'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets color
|
||||
* @param string $color
|
||||
* @return $this
|
||||
*/
|
||||
public function setColor($color)
|
||||
{
|
||||
$this->container['color'] = $color;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* AnimalFarm Class Doc Comment
|
||||
*
|
||||
@ -116,10 +117,6 @@ class AnimalFarm implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* ApiResponse Class Doc Comment
|
||||
*
|
||||
@ -116,25 +117,7 @@ class ApiResponse implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['code']
|
||||
* @var int
|
||||
*/
|
||||
'code' => null,
|
||||
|
||||
/**
|
||||
* $container['type']
|
||||
* @var string
|
||||
*/
|
||||
'type' => null,
|
||||
|
||||
/**
|
||||
* $container['message']
|
||||
* @var string
|
||||
*/
|
||||
'message' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -142,19 +125,9 @@ class ApiResponse implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["code"])) {
|
||||
$this->container['code'] = $data["code"];
|
||||
}
|
||||
if (isset($data["type"])) {
|
||||
$this->container['type'] = $data["type"];
|
||||
}
|
||||
if (isset($data["message"])) {
|
||||
$this->container['message'] = $data["message"];
|
||||
}
|
||||
}
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['type'] = isset($data['type']) ? $data['type'] : null;
|
||||
$this->container['message'] = isset($data['message']) ? $data['message'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -179,6 +152,7 @@ class ApiResponse implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets code
|
||||
* @return int
|
||||
@ -199,6 +173,7 @@ class ApiResponse implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets type
|
||||
* @return string
|
||||
@ -219,6 +194,7 @@ class ApiResponse implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets message
|
||||
* @return string
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Cat Class Doc Comment
|
||||
*
|
||||
@ -108,13 +109,7 @@ class Cat extends Animal implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['declawed']
|
||||
* @var bool
|
||||
*/
|
||||
'declawed' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -124,11 +119,7 @@ class Cat extends Animal implements ArrayAccess
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["declawed"])) {
|
||||
$this->container['declawed'] = $data["declawed"];
|
||||
}
|
||||
}
|
||||
$this->container['declawed'] = isset($data['declawed']) ? $data['declawed'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,6 +144,7 @@ class Cat extends Animal implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets declawed
|
||||
* @return bool
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Category Class Doc Comment
|
||||
*
|
||||
@ -112,19 +113,7 @@ class Category implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['id']
|
||||
* @var int
|
||||
*/
|
||||
'id' => null,
|
||||
|
||||
/**
|
||||
* $container['name']
|
||||
* @var string
|
||||
*/
|
||||
'name' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -132,16 +121,8 @@ class Category implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["id"])) {
|
||||
$this->container['id'] = $data["id"];
|
||||
}
|
||||
if (isset($data["name"])) {
|
||||
$this->container['name'] = $data["name"];
|
||||
}
|
||||
}
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -166,6 +147,7 @@ class Category implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
* @return int
|
||||
@ -186,6 +168,7 @@ class Category implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
* @return string
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Dog Class Doc Comment
|
||||
*
|
||||
@ -108,13 +109,7 @@ class Dog extends Animal implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['breed']
|
||||
* @var string
|
||||
*/
|
||||
'breed' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -124,11 +119,7 @@ class Dog extends Animal implements ArrayAccess
|
||||
{
|
||||
parent::__construct($data);
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["breed"])) {
|
||||
$this->container['breed'] = $data["breed"];
|
||||
}
|
||||
}
|
||||
$this->container['breed'] = isset($data['breed']) ? $data['breed'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,6 +144,7 @@ class Dog extends Animal implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets breed
|
||||
* @return string
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* EnumClass Class Doc Comment
|
||||
*
|
||||
@ -116,10 +117,6 @@ class EnumClass implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* EnumTest Class Doc Comment
|
||||
*
|
||||
@ -155,25 +156,7 @@ class EnumTest implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['enum_string']
|
||||
* @var string
|
||||
*/
|
||||
'enum_string' => null,
|
||||
|
||||
/**
|
||||
* $container['enum_integer']
|
||||
* @var int
|
||||
*/
|
||||
'enum_integer' => null,
|
||||
|
||||
/**
|
||||
* $container['enum_number']
|
||||
* @var double
|
||||
*/
|
||||
'enum_number' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -181,19 +164,9 @@ class EnumTest implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["enum_string"])) {
|
||||
$this->container['enum_string'] = $data["enum_string"];
|
||||
}
|
||||
if (isset($data["enum_integer"])) {
|
||||
$this->container['enum_integer'] = $data["enum_integer"];
|
||||
}
|
||||
if (isset($data["enum_number"])) {
|
||||
$this->container['enum_number'] = $data["enum_number"];
|
||||
}
|
||||
}
|
||||
$this->container['enum_string'] = isset($data['enum_string']) ? $data['enum_string'] : null;
|
||||
$this->container['enum_integer'] = isset($data['enum_integer']) ? $data['enum_integer'] : null;
|
||||
$this->container['enum_number'] = isset($data['enum_number']) ? $data['enum_number'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -242,6 +215,7 @@ class EnumTest implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets enum_string
|
||||
* @return string
|
||||
@ -266,6 +240,7 @@ class EnumTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets enum_integer
|
||||
* @return int
|
||||
@ -290,6 +265,7 @@ class EnumTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets enum_number
|
||||
* @return double
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* FormatTest Class Doc Comment
|
||||
*
|
||||
@ -156,85 +157,7 @@ class FormatTest implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['integer']
|
||||
* @var int
|
||||
*/
|
||||
'integer' => null,
|
||||
|
||||
/**
|
||||
* $container['int32']
|
||||
* @var int
|
||||
*/
|
||||
'int32' => null,
|
||||
|
||||
/**
|
||||
* $container['int64']
|
||||
* @var int
|
||||
*/
|
||||
'int64' => null,
|
||||
|
||||
/**
|
||||
* $container['number']
|
||||
* @var float
|
||||
*/
|
||||
'number' => null,
|
||||
|
||||
/**
|
||||
* $container['float']
|
||||
* @var float
|
||||
*/
|
||||
'float' => null,
|
||||
|
||||
/**
|
||||
* $container['double']
|
||||
* @var double
|
||||
*/
|
||||
'double' => null,
|
||||
|
||||
/**
|
||||
* $container['string']
|
||||
* @var string
|
||||
*/
|
||||
'string' => null,
|
||||
|
||||
/**
|
||||
* $container['byte']
|
||||
* @var string
|
||||
*/
|
||||
'byte' => null,
|
||||
|
||||
/**
|
||||
* $container['binary']
|
||||
* @var string
|
||||
*/
|
||||
'binary' => null,
|
||||
|
||||
/**
|
||||
* $container['date']
|
||||
* @var \DateTime
|
||||
*/
|
||||
'date' => null,
|
||||
|
||||
/**
|
||||
* $container['date_time']
|
||||
* @var \DateTime
|
||||
*/
|
||||
'date_time' => null,
|
||||
|
||||
/**
|
||||
* $container['uuid']
|
||||
* @var string
|
||||
*/
|
||||
'uuid' => null,
|
||||
|
||||
/**
|
||||
* $container['password']
|
||||
* @var string
|
||||
*/
|
||||
'password' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -242,49 +165,19 @@ class FormatTest implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["integer"])) {
|
||||
$this->container['integer'] = $data["integer"];
|
||||
}
|
||||
if (isset($data["int32"])) {
|
||||
$this->container['int32'] = $data["int32"];
|
||||
}
|
||||
if (isset($data["int64"])) {
|
||||
$this->container['int64'] = $data["int64"];
|
||||
}
|
||||
if (isset($data["number"])) {
|
||||
$this->container['number'] = $data["number"];
|
||||
}
|
||||
if (isset($data["float"])) {
|
||||
$this->container['float'] = $data["float"];
|
||||
}
|
||||
if (isset($data["double"])) {
|
||||
$this->container['double'] = $data["double"];
|
||||
}
|
||||
if (isset($data["string"])) {
|
||||
$this->container['string'] = $data["string"];
|
||||
}
|
||||
if (isset($data["byte"])) {
|
||||
$this->container['byte'] = $data["byte"];
|
||||
}
|
||||
if (isset($data["binary"])) {
|
||||
$this->container['binary'] = $data["binary"];
|
||||
}
|
||||
if (isset($data["date"])) {
|
||||
$this->container['date'] = $data["date"];
|
||||
}
|
||||
if (isset($data["date_time"])) {
|
||||
$this->container['date_time'] = $data["date_time"];
|
||||
}
|
||||
if (isset($data["uuid"])) {
|
||||
$this->container['uuid'] = $data["uuid"];
|
||||
}
|
||||
if (isset($data["password"])) {
|
||||
$this->container['password'] = $data["password"];
|
||||
}
|
||||
}
|
||||
$this->container['integer'] = isset($data['integer']) ? $data['integer'] : null;
|
||||
$this->container['int32'] = isset($data['int32']) ? $data['int32'] : null;
|
||||
$this->container['int64'] = isset($data['int64']) ? $data['int64'] : null;
|
||||
$this->container['number'] = isset($data['number']) ? $data['number'] : null;
|
||||
$this->container['float'] = isset($data['float']) ? $data['float'] : null;
|
||||
$this->container['double'] = isset($data['double']) ? $data['double'] : null;
|
||||
$this->container['string'] = isset($data['string']) ? $data['string'] : null;
|
||||
$this->container['byte'] = isset($data['byte']) ? $data['byte'] : null;
|
||||
$this->container['binary'] = isset($data['binary']) ? $data['binary'] : null;
|
||||
$this->container['date'] = isset($data['date']) ? $data['date'] : null;
|
||||
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null;
|
||||
$this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null;
|
||||
$this->container['password'] = isset($data['password']) ? $data['password'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -411,6 +304,7 @@ class FormatTest implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets integer
|
||||
* @return int
|
||||
@ -438,6 +332,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets int32
|
||||
* @return int
|
||||
@ -465,6 +360,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets int64
|
||||
* @return int
|
||||
@ -485,6 +381,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets number
|
||||
* @return float
|
||||
@ -512,6 +409,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets float
|
||||
* @return float
|
||||
@ -539,6 +437,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets double
|
||||
* @return double
|
||||
@ -566,6 +465,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets string
|
||||
* @return string
|
||||
@ -590,6 +490,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets byte
|
||||
* @return string
|
||||
@ -610,6 +511,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets binary
|
||||
* @return string
|
||||
@ -630,6 +532,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets date
|
||||
* @return \DateTime
|
||||
@ -650,6 +553,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets date_time
|
||||
* @return \DateTime
|
||||
@ -670,6 +574,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets uuid
|
||||
* @return string
|
||||
@ -690,6 +595,7 @@ class FormatTest implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets password
|
||||
* @return string
|
||||
|
@ -1,375 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineResponse200
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package Swagger\Client
|
||||
* @author http://github.com/swagger-api/swagger-codegen
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
/**
|
||||
* InlineResponse200 Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description
|
||||
* @package Swagger\Client
|
||||
* @author http://github.com/swagger-api/swagger-codegen
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class InlineResponse200 implements ArrayAccess
|
||||
{
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
static $swaggerTypes = array(
|
||||
'tags' => '\Swagger\Client\Model\Tag[]',
|
||||
'id' => 'int',
|
||||
'category' => 'object',
|
||||
'status' => 'string',
|
||||
'name' => 'string',
|
||||
'photo_urls' => 'string[]'
|
||||
);
|
||||
|
||||
static function swaggerTypes() {
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name, and the value is the original name
|
||||
* @var string[]
|
||||
*/
|
||||
static $attributeMap = array(
|
||||
'tags' => 'tags',
|
||||
'id' => 'id',
|
||||
'category' => 'category',
|
||||
'status' => 'status',
|
||||
'name' => 'name',
|
||||
'photo_urls' => 'photoUrls'
|
||||
);
|
||||
|
||||
static function attributeMap() {
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
static $setters = array(
|
||||
'tags' => 'setTags',
|
||||
'id' => 'setId',
|
||||
'category' => 'setCategory',
|
||||
'status' => 'setStatus',
|
||||
'name' => 'setName',
|
||||
'photo_urls' => 'setPhotoUrls'
|
||||
);
|
||||
|
||||
static function setters() {
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
static $getters = array(
|
||||
'tags' => 'getTags',
|
||||
'id' => 'getId',
|
||||
'category' => 'getCategory',
|
||||
'status' => 'getStatus',
|
||||
'name' => 'getName',
|
||||
'photo_urls' => 'getPhotoUrls'
|
||||
);
|
||||
|
||||
static function getters() {
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
const STATUS_AVAILABLE = 'available';
|
||||
const STATUS_PENDING = 'pending';
|
||||
const STATUS_SOLD = 'sold';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
*/
|
||||
public function getStatusAllowableValues() {
|
||||
return [
|
||||
self::STATUS_AVAILABLE,
|
||||
self::STATUS_PENDING,
|
||||
self::STATUS_SOLD,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* $tags
|
||||
* @var \Swagger\Client\Model\Tag[]
|
||||
*/
|
||||
protected $tags;
|
||||
|
||||
/**
|
||||
* $id
|
||||
* @var int
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* $category
|
||||
* @var object
|
||||
*/
|
||||
protected $category;
|
||||
|
||||
/**
|
||||
* $status pet status in the store
|
||||
* @var string
|
||||
*/
|
||||
protected $status;
|
||||
|
||||
/**
|
||||
* $name
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* $photo_urls
|
||||
* @var string[]
|
||||
*/
|
||||
protected $photo_urls;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property value initalizing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
if ($data != null) {
|
||||
$this->tags = $data["tags"];
|
||||
$this->id = $data["id"];
|
||||
$this->category = $data["category"];
|
||||
$this->status = $data["status"];
|
||||
$this->name = $data["name"];
|
||||
$this->photo_urls = $data["photo_urls"];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tags.
|
||||
* @return \Swagger\Client\Model\Tag[]
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets tags.
|
||||
* @param \Swagger\Client\Model\Tag[] $tags
|
||||
* @return $this
|
||||
*/
|
||||
public function setTags($tags)
|
||||
{
|
||||
|
||||
$this->tags = $tags;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets id.
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id.
|
||||
* @param int $id
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
|
||||
$this->id = $id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets category.
|
||||
* @return object
|
||||
*/
|
||||
public function getCategory()
|
||||
{
|
||||
return $this->category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets category.
|
||||
* @param object $category
|
||||
* @return $this
|
||||
*/
|
||||
public function setCategory($category)
|
||||
{
|
||||
|
||||
$this->category = $category;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status.
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets status.
|
||||
* @param string $status pet status in the store
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
{
|
||||
$allowed_values = array("available", "pending", "sold");
|
||||
if (!in_array($status, $allowed_values)) {
|
||||
throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'available', 'pending', 'sold'");
|
||||
}
|
||||
$this->status = $status;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name.
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name.
|
||||
* @param string $name
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets photo_urls.
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPhotoUrls()
|
||||
{
|
||||
return $this->photo_urls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets photo_urls.
|
||||
* @param string[] $photo_urls
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhotoUrls($photo_urls)
|
||||
{
|
||||
|
||||
$this->photo_urls = $photo_urls;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->$offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->$offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
$this->$offset = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->$offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object.
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) {
|
||||
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Model200Response Class Doc Comment
|
||||
*
|
||||
@ -108,13 +109,7 @@ class Model200Response implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['name']
|
||||
* @var int
|
||||
*/
|
||||
'name' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -122,13 +117,7 @@ class Model200Response implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["name"])) {
|
||||
$this->container['name'] = $data["name"];
|
||||
}
|
||||
}
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,6 +142,7 @@ class Model200Response implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
* @return int
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* ModelReturn Class Doc Comment
|
||||
*
|
||||
@ -108,13 +109,7 @@ class ModelReturn implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['return']
|
||||
* @var int
|
||||
*/
|
||||
'return' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -122,13 +117,7 @@ class ModelReturn implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["return"])) {
|
||||
$this->container['return'] = $data["return"];
|
||||
}
|
||||
}
|
||||
$this->container['return'] = isset($data['return']) ? $data['return'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,6 +142,7 @@ class ModelReturn implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets return
|
||||
* @return int
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Name Class Doc Comment
|
||||
*
|
||||
@ -116,25 +117,7 @@ class Name implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['name']
|
||||
* @var int
|
||||
*/
|
||||
'name' => null,
|
||||
|
||||
/**
|
||||
* $container['snake_case']
|
||||
* @var int
|
||||
*/
|
||||
'snake_case' => null,
|
||||
|
||||
/**
|
||||
* $container['property']
|
||||
* @var string
|
||||
*/
|
||||
'property' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -142,19 +125,9 @@ class Name implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["name"])) {
|
||||
$this->container['name'] = $data["name"];
|
||||
}
|
||||
if (isset($data["snake_case"])) {
|
||||
$this->container['snake_case'] = $data["snake_case"];
|
||||
}
|
||||
if (isset($data["property"])) {
|
||||
$this->container['property'] = $data["property"];
|
||||
}
|
||||
}
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['snake_case'] = isset($data['snake_case']) ? $data['snake_case'] : null;
|
||||
$this->container['property'] = isset($data['property']) ? $data['property'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,6 +158,7 @@ class Name implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
* @return int
|
||||
@ -205,6 +179,7 @@ class Name implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets snake_case
|
||||
* @return int
|
||||
@ -225,6 +200,7 @@ class Name implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets property
|
||||
* @return string
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Order Class Doc Comment
|
||||
*
|
||||
@ -143,43 +144,7 @@ class Order implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['id']
|
||||
* @var int
|
||||
*/
|
||||
'id' => null,
|
||||
|
||||
/**
|
||||
* $container['pet_id']
|
||||
* @var int
|
||||
*/
|
||||
'pet_id' => null,
|
||||
|
||||
/**
|
||||
* $container['quantity']
|
||||
* @var int
|
||||
*/
|
||||
'quantity' => null,
|
||||
|
||||
/**
|
||||
* $container['ship_date']
|
||||
* @var \DateTime
|
||||
*/
|
||||
'ship_date' => null,
|
||||
|
||||
/**
|
||||
* $container['status'] Order Status
|
||||
* @var string
|
||||
*/
|
||||
'status' => null,
|
||||
|
||||
/**
|
||||
* $container['complete']
|
||||
* @var bool
|
||||
*/
|
||||
'complete' => false,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -187,28 +152,12 @@ class Order implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["id"])) {
|
||||
$this->container['id'] = $data["id"];
|
||||
}
|
||||
if (isset($data["pet_id"])) {
|
||||
$this->container['pet_id'] = $data["pet_id"];
|
||||
}
|
||||
if (isset($data["quantity"])) {
|
||||
$this->container['quantity'] = $data["quantity"];
|
||||
}
|
||||
if (isset($data["ship_date"])) {
|
||||
$this->container['ship_date'] = $data["ship_date"];
|
||||
}
|
||||
if (isset($data["status"])) {
|
||||
$this->container['status'] = $data["status"];
|
||||
}
|
||||
if (isset($data["complete"])) {
|
||||
$this->container['complete'] = $data["complete"];
|
||||
}
|
||||
}
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['pet_id'] = isset($data['pet_id']) ? $data['pet_id'] : null;
|
||||
$this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null;
|
||||
$this->container['ship_date'] = isset($data['ship_date']) ? $data['ship_date'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
$this->container['complete'] = isset($data['complete']) ? $data['complete'] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -241,6 +190,7 @@ class Order implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
* @return int
|
||||
@ -261,6 +211,7 @@ class Order implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets pet_id
|
||||
* @return int
|
||||
@ -281,6 +232,7 @@ class Order implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets quantity
|
||||
* @return int
|
||||
@ -301,6 +253,7 @@ class Order implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets ship_date
|
||||
* @return \DateTime
|
||||
@ -321,6 +274,7 @@ class Order implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
@ -345,6 +299,7 @@ class Order implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets complete
|
||||
* @return bool
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Pet Class Doc Comment
|
||||
*
|
||||
@ -143,43 +144,7 @@ class Pet implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['id']
|
||||
* @var int
|
||||
*/
|
||||
'id' => null,
|
||||
|
||||
/**
|
||||
* $container['category']
|
||||
* @var \Swagger\Client\Model\Category
|
||||
*/
|
||||
'category' => null,
|
||||
|
||||
/**
|
||||
* $container['name']
|
||||
* @var string
|
||||
*/
|
||||
'name' => null,
|
||||
|
||||
/**
|
||||
* $container['photo_urls']
|
||||
* @var string[]
|
||||
*/
|
||||
'photo_urls' => null,
|
||||
|
||||
/**
|
||||
* $container['tags']
|
||||
* @var \Swagger\Client\Model\Tag[]
|
||||
*/
|
||||
'tags' => null,
|
||||
|
||||
/**
|
||||
* $container['status'] pet status in the store
|
||||
* @var string
|
||||
*/
|
||||
'status' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -187,28 +152,12 @@ class Pet implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["id"])) {
|
||||
$this->container['id'] = $data["id"];
|
||||
}
|
||||
if (isset($data["category"])) {
|
||||
$this->container['category'] = $data["category"];
|
||||
}
|
||||
if (isset($data["name"])) {
|
||||
$this->container['name'] = $data["name"];
|
||||
}
|
||||
if (isset($data["photo_urls"])) {
|
||||
$this->container['photo_urls'] = $data["photo_urls"];
|
||||
}
|
||||
if (isset($data["tags"])) {
|
||||
$this->container['tags'] = $data["tags"];
|
||||
}
|
||||
if (isset($data["status"])) {
|
||||
$this->container['status'] = $data["status"];
|
||||
}
|
||||
}
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['category'] = isset($data['category']) ? $data['category'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
$this->container['photo_urls'] = isset($data['photo_urls']) ? $data['photo_urls'] : null;
|
||||
$this->container['tags'] = isset($data['tags']) ? $data['tags'] : null;
|
||||
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -253,6 +202,7 @@ class Pet implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
* @return int
|
||||
@ -273,6 +223,7 @@ class Pet implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets category
|
||||
* @return \Swagger\Client\Model\Category
|
||||
@ -293,6 +244,7 @@ class Pet implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
* @return string
|
||||
@ -313,6 +265,7 @@ class Pet implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets photo_urls
|
||||
* @return string[]
|
||||
@ -333,6 +286,7 @@ class Pet implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tags
|
||||
* @return \Swagger\Client\Model\Tag[]
|
||||
@ -353,6 +307,7 @@ class Pet implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets status
|
||||
* @return string
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* SpecialModelName Class Doc Comment
|
||||
*
|
||||
@ -108,13 +109,7 @@ class SpecialModelName implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['special_property_name']
|
||||
* @var int
|
||||
*/
|
||||
'special_property_name' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -122,13 +117,7 @@ class SpecialModelName implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["special_property_name"])) {
|
||||
$this->container['special_property_name'] = $data["special_property_name"];
|
||||
}
|
||||
}
|
||||
$this->container['special_property_name'] = isset($data['special_property_name']) ? $data['special_property_name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,6 +142,7 @@ class SpecialModelName implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets special_property_name
|
||||
* @return int
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* Tag Class Doc Comment
|
||||
*
|
||||
@ -112,19 +113,7 @@ class Tag implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['id']
|
||||
* @var int
|
||||
*/
|
||||
'id' => null,
|
||||
|
||||
/**
|
||||
* $container['name']
|
||||
* @var string
|
||||
*/
|
||||
'name' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -132,16 +121,8 @@ class Tag implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["id"])) {
|
||||
$this->container['id'] = $data["id"];
|
||||
}
|
||||
if (isset($data["name"])) {
|
||||
$this->container['name'] = $data["name"];
|
||||
}
|
||||
}
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -166,6 +147,7 @@ class Tag implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
* @return int
|
||||
@ -186,6 +168,7 @@ class Tag implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
* @return string
|
||||
|
@ -34,6 +34,7 @@
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* User Class Doc Comment
|
||||
*
|
||||
@ -136,55 +137,7 @@ class User implements ArrayAccess
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array(
|
||||
/**
|
||||
* $container['id']
|
||||
* @var int
|
||||
*/
|
||||
'id' => null,
|
||||
|
||||
/**
|
||||
* $container['username']
|
||||
* @var string
|
||||
*/
|
||||
'username' => null,
|
||||
|
||||
/**
|
||||
* $container['first_name']
|
||||
* @var string
|
||||
*/
|
||||
'first_name' => null,
|
||||
|
||||
/**
|
||||
* $container['last_name']
|
||||
* @var string
|
||||
*/
|
||||
'last_name' => null,
|
||||
|
||||
/**
|
||||
* $container['email']
|
||||
* @var string
|
||||
*/
|
||||
'email' => null,
|
||||
|
||||
/**
|
||||
* $container['password']
|
||||
* @var string
|
||||
*/
|
||||
'password' => null,
|
||||
|
||||
/**
|
||||
* $container['phone']
|
||||
* @var string
|
||||
*/
|
||||
'phone' => null,
|
||||
|
||||
/**
|
||||
* $container['user_status'] User Status
|
||||
* @var int
|
||||
*/
|
||||
'user_status' => null,
|
||||
);
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -192,34 +145,14 @@ class User implements ArrayAccess
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
|
||||
|
||||
if ($data != null) {
|
||||
if (isset($data["id"])) {
|
||||
$this->container['id'] = $data["id"];
|
||||
}
|
||||
if (isset($data["username"])) {
|
||||
$this->container['username'] = $data["username"];
|
||||
}
|
||||
if (isset($data["first_name"])) {
|
||||
$this->container['first_name'] = $data["first_name"];
|
||||
}
|
||||
if (isset($data["last_name"])) {
|
||||
$this->container['last_name'] = $data["last_name"];
|
||||
}
|
||||
if (isset($data["email"])) {
|
||||
$this->container['email'] = $data["email"];
|
||||
}
|
||||
if (isset($data["password"])) {
|
||||
$this->container['password'] = $data["password"];
|
||||
}
|
||||
if (isset($data["phone"])) {
|
||||
$this->container['phone'] = $data["phone"];
|
||||
}
|
||||
if (isset($data["user_status"])) {
|
||||
$this->container['user_status'] = $data["user_status"];
|
||||
}
|
||||
}
|
||||
$this->container['id'] = isset($data['id']) ? $data['id'] : null;
|
||||
$this->container['username'] = isset($data['username']) ? $data['username'] : null;
|
||||
$this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null;
|
||||
$this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null;
|
||||
$this->container['email'] = isset($data['email']) ? $data['email'] : null;
|
||||
$this->container['password'] = isset($data['password']) ? $data['password'] : null;
|
||||
$this->container['phone'] = isset($data['phone']) ? $data['phone'] : null;
|
||||
$this->container['user_status'] = isset($data['user_status']) ? $data['user_status'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -244,6 +177,7 @@ class User implements ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
* @return int
|
||||
@ -264,6 +198,7 @@ class User implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets username
|
||||
* @return string
|
||||
@ -284,6 +219,7 @@ class User implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets first_name
|
||||
* @return string
|
||||
@ -304,6 +240,7 @@ class User implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets last_name
|
||||
* @return string
|
||||
@ -324,6 +261,7 @@ class User implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets email
|
||||
* @return string
|
||||
@ -344,6 +282,7 @@ class User implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets password
|
||||
* @return string
|
||||
@ -364,6 +303,7 @@ class User implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets phone
|
||||
* @return string
|
||||
@ -384,6 +324,7 @@ class User implements ArrayAccess
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user_status
|
||||
* @return int
|
||||
|
@ -1,70 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineResponse200Test
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package Swagger\Client
|
||||
* @author http://github.com/swagger-api/swagger-codegen
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
/**
|
||||
* Copyright 2016 SmartBear Software
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
/**
|
||||
* InlineResponse200Test Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description
|
||||
* @package Swagger\Client
|
||||
* @author http://github.com/swagger-api/swagger-codegen
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class InlineResponse200Test extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public static function setUpBeforeClass() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public static function tearDownAfterClass() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test InlineResponse200
|
||||
*/
|
||||
public function testInlineResponse200() {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -450,6 +450,20 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
|
||||
// test if default values works
|
||||
public function testDefaultValues()
|
||||
{
|
||||
// add some animals to the farm to make sure the ArrayAccess
|
||||
// interface works
|
||||
$dog = new Swagger\Client\Model\Dog();
|
||||
$animal = new Swagger\Client\Model\Animal();
|
||||
|
||||
// assert we can look up the animals in the farm by array
|
||||
// indices (let's try a random order)
|
||||
$this->assertSame('red', $dog->getColor());
|
||||
$this->assertSame('red', $animal->getColor());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user