forked from loafle/openapi-generator-original
update php samples
This commit is contained in:
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Bird Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class Bird implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,14 +53,14 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Bird';
|
||||
protected static string $openAPIModelName = 'Bird';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'size' => 'string',
|
||||
'color' => 'string'
|
||||
];
|
||||
@@ -65,11 +68,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'size' => null,
|
||||
'color' => null
|
||||
];
|
||||
@@ -77,7 +78,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'size' => false,
|
||||
@@ -87,16 +88,16 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -104,9 +105,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -114,7 +115,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -124,7 +125,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -134,7 +135,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -167,9 +168,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'size' => 'size',
|
||||
'color' => 'color'
|
||||
];
|
||||
@@ -177,9 +178,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'size' => 'setSize',
|
||||
'color' => 'setColor'
|
||||
];
|
||||
@@ -187,9 +188,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'size' => 'getSize',
|
||||
'color' => 'getColor'
|
||||
];
|
||||
@@ -198,9 +199,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -208,9 +209,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -218,9 +219,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -230,7 +231,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -239,15 +240,14 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -264,7 +264,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -276,9 +276,9 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -291,7 +291,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSize()
|
||||
public function getSize(): ?string
|
||||
{
|
||||
return $this->container['size'];
|
||||
}
|
||||
@@ -312,12 +312,12 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string|null $size size
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setSize($size)
|
||||
public function setSize(?string $size): static
|
||||
{
|
||||
if (is_null($size)) {
|
||||
throw new \InvalidArgumentException('non-nullable size cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable size cannot be null');
|
||||
}
|
||||
$this->container['size'] = $size;
|
||||
|
||||
@@ -329,7 +329,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getColor()
|
||||
public function getColor(): ?string
|
||||
{
|
||||
return $this->container['color'];
|
||||
}
|
||||
@@ -339,12 +339,12 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string|null $color color
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setColor($color)
|
||||
public function setColor(?string $color): static
|
||||
{
|
||||
if (is_null($color)) {
|
||||
throw new \InvalidArgumentException('non-nullable color cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable color cannot be null');
|
||||
}
|
||||
$this->container['color'] = $color;
|
||||
|
||||
@@ -357,7 +357,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -369,8 +369,8 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -399,7 +399,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -411,8 +411,8 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -422,7 +422,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -435,7 +435,7 @@ class Bird implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Category Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class Category implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,14 +53,14 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Category';
|
||||
protected static string $openAPIModelName = 'Category';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'id' => 'int',
|
||||
'name' => 'string'
|
||||
];
|
||||
@@ -65,11 +68,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'id' => 'int64',
|
||||
'name' => null
|
||||
];
|
||||
@@ -77,7 +78,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
@@ -87,16 +88,16 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -104,9 +105,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -114,7 +115,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -124,7 +125,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -134,7 +135,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -167,9 +168,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
];
|
||||
@@ -177,9 +178,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'id' => 'setId',
|
||||
'name' => 'setName'
|
||||
];
|
||||
@@ -187,9 +188,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'id' => 'getId',
|
||||
'name' => 'getName'
|
||||
];
|
||||
@@ -198,9 +199,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -208,9 +209,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -218,9 +219,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -230,7 +231,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -239,15 +240,14 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -264,7 +264,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -276,9 +276,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -291,7 +291,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
@@ -312,12 +312,12 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
public function setId(?int $id): static
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
@@ -329,7 +329,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
@@ -339,12 +339,12 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
public function setName(?string $name): static
|
||||
{
|
||||
if (is_null($name)) {
|
||||
throw new \InvalidArgumentException('non-nullable name cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable name cannot be null');
|
||||
}
|
||||
$this->container['name'] = $name;
|
||||
|
||||
@@ -357,7 +357,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -369,8 +369,8 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -399,7 +399,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -411,8 +411,8 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -422,7 +422,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -435,7 +435,7 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DataQuery Class Doc Comment
|
||||
@@ -37,7 +36,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class DataQuery extends Query
|
||||
{
|
||||
@@ -48,14 +47,14 @@ class DataQuery extends Query
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DataQuery';
|
||||
protected static string $openAPIModelName = 'DataQuery';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'suffix' => 'string',
|
||||
'text' => 'string',
|
||||
'date' => '\DateTime'
|
||||
@@ -64,11 +63,9 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'suffix' => null,
|
||||
'text' => null,
|
||||
'date' => 'date-time'
|
||||
@@ -77,7 +74,7 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'suffix' => false,
|
||||
@@ -88,16 +85,16 @@ class DataQuery extends Query
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes + parent::openAPITypes();
|
||||
}
|
||||
@@ -105,9 +102,9 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats + parent::openAPIFormats();
|
||||
}
|
||||
@@ -115,7 +112,7 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -125,7 +122,7 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -135,7 +132,7 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -168,9 +165,9 @@ class DataQuery extends Query
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'suffix' => 'suffix',
|
||||
'text' => 'text',
|
||||
'date' => 'date'
|
||||
@@ -179,9 +176,9 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'suffix' => 'setSuffix',
|
||||
'text' => 'setText',
|
||||
'date' => 'setDate'
|
||||
@@ -190,9 +187,9 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'suffix' => 'getSuffix',
|
||||
'text' => 'getText',
|
||||
'date' => 'getDate'
|
||||
@@ -202,9 +199,9 @@ class DataQuery extends Query
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return parent::attributeMap() + self::$attributeMap;
|
||||
}
|
||||
@@ -212,9 +209,9 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return parent::setters() + self::$setters;
|
||||
}
|
||||
@@ -222,9 +219,9 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return parent::getters() + self::$getters;
|
||||
}
|
||||
@@ -234,7 +231,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -244,8 +241,7 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -265,7 +261,7 @@ class DataQuery extends Query
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -277,9 +273,9 @@ class DataQuery extends Query
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = parent::listInvalidProperties();
|
||||
|
||||
@@ -292,7 +288,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -303,7 +299,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSuffix()
|
||||
public function getSuffix(): ?string
|
||||
{
|
||||
return $this->container['suffix'];
|
||||
}
|
||||
@@ -313,12 +309,12 @@ class DataQuery extends Query
|
||||
*
|
||||
* @param string|null $suffix test suffix
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setSuffix($suffix)
|
||||
public function setSuffix(?string $suffix): static
|
||||
{
|
||||
if (is_null($suffix)) {
|
||||
throw new \InvalidArgumentException('non-nullable suffix cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable suffix cannot be null');
|
||||
}
|
||||
$this->container['suffix'] = $suffix;
|
||||
|
||||
@@ -330,7 +326,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getText()
|
||||
public function getText(): ?string
|
||||
{
|
||||
return $this->container['text'];
|
||||
}
|
||||
@@ -340,12 +336,12 @@ class DataQuery extends Query
|
||||
*
|
||||
* @param string|null $text Some text containing white spaces
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setText($text)
|
||||
public function setText(?string $text): static
|
||||
{
|
||||
if (is_null($text)) {
|
||||
throw new \InvalidArgumentException('non-nullable text cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable text cannot be null');
|
||||
}
|
||||
$this->container['text'] = $text;
|
||||
|
||||
@@ -357,7 +353,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getDate()
|
||||
public function getDate(): ?\DateTime
|
||||
{
|
||||
return $this->container['date'];
|
||||
}
|
||||
@@ -367,12 +363,12 @@ class DataQuery extends Query
|
||||
*
|
||||
* @param \DateTime|null $date A date
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setDate($date)
|
||||
public function setDate(?\DateTime $date): static
|
||||
{
|
||||
if (is_null($date)) {
|
||||
throw new \InvalidArgumentException('non-nullable date cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable date cannot be null');
|
||||
}
|
||||
$this->container['date'] = $date;
|
||||
|
||||
@@ -385,7 +381,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -397,8 +393,8 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -411,7 +407,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -427,7 +423,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -439,8 +435,8 @@ class DataQuery extends Query
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -450,7 +446,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -463,7 +459,7 @@ class DataQuery extends Query
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* DefaultValue Class Doc Comment
|
||||
@@ -40,9 +43,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class DefaultValue implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -51,14 +54,14 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'DefaultValue';
|
||||
protected static string $openAPIModelName = 'DefaultValue';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'array_string_enum_ref_default' => '\OpenAPI\Client\Model\StringEnumRef[]',
|
||||
'array_string_enum_default' => 'string[]',
|
||||
'array_string_default' => 'string[]',
|
||||
@@ -72,11 +75,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'array_string_enum_ref_default' => null,
|
||||
'array_string_enum_default' => null,
|
||||
'array_string_default' => null,
|
||||
@@ -90,7 +91,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'array_string_enum_ref_default' => false,
|
||||
@@ -106,16 +107,16 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -123,9 +124,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -133,7 +134,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -143,7 +144,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -153,7 +154,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -186,9 +187,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'array_string_enum_ref_default' => 'array_string_enum_ref_default',
|
||||
'array_string_enum_default' => 'array_string_enum_default',
|
||||
'array_string_default' => 'array_string_default',
|
||||
@@ -202,9 +203,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'array_string_enum_ref_default' => 'setArrayStringEnumRefDefault',
|
||||
'array_string_enum_default' => 'setArrayStringEnumDefault',
|
||||
'array_string_default' => 'setArrayStringDefault',
|
||||
@@ -218,9 +219,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'array_string_enum_ref_default' => 'getArrayStringEnumRefDefault',
|
||||
'array_string_enum_default' => 'getArrayStringEnumDefault',
|
||||
'array_string_default' => 'getArrayStringDefault',
|
||||
@@ -235,9 +236,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -245,9 +246,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -255,9 +256,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -267,7 +268,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -293,22 +294,21 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->setIfExists('array_string_enum_ref_default', $data ?? [], null);
|
||||
$this->setIfExists('array_string_enum_default', $data ?? [], null);
|
||||
$this->setIfExists('array_string_default', $data ?? [], null);
|
||||
$this->setIfExists('array_integer_default', $data ?? [], null);
|
||||
$this->setIfExists('array_string_enum_ref_default', $data ?? [], [["success","failure"]]);
|
||||
$this->setIfExists('array_string_enum_default', $data ?? [], [["success","failure"]]);
|
||||
$this->setIfExists('array_string_default', $data ?? [], [["failure","skipped"]]);
|
||||
$this->setIfExists('array_integer_default', $data ?? [], [[1,3]]);
|
||||
$this->setIfExists('array_string', $data ?? [], null);
|
||||
$this->setIfExists('array_string_nullable', $data ?? [], null);
|
||||
$this->setIfExists('array_string_extension_nullable', $data ?? [], null);
|
||||
@@ -324,7 +324,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -336,9 +336,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -351,7 +351,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -362,7 +362,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return \OpenAPI\Client\Model\StringEnumRef[]|null
|
||||
*/
|
||||
public function getArrayStringEnumRefDefault()
|
||||
public function getArrayStringEnumRefDefault(): ?array
|
||||
{
|
||||
return $this->container['array_string_enum_ref_default'];
|
||||
}
|
||||
@@ -372,12 +372,12 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\StringEnumRef[]|null $array_string_enum_ref_default array_string_enum_ref_default
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayStringEnumRefDefault($array_string_enum_ref_default)
|
||||
public function setArrayStringEnumRefDefault(?array $array_string_enum_ref_default): static
|
||||
{
|
||||
if (is_null($array_string_enum_ref_default)) {
|
||||
throw new \InvalidArgumentException('non-nullable array_string_enum_ref_default cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable array_string_enum_ref_default cannot be null');
|
||||
}
|
||||
$this->container['array_string_enum_ref_default'] = $array_string_enum_ref_default;
|
||||
|
||||
@@ -389,7 +389,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getArrayStringEnumDefault()
|
||||
public function getArrayStringEnumDefault(): ?array
|
||||
{
|
||||
return $this->container['array_string_enum_default'];
|
||||
}
|
||||
@@ -399,16 +399,16 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string[]|null $array_string_enum_default array_string_enum_default
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayStringEnumDefault($array_string_enum_default)
|
||||
public function setArrayStringEnumDefault(?array $array_string_enum_default): static
|
||||
{
|
||||
if (is_null($array_string_enum_default)) {
|
||||
throw new \InvalidArgumentException('non-nullable array_string_enum_default cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable array_string_enum_default cannot be null');
|
||||
}
|
||||
$allowedValues = $this->getArrayStringEnumDefaultAllowableValues();
|
||||
if (array_diff($array_string_enum_default, $allowedValues)) {
|
||||
throw new \InvalidArgumentException(
|
||||
throw new InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'array_string_enum_default', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
@@ -425,7 +425,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getArrayStringDefault()
|
||||
public function getArrayStringDefault(): ?array
|
||||
{
|
||||
return $this->container['array_string_default'];
|
||||
}
|
||||
@@ -435,12 +435,12 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string[]|null $array_string_default array_string_default
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayStringDefault($array_string_default)
|
||||
public function setArrayStringDefault(?array $array_string_default): static
|
||||
{
|
||||
if (is_null($array_string_default)) {
|
||||
throw new \InvalidArgumentException('non-nullable array_string_default cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable array_string_default cannot be null');
|
||||
}
|
||||
$this->container['array_string_default'] = $array_string_default;
|
||||
|
||||
@@ -452,7 +452,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return int[]|null
|
||||
*/
|
||||
public function getArrayIntegerDefault()
|
||||
public function getArrayIntegerDefault(): ?array
|
||||
{
|
||||
return $this->container['array_integer_default'];
|
||||
}
|
||||
@@ -462,12 +462,12 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param int[]|null $array_integer_default array_integer_default
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayIntegerDefault($array_integer_default)
|
||||
public function setArrayIntegerDefault(?array $array_integer_default): static
|
||||
{
|
||||
if (is_null($array_integer_default)) {
|
||||
throw new \InvalidArgumentException('non-nullable array_integer_default cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable array_integer_default cannot be null');
|
||||
}
|
||||
$this->container['array_integer_default'] = $array_integer_default;
|
||||
|
||||
@@ -479,7 +479,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getArrayString()
|
||||
public function getArrayString(): ?array
|
||||
{
|
||||
return $this->container['array_string'];
|
||||
}
|
||||
@@ -489,12 +489,12 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string[]|null $array_string array_string
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayString($array_string)
|
||||
public function setArrayString(?array $array_string): static
|
||||
{
|
||||
if (is_null($array_string)) {
|
||||
throw new \InvalidArgumentException('non-nullable array_string cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable array_string cannot be null');
|
||||
}
|
||||
$this->container['array_string'] = $array_string;
|
||||
|
||||
@@ -506,7 +506,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getArrayStringNullable()
|
||||
public function getArrayStringNullable(): ?array
|
||||
{
|
||||
return $this->container['array_string_nullable'];
|
||||
}
|
||||
@@ -516,9 +516,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string[]|null $array_string_nullable array_string_nullable
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayStringNullable($array_string_nullable)
|
||||
public function setArrayStringNullable(?array $array_string_nullable): static
|
||||
{
|
||||
if (is_null($array_string_nullable)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'array_string_nullable');
|
||||
@@ -540,7 +540,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getArrayStringExtensionNullable()
|
||||
public function getArrayStringExtensionNullable(): ?array
|
||||
{
|
||||
return $this->container['array_string_extension_nullable'];
|
||||
}
|
||||
@@ -550,9 +550,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string[]|null $array_string_extension_nullable array_string_extension_nullable
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setArrayStringExtensionNullable($array_string_extension_nullable)
|
||||
public function setArrayStringExtensionNullable(?array $array_string_extension_nullable): static
|
||||
{
|
||||
if (is_null($array_string_extension_nullable)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'array_string_extension_nullable');
|
||||
@@ -574,7 +574,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStringNullable()
|
||||
public function getStringNullable(): ?string
|
||||
{
|
||||
return $this->container['string_nullable'];
|
||||
}
|
||||
@@ -584,9 +584,9 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string|null $string_nullable string_nullable
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setStringNullable($string_nullable)
|
||||
public function setStringNullable(?string $string_nullable): static
|
||||
{
|
||||
if (is_null($string_nullable)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'string_nullable');
|
||||
@@ -609,7 +609,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -621,8 +621,8 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -635,7 +635,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -651,7 +651,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -663,8 +663,8 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -674,7 +674,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -687,7 +687,7 @@ class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -42,49 +42,49 @@ interface ModelInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName();
|
||||
public function getModelName(): string;
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes();
|
||||
public static function openAPITypes(): array;
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats();
|
||||
public static function openAPIFormats(): array;
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name, and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap();
|
||||
public static function attributeMap(): array;
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters();
|
||||
public static function setters(): array;
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters();
|
||||
public static function getters(): array;
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function listInvalidProperties();
|
||||
public function listInvalidProperties(): array;
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
@@ -92,7 +92,7 @@ interface ModelInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function valid();
|
||||
public function valid(): bool;
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* NumberPropertiesOnly Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class NumberPropertiesOnly implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,14 +53,14 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'NumberPropertiesOnly';
|
||||
protected static string $openAPIModelName = 'NumberPropertiesOnly';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'number' => 'float',
|
||||
'float' => 'float',
|
||||
'double' => 'float'
|
||||
@@ -66,11 +69,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'number' => null,
|
||||
'float' => 'float',
|
||||
'double' => 'double'
|
||||
@@ -79,7 +80,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'number' => false,
|
||||
@@ -90,16 +91,16 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -107,9 +108,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -117,7 +118,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -127,7 +128,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -137,7 +138,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -170,9 +171,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'number' => 'number',
|
||||
'float' => 'float',
|
||||
'double' => 'double'
|
||||
@@ -181,9 +182,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'number' => 'setNumber',
|
||||
'float' => 'setFloat',
|
||||
'double' => 'setDouble'
|
||||
@@ -192,9 +193,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'number' => 'getNumber',
|
||||
'float' => 'getFloat',
|
||||
'double' => 'getDouble'
|
||||
@@ -204,9 +205,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -214,9 +215,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -224,9 +225,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -236,7 +237,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -245,15 +246,14 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -271,7 +271,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -283,9 +283,9 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -306,7 +306,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getNumber()
|
||||
public function getNumber(): ?float
|
||||
{
|
||||
return $this->container['number'];
|
||||
}
|
||||
@@ -327,12 +327,12 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @param float|null $number number
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setNumber($number)
|
||||
public function setNumber(?float $number): static
|
||||
{
|
||||
if (is_null($number)) {
|
||||
throw new \InvalidArgumentException('non-nullable number cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable number cannot be null');
|
||||
}
|
||||
$this->container['number'] = $number;
|
||||
|
||||
@@ -344,7 +344,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getFloat()
|
||||
public function getFloat(): ?float
|
||||
{
|
||||
return $this->container['float'];
|
||||
}
|
||||
@@ -354,12 +354,12 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @param float|null $float float
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setFloat($float)
|
||||
public function setFloat(?float $float): static
|
||||
{
|
||||
if (is_null($float)) {
|
||||
throw new \InvalidArgumentException('non-nullable float cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable float cannot be null');
|
||||
}
|
||||
$this->container['float'] = $float;
|
||||
|
||||
@@ -371,7 +371,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDouble()
|
||||
public function getDouble(): ?float
|
||||
{
|
||||
return $this->container['double'];
|
||||
}
|
||||
@@ -381,19 +381,19 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @param float|null $double double
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setDouble($double)
|
||||
public function setDouble(?float $double): static
|
||||
{
|
||||
if (is_null($double)) {
|
||||
throw new \InvalidArgumentException('non-nullable double cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable double cannot be null');
|
||||
}
|
||||
|
||||
if (($double > 50.2)) {
|
||||
throw new \InvalidArgumentException('invalid value for $double when calling NumberPropertiesOnly., must be smaller than or equal to 50.2.');
|
||||
throw new InvalidArgumentException('invalid value for $double when calling NumberPropertiesOnly., must be smaller than or equal to 50.2.');
|
||||
}
|
||||
if (($double < 0.8)) {
|
||||
throw new \InvalidArgumentException('invalid value for $double when calling NumberPropertiesOnly., must be bigger than or equal to 0.8.');
|
||||
throw new InvalidArgumentException('invalid value for $double when calling NumberPropertiesOnly., must be bigger than or equal to 0.8.');
|
||||
}
|
||||
|
||||
$this->container['double'] = $double;
|
||||
@@ -407,7 +407,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -419,8 +419,8 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -449,7 +449,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -461,8 +461,8 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -472,7 +472,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -485,7 +485,7 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializ
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Pet Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class Pet implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,14 +53,14 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Pet';
|
||||
protected static string $openAPIModelName = 'Pet';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'id' => 'int',
|
||||
'name' => 'string',
|
||||
'category' => '\OpenAPI\Client\Model\Category',
|
||||
@@ -69,11 +72,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'id' => 'int64',
|
||||
'name' => null,
|
||||
'category' => null,
|
||||
@@ -85,7 +86,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
@@ -99,16 +100,16 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -116,9 +117,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -126,7 +127,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -136,7 +137,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -146,7 +147,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -179,9 +180,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'id' => 'id',
|
||||
'name' => 'name',
|
||||
'category' => 'category',
|
||||
@@ -193,9 +194,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'id' => 'setId',
|
||||
'name' => 'setName',
|
||||
'category' => 'setCategory',
|
||||
@@ -207,9 +208,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'id' => 'getId',
|
||||
'name' => 'getName',
|
||||
'category' => 'getCategory',
|
||||
@@ -222,9 +223,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -232,9 +233,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -242,9 +243,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -254,7 +255,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -280,15 +281,14 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -309,7 +309,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -321,9 +321,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -351,7 +351,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -362,7 +362,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
@@ -372,12 +372,12 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
public function setId(?int $id): static
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
@@ -389,7 +389,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
@@ -399,12 +399,12 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string $name name
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
public function setName(string $name): static
|
||||
{
|
||||
if (is_null($name)) {
|
||||
throw new \InvalidArgumentException('non-nullable name cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable name cannot be null');
|
||||
}
|
||||
$this->container['name'] = $name;
|
||||
|
||||
@@ -416,7 +416,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return \OpenAPI\Client\Model\Category|null
|
||||
*/
|
||||
public function getCategory()
|
||||
public function getCategory(): ?\OpenAPI\Client\Model\Category
|
||||
{
|
||||
return $this->container['category'];
|
||||
}
|
||||
@@ -426,12 +426,12 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Category|null $category category
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setCategory($category)
|
||||
public function setCategory(?\OpenAPI\Client\Model\Category $category): static
|
||||
{
|
||||
if (is_null($category)) {
|
||||
throw new \InvalidArgumentException('non-nullable category cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable category cannot be null');
|
||||
}
|
||||
$this->container['category'] = $category;
|
||||
|
||||
@@ -443,7 +443,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPhotoUrls()
|
||||
public function getPhotoUrls(): array
|
||||
{
|
||||
return $this->container['photo_urls'];
|
||||
}
|
||||
@@ -453,12 +453,12 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string[] $photo_urls photo_urls
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhotoUrls($photo_urls)
|
||||
public function setPhotoUrls(array $photo_urls): static
|
||||
{
|
||||
if (is_null($photo_urls)) {
|
||||
throw new \InvalidArgumentException('non-nullable photo_urls cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable photo_urls cannot be null');
|
||||
}
|
||||
$this->container['photo_urls'] = $photo_urls;
|
||||
|
||||
@@ -470,7 +470,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return \OpenAPI\Client\Model\Tag[]|null
|
||||
*/
|
||||
public function getTags()
|
||||
public function getTags(): ?array
|
||||
{
|
||||
return $this->container['tags'];
|
||||
}
|
||||
@@ -480,12 +480,12 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Tag[]|null $tags tags
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setTags($tags)
|
||||
public function setTags(?array $tags): static
|
||||
{
|
||||
if (is_null($tags)) {
|
||||
throw new \InvalidArgumentException('non-nullable tags cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable tags cannot be null');
|
||||
}
|
||||
$this->container['tags'] = $tags;
|
||||
|
||||
@@ -497,7 +497,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStatus()
|
||||
public function getStatus(): ?string
|
||||
{
|
||||
return $this->container['status'];
|
||||
}
|
||||
@@ -507,16 +507,16 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string|null $status pet status in the store
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setStatus($status)
|
||||
public function setStatus(?string $status): static
|
||||
{
|
||||
if (is_null($status)) {
|
||||
throw new \InvalidArgumentException('non-nullable status cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable status cannot be null');
|
||||
}
|
||||
$allowedValues = $this->getStatusAllowableValues();
|
||||
if (!in_array($status, $allowedValues, true)) {
|
||||
throw new \InvalidArgumentException(
|
||||
throw new InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value '%s' for 'status', must be one of '%s'",
|
||||
$status,
|
||||
@@ -535,7 +535,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -547,8 +547,8 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -561,7 +561,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -577,7 +577,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -589,8 +589,8 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -600,7 +600,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -613,7 +613,7 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Query Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class Query implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,14 +53,14 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Query';
|
||||
protected static string $openAPIModelName = 'Query';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'id' => 'int',
|
||||
'outcomes' => 'string[]'
|
||||
];
|
||||
@@ -65,11 +68,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'id' => 'int64',
|
||||
'outcomes' => null
|
||||
];
|
||||
@@ -77,7 +78,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
@@ -87,16 +88,16 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -104,9 +105,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -114,7 +115,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -124,7 +125,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -134,7 +135,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -167,9 +168,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'id' => 'id',
|
||||
'outcomes' => 'outcomes'
|
||||
];
|
||||
@@ -177,9 +178,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'id' => 'setId',
|
||||
'outcomes' => 'setOutcomes'
|
||||
];
|
||||
@@ -187,9 +188,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'id' => 'getId',
|
||||
'outcomes' => 'getOutcomes'
|
||||
];
|
||||
@@ -198,9 +199,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -208,9 +209,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -218,9 +219,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -230,7 +231,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -256,20 +257,19 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
$this->setIfExists('id', $data ?? [], null);
|
||||
$this->setIfExists('outcomes', $data ?? [], null);
|
||||
$this->setIfExists('outcomes', $data ?? [], [["SUCCESS","FAILURE"]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -281,7 +281,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -293,9 +293,9 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -308,7 +308,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -319,7 +319,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
@@ -329,12 +329,12 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param int|null $id Query
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
public function setId(?int $id): static
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
@@ -346,7 +346,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getOutcomes()
|
||||
public function getOutcomes(): ?array
|
||||
{
|
||||
return $this->container['outcomes'];
|
||||
}
|
||||
@@ -356,16 +356,16 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string[]|null $outcomes outcomes
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setOutcomes($outcomes)
|
||||
public function setOutcomes(?array $outcomes): static
|
||||
{
|
||||
if (is_null($outcomes)) {
|
||||
throw new \InvalidArgumentException('non-nullable outcomes cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable outcomes cannot be null');
|
||||
}
|
||||
$allowedValues = $this->getOutcomesAllowableValues();
|
||||
if (array_diff($outcomes, $allowedValues)) {
|
||||
throw new \InvalidArgumentException(
|
||||
throw new InvalidArgumentException(
|
||||
sprintf(
|
||||
"Invalid value for 'outcomes', must be one of '%s'",
|
||||
implode("', '", $allowedValues)
|
||||
@@ -383,7 +383,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -395,8 +395,8 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -409,7 +409,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -425,7 +425,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -437,8 +437,8 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -448,7 +448,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -461,7 +461,7 @@ class Query implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* StringEnumRef Class Doc Comment
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* Tag Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class Tag implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,14 +53,14 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Tag';
|
||||
protected static string $openAPIModelName = 'Tag';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'id' => 'int',
|
||||
'name' => 'string'
|
||||
];
|
||||
@@ -65,11 +68,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'id' => 'int64',
|
||||
'name' => null
|
||||
];
|
||||
@@ -77,7 +78,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
@@ -87,16 +88,16 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -104,9 +105,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -114,7 +115,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -124,7 +125,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -134,7 +135,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -167,9 +168,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
];
|
||||
@@ -177,9 +178,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'id' => 'setId',
|
||||
'name' => 'setName'
|
||||
];
|
||||
@@ -187,9 +188,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'id' => 'getId',
|
||||
'name' => 'getName'
|
||||
];
|
||||
@@ -198,9 +199,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -208,9 +209,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -218,9 +219,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -230,7 +231,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -239,15 +240,14 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -264,7 +264,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -276,9 +276,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -291,7 +291,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
@@ -312,12 +312,12 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
public function setId(?int $id): static
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
@@ -329,7 +329,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
@@ -339,12 +339,12 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
public function setName(?string $name): static
|
||||
{
|
||||
if (is_null($name)) {
|
||||
throw new \InvalidArgumentException('non-nullable name cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable name cannot be null');
|
||||
}
|
||||
$this->container['name'] = $name;
|
||||
|
||||
@@ -357,7 +357,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -369,8 +369,8 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -399,7 +399,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -411,8 +411,8 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -422,7 +422,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -435,7 +435,7 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,14 +53,14 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'test_query_style_deepObject_explode_true_object_allOf_query_object_parameter';
|
||||
protected static string $openAPIModelName = 'test_query_style_deepObject_explode_true_object_allOf_query_object_parameter';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'size' => 'string',
|
||||
'color' => 'string',
|
||||
'id' => 'int',
|
||||
@@ -67,11 +70,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'size' => null,
|
||||
'color' => null,
|
||||
'id' => 'int64',
|
||||
@@ -81,7 +82,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'size' => false,
|
||||
@@ -93,16 +94,16 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -110,9 +111,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -120,7 +121,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -130,7 +131,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -140,7 +141,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -173,9 +174,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'size' => 'size',
|
||||
'color' => 'color',
|
||||
'id' => 'id',
|
||||
@@ -185,9 +186,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'size' => 'setSize',
|
||||
'color' => 'setColor',
|
||||
'id' => 'setId',
|
||||
@@ -197,9 +198,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'size' => 'getSize',
|
||||
'color' => 'getColor',
|
||||
'id' => 'getId',
|
||||
@@ -210,9 +211,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -220,9 +221,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -230,9 +231,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -242,7 +243,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -251,15 +252,14 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -278,7 +278,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -290,9 +290,9 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -305,7 +305,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSize()
|
||||
public function getSize(): ?string
|
||||
{
|
||||
return $this->container['size'];
|
||||
}
|
||||
@@ -326,12 +326,12 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @param string|null $size size
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setSize($size)
|
||||
public function setSize(?string $size): static
|
||||
{
|
||||
if (is_null($size)) {
|
||||
throw new \InvalidArgumentException('non-nullable size cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable size cannot be null');
|
||||
}
|
||||
$this->container['size'] = $size;
|
||||
|
||||
@@ -343,7 +343,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getColor()
|
||||
public function getColor(): ?string
|
||||
{
|
||||
return $this->container['color'];
|
||||
}
|
||||
@@ -353,12 +353,12 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @param string|null $color color
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setColor($color)
|
||||
public function setColor(?string $color): static
|
||||
{
|
||||
if (is_null($color)) {
|
||||
throw new \InvalidArgumentException('non-nullable color cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable color cannot be null');
|
||||
}
|
||||
$this->container['color'] = $color;
|
||||
|
||||
@@ -370,7 +370,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
@@ -380,12 +380,12 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
public function setId(?int $id): static
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
@@ -397,7 +397,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
@@ -407,12 +407,12 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
public function setName(?string $name): static
|
||||
{
|
||||
if (is_null($name)) {
|
||||
throw new \InvalidArgumentException('non-nullable name cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable name cannot be null');
|
||||
}
|
||||
$this->container['name'] = $name;
|
||||
|
||||
@@ -425,7 +425,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -437,8 +437,8 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -451,7 +451,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -467,7 +467,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -479,8 +479,8 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -490,7 +490,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -503,7 +503,7 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
namespace OpenAPI\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use ArrayAccess;
|
||||
use JsonSerializable;
|
||||
use InvalidArgumentException;
|
||||
use ReturnTypeWillChange;
|
||||
use OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter Class Doc Comment
|
||||
@@ -39,9 +42,9 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
* @implements ArrayAccess<string, mixed>
|
||||
*/
|
||||
class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements ModelInterface, ArrayAccess, JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
@@ -50,32 +53,30 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'test_query_style_form_explode_true_array_string_query_object_parameter';
|
||||
protected static string $openAPIModelName = 'test_query_style_form_explode_true_array_string_query_object_parameter';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
protected static array $openAPITypes = [
|
||||
'values' => 'string[]'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
* @var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
protected static array $openAPIFormats = [
|
||||
'values' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'values' => false
|
||||
@@ -84,16 +85,16 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
public static function openAPITypes(): array
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
@@ -101,9 +102,9 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
public static function openAPIFormats(): array
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
@@ -111,7 +112,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
@@ -121,7 +122,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
* @return array<string, bool>
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
@@ -131,7 +132,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
* @param array<string, bool> $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
@@ -164,27 +165,27 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
protected static array $attributeMap = [
|
||||
'values' => 'values'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $setters = [
|
||||
protected static array $setters = [
|
||||
'values' => 'setValues'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected static $getters = [
|
||||
protected static array $getters = [
|
||||
'values' => 'getValues'
|
||||
];
|
||||
|
||||
@@ -192,9 +193,9 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function attributeMap()
|
||||
public static function attributeMap(): array
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
@@ -202,9 +203,9 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function setters()
|
||||
public static function setters(): array
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
@@ -212,9 +213,9 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public static function getters()
|
||||
public static function getters(): array
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
@@ -224,7 +225,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
public function getModelName(): string
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
@@ -233,15 +234,14 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
* @var array
|
||||
*/
|
||||
protected $container = [];
|
||||
protected array $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[] $data Associated array of property values
|
||||
* initializing the model
|
||||
* @param array $data Associated array of property values initializing the model
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
@@ -257,7 +257,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
@@ -269,9 +269,9 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
* @return string[] invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
public function listInvalidProperties(): array
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
@@ -284,7 +284,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
public function valid(): bool
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
@@ -295,7 +295,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getValues()
|
||||
public function getValues(): ?array
|
||||
{
|
||||
return $this->container['values'];
|
||||
}
|
||||
@@ -305,12 +305,12 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @param string[]|null $values values
|
||||
*
|
||||
* @return self
|
||||
* @return $this
|
||||
*/
|
||||
public function setValues($values)
|
||||
public function setValues(?array $values): static
|
||||
{
|
||||
if (is_null($values)) {
|
||||
throw new \InvalidArgumentException('non-nullable values cannot be null');
|
||||
throw new InvalidArgumentException('non-nullable values cannot be null');
|
||||
}
|
||||
$this->container['values'] = $values;
|
||||
|
||||
@@ -323,7 +323,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
@@ -335,8 +335,8 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
@@ -365,7 +365,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
@@ -377,8 +377,8 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
#[ReturnTypeWillChange]
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
@@ -388,7 +388,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
@@ -401,7 +401,7 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
public function toHeaderValue(): string
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user