add new files

This commit is contained in:
wing328
2016-04-16 00:44:36 +08:00
parent 79decc53a1
commit 0b42b533d9
37 changed files with 1405 additions and 0 deletions

View File

@@ -0,0 +1,254 @@
<?php
/**
* ApiResponse
*
* 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;
/**
* ApiResponse 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 ApiResponse implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
static $swaggerModelName = 'ApiResponse';
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'code' => 'int',
'type' => 'string',
'message' => '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(
'code' => 'code',
'type' => 'type',
'message' => 'message'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'code' => 'setCode',
'type' => 'setType',
'message' => 'setMessage'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'code' => 'getCode',
'type' => 'getType',
'message' => 'getMessage'
);
static function getters() {
return self::$getters;
}
/**
* $code
* @var int
*/
protected $code;
/**
* $type
* @var string
*/
protected $type;
/**
* $message
* @var string
*/
protected $message;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->code = $data["code"];
$this->type = $data["type"];
$this->message = $data["message"];
}
}
/**
* Gets code
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* Sets code
* @param int $code
* @return $this
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Gets type
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Sets type
* @param string $type
* @return $this
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Gets message
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
* Sets message
* @param string $message
* @return $this
*/
public function setMessage($message)
{
$this->message = $message;
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')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -0,0 +1,70 @@
<?php
/**
* ApiResponseTest
*
* 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;
/**
* ApiResponseTest 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 ApiResponseTest 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 ApiResponse
*/
public function testApiResponse() {
}
}