PerudoPhpApi/lib/Model/GameRules.php

446 lines
11 KiB
PHP
Raw Permalink Normal View History

<?php
/**
* GameRules
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Perudo API
*
* Play perudo with your friends through the api!
*
* OpenAPI spec version: 1.0.0
2021-11-25 18:57:35 +01:00
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.30
*/
/**
* 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;
use \Swagger\Client\ObjectSerializer;
/**
* GameRules Class Doc Comment
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
2021-11-25 18:57:35 +01:00
class GameRules implements ModelInterface, ArrayAccess {
const DISCRIMINATOR = null;
/**
2021-11-25 18:57:35 +01:00
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'GameRules';
/**
2021-11-25 18:57:35 +01:00
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
2021-11-25 18:57:35 +01:00
'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[]
*/
protected static $swaggerFormats = [
2021-11-25 18:57:35 +01:00
'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
*/
2021-11-25 18:57:35 +01:00
public static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
2021-11-25 18:57:35 +01:00
public static function swaggerFormats() {
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
2021-11-25 18:57:35 +01:00
'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)
*
* @var string[]
*/
protected static $setters = [
2021-11-25 18:57:35 +01:00
'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)
*
* @var string[]
*/
protected static $getters = [
2021-11-25 18:57:35 +01:00
'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,
* and the value is the original name
*
* @return array
*/
2021-11-25 18:57:35 +01:00
public static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
2021-11-25 18:57:35 +01:00
public static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
2021-11-25 18:57:35 +01:00
public static function getters() {
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
2021-11-25 18:57:35 +01:00
public function getModelName() {
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
2021-11-25 18:57:35 +01:00
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;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
2021-11-25 18:57:35 +01:00
public function listInvalidProperties() {
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
2021-11-25 18:57:35 +01:00
public function valid() {
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets start_dice_per_player
*
* @return int
*/
2021-11-25 18:57:35 +01:00
public function getStartDicePerPlayer() {
return $this->container['start_dice_per_player'];
}
/**
* Sets start_dice_per_player
*
* @param int $start_dice_per_player start_dice_per_player
*
* @return $this
*/
2021-11-25 18:57:35 +01:00
public function setStartDicePerPlayer($start_dice_per_player) {
$this->container['start_dice_per_player'] = $start_dice_per_player;
return $this;
}
/**
* Gets higher_count_lower_value
*
* @return bool
*/
2021-11-25 18:57:35 +01:00
public function getHigherCountLowerValue() {
return $this->container['higher_count_lower_value'];
}
/**
* Sets higher_count_lower_value
*
* @param bool $higher_count_lower_value higher_count_lower_value
*
* @return $this
*/
2021-11-25 18:57:35 +01:00
public function setHigherCountLowerValue($higher_count_lower_value) {
$this->container['higher_count_lower_value'] = $higher_count_lower_value;
return $this;
}
/**
* Gets joker_counts_double
*
* @return bool
*/
2021-11-25 18:57:35 +01:00
public function getJokerCountsDouble() {
return $this->container['joker_counts_double'];
}
/**
* Sets joker_counts_double
*
* @param bool $joker_counts_double joker_counts_double
*
* @return $this
*/
2021-11-25 18:57:35 +01:00
public function setJokerCountsDouble($joker_counts_double) {
$this->container['joker_counts_double'] = $joker_counts_double;
return $this;
}
/**
* Gets has_joker
*
* @return bool
*/
2021-11-25 18:57:35 +01:00
public function getHasJoker() {
return $this->container['has_joker'];
}
/**
* Sets has_joker
*
* @param bool $has_joker has_joker
*
* @return $this
*/
2021-11-25 18:57:35 +01:00
public function setHasJoker($has_joker) {
$this->container['has_joker'] = $has_joker;
return $this;
}
/**
* Gets has_palifico
*
* @return bool
*/
2021-11-25 18:57:35 +01:00
public function getHasPalifico() {
return $this->container['has_palifico'];
}
/**
* Sets has_palifico
*
* @param bool $has_palifico has_palifico
*
* @return $this
*/
2021-11-25 18:57:35 +01:00
public function setHasPalifico($has_palifico) {
$this->container['has_palifico'] = $has_palifico;
return $this;
}
/**
* Gets has_calza
*
* @return bool
*/
2021-11-25 18:57:35 +01:00
public function getHasCalza() {
return $this->container['has_calza'];
}
/**
* Sets has_calza
*
* @param bool $has_calza has_calza
*
* @return $this
*/
2021-11-25 18:57:35 +01:00
public function setHasCalza($has_calza) {
$this->container['has_calza'] = $has_calza;
return $this;
}
/**
* Gets joker_die_value
*
* @return int
*/
2021-11-25 18:57:35 +01:00
public function getJokerDieValue() {
return $this->container['joker_die_value'];
}
/**
* Sets joker_die_value
*
* @param int $joker_die_value joker_die_value
*
* @return $this
*/
2021-11-25 18:57:35 +01:00
public function setJokerDieValue($joker_die_value) {
$this->container['joker_die_value'] = $joker_die_value;
return $this;
}
2021-11-25 18:57:35 +01:00
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
2021-11-25 18:57:35 +01:00
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
2021-11-25 18:57:35 +01:00
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
*/
2021-11-25 18:57:35 +01:00
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
*/
2021-11-25 18:57:35 +01:00
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
2021-11-25 18:57:35 +01:00
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}