2
0

PostApiV3ChannelsBatchProgress200ResponseDataInner.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. <?php
  2. /**
  3. * PostApiV3ChannelsBatchProgress200ResponseDataInner
  4. *
  5. * PHP version 8.1
  6. *
  7. * @category Class
  8. * @package WikipaliApi
  9. * @author OpenAPI Generator team
  10. * @link https://openapi-generator.tech
  11. */
  12. /**
  13. * MINT API
  14. *
  15. * International Academy Of Pali Tipitaka(国际巴利三藏学院) 由 `php openapi/scripts/generate.php` 依据 api-v13 的路由与控制器源码生成。 响应统一封装为 `{ok, message, data}`;`ok=false` 时 `message` 为错误信息。
  16. *
  17. * The version of the OpenAPI document: 1.0.0
  18. * Generated by: https://openapi-generator.tech
  19. * Generator version: 7.25.0
  20. */
  21. /**
  22. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  23. * https://openapi-generator.tech
  24. * Do not edit the class manually.
  25. */
  26. namespace WikipaliApi\Model;
  27. use \ArrayAccess;
  28. use \WikipaliApi\ObjectSerializer;
  29. /**
  30. * PostApiV3ChannelsBatchProgress200ResponseDataInner Class Doc Comment
  31. *
  32. * @category Class
  33. * @package WikipaliApi
  34. * @author OpenAPI Generator team
  35. * @link https://openapi-generator.tech
  36. * @implements \ArrayAccess<string, mixed>
  37. */
  38. class PostApiV3ChannelsBatchProgress200ResponseDataInner implements ModelInterface, ArrayAccess, \JsonSerializable
  39. {
  40. public const DISCRIMINATOR = null;
  41. /**
  42. * The original name of the model.
  43. *
  44. * @var string
  45. */
  46. protected static $openAPIModelName = 'post_api_v3_channels_batch_progress_200_response_data_inner';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $openAPITypes = [
  53. 'id' => 'string',
  54. 'name' => 'string',
  55. 'summary' => 'string',
  56. 'type' => 'string',
  57. 'lang' => 'string',
  58. 'status' => 'int',
  59. 'is_system' => 'bool',
  60. 'source_type' => 'string',
  61. 'source_id' => 'string',
  62. 'owner' => '\WikipaliApi\Model\GetApiV3Channels200ResponseDataInnerOwner',
  63. 'abilities' => '\WikipaliApi\Model\GetApiV3Channels200ResponseDataInnerAbilities',
  64. 'final' => 'string[]',
  65. 'content_created_at' => 'string',
  66. 'content_updated_at' => 'string',
  67. 'created_at' => 'string',
  68. 'updated_at' => 'string'
  69. ];
  70. /**
  71. * Array of property to format mappings. Used for (de)serialization
  72. *
  73. * @var string[]
  74. * @phpstan-var array<string, string|null>
  75. * @psalm-var array<string, string|null>
  76. */
  77. protected static $openAPIFormats = [
  78. 'id' => null,
  79. 'name' => null,
  80. 'summary' => null,
  81. 'type' => null,
  82. 'lang' => null,
  83. 'status' => null,
  84. 'is_system' => null,
  85. 'source_type' => null,
  86. 'source_id' => null,
  87. 'owner' => null,
  88. 'abilities' => null,
  89. 'final' => null,
  90. 'content_created_at' => null,
  91. 'content_updated_at' => null,
  92. 'created_at' => null,
  93. 'updated_at' => null
  94. ];
  95. /**
  96. * Array of nullable properties. Used for (de)serialization
  97. *
  98. * @var boolean[]
  99. */
  100. protected static array $openAPINullables = [
  101. 'id' => false,
  102. 'name' => false,
  103. 'summary' => true,
  104. 'type' => false,
  105. 'lang' => false,
  106. 'status' => false,
  107. 'is_system' => false,
  108. 'source_type' => false,
  109. 'source_id' => true,
  110. 'owner' => false,
  111. 'abilities' => false,
  112. 'final' => true,
  113. 'content_created_at' => true,
  114. 'content_updated_at' => true,
  115. 'created_at' => false,
  116. 'updated_at' => false
  117. ];
  118. /**
  119. * If a nullable field gets set to null, insert it here
  120. *
  121. * @var boolean[]
  122. */
  123. protected array $openAPINullablesSetToNull = [];
  124. /**
  125. * Array of property to type mappings. Used for (de)serialization
  126. *
  127. * @return array
  128. */
  129. public static function openAPITypes()
  130. {
  131. return self::$openAPITypes;
  132. }
  133. /**
  134. * Array of property to format mappings. Used for (de)serialization
  135. *
  136. * @return array
  137. */
  138. public static function openAPIFormats()
  139. {
  140. return self::$openAPIFormats;
  141. }
  142. /**
  143. * Array of nullable properties
  144. *
  145. * @return array
  146. */
  147. protected static function openAPINullables(): array
  148. {
  149. return self::$openAPINullables;
  150. }
  151. /**
  152. * Array of nullable field names deliberately set to null
  153. *
  154. * @return boolean[]
  155. */
  156. private function getOpenAPINullablesSetToNull(): array
  157. {
  158. return $this->openAPINullablesSetToNull;
  159. }
  160. /**
  161. * Setter - Array of nullable field names deliberately set to null
  162. *
  163. * @param boolean[] $openAPINullablesSetToNull
  164. */
  165. private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
  166. {
  167. $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
  168. }
  169. /**
  170. * Checks if a property is nullable
  171. *
  172. * @param string $property
  173. * @return bool
  174. */
  175. public static function isNullable(string $property): bool
  176. {
  177. return self::openAPINullables()[$property] ?? false;
  178. }
  179. /**
  180. * Checks if a nullable property is set to null.
  181. *
  182. * @param string $property
  183. * @return bool
  184. */
  185. public function isNullableSetToNull(string $property): bool
  186. {
  187. return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
  188. }
  189. /**
  190. * Array of attributes where the key is the local name,
  191. * and the value is the original name
  192. *
  193. * @var string[]
  194. */
  195. protected static $attributeMap = [
  196. 'id' => 'id',
  197. 'name' => 'name',
  198. 'summary' => 'summary',
  199. 'type' => 'type',
  200. 'lang' => 'lang',
  201. 'status' => 'status',
  202. 'is_system' => 'is_system',
  203. 'source_type' => 'source_type',
  204. 'source_id' => 'source_id',
  205. 'owner' => 'owner',
  206. 'abilities' => 'abilities',
  207. 'final' => 'final',
  208. 'content_created_at' => 'content_created_at',
  209. 'content_updated_at' => 'content_updated_at',
  210. 'created_at' => 'created_at',
  211. 'updated_at' => 'updated_at'
  212. ];
  213. /**
  214. * Array of attributes to setter functions (for deserialization of responses)
  215. *
  216. * @var string[]
  217. */
  218. protected static $setters = [
  219. 'id' => 'setId',
  220. 'name' => 'setName',
  221. 'summary' => 'setSummary',
  222. 'type' => 'setType',
  223. 'lang' => 'setLang',
  224. 'status' => 'setStatus',
  225. 'is_system' => 'setIsSystem',
  226. 'source_type' => 'setSourceType',
  227. 'source_id' => 'setSourceId',
  228. 'owner' => 'setOwner',
  229. 'abilities' => 'setAbilities',
  230. 'final' => 'setFinal',
  231. 'content_created_at' => 'setContentCreatedAt',
  232. 'content_updated_at' => 'setContentUpdatedAt',
  233. 'created_at' => 'setCreatedAt',
  234. 'updated_at' => 'setUpdatedAt'
  235. ];
  236. /**
  237. * Array of attributes to getter functions (for serialization of requests)
  238. *
  239. * @var string[]
  240. */
  241. protected static $getters = [
  242. 'id' => 'getId',
  243. 'name' => 'getName',
  244. 'summary' => 'getSummary',
  245. 'type' => 'getType',
  246. 'lang' => 'getLang',
  247. 'status' => 'getStatus',
  248. 'is_system' => 'getIsSystem',
  249. 'source_type' => 'getSourceType',
  250. 'source_id' => 'getSourceId',
  251. 'owner' => 'getOwner',
  252. 'abilities' => 'getAbilities',
  253. 'final' => 'getFinal',
  254. 'content_created_at' => 'getContentCreatedAt',
  255. 'content_updated_at' => 'getContentUpdatedAt',
  256. 'created_at' => 'getCreatedAt',
  257. 'updated_at' => 'getUpdatedAt'
  258. ];
  259. /**
  260. * Array of attributes where the key is the local name,
  261. * and the value is the original name
  262. *
  263. * @return array
  264. */
  265. public static function attributeMap()
  266. {
  267. return self::$attributeMap;
  268. }
  269. /**
  270. * Array of attributes to setter functions (for deserialization of responses)
  271. *
  272. * @return array
  273. */
  274. public static function setters()
  275. {
  276. return self::$setters;
  277. }
  278. /**
  279. * Array of attributes to getter functions (for serialization of requests)
  280. *
  281. * @return array
  282. */
  283. public static function getters()
  284. {
  285. return self::$getters;
  286. }
  287. /**
  288. * The original name of the model.
  289. *
  290. * @return string
  291. */
  292. public function getModelName()
  293. {
  294. return self::$openAPIModelName;
  295. }
  296. /**
  297. * Associative array for storing property values
  298. *
  299. * @var mixed[]
  300. */
  301. protected $container = [];
  302. /**
  303. * Constructor
  304. *
  305. * @param mixed[]|null $data Associated array of property values
  306. * initializing the model
  307. */
  308. public function __construct(?array $data = null)
  309. {
  310. $this->setIfExists('id', $data ?? [], null);
  311. $this->setIfExists('name', $data ?? [], null);
  312. $this->setIfExists('summary', $data ?? [], null);
  313. $this->setIfExists('type', $data ?? [], null);
  314. $this->setIfExists('lang', $data ?? [], null);
  315. $this->setIfExists('status', $data ?? [], null);
  316. $this->setIfExists('is_system', $data ?? [], null);
  317. $this->setIfExists('source_type', $data ?? [], null);
  318. $this->setIfExists('source_id', $data ?? [], null);
  319. $this->setIfExists('owner', $data ?? [], null);
  320. $this->setIfExists('abilities', $data ?? [], null);
  321. $this->setIfExists('final', $data ?? [], null);
  322. $this->setIfExists('content_created_at', $data ?? [], null);
  323. $this->setIfExists('content_updated_at', $data ?? [], null);
  324. $this->setIfExists('created_at', $data ?? [], null);
  325. $this->setIfExists('updated_at', $data ?? [], null);
  326. }
  327. /**
  328. * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
  329. * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
  330. * $this->openAPINullablesSetToNull array
  331. *
  332. * @param string $variableName
  333. * @param array $fields
  334. * @param mixed $defaultValue
  335. */
  336. private function setIfExists(string $variableName, array $fields, $defaultValue): void
  337. {
  338. if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
  339. $this->openAPINullablesSetToNull[] = $variableName;
  340. }
  341. $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
  342. }
  343. /**
  344. * Show all the invalid properties with reasons.
  345. *
  346. * @return array invalid properties with reasons
  347. */
  348. public function listInvalidProperties()
  349. {
  350. $invalidProperties = [];
  351. return $invalidProperties;
  352. }
  353. /**
  354. * Validate all the properties in the model
  355. * return true if all passed
  356. *
  357. * @return bool True if all properties are valid
  358. */
  359. public function valid()
  360. {
  361. return count($this->listInvalidProperties()) === 0;
  362. }
  363. /**
  364. * Gets id
  365. *
  366. * @return string|null
  367. */
  368. public function getId()
  369. {
  370. return $this->container['id'];
  371. }
  372. /**
  373. * Sets id
  374. *
  375. * @param string|null $id id
  376. *
  377. * @return self
  378. */
  379. public function setId($id)
  380. {
  381. if (is_null($id)) {
  382. throw new \InvalidArgumentException('non-nullable id cannot be null');
  383. }
  384. $this->container['id'] = $id;
  385. return $this;
  386. }
  387. /**
  388. * Gets name
  389. *
  390. * @return string|null
  391. */
  392. public function getName()
  393. {
  394. return $this->container['name'];
  395. }
  396. /**
  397. * Sets name
  398. *
  399. * @param string|null $name name
  400. *
  401. * @return self
  402. */
  403. public function setName($name)
  404. {
  405. if (is_null($name)) {
  406. throw new \InvalidArgumentException('non-nullable name cannot be null');
  407. }
  408. $this->container['name'] = $name;
  409. return $this;
  410. }
  411. /**
  412. * Gets summary
  413. *
  414. * @return string|null
  415. */
  416. public function getSummary()
  417. {
  418. return $this->container['summary'];
  419. }
  420. /**
  421. * Sets summary
  422. *
  423. * @param string|null $summary summary
  424. *
  425. * @return self
  426. */
  427. public function setSummary($summary)
  428. {
  429. if (is_null($summary)) {
  430. array_push($this->openAPINullablesSetToNull, 'summary');
  431. } else {
  432. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  433. $index = array_search('summary', $nullablesSetToNull);
  434. if ($index !== FALSE) {
  435. unset($nullablesSetToNull[$index]);
  436. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  437. }
  438. }
  439. $this->container['summary'] = $summary;
  440. return $this;
  441. }
  442. /**
  443. * Gets type
  444. *
  445. * @return string|null
  446. */
  447. public function getType()
  448. {
  449. return $this->container['type'];
  450. }
  451. /**
  452. * Sets type
  453. *
  454. * @param string|null $type type
  455. *
  456. * @return self
  457. */
  458. public function setType($type)
  459. {
  460. if (is_null($type)) {
  461. throw new \InvalidArgumentException('non-nullable type cannot be null');
  462. }
  463. $this->container['type'] = $type;
  464. return $this;
  465. }
  466. /**
  467. * Gets lang
  468. *
  469. * @return string|null
  470. */
  471. public function getLang()
  472. {
  473. return $this->container['lang'];
  474. }
  475. /**
  476. * Sets lang
  477. *
  478. * @param string|null $lang lang
  479. *
  480. * @return self
  481. */
  482. public function setLang($lang)
  483. {
  484. if (is_null($lang)) {
  485. throw new \InvalidArgumentException('non-nullable lang cannot be null');
  486. }
  487. $this->container['lang'] = $lang;
  488. return $this;
  489. }
  490. /**
  491. * Gets status
  492. *
  493. * @return int|null
  494. */
  495. public function getStatus()
  496. {
  497. return $this->container['status'];
  498. }
  499. /**
  500. * Sets status
  501. *
  502. * @param int|null $status status
  503. *
  504. * @return self
  505. */
  506. public function setStatus($status)
  507. {
  508. if (is_null($status)) {
  509. throw new \InvalidArgumentException('non-nullable status cannot be null');
  510. }
  511. $this->container['status'] = $status;
  512. return $this;
  513. }
  514. /**
  515. * Gets is_system
  516. *
  517. * @return bool|null
  518. */
  519. public function getIsSystem()
  520. {
  521. return $this->container['is_system'];
  522. }
  523. /**
  524. * Sets is_system
  525. *
  526. * @param bool|null $is_system is_system
  527. *
  528. * @return self
  529. */
  530. public function setIsSystem($is_system)
  531. {
  532. if (is_null($is_system)) {
  533. throw new \InvalidArgumentException('non-nullable is_system cannot be null');
  534. }
  535. $this->container['is_system'] = $is_system;
  536. return $this;
  537. }
  538. /**
  539. * Gets source_type
  540. *
  541. * @return string|null
  542. */
  543. public function getSourceType()
  544. {
  545. return $this->container['source_type'];
  546. }
  547. /**
  548. * Sets source_type
  549. *
  550. * @param string|null $source_type source_type
  551. *
  552. * @return self
  553. */
  554. public function setSourceType($source_type)
  555. {
  556. if (is_null($source_type)) {
  557. throw new \InvalidArgumentException('non-nullable source_type cannot be null');
  558. }
  559. $this->container['source_type'] = $source_type;
  560. return $this;
  561. }
  562. /**
  563. * Gets source_id
  564. *
  565. * @return string|null
  566. */
  567. public function getSourceId()
  568. {
  569. return $this->container['source_id'];
  570. }
  571. /**
  572. * Sets source_id
  573. *
  574. * @param string|null $source_id source_id
  575. *
  576. * @return self
  577. */
  578. public function setSourceId($source_id)
  579. {
  580. if (is_null($source_id)) {
  581. array_push($this->openAPINullablesSetToNull, 'source_id');
  582. } else {
  583. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  584. $index = array_search('source_id', $nullablesSetToNull);
  585. if ($index !== FALSE) {
  586. unset($nullablesSetToNull[$index]);
  587. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  588. }
  589. }
  590. $this->container['source_id'] = $source_id;
  591. return $this;
  592. }
  593. /**
  594. * Gets owner
  595. *
  596. * @return \WikipaliApi\Model\GetApiV3Channels200ResponseDataInnerOwner|null
  597. */
  598. public function getOwner()
  599. {
  600. return $this->container['owner'];
  601. }
  602. /**
  603. * Sets owner
  604. *
  605. * @param \WikipaliApi\Model\GetApiV3Channels200ResponseDataInnerOwner|null $owner owner
  606. *
  607. * @return self
  608. */
  609. public function setOwner($owner)
  610. {
  611. if (is_null($owner)) {
  612. throw new \InvalidArgumentException('non-nullable owner cannot be null');
  613. }
  614. $this->container['owner'] = $owner;
  615. return $this;
  616. }
  617. /**
  618. * Gets abilities
  619. *
  620. * @return \WikipaliApi\Model\GetApiV3Channels200ResponseDataInnerAbilities|null
  621. */
  622. public function getAbilities()
  623. {
  624. return $this->container['abilities'];
  625. }
  626. /**
  627. * Sets abilities
  628. *
  629. * @param \WikipaliApi\Model\GetApiV3Channels200ResponseDataInnerAbilities|null $abilities abilities
  630. *
  631. * @return self
  632. */
  633. public function setAbilities($abilities)
  634. {
  635. if (is_null($abilities)) {
  636. throw new \InvalidArgumentException('non-nullable abilities cannot be null');
  637. }
  638. $this->container['abilities'] = $abilities;
  639. return $this;
  640. }
  641. /**
  642. * Gets final
  643. *
  644. * @return string[]|null
  645. */
  646. public function getFinal()
  647. {
  648. return $this->container['final'];
  649. }
  650. /**
  651. * Sets final
  652. *
  653. * @param string[]|null $final final
  654. *
  655. * @return self
  656. */
  657. public function setFinal($final)
  658. {
  659. if (is_null($final)) {
  660. array_push($this->openAPINullablesSetToNull, 'final');
  661. } else {
  662. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  663. $index = array_search('final', $nullablesSetToNull);
  664. if ($index !== FALSE) {
  665. unset($nullablesSetToNull[$index]);
  666. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  667. }
  668. }
  669. $this->container['final'] = $final;
  670. return $this;
  671. }
  672. /**
  673. * Gets content_created_at
  674. *
  675. * @return string|null
  676. */
  677. public function getContentCreatedAt()
  678. {
  679. return $this->container['content_created_at'];
  680. }
  681. /**
  682. * Sets content_created_at
  683. *
  684. * @param string|null $content_created_at content_created_at
  685. *
  686. * @return self
  687. */
  688. public function setContentCreatedAt($content_created_at)
  689. {
  690. if (is_null($content_created_at)) {
  691. array_push($this->openAPINullablesSetToNull, 'content_created_at');
  692. } else {
  693. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  694. $index = array_search('content_created_at', $nullablesSetToNull);
  695. if ($index !== FALSE) {
  696. unset($nullablesSetToNull[$index]);
  697. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  698. }
  699. }
  700. $this->container['content_created_at'] = $content_created_at;
  701. return $this;
  702. }
  703. /**
  704. * Gets content_updated_at
  705. *
  706. * @return string|null
  707. */
  708. public function getContentUpdatedAt()
  709. {
  710. return $this->container['content_updated_at'];
  711. }
  712. /**
  713. * Sets content_updated_at
  714. *
  715. * @param string|null $content_updated_at content_updated_at
  716. *
  717. * @return self
  718. */
  719. public function setContentUpdatedAt($content_updated_at)
  720. {
  721. if (is_null($content_updated_at)) {
  722. array_push($this->openAPINullablesSetToNull, 'content_updated_at');
  723. } else {
  724. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  725. $index = array_search('content_updated_at', $nullablesSetToNull);
  726. if ($index !== FALSE) {
  727. unset($nullablesSetToNull[$index]);
  728. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  729. }
  730. }
  731. $this->container['content_updated_at'] = $content_updated_at;
  732. return $this;
  733. }
  734. /**
  735. * Gets created_at
  736. *
  737. * @return string|null
  738. */
  739. public function getCreatedAt()
  740. {
  741. return $this->container['created_at'];
  742. }
  743. /**
  744. * Sets created_at
  745. *
  746. * @param string|null $created_at created_at
  747. *
  748. * @return self
  749. */
  750. public function setCreatedAt($created_at)
  751. {
  752. if (is_null($created_at)) {
  753. throw new \InvalidArgumentException('non-nullable created_at cannot be null');
  754. }
  755. $this->container['created_at'] = $created_at;
  756. return $this;
  757. }
  758. /**
  759. * Gets updated_at
  760. *
  761. * @return string|null
  762. */
  763. public function getUpdatedAt()
  764. {
  765. return $this->container['updated_at'];
  766. }
  767. /**
  768. * Sets updated_at
  769. *
  770. * @param string|null $updated_at updated_at
  771. *
  772. * @return self
  773. */
  774. public function setUpdatedAt($updated_at)
  775. {
  776. if (is_null($updated_at)) {
  777. throw new \InvalidArgumentException('non-nullable updated_at cannot be null');
  778. }
  779. $this->container['updated_at'] = $updated_at;
  780. return $this;
  781. }
  782. /**
  783. * Returns true if offset exists. False otherwise.
  784. *
  785. * @param integer|string $offset Offset
  786. *
  787. * @return boolean
  788. */
  789. public function offsetExists(mixed $offset): bool
  790. {
  791. return isset($this->container[$offset]);
  792. }
  793. /**
  794. * Gets offset.
  795. *
  796. * @param integer|string $offset Offset
  797. *
  798. * @return mixed|null
  799. */
  800. #[\ReturnTypeWillChange]
  801. public function offsetGet(mixed $offset)
  802. {
  803. return $this->container[$offset] ?? null;
  804. }
  805. /**
  806. * Sets value based on offset.
  807. *
  808. * @param int|null $offset Offset
  809. * @param mixed $value Value to be set
  810. *
  811. * @return void
  812. */
  813. public function offsetSet($offset, $value): void
  814. {
  815. if (is_null($offset)) {
  816. $this->container[] = $value;
  817. } else {
  818. $this->container[$offset] = $value;
  819. }
  820. }
  821. /**
  822. * Unsets offset.
  823. *
  824. * @param integer|string $offset Offset
  825. *
  826. * @return void
  827. */
  828. public function offsetUnset(mixed $offset): void
  829. {
  830. unset($this->container[$offset]);
  831. }
  832. /**
  833. * Serializes the object to a value that can be serialized natively by json_encode().
  834. * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
  835. *
  836. * @return mixed Returns data which can be serialized by json_encode(), which is a value
  837. * of any type other than a resource.
  838. */
  839. #[\ReturnTypeWillChange]
  840. public function jsonSerialize()
  841. {
  842. return ObjectSerializer::sanitizeForSerialization($this);
  843. }
  844. /**
  845. * Gets the string presentation of the object
  846. *
  847. * @return string
  848. */
  849. public function __toString()
  850. {
  851. return json_encode(
  852. ObjectSerializer::sanitizeForSerialization($this),
  853. JSON_PRETTY_PRINT
  854. );
  855. }
  856. /**
  857. * Gets a header-safe presentation of the object
  858. *
  859. * @return string
  860. */
  861. public function toHeaderValue()
  862. {
  863. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  864. }
  865. }