add enum support to php, refactor post process model enum

This commit is contained in:
wing328
2016-04-02 19:03:32 +08:00
parent f2d180f9a8
commit 800a858acb
47 changed files with 1480 additions and 663 deletions

View File

@@ -1,11 +1,11 @@
# SwaggerClient-php
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-05-02T21:49:03.153+08:00
- Build date: 2016-04-02T19:03:06.710+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements
@@ -22,11 +22,11 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
"url": "https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
"YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID": "*@dev"
}
}
```
@@ -58,24 +58,16 @@ Please follow the [installation procedure](#installation--usage) and then run th
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi();
$number = 3.4; // float | None
$double = 1.2; // double | None
$string = "string_example"; // string | None
$byte = "B"; // string | None
$integer = 56; // int | None
$int32 = 56; // int | None
$int64 = 789; // int | None
$float = 3.4; // float | None
$binary = "B"; // string | None
$date = new \DateTime(); // \DateTime | None
$date_time = new \DateTime(); // \DateTime | None
$password = "password_example"; // string | None
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\PetApi();
$body = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet object that needs to be added to the store
try {
$api_instance->testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password);
$api_instance->addPet($body);
} catch (Exception $e) {
echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), "\n";
echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), "\n";
}
?>
@@ -87,17 +79,21 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addpetusingbytearray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getpetbyidinobject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
*PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petpetidtestingbytearraytrueget) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**findOrdersByStatus**](docs/StoreApi.md#findordersbystatus) | **GET** /store/findByStatus | Finds orders by status
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getinventoryinobject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user
@@ -113,11 +109,11 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [Animal](docs/Animal.md)
- [ApiResponse](docs/ApiResponse.md)
- [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [Dog](docs/Dog.md)
- [FormatTest](docs/FormatTest.md)
- [EnumTest](docs/EnumTest.md)
- [InlineResponse200](docs/InlineResponse200.md)
- [Model200Response](docs/Model200Response.md)
- [ModelReturn](docs/ModelReturn.md)
- [Name](docs/Name.md)
@@ -131,17 +127,45 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
## test_api_key_header
- **Type**: API key
- **API key parameter name**: test_api_key_header
- **Location**: HTTP header
## api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
## test_http_basic
- **Type**: HTTP basic authentication
## test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **Location**: HTTP header
## test_api_client_id
- **Type**: API key
- **API key parameter name**: x-test_api_client_id
- **Location**: HTTP header
## test_api_key_query
- **Type**: API key
- **API key parameter name**: test_api_key_query
- **Location**: URL query string
## petstore_auth
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets

View File

@@ -60,7 +60,7 @@ class PetApi
* Constructor
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
function __construct($apiClient = null)
function __construct(\Swagger\Client\ApiClient $apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
@@ -84,7 +84,7 @@ class PetApi
* @param \Swagger\Client\ApiClient $apiClient set the API client
* @return PetApi
*/
public function setApiClient(ApiClient $apiClient)
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;

View File

@@ -60,7 +60,7 @@ class StoreApi
* Constructor
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
function __construct($apiClient = null)
function __construct(\Swagger\Client\ApiClient $apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
@@ -84,7 +84,7 @@ class StoreApi
* @param \Swagger\Client\ApiClient $apiClient set the API client
* @return StoreApi
*/
public function setApiClient(ApiClient $apiClient)
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;

View File

@@ -60,7 +60,7 @@ class UserApi
* Constructor
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
*/
function __construct($apiClient = null)
function __construct(\Swagger\Client\ApiClient $apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
@@ -84,7 +84,7 @@ class UserApi
* @param \Swagger\Client\ApiClient $apiClient set the API client
* @return UserApi
*/
public function setApiClient(ApiClient $apiClient)
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;

View File

@@ -69,7 +69,7 @@ class ApiClient
* Constructor of the class
* @param Configuration $config config for this ApiClient
*/
public function __construct(Configuration $config = null)
public function __construct(\Swagger\Client\Configuration $config = null)
{
if ($config == null) {
$config = Configuration::getDefaultConfiguration();

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Animal implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Animal';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -59,19 +53,19 @@ class Animal implements ArrayAccess
static $swaggerTypes = array(
'class_name' => '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[]
* @var string[]
*/
static $attributeMap = array(
'class_name' => 'className'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -83,7 +77,7 @@ class Animal implements ArrayAccess
static $setters = array(
'class_name' => 'setClassName'
);
static function setters() {
return self::$setters;
}
@@ -95,16 +89,22 @@ class Animal implements ArrayAccess
static $getters = array(
'class_name' => 'getClassName'
);
static function getters() {
return self::$getters;
}
/**
* $class_name
* @var string
*/
protected $class_name;
/**
* Constructor
@@ -113,14 +113,11 @@ class Animal implements ArrayAccess
public function __construct(array $data = null)
{
// Initialize discriminator property with the model name.
$discrimintor = array_search('className', self::$attributeMap);
$this->{$discrimintor} = static::$swaggerModelName;
if ($data != null) {
$this->class_name = $data["class_name"];
}
}
/**
* Gets class_name
* @return string
@@ -129,7 +126,7 @@ class Animal implements ArrayAccess
{
return $this->class_name;
}
/**
* Sets class_name
* @param string $class_name
@@ -141,6 +138,7 @@ class Animal implements ArrayAccess
$this->class_name = $class_name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -150,7 +148,7 @@ class Animal implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -160,7 +158,7 @@ class Animal implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -171,7 +169,7 @@ class Animal implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -181,17 +179,17 @@ class Animal implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Cat extends Animal implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Cat';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -59,19 +53,19 @@ class Cat extends Animal implements ArrayAccess
static $swaggerTypes = array(
'declawed' => 'bool'
);
static function swaggerTypes() {
return self::$swaggerTypes + parent::swaggerTypes();
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
* @var string[]
*/
static $attributeMap = array(
'declawed' => 'declawed'
);
static function attributeMap() {
return parent::attributeMap() + self::$attributeMap;
}
@@ -83,7 +77,7 @@ class Cat extends Animal implements ArrayAccess
static $setters = array(
'declawed' => 'setDeclawed'
);
static function setters() {
return parent::setters() + self::$setters;
}
@@ -95,16 +89,22 @@ class Cat extends Animal implements ArrayAccess
static $getters = array(
'declawed' => 'getDeclawed'
);
static function getters() {
return parent::getters() + self::$getters;
}
/**
* $declawed
* @var bool
*/
protected $declawed;
/**
* Constructor
@@ -113,11 +113,11 @@ class Cat extends Animal implements ArrayAccess
public function __construct(array $data = null)
{
parent::__construct($data);
if ($data != null) {
$this->declawed = $data["declawed"];
}
}
/**
* Gets declawed
* @return bool
@@ -126,7 +126,7 @@ class Cat extends Animal implements ArrayAccess
{
return $this->declawed;
}
/**
* Sets declawed
* @param bool $declawed
@@ -138,6 +138,7 @@ class Cat extends Animal implements ArrayAccess
$this->declawed = $declawed;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -147,7 +148,7 @@ class Cat extends Animal implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -157,7 +158,7 @@ class Cat extends Animal implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -168,7 +169,7 @@ class Cat extends Animal implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -178,17 +179,17 @@ class Cat extends Animal implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Category implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Category';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -60,20 +54,20 @@ class Category implements ArrayAccess
'id' => 'int',
'name' => '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[]
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
'name' => 'name'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -86,7 +80,7 @@ class Category implements ArrayAccess
'id' => 'setId',
'name' => 'setName'
);
static function setters() {
return self::$setters;
}
@@ -99,21 +93,28 @@ class Category implements ArrayAccess
'id' => 'getId',
'name' => 'getName'
);
static function getters() {
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $name
* @var string
*/
protected $name;
/**
* Constructor
@@ -122,12 +123,12 @@ class Category implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->name = $data["name"];
}
}
/**
* Gets id
* @return int
@@ -136,7 +137,7 @@ class Category implements ArrayAccess
{
return $this->id;
}
/**
* Sets id
* @param int $id
@@ -148,6 +149,7 @@ class Category implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets name
* @return string
@@ -156,7 +158,7 @@ class Category implements ArrayAccess
{
return $this->name;
}
/**
* Sets name
* @param string $name
@@ -168,6 +170,7 @@ class Category implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -177,7 +180,7 @@ class Category implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -187,7 +190,7 @@ class Category implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -198,7 +201,7 @@ class Category implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -208,17 +211,17 @@ class Category implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Dog extends Animal implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Dog';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -59,19 +53,19 @@ class Dog extends Animal implements ArrayAccess
static $swaggerTypes = array(
'breed' => 'string'
);
static function swaggerTypes() {
return self::$swaggerTypes + parent::swaggerTypes();
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
* @var string[]
*/
static $attributeMap = array(
'breed' => 'breed'
);
static function attributeMap() {
return parent::attributeMap() + self::$attributeMap;
}
@@ -83,7 +77,7 @@ class Dog extends Animal implements ArrayAccess
static $setters = array(
'breed' => 'setBreed'
);
static function setters() {
return parent::setters() + self::$setters;
}
@@ -95,16 +89,22 @@ class Dog extends Animal implements ArrayAccess
static $getters = array(
'breed' => 'getBreed'
);
static function getters() {
return parent::getters() + self::$getters;
}
/**
* $breed
* @var string
*/
protected $breed;
/**
* Constructor
@@ -113,11 +113,11 @@ class Dog extends Animal implements ArrayAccess
public function __construct(array $data = null)
{
parent::__construct($data);
if ($data != null) {
$this->breed = $data["breed"];
}
}
/**
* Gets breed
* @return string
@@ -126,7 +126,7 @@ class Dog extends Animal implements ArrayAccess
{
return $this->breed;
}
/**
* Sets breed
* @param string $breed
@@ -138,6 +138,7 @@ class Dog extends Animal implements ArrayAccess
$this->breed = $breed;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -147,7 +148,7 @@ class Dog extends Animal implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -157,7 +158,7 @@ class Dog extends Animal implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -168,7 +169,7 @@ class Dog extends Animal implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -178,17 +179,17 @@ class Dog extends Animal implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class InlineResponse200 implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'inline_response_200';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -64,14 +58,14 @@ class InlineResponse200 implements ArrayAccess
'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[]
* @var string[]
*/
static $attributeMap = array(
'tags' => 'tags',
@@ -81,7 +75,7 @@ class InlineResponse200 implements ArrayAccess
'name' => 'name',
'photo_urls' => 'photoUrls'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -98,7 +92,7 @@ class InlineResponse200 implements ArrayAccess
'name' => 'setName',
'photo_urls' => 'setPhotoUrls'
);
static function setters() {
return self::$setters;
}
@@ -115,41 +109,55 @@ class InlineResponse200 implements ArrayAccess
'name' => 'getName',
'photo_urls' => 'getPhotoUrls'
);
static function getters() {
return self::$getters;
}
const STATUS_AVAILABLE = "available";
const STATUS_PENDING = "pending";
const STATUS_SOLD = "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
@@ -158,7 +166,6 @@ class InlineResponse200 implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->tags = $data["tags"];
$this->id = $data["id"];
@@ -168,6 +175,7 @@ class InlineResponse200 implements ArrayAccess
$this->photo_urls = $data["photo_urls"];
}
}
/**
* Gets tags
* @return \Swagger\Client\Model\Tag[]
@@ -176,7 +184,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->tags;
}
/**
* Sets tags
* @param \Swagger\Client\Model\Tag[] $tags
@@ -188,6 +196,7 @@ class InlineResponse200 implements ArrayAccess
$this->tags = $tags;
return $this;
}
/**
* Gets id
* @return int
@@ -196,7 +205,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->id;
}
/**
* Sets id
* @param int $id
@@ -208,6 +217,7 @@ class InlineResponse200 implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets category
* @return object
@@ -216,7 +226,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->category;
}
/**
* Sets category
* @param object $category
@@ -228,6 +238,7 @@ class InlineResponse200 implements ArrayAccess
$this->category = $category;
return $this;
}
/**
* Gets status
* @return string
@@ -236,7 +247,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->status;
}
/**
* Sets status
* @param string $status pet status in the store
@@ -251,6 +262,7 @@ class InlineResponse200 implements ArrayAccess
$this->status = $status;
return $this;
}
/**
* Gets name
* @return string
@@ -259,7 +271,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->name;
}
/**
* Sets name
* @param string $name
@@ -271,6 +283,7 @@ class InlineResponse200 implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Gets photo_urls
* @return string[]
@@ -279,7 +292,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->photo_urls;
}
/**
* Sets photo_urls
* @param string[] $photo_urls
@@ -291,6 +304,7 @@ class InlineResponse200 implements ArrayAccess
$this->photo_urls = $photo_urls;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -300,7 +314,7 @@ class InlineResponse200 implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -310,7 +324,7 @@ class InlineResponse200 implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -321,7 +335,7 @@ class InlineResponse200 implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -331,17 +345,17 @@ class InlineResponse200 implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -38,7 +38,7 @@ use \ArrayAccess;
* Model200Response Class Doc Comment
*
* @category Class
* @description Model for testing model name starting with number
* @description
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Model200Response implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = '200_response';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -59,19 +53,19 @@ class Model200Response implements ArrayAccess
static $swaggerTypes = array(
'name' => 'int'
);
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[]
* @var string[]
*/
static $attributeMap = array(
'name' => 'name'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -83,7 +77,7 @@ class Model200Response implements ArrayAccess
static $setters = array(
'name' => 'setName'
);
static function setters() {
return self::$setters;
}
@@ -95,16 +89,22 @@ class Model200Response implements ArrayAccess
static $getters = array(
'name' => 'getName'
);
static function getters() {
return self::$getters;
}
/**
* $name
* @var int
*/
protected $name;
/**
* Constructor
@@ -113,11 +113,11 @@ class Model200Response implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->name = $data["name"];
}
}
/**
* Gets name
* @return int
@@ -126,7 +126,7 @@ class Model200Response implements ArrayAccess
{
return $this->name;
}
/**
* Sets name
* @param int $name
@@ -138,6 +138,7 @@ class Model200Response implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -147,7 +148,7 @@ class Model200Response implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -157,7 +158,7 @@ class Model200Response implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -168,7 +169,7 @@ class Model200Response implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -178,17 +179,17 @@ class Model200Response implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -38,7 +38,7 @@ use \ArrayAccess;
* ModelReturn Class Doc Comment
*
* @category Class
* @description Model for testing reserved words
* @description
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class ModelReturn implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Return';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -59,19 +53,19 @@ class ModelReturn implements ArrayAccess
static $swaggerTypes = array(
'return' => 'int'
);
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[]
* @var string[]
*/
static $attributeMap = array(
'return' => 'return'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -83,7 +77,7 @@ class ModelReturn implements ArrayAccess
static $setters = array(
'return' => 'setReturn'
);
static function setters() {
return self::$setters;
}
@@ -95,16 +89,22 @@ class ModelReturn implements ArrayAccess
static $getters = array(
'return' => 'getReturn'
);
static function getters() {
return self::$getters;
}
/**
* $return
* @var int
*/
protected $return;
/**
* Constructor
@@ -113,11 +113,11 @@ class ModelReturn implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->return = $data["return"];
}
}
/**
* Gets return
* @return int
@@ -126,7 +126,7 @@ class ModelReturn implements ArrayAccess
{
return $this->return;
}
/**
* Sets return
* @param int $return
@@ -138,6 +138,7 @@ class ModelReturn implements ArrayAccess
$this->return = $return;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -147,7 +148,7 @@ class ModelReturn implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -157,7 +158,7 @@ class ModelReturn implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -168,7 +169,7 @@ class ModelReturn implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -178,17 +179,17 @@ class ModelReturn implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -38,7 +38,7 @@ use \ArrayAccess;
* Name Class Doc Comment
*
* @category Class
* @description Model for testing model name same as property name
* @description
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@@ -46,36 +46,28 @@ use \ArrayAccess;
*/
class Name implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Name';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'name' => 'int',
'snake_case' => 'int',
'property' => 'string'
'snake_case' => 'int'
);
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[]
* @var string[]
*/
static $attributeMap = array(
'name' => 'name',
'snake_case' => 'snake_case',
'property' => 'property'
'snake_case' => 'snake_case'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -86,10 +78,9 @@ class Name implements ArrayAccess
*/
static $setters = array(
'name' => 'setName',
'snake_case' => 'setSnakeCase',
'property' => 'setProperty'
'snake_case' => 'setSnakeCase'
);
static function setters() {
return self::$setters;
}
@@ -100,29 +91,30 @@ class Name implements ArrayAccess
*/
static $getters = array(
'name' => 'getName',
'snake_case' => 'getSnakeCase',
'property' => 'getProperty'
'snake_case' => 'getSnakeCase'
);
static function getters() {
return self::$getters;
}
/**
* $name
* @var int
*/
protected $name;
/**
* $snake_case
* @var int
*/
protected $snake_case;
/**
* $property
* @var string
*/
protected $property;
/**
* Constructor
@@ -131,13 +123,12 @@ class Name implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->name = $data["name"];
$this->snake_case = $data["snake_case"];
$this->property = $data["property"];
}
}
/**
* Gets name
* @return int
@@ -146,7 +137,7 @@ class Name implements ArrayAccess
{
return $this->name;
}
/**
* Sets name
* @param int $name
@@ -158,6 +149,7 @@ class Name implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Gets snake_case
* @return int
@@ -166,7 +158,7 @@ class Name implements ArrayAccess
{
return $this->snake_case;
}
/**
* Sets snake_case
* @param int $snake_case
@@ -178,26 +170,7 @@ class Name implements ArrayAccess
$this->snake_case = $snake_case;
return $this;
}
/**
* Gets property
* @return string
*/
public function getProperty()
{
return $this->property;
}
/**
* Sets property
* @param string $property
* @return $this
*/
public function setProperty($property)
{
$this->property = $property;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -207,7 +180,7 @@ class Name implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -217,7 +190,7 @@ class Name implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -228,7 +201,7 @@ class Name implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -238,17 +211,17 @@ class Name implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Order implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Order';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -64,14 +58,14 @@ class Order implements ArrayAccess
'status' => 'string',
'complete' => 'bool'
);
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[]
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
@@ -81,7 +75,7 @@ class Order implements ArrayAccess
'status' => 'status',
'complete' => 'complete'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -98,7 +92,7 @@ class Order implements ArrayAccess
'status' => 'setStatus',
'complete' => 'setComplete'
);
static function setters() {
return self::$setters;
}
@@ -115,41 +109,55 @@ class Order implements ArrayAccess
'status' => 'getStatus',
'complete' => 'getComplete'
);
static function getters() {
return self::$getters;
}
const STATUS_PLACED = "placed";
const STATUS_APPROVED = "approved";
const STATUS_DELIVERED = "delivered";
/**
* $id
* @var int
*/
protected $id;
/**
* $pet_id
* @var int
*/
protected $pet_id;
/**
* $quantity
* @var int
*/
protected $quantity;
/**
* $ship_date
* @var \DateTime
*/
protected $ship_date;
/**
* $status Order Status
* @var string
*/
protected $status;
/**
* $complete
* @var bool
*/
protected $complete = false;
protected $complete;
/**
* Constructor
@@ -158,7 +166,6 @@ class Order implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->pet_id = $data["pet_id"];
@@ -168,6 +175,7 @@ class Order implements ArrayAccess
$this->complete = $data["complete"];
}
}
/**
* Gets id
* @return int
@@ -176,7 +184,7 @@ class Order implements ArrayAccess
{
return $this->id;
}
/**
* Sets id
* @param int $id
@@ -188,6 +196,7 @@ class Order implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets pet_id
* @return int
@@ -196,7 +205,7 @@ class Order implements ArrayAccess
{
return $this->pet_id;
}
/**
* Sets pet_id
* @param int $pet_id
@@ -208,6 +217,7 @@ class Order implements ArrayAccess
$this->pet_id = $pet_id;
return $this;
}
/**
* Gets quantity
* @return int
@@ -216,7 +226,7 @@ class Order implements ArrayAccess
{
return $this->quantity;
}
/**
* Sets quantity
* @param int $quantity
@@ -228,6 +238,7 @@ class Order implements ArrayAccess
$this->quantity = $quantity;
return $this;
}
/**
* Gets ship_date
* @return \DateTime
@@ -236,7 +247,7 @@ class Order implements ArrayAccess
{
return $this->ship_date;
}
/**
* Sets ship_date
* @param \DateTime $ship_date
@@ -248,6 +259,7 @@ class Order implements ArrayAccess
$this->ship_date = $ship_date;
return $this;
}
/**
* Gets status
* @return string
@@ -256,7 +268,7 @@ class Order implements ArrayAccess
{
return $this->status;
}
/**
* Sets status
* @param string $status Order Status
@@ -271,6 +283,7 @@ class Order implements ArrayAccess
$this->status = $status;
return $this;
}
/**
* Gets complete
* @return bool
@@ -279,7 +292,7 @@ class Order implements ArrayAccess
{
return $this->complete;
}
/**
* Sets complete
* @param bool $complete
@@ -291,6 +304,7 @@ class Order implements ArrayAccess
$this->complete = $complete;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -300,7 +314,7 @@ class Order implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -310,7 +324,7 @@ class Order implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -321,7 +335,7 @@ class Order implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -331,17 +345,17 @@ class Order implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Pet implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Pet';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -64,14 +58,14 @@ class Pet implements ArrayAccess
'tags' => '\Swagger\Client\Model\Tag[]',
'status' => '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[]
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
@@ -81,7 +75,7 @@ class Pet implements ArrayAccess
'tags' => 'tags',
'status' => 'status'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -98,7 +92,7 @@ class Pet implements ArrayAccess
'tags' => 'setTags',
'status' => 'setStatus'
);
static function setters() {
return self::$setters;
}
@@ -115,41 +109,55 @@ class Pet implements ArrayAccess
'tags' => 'getTags',
'status' => 'getStatus'
);
static function getters() {
return self::$getters;
}
const STATUS_AVAILABLE = "available";
const STATUS_PENDING = "pending";
const STATUS_SOLD = "sold";
/**
* $id
* @var int
*/
protected $id;
/**
* $category
* @var \Swagger\Client\Model\Category
*/
protected $category;
/**
* $name
* @var string
*/
protected $name;
/**
* $photo_urls
* @var string[]
*/
protected $photo_urls;
/**
* $tags
* @var \Swagger\Client\Model\Tag[]
*/
protected $tags;
/**
* $status pet status in the store
* @var string
*/
protected $status;
/**
* Constructor
@@ -158,7 +166,6 @@ class Pet implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->category = $data["category"];
@@ -168,6 +175,7 @@ class Pet implements ArrayAccess
$this->status = $data["status"];
}
}
/**
* Gets id
* @return int
@@ -176,7 +184,7 @@ class Pet implements ArrayAccess
{
return $this->id;
}
/**
* Sets id
* @param int $id
@@ -188,6 +196,7 @@ class Pet implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets category
* @return \Swagger\Client\Model\Category
@@ -196,7 +205,7 @@ class Pet implements ArrayAccess
{
return $this->category;
}
/**
* Sets category
* @param \Swagger\Client\Model\Category $category
@@ -208,6 +217,7 @@ class Pet implements ArrayAccess
$this->category = $category;
return $this;
}
/**
* Gets name
* @return string
@@ -216,7 +226,7 @@ class Pet implements ArrayAccess
{
return $this->name;
}
/**
* Sets name
* @param string $name
@@ -228,6 +238,7 @@ class Pet implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Gets photo_urls
* @return string[]
@@ -236,7 +247,7 @@ class Pet implements ArrayAccess
{
return $this->photo_urls;
}
/**
* Sets photo_urls
* @param string[] $photo_urls
@@ -248,6 +259,7 @@ class Pet implements ArrayAccess
$this->photo_urls = $photo_urls;
return $this;
}
/**
* Gets tags
* @return \Swagger\Client\Model\Tag[]
@@ -256,7 +268,7 @@ class Pet implements ArrayAccess
{
return $this->tags;
}
/**
* Sets tags
* @param \Swagger\Client\Model\Tag[] $tags
@@ -268,6 +280,7 @@ class Pet implements ArrayAccess
$this->tags = $tags;
return $this;
}
/**
* Gets status
* @return string
@@ -276,7 +289,7 @@ class Pet implements ArrayAccess
{
return $this->status;
}
/**
* Sets status
* @param string $status pet status in the store
@@ -291,6 +304,7 @@ class Pet implements ArrayAccess
$this->status = $status;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -300,7 +314,7 @@ class Pet implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -310,7 +324,7 @@ class Pet implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -321,7 +335,7 @@ class Pet implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -331,17 +345,17 @@ class Pet implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class SpecialModelName implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = '$special[model.name]';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -59,19 +53,19 @@ class SpecialModelName implements ArrayAccess
static $swaggerTypes = array(
'special_property_name' => 'int'
);
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[]
* @var string[]
*/
static $attributeMap = array(
'special_property_name' => '$special[property.name]'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -83,7 +77,7 @@ class SpecialModelName implements ArrayAccess
static $setters = array(
'special_property_name' => 'setSpecialPropertyName'
);
static function setters() {
return self::$setters;
}
@@ -95,16 +89,22 @@ class SpecialModelName implements ArrayAccess
static $getters = array(
'special_property_name' => 'getSpecialPropertyName'
);
static function getters() {
return self::$getters;
}
/**
* $special_property_name
* @var int
*/
protected $special_property_name;
/**
* Constructor
@@ -113,11 +113,11 @@ class SpecialModelName implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->special_property_name = $data["special_property_name"];
}
}
/**
* Gets special_property_name
* @return int
@@ -126,7 +126,7 @@ class SpecialModelName implements ArrayAccess
{
return $this->special_property_name;
}
/**
* Sets special_property_name
* @param int $special_property_name
@@ -138,6 +138,7 @@ class SpecialModelName implements ArrayAccess
$this->special_property_name = $special_property_name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -147,7 +148,7 @@ class SpecialModelName implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -157,7 +158,7 @@ class SpecialModelName implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -168,7 +169,7 @@ class SpecialModelName implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -178,17 +179,17 @@ class SpecialModelName implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class Tag implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'Tag';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -60,20 +54,20 @@ class Tag implements ArrayAccess
'id' => 'int',
'name' => '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[]
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
'name' => 'name'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -86,7 +80,7 @@ class Tag implements ArrayAccess
'id' => 'setId',
'name' => 'setName'
);
static function setters() {
return self::$setters;
}
@@ -99,21 +93,28 @@ class Tag implements ArrayAccess
'id' => 'getId',
'name' => 'getName'
);
static function getters() {
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $name
* @var string
*/
protected $name;
/**
* Constructor
@@ -122,12 +123,12 @@ class Tag implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->name = $data["name"];
}
}
/**
* Gets id
* @return int
@@ -136,7 +137,7 @@ class Tag implements ArrayAccess
{
return $this->id;
}
/**
* Sets id
* @param int $id
@@ -148,6 +149,7 @@ class Tag implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets name
* @return string
@@ -156,7 +158,7 @@ class Tag implements ArrayAccess
{
return $this->name;
}
/**
* Sets name
* @param string $name
@@ -168,6 +170,7 @@ class Tag implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -177,7 +180,7 @@ class Tag implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -187,7 +190,7 @@ class Tag implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -198,7 +201,7 @@ class Tag implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -208,17 +211,17 @@ class Tag implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -46,12 +46,6 @@ use \ArrayAccess;
*/
class User implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'User';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
@@ -66,14 +60,14 @@ class User implements ArrayAccess
'phone' => 'string',
'user_status' => 'int'
);
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[]
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
@@ -85,7 +79,7 @@ class User implements ArrayAccess
'phone' => 'phone',
'user_status' => 'userStatus'
);
static function attributeMap() {
return self::$attributeMap;
}
@@ -104,7 +98,7 @@ class User implements ArrayAccess
'phone' => 'setPhone',
'user_status' => 'setUserStatus'
);
static function setters() {
return self::$setters;
}
@@ -123,51 +117,64 @@ class User implements ArrayAccess
'phone' => 'getPhone',
'user_status' => 'getUserStatus'
);
static function getters() {
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $username
* @var string
*/
protected $username;
/**
* $first_name
* @var string
*/
protected $first_name;
/**
* $last_name
* @var string
*/
protected $last_name;
/**
* $email
* @var string
*/
protected $email;
/**
* $password
* @var string
*/
protected $password;
/**
* $phone
* @var string
*/
protected $phone;
/**
* $user_status User Status
* @var int
*/
protected $user_status;
/**
* Constructor
@@ -176,7 +183,6 @@ class User implements ArrayAccess
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->username = $data["username"];
@@ -188,6 +194,7 @@ class User implements ArrayAccess
$this->user_status = $data["user_status"];
}
}
/**
* Gets id
* @return int
@@ -196,7 +203,7 @@ class User implements ArrayAccess
{
return $this->id;
}
/**
* Sets id
* @param int $id
@@ -208,6 +215,7 @@ class User implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets username
* @return string
@@ -216,7 +224,7 @@ class User implements ArrayAccess
{
return $this->username;
}
/**
* Sets username
* @param string $username
@@ -228,6 +236,7 @@ class User implements ArrayAccess
$this->username = $username;
return $this;
}
/**
* Gets first_name
* @return string
@@ -236,7 +245,7 @@ class User implements ArrayAccess
{
return $this->first_name;
}
/**
* Sets first_name
* @param string $first_name
@@ -248,6 +257,7 @@ class User implements ArrayAccess
$this->first_name = $first_name;
return $this;
}
/**
* Gets last_name
* @return string
@@ -256,7 +266,7 @@ class User implements ArrayAccess
{
return $this->last_name;
}
/**
* Sets last_name
* @param string $last_name
@@ -268,6 +278,7 @@ class User implements ArrayAccess
$this->last_name = $last_name;
return $this;
}
/**
* Gets email
* @return string
@@ -276,7 +287,7 @@ class User implements ArrayAccess
{
return $this->email;
}
/**
* Sets email
* @param string $email
@@ -288,6 +299,7 @@ class User implements ArrayAccess
$this->email = $email;
return $this;
}
/**
* Gets password
* @return string
@@ -296,7 +308,7 @@ class User implements ArrayAccess
{
return $this->password;
}
/**
* Sets password
* @param string $password
@@ -308,6 +320,7 @@ class User implements ArrayAccess
$this->password = $password;
return $this;
}
/**
* Gets phone
* @return string
@@ -316,7 +329,7 @@ class User implements ArrayAccess
{
return $this->phone;
}
/**
* Sets phone
* @param string $phone
@@ -328,6 +341,7 @@ class User implements ArrayAccess
$this->phone = $phone;
return $this;
}
/**
* Gets user_status
* @return int
@@ -336,7 +350,7 @@ class User implements ArrayAccess
{
return $this->user_status;
}
/**
* Sets user_status
* @param int $user_status User Status
@@ -348,6 +362,7 @@ class User implements ArrayAccess
$this->user_status = $user_status;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@@ -357,7 +372,7 @@ class User implements ArrayAccess
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
@@ -367,7 +382,7 @@ class User implements ArrayAccess
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
@@ -378,7 +393,7 @@ class User implements ArrayAccess
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
@@ -388,17 +403,17 @@ class User implements ArrayAccess
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
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));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}