Cleanup the models

This commit is contained in:
Tim
2021-11-25 18:57:35 +01:00
parent 65830a4283
commit dab95e7280
12 changed files with 633 additions and 828 deletions

View File

@ -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,42 +39,42 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GameIsStarted implements ModelInterface, ArrayAccess
{
class GameIsStarted 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 = 'GameIsStarted';
/**
* 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 = [
'started' => 'bool',
'game_state' => '\Swagger\Client\Model\GameState' ];
'started' => 'bool',
'game_state' => GameState::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 = [
'started' => null,
'game_state' => null ];
'started' => null,
'game_state' => null,
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
public static function swaggerTypes() {
return self::$swaggerTypes;
}
@ -83,8 +83,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -95,8 +94,9 @@ class GameIsStarted implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $attributeMap = [
'started' => 'started',
'game_state' => 'gameState' ];
'started' => 'started',
'game_state' => 'gameState',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -104,8 +104,9 @@ class GameIsStarted implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $setters = [
'started' => 'setStarted',
'game_state' => 'setGameState' ];
'started' => 'setStarted',
'game_state' => 'setGameState',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -113,8 +114,9 @@ class GameIsStarted implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $getters = [
'started' => 'getStarted',
'game_state' => 'getGameState' ];
'started' => 'getStarted',
'game_state' => 'getGameState',
];
/**
* Array of attributes where the key is the local name,
@ -122,8 +124,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -132,8 +133,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -142,8 +142,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -152,13 +151,10 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return string
*/
public function getModelName()
{
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
@ -172,10 +168,9 @@ class GameIsStarted implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['started'] = isset($data['started']) ? $data['started'] : null;
$this->container['game_state'] = isset($data['game_state']) ? $data['game_state'] : null;
public function __construct(array $data = null) {
$this->container['started'] = $data['started'] ?? null;
$this->container['game_state'] = $data['game_state'] ?? null;
}
/**
@ -183,8 +178,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -196,19 +190,16 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets started
*
* @return bool
*/
public function getStarted()
{
public function getStarted() {
return $this->container['started'];
}
@ -219,8 +210,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setStarted($started)
{
public function setStarted($started) {
$this->container['started'] = $started;
return $this;
@ -231,8 +221,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return \Swagger\Client\Model\GameState
*/
public function getGameState()
{
public function getGameState() {
return $this->container['game_state'];
}
@ -243,12 +232,12 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setGameState($game_state)
{
public function setGameState($game_state) {
$this->container['game_state'] = $game_state;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -256,8 +245,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -268,8 +256,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return mixed
*/
public function offsetGet($offset)
{
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@ -281,8 +268,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetSet($offset, $value)
{
public function offsetSet($offset, $value) {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@ -297,8 +283,7 @@ class GameIsStarted implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -307,8 +292,7 @@ class GameIsStarted 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),