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,48 +39,48 @@ use \Swagger\Client\ObjectSerializer;
|
||||
* @author Swagger Codegen team
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class Round implements ModelInterface, ArrayAccess
|
||||
{
|
||||
class Round 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 = 'Round';
|
||||
|
||||
/**
|
||||
* 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 = [
|
||||
'number' => 'int',
|
||||
'turns' => '\Swagger\Client\Model\Turn[]',
|
||||
'loser' => '\Swagger\Client\Model\Player',
|
||||
'my_rolls' => 'int[]',
|
||||
'rolls' => 'int[][]' ];
|
||||
'number' => 'int',
|
||||
'turns' => Turn::class . '[]',
|
||||
'loser' => Player::class,
|
||||
'my_rolls' => 'int[]',
|
||||
'rolls' => '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 = [
|
||||
'number' => null,
|
||||
'turns' => null,
|
||||
'loser' => null,
|
||||
'my_rolls' => null,
|
||||
'rolls' => null ];
|
||||
'number' => null,
|
||||
'turns' => null,
|
||||
'loser' => null,
|
||||
'my_rolls' => null,
|
||||
'rolls' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerTypes()
|
||||
{
|
||||
public static function swaggerTypes() {
|
||||
return self::$swaggerTypes;
|
||||
}
|
||||
|
||||
@ -89,8 +89,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function swaggerFormats()
|
||||
{
|
||||
public static function swaggerFormats() {
|
||||
return self::$swaggerFormats;
|
||||
}
|
||||
|
||||
@ -101,11 +100,12 @@ class Round implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'number' => 'number',
|
||||
'turns' => 'turns',
|
||||
'loser' => 'loser',
|
||||
'my_rolls' => 'myRolls',
|
||||
'rolls' => 'rolls' ];
|
||||
'number' => 'number',
|
||||
'turns' => 'turns',
|
||||
'loser' => 'loser',
|
||||
'my_rolls' => 'myRolls',
|
||||
'rolls' => 'rolls',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
@ -113,11 +113,12 @@ class Round implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'number' => 'setNumber',
|
||||
'turns' => 'setTurns',
|
||||
'loser' => 'setLoser',
|
||||
'my_rolls' => 'setMyRolls',
|
||||
'rolls' => 'setRolls' ];
|
||||
'number' => 'setNumber',
|
||||
'turns' => 'setTurns',
|
||||
'loser' => 'setLoser',
|
||||
'my_rolls' => 'setMyRolls',
|
||||
'rolls' => 'setRolls',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
@ -125,11 +126,12 @@ class Round implements ModelInterface, ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'number' => 'getNumber',
|
||||
'turns' => 'getTurns',
|
||||
'loser' => 'getLoser',
|
||||
'my_rolls' => 'getMyRolls',
|
||||
'rolls' => 'getRolls' ];
|
||||
'number' => 'getNumber',
|
||||
'turns' => 'getTurns',
|
||||
'loser' => 'getLoser',
|
||||
'my_rolls' => 'getMyRolls',
|
||||
'rolls' => 'getRolls',
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
@ -137,8 +139,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
public static function attributeMap() {
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
@ -147,8 +148,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
public static function setters() {
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
@ -157,8 +157,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
public static function getters() {
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
@ -167,13 +166,10 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
public function getModelName() {
|
||||
return self::$swaggerModelName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
@ -187,13 +183,12 @@ class Round implements ModelInterface, ArrayAccess
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->container['number'] = isset($data['number']) ? $data['number'] : null;
|
||||
$this->container['turns'] = isset($data['turns']) ? $data['turns'] : null;
|
||||
$this->container['loser'] = isset($data['loser']) ? $data['loser'] : null;
|
||||
$this->container['my_rolls'] = isset($data['my_rolls']) ? $data['my_rolls'] : null;
|
||||
$this->container['rolls'] = isset($data['rolls']) ? $data['rolls'] : null;
|
||||
public function __construct(array $data = null) {
|
||||
$this->container['number'] = $data['number'] ?? null;
|
||||
$this->container['turns'] = $data['turns'] ?? null;
|
||||
$this->container['loser'] = $data['loser'] ?? null;
|
||||
$this->container['my_rolls'] = $data['my_rolls'] ?? null;
|
||||
$this->container['rolls'] = $data['rolls'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -201,8 +196,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
public function listInvalidProperties() {
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
@ -214,19 +208,16 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
public function valid() {
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets number
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getNumber()
|
||||
{
|
||||
public function getNumber() {
|
||||
return $this->container['number'];
|
||||
}
|
||||
|
||||
@ -237,8 +228,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($number)
|
||||
{
|
||||
public function setNumber($number) {
|
||||
$this->container['number'] = $number;
|
||||
|
||||
return $this;
|
||||
@ -249,8 +239,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\Turn[]
|
||||
*/
|
||||
public function getTurns()
|
||||
{
|
||||
public function getTurns() {
|
||||
return $this->container['turns'];
|
||||
}
|
||||
|
||||
@ -261,8 +250,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTurns($turns)
|
||||
{
|
||||
public function setTurns($turns) {
|
||||
$this->container['turns'] = $turns;
|
||||
|
||||
return $this;
|
||||
@ -273,8 +261,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return \Swagger\Client\Model\Player
|
||||
*/
|
||||
public function getLoser()
|
||||
{
|
||||
public function getLoser() {
|
||||
return $this->container['loser'];
|
||||
}
|
||||
|
||||
@ -285,8 +272,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLoser($loser)
|
||||
{
|
||||
public function setLoser($loser) {
|
||||
$this->container['loser'] = $loser;
|
||||
|
||||
return $this;
|
||||
@ -297,8 +283,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return int[][]
|
||||
*/
|
||||
public function getMyRolls()
|
||||
{
|
||||
public function getMyRolls() {
|
||||
return $this->container['my_rolls'];
|
||||
}
|
||||
|
||||
@ -309,8 +294,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setMyRolls($my_rolls)
|
||||
{
|
||||
public function setMyRolls($my_rolls) {
|
||||
$this->container['my_rolls'] = $my_rolls;
|
||||
|
||||
return $this;
|
||||
@ -321,8 +305,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return int[]
|
||||
*/
|
||||
public function getRolls()
|
||||
{
|
||||
public function getRolls() {
|
||||
return $this->container['rolls'];
|
||||
}
|
||||
|
||||
@ -333,12 +316,12 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setRolls($rolls)
|
||||
{
|
||||
public function setRolls($rolls) {
|
||||
$this->container['rolls'] = $rolls;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
@ -346,8 +329,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -358,8 +340,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
public function offsetGet($offset) {
|
||||
return isset($this->container[$offset]) ? $this->container[$offset] : null;
|
||||
}
|
||||
|
||||
@ -371,8 +352,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
public function offsetSet($offset, $value) {
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
@ -387,8 +367,7 @@ class Round implements ModelInterface, ArrayAccess
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
@ -397,8 +376,7 @@ class Round 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