Cleanup the models
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* Play perudo with your friends through the api!
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
* Swagger Codegen version: 3.0.30
|
||||
*/
|
||||
@ -39,46 +39,46 @@ use \Swagger\Client\ObjectSerializer;
|
||||
* @author Swagger Codegen team
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class Turn implements ModelInterface, ArrayAccess
|
||||
{
|
||||
class Turn implements ModelInterface, ArrayAccess {
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $swaggerModelName = 'Turn';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerTypes = [
|
||||
'number' => 'int',
|
||||
'player' => '\Swagger\Client\Model\Player',
|
||||
'dice_count' => 'int',
|
||||
'die_value' => 'int' ];
|
||||
'number' => 'int',
|
||||
'player' => Player::class,
|
||||
'dice_count' => 'int',
|
||||
'die_value' => 'int',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $swaggerFormats = [
|
||||
'number' => null,
|
||||
'player' => null,
|
||||
'dice_count' => null,
|
||||
'die_value' => null ];
|
||||
'number' => null,
|
||||
'player' => null,
|
||||
'dice_count' => null,
|
||||
'die_value' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
public static function swaggerTypes() {
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
@ -87,8 +87,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
public static function swaggerFormats() {
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
@ -99,10 +98,11 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'number' => 'number',
|
||||
'player' => 'player',
|
||||
'dice_count' => 'diceCount',
|
||||
'die_value' => 'dieValue' ];
|
||||
'number' => 'number',
|
||||
'player' => 'player',
|
||||
'dice_count' => 'diceCount',
|
||||
'die_value' => 'dieValue',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
@ -110,10 +110,11 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'number' => 'setNumber',
|
||||
'player' => 'setPlayer',
|
||||
'dice_count' => 'setDiceCount',
|
||||
'die_value' => 'setDieValue' ];
|
||||
'number' => 'setNumber',
|
||||
'player' => 'setPlayer',
|
||||
'dice_count' => 'setDiceCount',
|
||||
'die_value' => 'setDieValue',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
@ -121,10 +122,11 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'number' => 'getNumber',
|
||||
'player' => 'getPlayer',
|
||||
'dice_count' => 'getDiceCount',
|
||||
'die_value' => 'getDieValue' ];
|
||||
'number' => 'getNumber',
|
||||
'player' => 'getPlayer',
|
||||
'dice_count' => 'getDiceCount',
|
||||
'die_value' => 'getDieValue',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
@ -132,8 +134,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
public static function attributeMap() {
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
@ -142,8 +143,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
public static function setters() {
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
@ -152,8 +152,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
public static function getters() {
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
@ -162,13 +161,10 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
public function getModelName() {
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
@ -182,12 +178,11 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['number'] = isset($data['number']) ? $data['number'] : null;
|
||||
$this->container['player'] = isset($data['player']) ? $data['player'] : null;
|
||||
$this->container['dice_count'] = isset($data['dice_count']) ? $data['dice_count'] : null;
|
||||
$this->container['die_value'] = isset($data['die_value']) ? $data['die_value'] : null;
|
||||
public function __construct(array $data = null) {
|
||||
$this->container['number'] = $data['number'] ?? null;
|
||||
$this->container['player'] = $data['player'] ?? null;
|
||||
$this->container['dice_count'] = $data['dice_count'] ?? null;
|
||||
$this->container['die_value'] = $data['die_value'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -195,8 +190,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
public function listInvalidProperties() {
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
@ -208,19 +202,16 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
public function valid() {
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets number
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
public function getNumber() {
|
||||
return $this->container['number'];
|
||||
}
|
||||
|
||||
@ -231,8 +222,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($number)
|
||||
{
|
||||
public function setNumber($number) {
|
||||
$this->container['number'] = $number;
|
||||
|
||||
return $this;
|
||||
@ -243,8 +233,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\Player
|
||||
*/
|
||||
public function getPlayer()
|
||||
{
|
||||
public function getPlayer() {
|
||||
return $this->container['player'];
|
||||
}
|
||||
|
||||
@ -255,8 +244,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPlayer($player)
|
||||
{
|
||||
public function setPlayer($player) {
|
||||
$this->container['player'] = $player;
|
||||
|
||||
return $this;
|
||||
@ -267,8 +255,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDiceCount()
|
||||
{
|
||||
public function getDiceCount() {
|
||||
return $this->container['dice_count'];
|
||||
}
|
||||
|
||||
@ -279,8 +266,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDiceCount($dice_count)
|
||||
{
|
||||
public function setDiceCount($dice_count) {
|
||||
$this->container['dice_count'] = $dice_count;
|
||||
|
||||
return $this;
|
||||
@ -291,8 +277,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDieValue()
|
||||
{
|
||||
public function getDieValue() {
|
||||
return $this->container['die_value'];
|
||||
}
|
||||
|
||||
@ -303,12 +288,12 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDieValue($die_value)
|
||||
{
|
||||
public function setDieValue($die_value) {
|
||||
$this->container['die_value'] = $die_value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
@ -316,8 +301,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -328,8 +312,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
public function offsetGet($offset) {
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
@ -341,8 +324,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
public function offsetSet($offset, $value) {
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
@ -357,8 +339,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -367,8 +348,7 @@ class Turn implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
public function __toString() {
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
|
Reference in New Issue
Block a user