GetApiV3AdminAgentRuns200ResponseDataInner.php 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573
  1. <?php
  2. /**
  3. * GetApiV3AdminAgentRuns200ResponseDataInner
  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. * GetApiV3AdminAgentRuns200ResponseDataInner 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 GetApiV3AdminAgentRuns200ResponseDataInner 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 = 'get_api_v3_admin_agent_runs_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. 'run_id' => 'string',
  54. 'thread_id' => 'string',
  55. 'thread_title' => 'string',
  56. 'account_type' => 'string',
  57. 'user' => '\WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser',
  58. 'device_id' => 'string',
  59. 'client_ip' => 'string',
  60. 'client' => 'string',
  61. 'app_version' => 'string',
  62. 'question' => 'string',
  63. 'route' => 'string',
  64. 'deep' => 'bool',
  65. 'improve' => 'bool',
  66. 'status' => 'string',
  67. 'latency_ms' => 'int',
  68. 'tokens_in' => 'int',
  69. 'tokens_out' => 'int',
  70. 'llm_calls' => 'int',
  71. 'tool_calls' => 'int',
  72. 'started_at' => 'string',
  73. 'answer' => 'string',
  74. 'evidence' => 'string',
  75. 'plan' => 'object',
  76. 'passage' => 'object',
  77. 'citations' => 'object[]',
  78. 'error' => 'string',
  79. 'model' => 'string',
  80. 'prompt_version' => 'string',
  81. 'steps' => '\WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]'
  82. ];
  83. /**
  84. * Array of property to format mappings. Used for (de)serialization
  85. *
  86. * @var string[]
  87. * @phpstan-var array<string, string|null>
  88. * @psalm-var array<string, string|null>
  89. */
  90. protected static $openAPIFormats = [
  91. 'run_id' => null,
  92. 'thread_id' => null,
  93. 'thread_title' => null,
  94. 'account_type' => null,
  95. 'user' => null,
  96. 'device_id' => null,
  97. 'client_ip' => null,
  98. 'client' => null,
  99. 'app_version' => null,
  100. 'question' => null,
  101. 'route' => null,
  102. 'deep' => null,
  103. 'improve' => null,
  104. 'status' => null,
  105. 'latency_ms' => null,
  106. 'tokens_in' => null,
  107. 'tokens_out' => null,
  108. 'llm_calls' => null,
  109. 'tool_calls' => null,
  110. 'started_at' => null,
  111. 'answer' => null,
  112. 'evidence' => null,
  113. 'plan' => null,
  114. 'passage' => null,
  115. 'citations' => null,
  116. 'error' => null,
  117. 'model' => null,
  118. 'prompt_version' => null,
  119. 'steps' => null
  120. ];
  121. /**
  122. * Array of nullable properties. Used for (de)serialization
  123. *
  124. * @var boolean[]
  125. */
  126. protected static array $openAPINullables = [
  127. 'run_id' => false,
  128. 'thread_id' => true,
  129. 'thread_title' => true,
  130. 'account_type' => false,
  131. 'user' => true,
  132. 'device_id' => true,
  133. 'client_ip' => true,
  134. 'client' => true,
  135. 'app_version' => true,
  136. 'question' => false,
  137. 'route' => true,
  138. 'deep' => false,
  139. 'improve' => false,
  140. 'status' => false,
  141. 'latency_ms' => true,
  142. 'tokens_in' => true,
  143. 'tokens_out' => true,
  144. 'llm_calls' => false,
  145. 'tool_calls' => false,
  146. 'started_at' => true,
  147. 'answer' => true,
  148. 'evidence' => true,
  149. 'plan' => true,
  150. 'passage' => true,
  151. 'citations' => true,
  152. 'error' => true,
  153. 'model' => true,
  154. 'prompt_version' => true,
  155. 'steps' => false
  156. ];
  157. /**
  158. * If a nullable field gets set to null, insert it here
  159. *
  160. * @var boolean[]
  161. */
  162. protected array $openAPINullablesSetToNull = [];
  163. /**
  164. * Array of property to type mappings. Used for (de)serialization
  165. *
  166. * @return array
  167. */
  168. public static function openAPITypes()
  169. {
  170. return self::$openAPITypes;
  171. }
  172. /**
  173. * Array of property to format mappings. Used for (de)serialization
  174. *
  175. * @return array
  176. */
  177. public static function openAPIFormats()
  178. {
  179. return self::$openAPIFormats;
  180. }
  181. /**
  182. * Array of nullable properties
  183. *
  184. * @return array
  185. */
  186. protected static function openAPINullables(): array
  187. {
  188. return self::$openAPINullables;
  189. }
  190. /**
  191. * Array of nullable field names deliberately set to null
  192. *
  193. * @return boolean[]
  194. */
  195. private function getOpenAPINullablesSetToNull(): array
  196. {
  197. return $this->openAPINullablesSetToNull;
  198. }
  199. /**
  200. * Setter - Array of nullable field names deliberately set to null
  201. *
  202. * @param boolean[] $openAPINullablesSetToNull
  203. */
  204. private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
  205. {
  206. $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
  207. }
  208. /**
  209. * Checks if a property is nullable
  210. *
  211. * @param string $property
  212. * @return bool
  213. */
  214. public static function isNullable(string $property): bool
  215. {
  216. return self::openAPINullables()[$property] ?? false;
  217. }
  218. /**
  219. * Checks if a nullable property is set to null.
  220. *
  221. * @param string $property
  222. * @return bool
  223. */
  224. public function isNullableSetToNull(string $property): bool
  225. {
  226. return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
  227. }
  228. /**
  229. * Array of attributes where the key is the local name,
  230. * and the value is the original name
  231. *
  232. * @var string[]
  233. */
  234. protected static $attributeMap = [
  235. 'run_id' => 'run_id',
  236. 'thread_id' => 'thread_id',
  237. 'thread_title' => 'thread_title',
  238. 'account_type' => 'account_type',
  239. 'user' => 'user',
  240. 'device_id' => 'device_id',
  241. 'client_ip' => 'client_ip',
  242. 'client' => 'client',
  243. 'app_version' => 'app_version',
  244. 'question' => 'question',
  245. 'route' => 'route',
  246. 'deep' => 'deep',
  247. 'improve' => 'improve',
  248. 'status' => 'status',
  249. 'latency_ms' => 'latency_ms',
  250. 'tokens_in' => 'tokens_in',
  251. 'tokens_out' => 'tokens_out',
  252. 'llm_calls' => 'llm_calls',
  253. 'tool_calls' => 'tool_calls',
  254. 'started_at' => 'started_at',
  255. 'answer' => 'answer',
  256. 'evidence' => 'evidence',
  257. 'plan' => 'plan',
  258. 'passage' => 'passage',
  259. 'citations' => 'citations',
  260. 'error' => 'error',
  261. 'model' => 'model',
  262. 'prompt_version' => 'prompt_version',
  263. 'steps' => 'steps'
  264. ];
  265. /**
  266. * Array of attributes to setter functions (for deserialization of responses)
  267. *
  268. * @var string[]
  269. */
  270. protected static $setters = [
  271. 'run_id' => 'setRunId',
  272. 'thread_id' => 'setThreadId',
  273. 'thread_title' => 'setThreadTitle',
  274. 'account_type' => 'setAccountType',
  275. 'user' => 'setUser',
  276. 'device_id' => 'setDeviceId',
  277. 'client_ip' => 'setClientIp',
  278. 'client' => 'setClient',
  279. 'app_version' => 'setAppVersion',
  280. 'question' => 'setQuestion',
  281. 'route' => 'setRoute',
  282. 'deep' => 'setDeep',
  283. 'improve' => 'setImprove',
  284. 'status' => 'setStatus',
  285. 'latency_ms' => 'setLatencyMs',
  286. 'tokens_in' => 'setTokensIn',
  287. 'tokens_out' => 'setTokensOut',
  288. 'llm_calls' => 'setLlmCalls',
  289. 'tool_calls' => 'setToolCalls',
  290. 'started_at' => 'setStartedAt',
  291. 'answer' => 'setAnswer',
  292. 'evidence' => 'setEvidence',
  293. 'plan' => 'setPlan',
  294. 'passage' => 'setPassage',
  295. 'citations' => 'setCitations',
  296. 'error' => 'setError',
  297. 'model' => 'setModel',
  298. 'prompt_version' => 'setPromptVersion',
  299. 'steps' => 'setSteps'
  300. ];
  301. /**
  302. * Array of attributes to getter functions (for serialization of requests)
  303. *
  304. * @var string[]
  305. */
  306. protected static $getters = [
  307. 'run_id' => 'getRunId',
  308. 'thread_id' => 'getThreadId',
  309. 'thread_title' => 'getThreadTitle',
  310. 'account_type' => 'getAccountType',
  311. 'user' => 'getUser',
  312. 'device_id' => 'getDeviceId',
  313. 'client_ip' => 'getClientIp',
  314. 'client' => 'getClient',
  315. 'app_version' => 'getAppVersion',
  316. 'question' => 'getQuestion',
  317. 'route' => 'getRoute',
  318. 'deep' => 'getDeep',
  319. 'improve' => 'getImprove',
  320. 'status' => 'getStatus',
  321. 'latency_ms' => 'getLatencyMs',
  322. 'tokens_in' => 'getTokensIn',
  323. 'tokens_out' => 'getTokensOut',
  324. 'llm_calls' => 'getLlmCalls',
  325. 'tool_calls' => 'getToolCalls',
  326. 'started_at' => 'getStartedAt',
  327. 'answer' => 'getAnswer',
  328. 'evidence' => 'getEvidence',
  329. 'plan' => 'getPlan',
  330. 'passage' => 'getPassage',
  331. 'citations' => 'getCitations',
  332. 'error' => 'getError',
  333. 'model' => 'getModel',
  334. 'prompt_version' => 'getPromptVersion',
  335. 'steps' => 'getSteps'
  336. ];
  337. /**
  338. * Array of attributes where the key is the local name,
  339. * and the value is the original name
  340. *
  341. * @return array
  342. */
  343. public static function attributeMap()
  344. {
  345. return self::$attributeMap;
  346. }
  347. /**
  348. * Array of attributes to setter functions (for deserialization of responses)
  349. *
  350. * @return array
  351. */
  352. public static function setters()
  353. {
  354. return self::$setters;
  355. }
  356. /**
  357. * Array of attributes to getter functions (for serialization of requests)
  358. *
  359. * @return array
  360. */
  361. public static function getters()
  362. {
  363. return self::$getters;
  364. }
  365. /**
  366. * The original name of the model.
  367. *
  368. * @return string
  369. */
  370. public function getModelName()
  371. {
  372. return self::$openAPIModelName;
  373. }
  374. public const ACCOUNT_TYPE_USER = 'user';
  375. public const ACCOUNT_TYPE_GUEST = 'guest';
  376. public const ROUTE_QUESTION = 'question';
  377. public const ROUTE_TERM = 'term';
  378. public const ROUTE_PASSAGE = 'passage';
  379. public const ROUTE_CHAT = 'chat';
  380. /**
  381. * Gets allowable values of the enum
  382. *
  383. * @return string[]
  384. */
  385. public function getAccountTypeAllowableValues()
  386. {
  387. return [
  388. self::ACCOUNT_TYPE_USER,
  389. self::ACCOUNT_TYPE_GUEST,
  390. ];
  391. }
  392. /**
  393. * Gets allowable values of the enum
  394. *
  395. * @return string[]
  396. */
  397. public function getRouteAllowableValues()
  398. {
  399. return [
  400. self::ROUTE_QUESTION,
  401. self::ROUTE_TERM,
  402. self::ROUTE_PASSAGE,
  403. self::ROUTE_CHAT,
  404. ];
  405. }
  406. /**
  407. * Associative array for storing property values
  408. *
  409. * @var mixed[]
  410. */
  411. protected $container = [];
  412. /**
  413. * Constructor
  414. *
  415. * @param mixed[]|null $data Associated array of property values
  416. * initializing the model
  417. */
  418. public function __construct(?array $data = null)
  419. {
  420. $this->setIfExists('run_id', $data ?? [], null);
  421. $this->setIfExists('thread_id', $data ?? [], null);
  422. $this->setIfExists('thread_title', $data ?? [], null);
  423. $this->setIfExists('account_type', $data ?? [], null);
  424. $this->setIfExists('user', $data ?? [], null);
  425. $this->setIfExists('device_id', $data ?? [], null);
  426. $this->setIfExists('client_ip', $data ?? [], null);
  427. $this->setIfExists('client', $data ?? [], null);
  428. $this->setIfExists('app_version', $data ?? [], null);
  429. $this->setIfExists('question', $data ?? [], null);
  430. $this->setIfExists('route', $data ?? [], null);
  431. $this->setIfExists('deep', $data ?? [], null);
  432. $this->setIfExists('improve', $data ?? [], null);
  433. $this->setIfExists('status', $data ?? [], null);
  434. $this->setIfExists('latency_ms', $data ?? [], null);
  435. $this->setIfExists('tokens_in', $data ?? [], null);
  436. $this->setIfExists('tokens_out', $data ?? [], null);
  437. $this->setIfExists('llm_calls', $data ?? [], null);
  438. $this->setIfExists('tool_calls', $data ?? [], null);
  439. $this->setIfExists('started_at', $data ?? [], null);
  440. $this->setIfExists('answer', $data ?? [], null);
  441. $this->setIfExists('evidence', $data ?? [], null);
  442. $this->setIfExists('plan', $data ?? [], null);
  443. $this->setIfExists('passage', $data ?? [], null);
  444. $this->setIfExists('citations', $data ?? [], null);
  445. $this->setIfExists('error', $data ?? [], null);
  446. $this->setIfExists('model', $data ?? [], null);
  447. $this->setIfExists('prompt_version', $data ?? [], null);
  448. $this->setIfExists('steps', $data ?? [], null);
  449. }
  450. /**
  451. * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
  452. * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
  453. * $this->openAPINullablesSetToNull array
  454. *
  455. * @param string $variableName
  456. * @param array $fields
  457. * @param mixed $defaultValue
  458. */
  459. private function setIfExists(string $variableName, array $fields, $defaultValue): void
  460. {
  461. if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
  462. $this->openAPINullablesSetToNull[] = $variableName;
  463. }
  464. $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
  465. }
  466. /**
  467. * Show all the invalid properties with reasons.
  468. *
  469. * @return array invalid properties with reasons
  470. */
  471. public function listInvalidProperties()
  472. {
  473. $invalidProperties = [];
  474. $allowedValues = $this->getAccountTypeAllowableValues();
  475. if (!is_null($this->container['account_type']) && !in_array($this->container['account_type'], $allowedValues, true)) {
  476. $invalidProperties[] = sprintf(
  477. "invalid value '%s' for 'account_type', must be one of '%s'",
  478. $this->container['account_type'],
  479. implode("', '", $allowedValues)
  480. );
  481. }
  482. $allowedValues = $this->getRouteAllowableValues();
  483. if (!is_null($this->container['route']) && !in_array($this->container['route'], $allowedValues, true)) {
  484. $invalidProperties[] = sprintf(
  485. "invalid value '%s' for 'route', must be one of '%s'",
  486. $this->container['route'],
  487. implode("', '", $allowedValues)
  488. );
  489. }
  490. return $invalidProperties;
  491. }
  492. /**
  493. * Validate all the properties in the model
  494. * return true if all passed
  495. *
  496. * @return bool True if all properties are valid
  497. */
  498. public function valid()
  499. {
  500. return count($this->listInvalidProperties()) === 0;
  501. }
  502. /**
  503. * Gets run_id
  504. *
  505. * @return string|null
  506. */
  507. public function getRunId()
  508. {
  509. return $this->container['run_id'];
  510. }
  511. /**
  512. * Sets run_id
  513. *
  514. * @param string|null $run_id run_id
  515. *
  516. * @return self
  517. */
  518. public function setRunId($run_id)
  519. {
  520. if (is_null($run_id)) {
  521. throw new \InvalidArgumentException('non-nullable run_id cannot be null');
  522. }
  523. $this->container['run_id'] = $run_id;
  524. return $this;
  525. }
  526. /**
  527. * Gets thread_id
  528. *
  529. * @return string|null
  530. */
  531. public function getThreadId()
  532. {
  533. return $this->container['thread_id'];
  534. }
  535. /**
  536. * Sets thread_id
  537. *
  538. * @param string|null $thread_id thread_id
  539. *
  540. * @return self
  541. */
  542. public function setThreadId($thread_id)
  543. {
  544. if (is_null($thread_id)) {
  545. array_push($this->openAPINullablesSetToNull, 'thread_id');
  546. } else {
  547. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  548. $index = array_search('thread_id', $nullablesSetToNull);
  549. if ($index !== FALSE) {
  550. unset($nullablesSetToNull[$index]);
  551. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  552. }
  553. }
  554. $this->container['thread_id'] = $thread_id;
  555. return $this;
  556. }
  557. /**
  558. * Gets thread_title
  559. *
  560. * @return string|null
  561. */
  562. public function getThreadTitle()
  563. {
  564. return $this->container['thread_title'];
  565. }
  566. /**
  567. * Sets thread_title
  568. *
  569. * @param string|null $thread_title thread_title
  570. *
  571. * @return self
  572. */
  573. public function setThreadTitle($thread_title)
  574. {
  575. if (is_null($thread_title)) {
  576. array_push($this->openAPINullablesSetToNull, 'thread_title');
  577. } else {
  578. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  579. $index = array_search('thread_title', $nullablesSetToNull);
  580. if ($index !== FALSE) {
  581. unset($nullablesSetToNull[$index]);
  582. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  583. }
  584. }
  585. $this->container['thread_title'] = $thread_title;
  586. return $this;
  587. }
  588. /**
  589. * Gets account_type
  590. *
  591. * @return string|null
  592. */
  593. public function getAccountType()
  594. {
  595. return $this->container['account_type'];
  596. }
  597. /**
  598. * Sets account_type
  599. *
  600. * @param string|null $account_type account_type
  601. *
  602. * @return self
  603. */
  604. public function setAccountType($account_type)
  605. {
  606. if (is_null($account_type)) {
  607. throw new \InvalidArgumentException('non-nullable account_type cannot be null');
  608. }
  609. $allowedValues = $this->getAccountTypeAllowableValues();
  610. if (!in_array($account_type, $allowedValues, true)) {
  611. throw new \InvalidArgumentException(
  612. sprintf(
  613. "Invalid value '%s' for 'account_type', must be one of '%s'",
  614. $account_type,
  615. implode("', '", $allowedValues)
  616. )
  617. );
  618. }
  619. $this->container['account_type'] = $account_type;
  620. return $this;
  621. }
  622. /**
  623. * Gets user
  624. *
  625. * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null
  626. */
  627. public function getUser()
  628. {
  629. return $this->container['user'];
  630. }
  631. /**
  632. * Sets user
  633. *
  634. * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null $user user
  635. *
  636. * @return self
  637. */
  638. public function setUser($user)
  639. {
  640. if (is_null($user)) {
  641. array_push($this->openAPINullablesSetToNull, 'user');
  642. } else {
  643. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  644. $index = array_search('user', $nullablesSetToNull);
  645. if ($index !== FALSE) {
  646. unset($nullablesSetToNull[$index]);
  647. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  648. }
  649. }
  650. $this->container['user'] = $user;
  651. return $this;
  652. }
  653. /**
  654. * Gets device_id
  655. *
  656. * @return string|null
  657. */
  658. public function getDeviceId()
  659. {
  660. return $this->container['device_id'];
  661. }
  662. /**
  663. * Sets device_id
  664. *
  665. * @param string|null $device_id device_id
  666. *
  667. * @return self
  668. */
  669. public function setDeviceId($device_id)
  670. {
  671. if (is_null($device_id)) {
  672. array_push($this->openAPINullablesSetToNull, 'device_id');
  673. } else {
  674. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  675. $index = array_search('device_id', $nullablesSetToNull);
  676. if ($index !== FALSE) {
  677. unset($nullablesSetToNull[$index]);
  678. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  679. }
  680. }
  681. $this->container['device_id'] = $device_id;
  682. return $this;
  683. }
  684. /**
  685. * Gets client_ip
  686. *
  687. * @return string|null
  688. */
  689. public function getClientIp()
  690. {
  691. return $this->container['client_ip'];
  692. }
  693. /**
  694. * Sets client_ip
  695. *
  696. * @param string|null $client_ip client_ip
  697. *
  698. * @return self
  699. */
  700. public function setClientIp($client_ip)
  701. {
  702. if (is_null($client_ip)) {
  703. array_push($this->openAPINullablesSetToNull, 'client_ip');
  704. } else {
  705. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  706. $index = array_search('client_ip', $nullablesSetToNull);
  707. if ($index !== FALSE) {
  708. unset($nullablesSetToNull[$index]);
  709. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  710. }
  711. }
  712. $this->container['client_ip'] = $client_ip;
  713. return $this;
  714. }
  715. /**
  716. * Gets client
  717. *
  718. * @return string|null
  719. */
  720. public function getClient()
  721. {
  722. return $this->container['client'];
  723. }
  724. /**
  725. * Sets client
  726. *
  727. * @param string|null $client client
  728. *
  729. * @return self
  730. */
  731. public function setClient($client)
  732. {
  733. if (is_null($client)) {
  734. array_push($this->openAPINullablesSetToNull, 'client');
  735. } else {
  736. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  737. $index = array_search('client', $nullablesSetToNull);
  738. if ($index !== FALSE) {
  739. unset($nullablesSetToNull[$index]);
  740. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  741. }
  742. }
  743. $this->container['client'] = $client;
  744. return $this;
  745. }
  746. /**
  747. * Gets app_version
  748. *
  749. * @return string|null
  750. */
  751. public function getAppVersion()
  752. {
  753. return $this->container['app_version'];
  754. }
  755. /**
  756. * Sets app_version
  757. *
  758. * @param string|null $app_version app_version
  759. *
  760. * @return self
  761. */
  762. public function setAppVersion($app_version)
  763. {
  764. if (is_null($app_version)) {
  765. array_push($this->openAPINullablesSetToNull, 'app_version');
  766. } else {
  767. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  768. $index = array_search('app_version', $nullablesSetToNull);
  769. if ($index !== FALSE) {
  770. unset($nullablesSetToNull[$index]);
  771. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  772. }
  773. }
  774. $this->container['app_version'] = $app_version;
  775. return $this;
  776. }
  777. /**
  778. * Gets question
  779. *
  780. * @return string|null
  781. */
  782. public function getQuestion()
  783. {
  784. return $this->container['question'];
  785. }
  786. /**
  787. * Sets question
  788. *
  789. * @param string|null $question question
  790. *
  791. * @return self
  792. */
  793. public function setQuestion($question)
  794. {
  795. if (is_null($question)) {
  796. throw new \InvalidArgumentException('non-nullable question cannot be null');
  797. }
  798. $this->container['question'] = $question;
  799. return $this;
  800. }
  801. /**
  802. * Gets route
  803. *
  804. * @return string|null
  805. */
  806. public function getRoute()
  807. {
  808. return $this->container['route'];
  809. }
  810. /**
  811. * Sets route
  812. *
  813. * @param string|null $route route
  814. *
  815. * @return self
  816. */
  817. public function setRoute($route)
  818. {
  819. if (is_null($route)) {
  820. array_push($this->openAPINullablesSetToNull, 'route');
  821. } else {
  822. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  823. $index = array_search('route', $nullablesSetToNull);
  824. if ($index !== FALSE) {
  825. unset($nullablesSetToNull[$index]);
  826. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  827. }
  828. }
  829. $allowedValues = $this->getRouteAllowableValues();
  830. if (!is_null($route) && !in_array($route, $allowedValues, true)) {
  831. throw new \InvalidArgumentException(
  832. sprintf(
  833. "Invalid value '%s' for 'route', must be one of '%s'",
  834. $route,
  835. implode("', '", $allowedValues)
  836. )
  837. );
  838. }
  839. $this->container['route'] = $route;
  840. return $this;
  841. }
  842. /**
  843. * Gets deep
  844. *
  845. * @return bool|null
  846. */
  847. public function getDeep()
  848. {
  849. return $this->container['deep'];
  850. }
  851. /**
  852. * Sets deep
  853. *
  854. * @param bool|null $deep deep
  855. *
  856. * @return self
  857. */
  858. public function setDeep($deep)
  859. {
  860. if (is_null($deep)) {
  861. throw new \InvalidArgumentException('non-nullable deep cannot be null');
  862. }
  863. $this->container['deep'] = $deep;
  864. return $this;
  865. }
  866. /**
  867. * Gets improve
  868. *
  869. * @return bool|null
  870. */
  871. public function getImprove()
  872. {
  873. return $this->container['improve'];
  874. }
  875. /**
  876. * Sets improve
  877. *
  878. * @param bool|null $improve improve
  879. *
  880. * @return self
  881. */
  882. public function setImprove($improve)
  883. {
  884. if (is_null($improve)) {
  885. throw new \InvalidArgumentException('non-nullable improve cannot be null');
  886. }
  887. $this->container['improve'] = $improve;
  888. return $this;
  889. }
  890. /**
  891. * Gets status
  892. *
  893. * @return string|null
  894. */
  895. public function getStatus()
  896. {
  897. return $this->container['status'];
  898. }
  899. /**
  900. * Sets status
  901. *
  902. * @param string|null $status status
  903. *
  904. * @return self
  905. */
  906. public function setStatus($status)
  907. {
  908. if (is_null($status)) {
  909. throw new \InvalidArgumentException('non-nullable status cannot be null');
  910. }
  911. $this->container['status'] = $status;
  912. return $this;
  913. }
  914. /**
  915. * Gets latency_ms
  916. *
  917. * @return int|null
  918. */
  919. public function getLatencyMs()
  920. {
  921. return $this->container['latency_ms'];
  922. }
  923. /**
  924. * Sets latency_ms
  925. *
  926. * @param int|null $latency_ms latency_ms
  927. *
  928. * @return self
  929. */
  930. public function setLatencyMs($latency_ms)
  931. {
  932. if (is_null($latency_ms)) {
  933. array_push($this->openAPINullablesSetToNull, 'latency_ms');
  934. } else {
  935. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  936. $index = array_search('latency_ms', $nullablesSetToNull);
  937. if ($index !== FALSE) {
  938. unset($nullablesSetToNull[$index]);
  939. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  940. }
  941. }
  942. $this->container['latency_ms'] = $latency_ms;
  943. return $this;
  944. }
  945. /**
  946. * Gets tokens_in
  947. *
  948. * @return int|null
  949. */
  950. public function getTokensIn()
  951. {
  952. return $this->container['tokens_in'];
  953. }
  954. /**
  955. * Sets tokens_in
  956. *
  957. * @param int|null $tokens_in tokens_in
  958. *
  959. * @return self
  960. */
  961. public function setTokensIn($tokens_in)
  962. {
  963. if (is_null($tokens_in)) {
  964. array_push($this->openAPINullablesSetToNull, 'tokens_in');
  965. } else {
  966. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  967. $index = array_search('tokens_in', $nullablesSetToNull);
  968. if ($index !== FALSE) {
  969. unset($nullablesSetToNull[$index]);
  970. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  971. }
  972. }
  973. $this->container['tokens_in'] = $tokens_in;
  974. return $this;
  975. }
  976. /**
  977. * Gets tokens_out
  978. *
  979. * @return int|null
  980. */
  981. public function getTokensOut()
  982. {
  983. return $this->container['tokens_out'];
  984. }
  985. /**
  986. * Sets tokens_out
  987. *
  988. * @param int|null $tokens_out tokens_out
  989. *
  990. * @return self
  991. */
  992. public function setTokensOut($tokens_out)
  993. {
  994. if (is_null($tokens_out)) {
  995. array_push($this->openAPINullablesSetToNull, 'tokens_out');
  996. } else {
  997. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  998. $index = array_search('tokens_out', $nullablesSetToNull);
  999. if ($index !== FALSE) {
  1000. unset($nullablesSetToNull[$index]);
  1001. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1002. }
  1003. }
  1004. $this->container['tokens_out'] = $tokens_out;
  1005. return $this;
  1006. }
  1007. /**
  1008. * Gets llm_calls
  1009. *
  1010. * @return int|null
  1011. */
  1012. public function getLlmCalls()
  1013. {
  1014. return $this->container['llm_calls'];
  1015. }
  1016. /**
  1017. * Sets llm_calls
  1018. *
  1019. * @param int|null $llm_calls llm_calls
  1020. *
  1021. * @return self
  1022. */
  1023. public function setLlmCalls($llm_calls)
  1024. {
  1025. if (is_null($llm_calls)) {
  1026. throw new \InvalidArgumentException('non-nullable llm_calls cannot be null');
  1027. }
  1028. $this->container['llm_calls'] = $llm_calls;
  1029. return $this;
  1030. }
  1031. /**
  1032. * Gets tool_calls
  1033. *
  1034. * @return int|null
  1035. */
  1036. public function getToolCalls()
  1037. {
  1038. return $this->container['tool_calls'];
  1039. }
  1040. /**
  1041. * Sets tool_calls
  1042. *
  1043. * @param int|null $tool_calls tool_calls
  1044. *
  1045. * @return self
  1046. */
  1047. public function setToolCalls($tool_calls)
  1048. {
  1049. if (is_null($tool_calls)) {
  1050. throw new \InvalidArgumentException('non-nullable tool_calls cannot be null');
  1051. }
  1052. $this->container['tool_calls'] = $tool_calls;
  1053. return $this;
  1054. }
  1055. /**
  1056. * Gets started_at
  1057. *
  1058. * @return string|null
  1059. */
  1060. public function getStartedAt()
  1061. {
  1062. return $this->container['started_at'];
  1063. }
  1064. /**
  1065. * Sets started_at
  1066. *
  1067. * @param string|null $started_at started_at
  1068. *
  1069. * @return self
  1070. */
  1071. public function setStartedAt($started_at)
  1072. {
  1073. if (is_null($started_at)) {
  1074. array_push($this->openAPINullablesSetToNull, 'started_at');
  1075. } else {
  1076. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1077. $index = array_search('started_at', $nullablesSetToNull);
  1078. if ($index !== FALSE) {
  1079. unset($nullablesSetToNull[$index]);
  1080. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1081. }
  1082. }
  1083. $this->container['started_at'] = $started_at;
  1084. return $this;
  1085. }
  1086. /**
  1087. * Gets answer
  1088. *
  1089. * @return string|null
  1090. */
  1091. public function getAnswer()
  1092. {
  1093. return $this->container['answer'];
  1094. }
  1095. /**
  1096. * Sets answer
  1097. *
  1098. * @param string|null $answer 仅在部分查询口径下返回。
  1099. *
  1100. * @return self
  1101. */
  1102. public function setAnswer($answer)
  1103. {
  1104. if (is_null($answer)) {
  1105. array_push($this->openAPINullablesSetToNull, 'answer');
  1106. } else {
  1107. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1108. $index = array_search('answer', $nullablesSetToNull);
  1109. if ($index !== FALSE) {
  1110. unset($nullablesSetToNull[$index]);
  1111. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1112. }
  1113. }
  1114. $this->container['answer'] = $answer;
  1115. return $this;
  1116. }
  1117. /**
  1118. * Gets evidence
  1119. *
  1120. * @return string|null
  1121. */
  1122. public function getEvidence()
  1123. {
  1124. return $this->container['evidence'];
  1125. }
  1126. /**
  1127. * Sets evidence
  1128. *
  1129. * @param string|null $evidence 仅在部分查询口径下返回。
  1130. *
  1131. * @return self
  1132. */
  1133. public function setEvidence($evidence)
  1134. {
  1135. if (is_null($evidence)) {
  1136. array_push($this->openAPINullablesSetToNull, 'evidence');
  1137. } else {
  1138. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1139. $index = array_search('evidence', $nullablesSetToNull);
  1140. if ($index !== FALSE) {
  1141. unset($nullablesSetToNull[$index]);
  1142. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1143. }
  1144. }
  1145. $this->container['evidence'] = $evidence;
  1146. return $this;
  1147. }
  1148. /**
  1149. * Gets plan
  1150. *
  1151. * @return object|null
  1152. */
  1153. public function getPlan()
  1154. {
  1155. return $this->container['plan'];
  1156. }
  1157. /**
  1158. * Sets plan
  1159. *
  1160. * @param object|null $plan 仅在部分查询口径下返回。
  1161. *
  1162. * @return self
  1163. */
  1164. public function setPlan($plan)
  1165. {
  1166. if (is_null($plan)) {
  1167. array_push($this->openAPINullablesSetToNull, 'plan');
  1168. } else {
  1169. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1170. $index = array_search('plan', $nullablesSetToNull);
  1171. if ($index !== FALSE) {
  1172. unset($nullablesSetToNull[$index]);
  1173. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1174. }
  1175. }
  1176. $this->container['plan'] = $plan;
  1177. return $this;
  1178. }
  1179. /**
  1180. * Gets passage
  1181. *
  1182. * @return object|null
  1183. */
  1184. public function getPassage()
  1185. {
  1186. return $this->container['passage'];
  1187. }
  1188. /**
  1189. * Sets passage
  1190. *
  1191. * @param object|null $passage 仅在部分查询口径下返回。
  1192. *
  1193. * @return self
  1194. */
  1195. public function setPassage($passage)
  1196. {
  1197. if (is_null($passage)) {
  1198. array_push($this->openAPINullablesSetToNull, 'passage');
  1199. } else {
  1200. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1201. $index = array_search('passage', $nullablesSetToNull);
  1202. if ($index !== FALSE) {
  1203. unset($nullablesSetToNull[$index]);
  1204. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1205. }
  1206. }
  1207. $this->container['passage'] = $passage;
  1208. return $this;
  1209. }
  1210. /**
  1211. * Gets citations
  1212. *
  1213. * @return object[]|null
  1214. */
  1215. public function getCitations()
  1216. {
  1217. return $this->container['citations'];
  1218. }
  1219. /**
  1220. * Sets citations
  1221. *
  1222. * @param object[]|null $citations 仅在部分查询口径下返回。
  1223. *
  1224. * @return self
  1225. */
  1226. public function setCitations($citations)
  1227. {
  1228. if (is_null($citations)) {
  1229. array_push($this->openAPINullablesSetToNull, 'citations');
  1230. } else {
  1231. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1232. $index = array_search('citations', $nullablesSetToNull);
  1233. if ($index !== FALSE) {
  1234. unset($nullablesSetToNull[$index]);
  1235. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1236. }
  1237. }
  1238. $this->container['citations'] = $citations;
  1239. return $this;
  1240. }
  1241. /**
  1242. * Gets error
  1243. *
  1244. * @return string|null
  1245. */
  1246. public function getError()
  1247. {
  1248. return $this->container['error'];
  1249. }
  1250. /**
  1251. * Sets error
  1252. *
  1253. * @param string|null $error 仅在部分查询口径下返回。
  1254. *
  1255. * @return self
  1256. */
  1257. public function setError($error)
  1258. {
  1259. if (is_null($error)) {
  1260. array_push($this->openAPINullablesSetToNull, 'error');
  1261. } else {
  1262. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1263. $index = array_search('error', $nullablesSetToNull);
  1264. if ($index !== FALSE) {
  1265. unset($nullablesSetToNull[$index]);
  1266. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1267. }
  1268. }
  1269. $this->container['error'] = $error;
  1270. return $this;
  1271. }
  1272. /**
  1273. * Gets model
  1274. *
  1275. * @return string|null
  1276. */
  1277. public function getModel()
  1278. {
  1279. return $this->container['model'];
  1280. }
  1281. /**
  1282. * Sets model
  1283. *
  1284. * @param string|null $model 仅在部分查询口径下返回。
  1285. *
  1286. * @return self
  1287. */
  1288. public function setModel($model)
  1289. {
  1290. if (is_null($model)) {
  1291. array_push($this->openAPINullablesSetToNull, 'model');
  1292. } else {
  1293. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1294. $index = array_search('model', $nullablesSetToNull);
  1295. if ($index !== FALSE) {
  1296. unset($nullablesSetToNull[$index]);
  1297. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1298. }
  1299. }
  1300. $this->container['model'] = $model;
  1301. return $this;
  1302. }
  1303. /**
  1304. * Gets prompt_version
  1305. *
  1306. * @return string|null
  1307. */
  1308. public function getPromptVersion()
  1309. {
  1310. return $this->container['prompt_version'];
  1311. }
  1312. /**
  1313. * Sets prompt_version
  1314. *
  1315. * @param string|null $prompt_version 仅在部分查询口径下返回。
  1316. *
  1317. * @return self
  1318. */
  1319. public function setPromptVersion($prompt_version)
  1320. {
  1321. if (is_null($prompt_version)) {
  1322. array_push($this->openAPINullablesSetToNull, 'prompt_version');
  1323. } else {
  1324. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1325. $index = array_search('prompt_version', $nullablesSetToNull);
  1326. if ($index !== FALSE) {
  1327. unset($nullablesSetToNull[$index]);
  1328. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1329. }
  1330. }
  1331. $this->container['prompt_version'] = $prompt_version;
  1332. return $this;
  1333. }
  1334. /**
  1335. * Gets steps
  1336. *
  1337. * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]|null
  1338. */
  1339. public function getSteps()
  1340. {
  1341. return $this->container['steps'];
  1342. }
  1343. /**
  1344. * Sets steps
  1345. *
  1346. * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]|null $steps 仅在部分查询口径下返回。
  1347. *
  1348. * @return self
  1349. */
  1350. public function setSteps($steps)
  1351. {
  1352. if (is_null($steps)) {
  1353. throw new \InvalidArgumentException('non-nullable steps cannot be null');
  1354. }
  1355. $this->container['steps'] = $steps;
  1356. return $this;
  1357. }
  1358. /**
  1359. * Returns true if offset exists. False otherwise.
  1360. *
  1361. * @param integer|string $offset Offset
  1362. *
  1363. * @return boolean
  1364. */
  1365. public function offsetExists(mixed $offset): bool
  1366. {
  1367. return isset($this->container[$offset]);
  1368. }
  1369. /**
  1370. * Gets offset.
  1371. *
  1372. * @param integer|string $offset Offset
  1373. *
  1374. * @return mixed|null
  1375. */
  1376. #[\ReturnTypeWillChange]
  1377. public function offsetGet(mixed $offset)
  1378. {
  1379. return $this->container[$offset] ?? null;
  1380. }
  1381. /**
  1382. * Sets value based on offset.
  1383. *
  1384. * @param int|null $offset Offset
  1385. * @param mixed $value Value to be set
  1386. *
  1387. * @return void
  1388. */
  1389. public function offsetSet($offset, $value): void
  1390. {
  1391. if (is_null($offset)) {
  1392. $this->container[] = $value;
  1393. } else {
  1394. $this->container[$offset] = $value;
  1395. }
  1396. }
  1397. /**
  1398. * Unsets offset.
  1399. *
  1400. * @param integer|string $offset Offset
  1401. *
  1402. * @return void
  1403. */
  1404. public function offsetUnset(mixed $offset): void
  1405. {
  1406. unset($this->container[$offset]);
  1407. }
  1408. /**
  1409. * Serializes the object to a value that can be serialized natively by json_encode().
  1410. * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
  1411. *
  1412. * @return mixed Returns data which can be serialized by json_encode(), which is a value
  1413. * of any type other than a resource.
  1414. */
  1415. #[\ReturnTypeWillChange]
  1416. public function jsonSerialize()
  1417. {
  1418. return ObjectSerializer::sanitizeForSerialization($this);
  1419. }
  1420. /**
  1421. * Gets the string presentation of the object
  1422. *
  1423. * @return string
  1424. */
  1425. public function __toString()
  1426. {
  1427. return json_encode(
  1428. ObjectSerializer::sanitizeForSerialization($this),
  1429. JSON_PRETTY_PRINT
  1430. );
  1431. }
  1432. /**
  1433. * Gets a header-safe presentation of the object
  1434. *
  1435. * @return string
  1436. */
  1437. public function toHeaderValue()
  1438. {
  1439. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  1440. }
  1441. }