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,52 +39,52 @@ use \Swagger\Client\ObjectSerializer;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class GameRules implements ModelInterface, ArrayAccess
{
class GameRules 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 = 'GameRules';
/**
* 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 = [
'start_dice_per_player' => 'int',
'higher_count_lower_value' => 'bool',
'joker_counts_double' => 'bool',
'has_joker' => 'bool',
'has_palifico' => 'bool',
'has_calza' => 'bool',
'joker_die_value' => 'int' ];
'start_dice_per_player' => 'int',
'higher_count_lower_value' => 'bool',
'joker_counts_double' => 'bool',
'has_joker' => 'bool',
'has_palifico' => 'bool',
'has_calza' => 'bool',
'joker_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 = [
'start_dice_per_player' => null,
'higher_count_lower_value' => null,
'joker_counts_double' => null,
'has_joker' => null,
'has_palifico' => null,
'has_calza' => null,
'joker_die_value' => null ];
'start_dice_per_player' => null,
'higher_count_lower_value' => null,
'joker_counts_double' => null,
'has_joker' => null,
'has_palifico' => null,
'has_calza' => null,
'joker_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;
}
@ -93,8 +93,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function swaggerFormats()
{
public static function swaggerFormats() {
return self::$swaggerFormats;
}
@ -105,13 +104,14 @@ class GameRules implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $attributeMap = [
'start_dice_per_player' => 'startDicePerPlayer',
'higher_count_lower_value' => 'higherCountLowerValue',
'joker_counts_double' => 'jokerCountsDouble',
'has_joker' => 'hasJoker',
'has_palifico' => 'hasPalifico',
'has_calza' => 'hasCalza',
'joker_die_value' => 'jokerDieValue' ];
'start_dice_per_player' => 'startDicePerPlayer',
'higher_count_lower_value' => 'higherCountLowerValue',
'joker_counts_double' => 'jokerCountsDouble',
'has_joker' => 'hasJoker',
'has_palifico' => 'hasPalifico',
'has_calza' => 'hasCalza',
'joker_die_value' => 'jokerDieValue',
];
/**
* Array of attributes to setter functions (for deserialization of responses)
@ -119,13 +119,14 @@ class GameRules implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $setters = [
'start_dice_per_player' => 'setStartDicePerPlayer',
'higher_count_lower_value' => 'setHigherCountLowerValue',
'joker_counts_double' => 'setJokerCountsDouble',
'has_joker' => 'setHasJoker',
'has_palifico' => 'setHasPalifico',
'has_calza' => 'setHasCalza',
'joker_die_value' => 'setJokerDieValue' ];
'start_dice_per_player' => 'setStartDicePerPlayer',
'higher_count_lower_value' => 'setHigherCountLowerValue',
'joker_counts_double' => 'setJokerCountsDouble',
'has_joker' => 'setHasJoker',
'has_palifico' => 'setHasPalifico',
'has_calza' => 'setHasCalza',
'joker_die_value' => 'setJokerDieValue',
];
/**
* Array of attributes to getter functions (for serialization of requests)
@ -133,13 +134,14 @@ class GameRules implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $getters = [
'start_dice_per_player' => 'getStartDicePerPlayer',
'higher_count_lower_value' => 'getHigherCountLowerValue',
'joker_counts_double' => 'getJokerCountsDouble',
'has_joker' => 'getHasJoker',
'has_palifico' => 'getHasPalifico',
'has_calza' => 'getHasCalza',
'joker_die_value' => 'getJokerDieValue' ];
'start_dice_per_player' => 'getStartDicePerPlayer',
'higher_count_lower_value' => 'getHigherCountLowerValue',
'joker_counts_double' => 'getJokerCountsDouble',
'has_joker' => 'getHasJoker',
'has_palifico' => 'getHasPalifico',
'has_calza' => 'getHasCalza',
'joker_die_value' => 'getJokerDieValue',
];
/**
* Array of attributes where the key is the local name,
@ -147,8 +149,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function attributeMap()
{
public static function attributeMap() {
return self::$attributeMap;
}
@ -157,8 +158,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function setters()
{
public static function setters() {
return self::$setters;
}
@ -167,8 +167,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array
*/
public static function getters()
{
public static function getters() {
return self::$getters;
}
@ -177,13 +176,10 @@ class GameRules 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 GameRules implements ModelInterface, ArrayAccess
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['start_dice_per_player'] = isset($data['start_dice_per_player']) ? $data['start_dice_per_player'] : null;
$this->container['higher_count_lower_value'] = isset($data['higher_count_lower_value']) ? $data['higher_count_lower_value'] : null;
$this->container['joker_counts_double'] = isset($data['joker_counts_double']) ? $data['joker_counts_double'] : null;
$this->container['has_joker'] = isset($data['has_joker']) ? $data['has_joker'] : null;
$this->container['has_palifico'] = isset($data['has_palifico']) ? $data['has_palifico'] : null;
$this->container['has_calza'] = isset($data['has_calza']) ? $data['has_calza'] : null;
$this->container['joker_die_value'] = isset($data['joker_die_value']) ? $data['joker_die_value'] : null;
public function __construct(array $data = null) {
$this->container['start_dice_per_player'] = $data['start_dice_per_player'] ?? null;
$this->container['higher_count_lower_value'] = $data['higher_count_lower_value'] ?? null;
$this->container['joker_counts_double'] = $data['joker_counts_double'] ?? null;
$this->container['has_joker'] = $data['has_joker'] ?? null;
$this->container['has_palifico'] = $data['has_palifico'] ?? null;
$this->container['has_calza'] = $data['has_calza'] ?? null;
$this->container['joker_die_value'] = $data['joker_die_value'] ?? null;
}
/**
@ -213,8 +208,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
@ -226,19 +220,16 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool True if all properties are valid
*/
public function valid()
{
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets start_dice_per_player
*
* @return int
*/
public function getStartDicePerPlayer()
{
public function getStartDicePerPlayer() {
return $this->container['start_dice_per_player'];
}
@ -249,8 +240,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setStartDicePerPlayer($start_dice_per_player)
{
public function setStartDicePerPlayer($start_dice_per_player) {
$this->container['start_dice_per_player'] = $start_dice_per_player;
return $this;
@ -261,8 +251,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHigherCountLowerValue()
{
public function getHigherCountLowerValue() {
return $this->container['higher_count_lower_value'];
}
@ -273,8 +262,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHigherCountLowerValue($higher_count_lower_value)
{
public function setHigherCountLowerValue($higher_count_lower_value) {
$this->container['higher_count_lower_value'] = $higher_count_lower_value;
return $this;
@ -285,8 +273,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getJokerCountsDouble()
{
public function getJokerCountsDouble() {
return $this->container['joker_counts_double'];
}
@ -297,8 +284,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setJokerCountsDouble($joker_counts_double)
{
public function setJokerCountsDouble($joker_counts_double) {
$this->container['joker_counts_double'] = $joker_counts_double;
return $this;
@ -309,8 +295,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHasJoker()
{
public function getHasJoker() {
return $this->container['has_joker'];
}
@ -321,8 +306,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHasJoker($has_joker)
{
public function setHasJoker($has_joker) {
$this->container['has_joker'] = $has_joker;
return $this;
@ -333,8 +317,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHasPalifico()
{
public function getHasPalifico() {
return $this->container['has_palifico'];
}
@ -345,8 +328,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHasPalifico($has_palifico)
{
public function setHasPalifico($has_palifico) {
$this->container['has_palifico'] = $has_palifico;
return $this;
@ -357,8 +339,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return bool
*/
public function getHasCalza()
{
public function getHasCalza() {
return $this->container['has_calza'];
}
@ -369,8 +350,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setHasCalza($has_calza)
{
public function setHasCalza($has_calza) {
$this->container['has_calza'] = $has_calza;
return $this;
@ -381,8 +361,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return int
*/
public function getJokerDieValue()
{
public function getJokerDieValue() {
return $this->container['joker_die_value'];
}
@ -393,12 +372,12 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return $this
*/
public function setJokerDieValue($joker_die_value)
{
public function setJokerDieValue($joker_die_value) {
$this->container['joker_die_value'] = $joker_die_value;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@ -406,8 +385,7 @@ class GameRules implements ModelInterface, ArrayAccess
*
* @return boolean
*/
public function offsetExists($offset)
{
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
@ -418,8 +396,7 @@ class GameRules 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 GameRules 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 GameRules implements ModelInterface, ArrayAccess
*
* @return void
*/
public function offsetUnset($offset)
{
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
@ -457,8 +432,7 @@ class GameRules 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),