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,52 +39,52 @@ use \Swagger\Client\ObjectSerializer;
|
||||
* @author Swagger Codegen team
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class GameState implements ModelInterface, ArrayAccess
|
||||
{
|
||||
class GameState 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 = 'GameState';
|
||||
|
||||
/**
|
||||
* 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 = [
|
||||
'state' => 'string',
|
||||
'code' => 'string',
|
||||
'rounds' => '\Swagger\Client\Model\Round[]',
|
||||
'players' => '\Swagger\Client\Model\Player[]',
|
||||
'current_player' => '\Swagger\Client\Model\Player',
|
||||
'owning_player' => '\Swagger\Client\Model\Player',
|
||||
'rules' => '\Swagger\Client\Model\GameRules' ];
|
||||
'state' => 'string',
|
||||
'code' => 'string',
|
||||
'rounds' => Round::class . '[]',
|
||||
'players' => Player::class . '[]',
|
||||
'current_player' => Player::class,
|
||||
'owning_player' => Player::class,
|
||||
'rules' => GameRules::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 = [
|
||||
'state' => null,
|
||||
'code' => null,
|
||||
'rounds' => null,
|
||||
'players' => null,
|
||||
'current_player' => null,
|
||||
'owning_player' => null,
|
||||
'rules' => null ];
|
||||
'state' => null,
|
||||
'code' => null,
|
||||
'rounds' => null,
|
||||
'players' => null,
|
||||
'current_player' => null,
|
||||
'owning_player' => null,
|
||||
'rules' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
public static function swaggerTypes() {
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
@ -93,8 +93,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
public static function swaggerFormats() {
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
@ -105,13 +104,14 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'state' => 'state',
|
||||
'code' => 'code',
|
||||
'rounds' => 'rounds',
|
||||
'players' => 'players',
|
||||
'current_player' => 'currentPlayer',
|
||||
'owning_player' => 'owningPlayer',
|
||||
'rules' => 'rules' ];
|
||||
'state' => 'state',
|
||||
'code' => 'code',
|
||||
'rounds' => 'rounds',
|
||||
'players' => 'players',
|
||||
'current_player' => 'currentPlayer',
|
||||
'owning_player' => 'owningPlayer',
|
||||
'rules' => 'rules',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
@ -119,13 +119,14 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'state' => 'setState',
|
||||
'code' => 'setCode',
|
||||
'rounds' => 'setRounds',
|
||||
'players' => 'setPlayers',
|
||||
'current_player' => 'setCurrentPlayer',
|
||||
'owning_player' => 'setOwningPlayer',
|
||||
'rules' => 'setRules' ];
|
||||
'state' => 'setState',
|
||||
'code' => 'setCode',
|
||||
'rounds' => 'setRounds',
|
||||
'players' => 'setPlayers',
|
||||
'current_player' => 'setCurrentPlayer',
|
||||
'owning_player' => 'setOwningPlayer',
|
||||
'rules' => 'setRules',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
@ -133,13 +134,14 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'state' => 'getState',
|
||||
'code' => 'getCode',
|
||||
'rounds' => 'getRounds',
|
||||
'players' => 'getPlayers',
|
||||
'current_player' => 'getCurrentPlayer',
|
||||
'owning_player' => 'getOwningPlayer',
|
||||
'rules' => 'getRules' ];
|
||||
'state' => 'getState',
|
||||
'code' => 'getCode',
|
||||
'rounds' => 'getRounds',
|
||||
'players' => 'getPlayers',
|
||||
'current_player' => 'getCurrentPlayer',
|
||||
'owning_player' => 'getOwningPlayer',
|
||||
'rules' => 'getRules',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
@ -147,8 +149,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
public static function attributeMap() {
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
@ -157,8 +158,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
public static function setters() {
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
@ -167,8 +167,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
public static function getters() {
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
@ -177,13 +176,10 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
public function getModelName() {
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
@ -197,15 +193,14 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['state'] = isset($data['state']) ? $data['state'] : null;
|
||||
$this->container['code'] = isset($data['code']) ? $data['code'] : null;
|
||||
$this->container['rounds'] = isset($data['rounds']) ? $data['rounds'] : null;
|
||||
$this->container['players'] = isset($data['players']) ? $data['players'] : null;
|
||||
$this->container['current_player'] = isset($data['current_player']) ? $data['current_player'] : null;
|
||||
$this->container['owning_player'] = isset($data['owning_player']) ? $data['owning_player'] : null;
|
||||
$this->container['rules'] = isset($data['rules']) ? $data['rules'] : null;
|
||||
public function __construct(array $data = null) {
|
||||
$this->container['state'] = $data['state'] ?? null;
|
||||
$this->container['code'] = $data['code'] ?? null;
|
||||
$this->container['rounds'] = $data['rounds'] ?? null;
|
||||
$this->container['players'] = $data['players'] ?? null;
|
||||
$this->container['current_player'] = $data['current_player'] ?? null;
|
||||
$this->container['owning_player'] = $data['owning_player'] ?? null;
|
||||
$this->container['rules'] = $data['rules'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -213,8 +208,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
public function listInvalidProperties() {
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
@ -226,19 +220,16 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
public function valid() {
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets state
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getState()
|
||||
{
|
||||
public function getState() {
|
||||
return $this->container['state'];
|
||||
}
|
||||
|
||||
@ -249,8 +240,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
{
|
||||
public function setState($state) {
|
||||
$this->container['state'] = $state;
|
||||
|
||||
return $this;
|
||||
@ -261,8 +251,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
public function getCode() {
|
||||
return $this->container['code'];
|
||||
}
|
||||
|
||||
@ -273,8 +262,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
public function setCode($code) {
|
||||
$this->container['code'] = $code;
|
||||
|
||||
return $this;
|
||||
@ -285,8 +273,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\Round[]
|
||||
*/
|
||||
public function getRounds()
|
||||
{
|
||||
public function getRounds() {
|
||||
return $this->container['rounds'];
|
||||
}
|
||||
|
||||
@ -297,8 +284,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRounds($rounds)
|
||||
{
|
||||
public function setRounds($rounds) {
|
||||
$this->container['rounds'] = $rounds;
|
||||
|
||||
return $this;
|
||||
@ -309,8 +295,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\Player[]
|
||||
*/
|
||||
public function getPlayers()
|
||||
{
|
||||
public function getPlayers() {
|
||||
return $this->container['players'];
|
||||
}
|
||||
|
||||
@ -321,8 +306,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPlayers($players)
|
||||
{
|
||||
public function setPlayers($players) {
|
||||
$this->container['players'] = $players;
|
||||
|
||||
return $this;
|
||||
@ -333,8 +317,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\Player
|
||||
*/
|
||||
public function getCurrentPlayer()
|
||||
{
|
||||
public function getCurrentPlayer() {
|
||||
return $this->container['current_player'];
|
||||
}
|
||||
|
||||
@ -345,8 +328,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCurrentPlayer($current_player)
|
||||
{
|
||||
public function setCurrentPlayer($current_player) {
|
||||
$this->container['current_player'] = $current_player;
|
||||
|
||||
return $this;
|
||||
@ -357,8 +339,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\Player
|
||||
*/
|
||||
public function getOwningPlayer()
|
||||
{
|
||||
public function getOwningPlayer() {
|
||||
return $this->container['owning_player'];
|
||||
}
|
||||
|
||||
@ -369,8 +350,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setOwningPlayer($owning_player)
|
||||
{
|
||||
public function setOwningPlayer($owning_player) {
|
||||
$this->container['owning_player'] = $owning_player;
|
||||
|
||||
return $this;
|
||||
@ -381,8 +361,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\GameRules
|
||||
*/
|
||||
public function getRules()
|
||||
{
|
||||
public function getRules() {
|
||||
return $this->container['rules'];
|
||||
}
|
||||
|
||||
@ -393,12 +372,12 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRules($rules)
|
||||
{
|
||||
public function setRules($rules) {
|
||||
$this->container['rules'] = $rules;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
@ -406,8 +385,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -418,8 +396,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
public function offsetGet($offset) {
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
@ -431,8 +408,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
public function offsetSet($offset, $value) {
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
@ -447,8 +423,7 @@ class GameState implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -457,8 +432,7 @@ class GameState 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