| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057 |
- <?php
- /**
- * PostApiV3AdminCreditAdjustments200ResponseData
- *
- * PHP version 8.1
- *
- * @category Class
- * @package WikipaliApi
- * @author OpenAPI Generator team
- * @link https://openapi-generator.tech
- */
- /**
- * MINT API
- *
- * International Academy Of Pali Tipitaka(国际巴利三藏学院) 由 `php openapi/scripts/generate.php` 依据 api-v13 的路由与控制器源码生成。 响应统一封装为 `{ok, message, data}`;`ok=false` 时 `message` 为错误信息。
- *
- * The version of the OpenAPI document: 1.0.0
- * Generated by: https://openapi-generator.tech
- * Generator version: 7.25.0
- */
- /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
- namespace WikipaliApi\Model;
- use \ArrayAccess;
- use \WikipaliApi\ObjectSerializer;
- /**
- * PostApiV3AdminCreditAdjustments200ResponseData Class Doc Comment
- *
- * @category Class
- * @package WikipaliApi
- * @author OpenAPI Generator team
- * @link https://openapi-generator.tech
- * @implements \ArrayAccess<string, mixed>
- */
- class PostApiV3AdminCreditAdjustments200ResponseData implements ModelInterface, ArrayAccess, \JsonSerializable
- {
- public const DISCRIMINATOR = null;
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'post_api_v3_admin_credit_adjustments_200_response_data';
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'account_type' => 'string',
- 'account_id' => 'string',
- 'user' => '\WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser',
- 'delta' => 'int',
- 'kind' => 'string',
- 'bucket' => 'string',
- 'source' => 'string',
- 'ref' => 'string',
- 'day' => 'string',
- 'policy_version' => 'int',
- 'client_ip' => 'string',
- 'note' => 'string',
- 'operator' => '\WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser',
- 'created_at' => 'string',
- 'updated_at' => '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>
- */
- protected static $openAPIFormats = [
- 'account_type' => null,
- 'account_id' => null,
- 'user' => null,
- 'delta' => null,
- 'kind' => null,
- 'bucket' => null,
- 'source' => null,
- 'ref' => null,
- 'day' => null,
- 'policy_version' => null,
- 'client_ip' => null,
- 'note' => null,
- 'operator' => null,
- 'created_at' => null,
- 'updated_at' => null
- ];
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static array $openAPINullables = [
- 'account_type' => false,
- 'account_id' => false,
- 'user' => true,
- 'delta' => false,
- 'kind' => false,
- 'bucket' => false,
- 'source' => false,
- 'ref' => false,
- 'day' => false,
- 'policy_version' => false,
- 'client_ip' => true,
- 'note' => true,
- 'operator' => true,
- 'created_at' => false,
- 'updated_at' => false
- ];
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected array $openAPINullablesSetToNull = [];
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @return array
- */
- public static function openAPITypes()
- {
- return self::$openAPITypes;
- }
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @return array
- */
- public static function openAPIFormats()
- {
- return self::$openAPIFormats;
- }
- /**
- * Array of nullable properties
- *
- * @return array
- */
- protected static function openAPINullables(): array
- {
- return self::$openAPINullables;
- }
- /**
- * Array of nullable field names deliberately set to null
- *
- * @return boolean[]
- */
- private function getOpenAPINullablesSetToNull(): array
- {
- return $this->openAPINullablesSetToNull;
- }
- /**
- * Setter - Array of nullable field names deliberately set to null
- *
- * @param boolean[] $openAPINullablesSetToNull
- */
- private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
- {
- $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
- }
- /**
- * Checks if a property is nullable
- *
- * @param string $property
- * @return bool
- */
- public static function isNullable(string $property): bool
- {
- return self::openAPINullables()[$property] ?? false;
- }
- /**
- * Checks if a nullable property is set to null.
- *
- * @param string $property
- * @return bool
- */
- public function isNullableSetToNull(string $property): bool
- {
- return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
- }
- /**
- * Array of attributes where the key is the local name,
- * and the value is the original name
- *
- * @var string[]
- */
- protected static $attributeMap = [
- 'account_type' => 'account_type',
- 'account_id' => 'account_id',
- 'user' => 'user',
- 'delta' => 'delta',
- 'kind' => 'kind',
- 'bucket' => 'bucket',
- 'source' => 'source',
- 'ref' => 'ref',
- 'day' => 'day',
- 'policy_version' => 'policy_version',
- 'client_ip' => 'client_ip',
- 'note' => 'note',
- 'operator' => 'operator',
- 'created_at' => 'created_at',
- 'updated_at' => 'updated_at'
- ];
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'account_type' => 'setAccountType',
- 'account_id' => 'setAccountId',
- 'user' => 'setUser',
- 'delta' => 'setDelta',
- 'kind' => 'setKind',
- 'bucket' => 'setBucket',
- 'source' => 'setSource',
- 'ref' => 'setRef',
- 'day' => 'setDay',
- 'policy_version' => 'setPolicyVersion',
- 'client_ip' => 'setClientIp',
- 'note' => 'setNote',
- 'operator' => 'setOperator',
- 'created_at' => 'setCreatedAt',
- 'updated_at' => 'setUpdatedAt'
- ];
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'account_type' => 'getAccountType',
- 'account_id' => 'getAccountId',
- 'user' => 'getUser',
- 'delta' => 'getDelta',
- 'kind' => 'getKind',
- 'bucket' => 'getBucket',
- 'source' => 'getSource',
- 'ref' => 'getRef',
- 'day' => 'getDay',
- 'policy_version' => 'getPolicyVersion',
- 'client_ip' => 'getClientIp',
- 'note' => 'getNote',
- 'operator' => 'getOperator',
- 'created_at' => 'getCreatedAt',
- 'updated_at' => 'getUpdatedAt'
- ];
- /**
- * Array of attributes where the key is the local name,
- * and the value is the original name
- *
- * @return array
- */
- public static function attributeMap()
- {
- return self::$attributeMap;
- }
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @return array
- */
- public static function setters()
- {
- return self::$setters;
- }
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @return array
- */
- public static function getters()
- {
- return self::$getters;
- }
- /**
- * The original name of the model.
- *
- * @return string
- */
- public function getModelName()
- {
- return self::$openAPIModelName;
- }
- public const ACCOUNT_TYPE_USER = 'user';
- public const ACCOUNT_TYPE_GUEST = 'guest';
- public const KIND_EARN = 'earn';
- public const KIND_SPEND = 'spend';
- public const KIND_REFUND = 'refund';
- public const KIND_ADJUST = 'adjust';
- public const BUCKET_FREE = 'free';
- public const BUCKET_EARNED = 'earned';
- public const SOURCE_READING = 'reading';
- public const SOURCE_EDITING = 'editing';
- public const SOURCE_AGENT_RUN = 'agent_run';
- public const SOURCE_ADMIN = 'admin';
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getAccountTypeAllowableValues()
- {
- return [
- self::ACCOUNT_TYPE_USER,
- self::ACCOUNT_TYPE_GUEST,
- ];
- }
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getKindAllowableValues()
- {
- return [
- self::KIND_EARN,
- self::KIND_SPEND,
- self::KIND_REFUND,
- self::KIND_ADJUST,
- ];
- }
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getBucketAllowableValues()
- {
- return [
- self::BUCKET_FREE,
- self::BUCKET_EARNED,
- ];
- }
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getSourceAllowableValues()
- {
- return [
- self::SOURCE_READING,
- self::SOURCE_EDITING,
- self::SOURCE_AGENT_RUN,
- self::SOURCE_ADMIN,
- ];
- }
- /**
- * Associative array for storing property values
- *
- * @var mixed[]
- */
- protected $container = [];
- /**
- * Constructor
- *
- * @param mixed[]|null $data Associated array of property values
- * initializing the model
- */
- public function __construct(?array $data = null)
- {
- $this->setIfExists('account_type', $data ?? [], null);
- $this->setIfExists('account_id', $data ?? [], null);
- $this->setIfExists('user', $data ?? [], null);
- $this->setIfExists('delta', $data ?? [], null);
- $this->setIfExists('kind', $data ?? [], null);
- $this->setIfExists('bucket', $data ?? [], null);
- $this->setIfExists('source', $data ?? [], null);
- $this->setIfExists('ref', $data ?? [], null);
- $this->setIfExists('day', $data ?? [], null);
- $this->setIfExists('policy_version', $data ?? [], null);
- $this->setIfExists('client_ip', $data ?? [], null);
- $this->setIfExists('note', $data ?? [], null);
- $this->setIfExists('operator', $data ?? [], null);
- $this->setIfExists('created_at', $data ?? [], null);
- $this->setIfExists('updated_at', $data ?? [], null);
- }
- /**
- * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
- * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
- * $this->openAPINullablesSetToNull array
- *
- * @param string $variableName
- * @param array $fields
- * @param mixed $defaultValue
- */
- private function setIfExists(string $variableName, array $fields, $defaultValue): void
- {
- if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
- $this->openAPINullablesSetToNull[] = $variableName;
- }
- $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
- }
- /**
- * Show all the invalid properties with reasons.
- *
- * @return array invalid properties with reasons
- */
- public function listInvalidProperties()
- {
- $invalidProperties = [];
- $allowedValues = $this->getAccountTypeAllowableValues();
- if (!is_null($this->container['account_type']) && !in_array($this->container['account_type'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'account_type', must be one of '%s'",
- $this->container['account_type'],
- implode("', '", $allowedValues)
- );
- }
- $allowedValues = $this->getKindAllowableValues();
- if (!is_null($this->container['kind']) && !in_array($this->container['kind'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'kind', must be one of '%s'",
- $this->container['kind'],
- implode("', '", $allowedValues)
- );
- }
- $allowedValues = $this->getBucketAllowableValues();
- if (!is_null($this->container['bucket']) && !in_array($this->container['bucket'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'bucket', must be one of '%s'",
- $this->container['bucket'],
- implode("', '", $allowedValues)
- );
- }
- $allowedValues = $this->getSourceAllowableValues();
- if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'source', must be one of '%s'",
- $this->container['source'],
- implode("', '", $allowedValues)
- );
- }
- return $invalidProperties;
- }
- /**
- * Validate all the properties in the model
- * return true if all passed
- *
- * @return bool True if all properties are valid
- */
- public function valid()
- {
- return count($this->listInvalidProperties()) === 0;
- }
- /**
- * Gets account_type
- *
- * @return string|null
- */
- public function getAccountType()
- {
- return $this->container['account_type'];
- }
- /**
- * Sets account_type
- *
- * @param string|null $account_type account_type
- *
- * @return self
- */
- public function setAccountType($account_type)
- {
- if (is_null($account_type)) {
- throw new \InvalidArgumentException('non-nullable account_type cannot be null');
- }
- $allowedValues = $this->getAccountTypeAllowableValues();
- if (!in_array($account_type, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'account_type', must be one of '%s'",
- $account_type,
- implode("', '", $allowedValues)
- )
- );
- }
- $this->container['account_type'] = $account_type;
- return $this;
- }
- /**
- * Gets account_id
- *
- * @return string|null
- */
- public function getAccountId()
- {
- return $this->container['account_id'];
- }
- /**
- * Sets account_id
- *
- * @param string|null $account_id account_id
- *
- * @return self
- */
- public function setAccountId($account_id)
- {
- if (is_null($account_id)) {
- throw new \InvalidArgumentException('non-nullable account_id cannot be null');
- }
- $this->container['account_id'] = $account_id;
- return $this;
- }
- /**
- * Gets user
- *
- * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null
- */
- public function getUser()
- {
- return $this->container['user'];
- }
- /**
- * Sets user
- *
- * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null $user user
- *
- * @return self
- */
- public function setUser($user)
- {
- if (is_null($user)) {
- array_push($this->openAPINullablesSetToNull, 'user');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('user', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['user'] = $user;
- return $this;
- }
- /**
- * Gets delta
- *
- * @return int|null
- */
- public function getDelta()
- {
- return $this->container['delta'];
- }
- /**
- * Sets delta
- *
- * @param int|null $delta delta
- *
- * @return self
- */
- public function setDelta($delta)
- {
- if (is_null($delta)) {
- throw new \InvalidArgumentException('non-nullable delta cannot be null');
- }
- $this->container['delta'] = $delta;
- return $this;
- }
- /**
- * Gets kind
- *
- * @return string|null
- */
- public function getKind()
- {
- return $this->container['kind'];
- }
- /**
- * Sets kind
- *
- * @param string|null $kind kind
- *
- * @return self
- */
- public function setKind($kind)
- {
- if (is_null($kind)) {
- throw new \InvalidArgumentException('non-nullable kind cannot be null');
- }
- $allowedValues = $this->getKindAllowableValues();
- if (!in_array($kind, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'kind', must be one of '%s'",
- $kind,
- implode("', '", $allowedValues)
- )
- );
- }
- $this->container['kind'] = $kind;
- return $this;
- }
- /**
- * Gets bucket
- *
- * @return string|null
- */
- public function getBucket()
- {
- return $this->container['bucket'];
- }
- /**
- * Sets bucket
- *
- * @param string|null $bucket bucket
- *
- * @return self
- */
- public function setBucket($bucket)
- {
- if (is_null($bucket)) {
- throw new \InvalidArgumentException('non-nullable bucket cannot be null');
- }
- $allowedValues = $this->getBucketAllowableValues();
- if (!in_array($bucket, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'bucket', must be one of '%s'",
- $bucket,
- implode("', '", $allowedValues)
- )
- );
- }
- $this->container['bucket'] = $bucket;
- return $this;
- }
- /**
- * Gets source
- *
- * @return string|null
- */
- public function getSource()
- {
- return $this->container['source'];
- }
- /**
- * Sets source
- *
- * @param string|null $source source
- *
- * @return self
- */
- public function setSource($source)
- {
- if (is_null($source)) {
- throw new \InvalidArgumentException('non-nullable source cannot be null');
- }
- $allowedValues = $this->getSourceAllowableValues();
- if (!in_array($source, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'source', must be one of '%s'",
- $source,
- implode("', '", $allowedValues)
- )
- );
- }
- $this->container['source'] = $source;
- return $this;
- }
- /**
- * Gets ref
- *
- * @return string|null
- */
- public function getRef()
- {
- return $this->container['ref'];
- }
- /**
- * Sets ref
- *
- * @param string|null $ref ref
- *
- * @return self
- */
- public function setRef($ref)
- {
- if (is_null($ref)) {
- throw new \InvalidArgumentException('non-nullable ref cannot be null');
- }
- $this->container['ref'] = $ref;
- return $this;
- }
- /**
- * Gets day
- *
- * @return string|null
- */
- public function getDay()
- {
- return $this->container['day'];
- }
- /**
- * Sets day
- *
- * @param string|null $day day
- *
- * @return self
- */
- public function setDay($day)
- {
- if (is_null($day)) {
- throw new \InvalidArgumentException('non-nullable day cannot be null');
- }
- $this->container['day'] = $day;
- return $this;
- }
- /**
- * Gets policy_version
- *
- * @return int|null
- */
- public function getPolicyVersion()
- {
- return $this->container['policy_version'];
- }
- /**
- * Sets policy_version
- *
- * @param int|null $policy_version policy_version
- *
- * @return self
- */
- public function setPolicyVersion($policy_version)
- {
- if (is_null($policy_version)) {
- throw new \InvalidArgumentException('non-nullable policy_version cannot be null');
- }
- $this->container['policy_version'] = $policy_version;
- return $this;
- }
- /**
- * Gets client_ip
- *
- * @return string|null
- */
- public function getClientIp()
- {
- return $this->container['client_ip'];
- }
- /**
- * Sets client_ip
- *
- * @param string|null $client_ip client_ip
- *
- * @return self
- */
- public function setClientIp($client_ip)
- {
- if (is_null($client_ip)) {
- array_push($this->openAPINullablesSetToNull, 'client_ip');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('client_ip', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['client_ip'] = $client_ip;
- return $this;
- }
- /**
- * Gets note
- *
- * @return string|null
- */
- public function getNote()
- {
- return $this->container['note'];
- }
- /**
- * Sets note
- *
- * @param string|null $note note
- *
- * @return self
- */
- public function setNote($note)
- {
- if (is_null($note)) {
- array_push($this->openAPINullablesSetToNull, 'note');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('note', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['note'] = $note;
- return $this;
- }
- /**
- * Gets operator
- *
- * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null
- */
- public function getOperator()
- {
- return $this->container['operator'];
- }
- /**
- * Sets operator
- *
- * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null $operator operator
- *
- * @return self
- */
- public function setOperator($operator)
- {
- if (is_null($operator)) {
- array_push($this->openAPINullablesSetToNull, 'operator');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('operator', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['operator'] = $operator;
- return $this;
- }
- /**
- * Gets created_at
- *
- * @return string|null
- */
- public function getCreatedAt()
- {
- return $this->container['created_at'];
- }
- /**
- * Sets created_at
- *
- * @param string|null $created_at created_at
- *
- * @return self
- */
- public function setCreatedAt($created_at)
- {
- if (is_null($created_at)) {
- throw new \InvalidArgumentException('non-nullable created_at cannot be null');
- }
- $this->container['created_at'] = $created_at;
- return $this;
- }
- /**
- * Gets updated_at
- *
- * @return string|null
- */
- public function getUpdatedAt()
- {
- return $this->container['updated_at'];
- }
- /**
- * Sets updated_at
- *
- * @param string|null $updated_at updated_at
- *
- * @return self
- */
- public function setUpdatedAt($updated_at)
- {
- if (is_null($updated_at)) {
- throw new \InvalidArgumentException('non-nullable updated_at cannot be null');
- }
- $this->container['updated_at'] = $updated_at;
- return $this;
- }
- /**
- * Returns true if offset exists. False otherwise.
- *
- * @param integer|string $offset Offset
- *
- * @return boolean
- */
- public function offsetExists(mixed $offset): bool
- {
- return isset($this->container[$offset]);
- }
- /**
- * Gets offset.
- *
- * @param integer|string $offset Offset
- *
- * @return mixed|null
- */
- #[\ReturnTypeWillChange]
- public function offsetGet(mixed $offset)
- {
- return $this->container[$offset] ?? null;
- }
- /**
- * Sets value based on offset.
- *
- * @param int|null $offset Offset
- * @param mixed $value Value to be set
- *
- * @return void
- */
- public function offsetSet($offset, $value): void
- {
- if (is_null($offset)) {
- $this->container[] = $value;
- } else {
- $this->container[$offset] = $value;
- }
- }
- /**
- * Unsets offset.
- *
- * @param integer|string $offset Offset
- *
- * @return void
- */
- public function offsetUnset(mixed $offset): void
- {
- unset($this->container[$offset]);
- }
- /**
- * Serializes the object to a value that can be serialized natively by json_encode().
- * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
- *
- * @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()
- {
- return ObjectSerializer::sanitizeForSerialization($this);
- }
- /**
- * Gets the string presentation of the object
- *
- * @return string
- */
- public function __toString()
- {
- return json_encode(
- ObjectSerializer::sanitizeForSerialization($this),
- JSON_PRETTY_PRINT
- );
- }
- /**
- * Gets a header-safe presentation of the object
- *
- * @return string
- */
- public function toHeaderValue()
- {
- return json_encode(ObjectSerializer::sanitizeForSerialization($this));
- }
- }
|