forked from loafle/openapi-generator-original
Rebuild php petstore sample client
This commit is contained in:
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesClass Class Doc Comment
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
class AdditionalPropertiesClass implements ArrayAccess
|
||||
{
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'AdditionalPropertiesClass';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = array(
|
||||
|
||||
);
|
||||
|
||||
public 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[]
|
||||
*/
|
||||
protected static $attributeMap = array(
|
||||
|
||||
);
|
||||
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = array(
|
||||
|
||||
);
|
||||
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = array(
|
||||
|
||||
);
|
||||
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property value initalizing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalid_properties = array();
|
||||
return $invalid_properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properteis are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$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));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
<?php
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass
|
||||
*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass Class Doc Comment
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess
|
||||
{
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'MixedPropertiesAndAdditionalPropertiesClass';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = array(
|
||||
'uuid' => 'string',
|
||||
'date_time' => '\DateTime'
|
||||
);
|
||||
|
||||
public 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[]
|
||||
*/
|
||||
protected static $attributeMap = array(
|
||||
'uuid' => 'uuid',
|
||||
'date_time' => 'dateTime'
|
||||
);
|
||||
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = array(
|
||||
'uuid' => 'setUuid',
|
||||
'date_time' => 'setDateTime'
|
||||
);
|
||||
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = array(
|
||||
'uuid' => 'getUuid',
|
||||
'date_time' => 'getDateTime'
|
||||
);
|
||||
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property value initalizing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null;
|
||||
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalid_properties = array();
|
||||
return $invalid_properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properteis are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets uuid
|
||||
* @return string
|
||||
*/
|
||||
public function getUuid()
|
||||
{
|
||||
return $this->container['uuid'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets uuid
|
||||
* @param string $uuid
|
||||
* @return $this
|
||||
*/
|
||||
public function setUuid($uuid)
|
||||
{
|
||||
$this->container['uuid'] = $uuid;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets date_time
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDateTime()
|
||||
{
|
||||
return $this->container['date_time'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets date_time
|
||||
* @param \DateTime $date_time
|
||||
* @return $this
|
||||
*/
|
||||
public function setDateTime($date_time)
|
||||
{
|
||||
$this->container['date_time'] = $date_time;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$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));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
<?php
|
||||
/**
|
||||
* ReadOnlyFirst
|
||||
*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* ReadOnlyFirst Class Doc Comment
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
class ReadOnlyFirst implements ArrayAccess
|
||||
{
|
||||
/**
|
||||
* The original name of the model.
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'ReadOnlyFirst';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = array(
|
||||
'bar' => 'string',
|
||||
'baz' => 'string'
|
||||
);
|
||||
|
||||
public 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[]
|
||||
*/
|
||||
protected static $attributeMap = array(
|
||||
'bar' => 'bar',
|
||||
'baz' => 'baz'
|
||||
);
|
||||
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = array(
|
||||
'bar' => 'setBar',
|
||||
'baz' => 'setBaz'
|
||||
);
|
||||
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = array(
|
||||
'bar' => 'getBar',
|
||||
'baz' => 'getBaz'
|
||||
);
|
||||
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param mixed[] $data Associated array of property value initalizing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['bar'] = isset($data['bar']) ? $data['bar'] : null;
|
||||
$this->container['baz'] = isset($data['baz']) ? $data['baz'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalid_properties = array();
|
||||
return $invalid_properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properteis are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets bar
|
||||
* @return string
|
||||
*/
|
||||
public function getBar()
|
||||
{
|
||||
return $this->container['bar'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets bar
|
||||
* @param string $bar
|
||||
* @return $this
|
||||
*/
|
||||
public function setBar($bar)
|
||||
{
|
||||
$this->container['bar'] = $bar;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets baz
|
||||
* @return string
|
||||
*/
|
||||
public function getBaz()
|
||||
{
|
||||
return $this->container['baz'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets baz
|
||||
* @param string $baz
|
||||
* @return $this
|
||||
*/
|
||||
public function setBaz($baz)
|
||||
{
|
||||
$this->container['baz'] = $baz;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
* @param integer $offset Offset
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
* @param integer $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
* @param integer $offset Offset
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user