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,42 +39,42 @@ use \Swagger\Client\ObjectSerializer;
|
||||
* @author Swagger Codegen team
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
{
|
||||
class PlayerGuess 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 = 'PlayerGuess';
|
||||
|
||||
/**
|
||||
* 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 = [
|
||||
'dice_count' => 'int',
|
||||
'die_value' => '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 = [
|
||||
'dice_count' => null,
|
||||
'die_value' => 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;
|
||||
}
|
||||
|
||||
@ -83,8 +83,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
public static function swaggerFormats() {
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
@ -96,7 +95,8 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'dice_count' => 'diceCount',
|
||||
'die_value' => 'dieValue' ];
|
||||
'die_value' => 'dieValue',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
@ -105,7 +105,8 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*/
|
||||
protected static $setters = [
|
||||
'dice_count' => 'setDiceCount',
|
||||
'die_value' => 'setDieValue' ];
|
||||
'die_value' => 'setDieValue',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
@ -114,7 +115,8 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*/
|
||||
protected static $getters = [
|
||||
'dice_count' => 'getDiceCount',
|
||||
'die_value' => 'getDieValue' ];
|
||||
'die_value' => 'getDieValue',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
@ -122,8 +124,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
public static function attributeMap() {
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
@ -132,8 +133,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
public static function setters() {
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
@ -142,8 +142,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
public static function getters() {
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
@ -152,13 +151,10 @@ class PlayerGuess 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 PlayerGuess implements ModelInterface, ArrayAccess
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = 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['dice_count'] = $data['dice_count'] ?? null;
|
||||
$this->container['die_value'] = $data['die_value'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -183,8 +178,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
public function listInvalidProperties() {
|
||||
$invalidProperties = [];
|
||||
|
||||
if ($this->container['dice_count'] === null) {
|
||||
@ -193,6 +187,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
if ($this->container['die_value'] === null) {
|
||||
$invalidProperties[] = "'die_value' can't be null";
|
||||
}
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
@ -202,19 +197,16 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
public function valid() {
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets dice_count
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDiceCount()
|
||||
{
|
||||
public function getDiceCount() {
|
||||
return $this->container['dice_count'];
|
||||
}
|
||||
|
||||
@ -225,8 +217,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDiceCount($dice_count)
|
||||
{
|
||||
public function setDiceCount($dice_count) {
|
||||
$this->container['dice_count'] = $dice_count;
|
||||
|
||||
return $this;
|
||||
@ -237,8 +228,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDieValue()
|
||||
{
|
||||
public function getDieValue() {
|
||||
return $this->container['die_value'];
|
||||
}
|
||||
|
||||
@ -249,12 +239,12 @@ class PlayerGuess 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.
|
||||
*
|
||||
@ -262,8 +252,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -274,8 +263,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
public function offsetGet($offset) {
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
@ -287,8 +275,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
public function offsetSet($offset, $value) {
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
@ -303,8 +290,7 @@ class PlayerGuess implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -313,8 +299,7 @@ class PlayerGuess 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