GetApiV3AdminAgentRuns200ResponseDataInner.php 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501
  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: 2026.11.12
  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. /**
  375. * Associative array for storing property values
  376. *
  377. * @var mixed[]
  378. */
  379. protected $container = [];
  380. /**
  381. * Constructor
  382. *
  383. * @param mixed[]|null $data Associated array of property values
  384. * initializing the model
  385. */
  386. public function __construct(?array $data = null)
  387. {
  388. $this->setIfExists('run_id', $data ?? [], null);
  389. $this->setIfExists('thread_id', $data ?? [], null);
  390. $this->setIfExists('thread_title', $data ?? [], null);
  391. $this->setIfExists('account_type', $data ?? [], null);
  392. $this->setIfExists('user', $data ?? [], null);
  393. $this->setIfExists('device_id', $data ?? [], null);
  394. $this->setIfExists('client_ip', $data ?? [], null);
  395. $this->setIfExists('client', $data ?? [], null);
  396. $this->setIfExists('app_version', $data ?? [], null);
  397. $this->setIfExists('question', $data ?? [], null);
  398. $this->setIfExists('route', $data ?? [], null);
  399. $this->setIfExists('deep', $data ?? [], null);
  400. $this->setIfExists('improve', $data ?? [], null);
  401. $this->setIfExists('status', $data ?? [], null);
  402. $this->setIfExists('latency_ms', $data ?? [], null);
  403. $this->setIfExists('tokens_in', $data ?? [], null);
  404. $this->setIfExists('tokens_out', $data ?? [], null);
  405. $this->setIfExists('llm_calls', $data ?? [], null);
  406. $this->setIfExists('tool_calls', $data ?? [], null);
  407. $this->setIfExists('started_at', $data ?? [], null);
  408. $this->setIfExists('answer', $data ?? [], null);
  409. $this->setIfExists('evidence', $data ?? [], null);
  410. $this->setIfExists('plan', $data ?? [], null);
  411. $this->setIfExists('passage', $data ?? [], null);
  412. $this->setIfExists('citations', $data ?? [], null);
  413. $this->setIfExists('error', $data ?? [], null);
  414. $this->setIfExists('model', $data ?? [], null);
  415. $this->setIfExists('prompt_version', $data ?? [], null);
  416. $this->setIfExists('steps', $data ?? [], null);
  417. }
  418. /**
  419. * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
  420. * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
  421. * $this->openAPINullablesSetToNull array
  422. *
  423. * @param string $variableName
  424. * @param array $fields
  425. * @param mixed $defaultValue
  426. */
  427. private function setIfExists(string $variableName, array $fields, $defaultValue): void
  428. {
  429. if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
  430. $this->openAPINullablesSetToNull[] = $variableName;
  431. }
  432. $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
  433. }
  434. /**
  435. * Show all the invalid properties with reasons.
  436. *
  437. * @return array invalid properties with reasons
  438. */
  439. public function listInvalidProperties()
  440. {
  441. $invalidProperties = [];
  442. return $invalidProperties;
  443. }
  444. /**
  445. * Validate all the properties in the model
  446. * return true if all passed
  447. *
  448. * @return bool True if all properties are valid
  449. */
  450. public function valid()
  451. {
  452. return count($this->listInvalidProperties()) === 0;
  453. }
  454. /**
  455. * Gets run_id
  456. *
  457. * @return string|null
  458. */
  459. public function getRunId()
  460. {
  461. return $this->container['run_id'];
  462. }
  463. /**
  464. * Sets run_id
  465. *
  466. * @param string|null $run_id run_id
  467. *
  468. * @return self
  469. */
  470. public function setRunId($run_id)
  471. {
  472. if (is_null($run_id)) {
  473. throw new \InvalidArgumentException('non-nullable run_id cannot be null');
  474. }
  475. $this->container['run_id'] = $run_id;
  476. return $this;
  477. }
  478. /**
  479. * Gets thread_id
  480. *
  481. * @return string|null
  482. */
  483. public function getThreadId()
  484. {
  485. return $this->container['thread_id'];
  486. }
  487. /**
  488. * Sets thread_id
  489. *
  490. * @param string|null $thread_id thread_id
  491. *
  492. * @return self
  493. */
  494. public function setThreadId($thread_id)
  495. {
  496. if (is_null($thread_id)) {
  497. array_push($this->openAPINullablesSetToNull, 'thread_id');
  498. } else {
  499. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  500. $index = array_search('thread_id', $nullablesSetToNull);
  501. if ($index !== FALSE) {
  502. unset($nullablesSetToNull[$index]);
  503. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  504. }
  505. }
  506. $this->container['thread_id'] = $thread_id;
  507. return $this;
  508. }
  509. /**
  510. * Gets thread_title
  511. *
  512. * @return string|null
  513. */
  514. public function getThreadTitle()
  515. {
  516. return $this->container['thread_title'];
  517. }
  518. /**
  519. * Sets thread_title
  520. *
  521. * @param string|null $thread_title thread_title
  522. *
  523. * @return self
  524. */
  525. public function setThreadTitle($thread_title)
  526. {
  527. if (is_null($thread_title)) {
  528. array_push($this->openAPINullablesSetToNull, 'thread_title');
  529. } else {
  530. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  531. $index = array_search('thread_title', $nullablesSetToNull);
  532. if ($index !== FALSE) {
  533. unset($nullablesSetToNull[$index]);
  534. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  535. }
  536. }
  537. $this->container['thread_title'] = $thread_title;
  538. return $this;
  539. }
  540. /**
  541. * Gets account_type
  542. *
  543. * @return string|null
  544. */
  545. public function getAccountType()
  546. {
  547. return $this->container['account_type'];
  548. }
  549. /**
  550. * Sets account_type
  551. *
  552. * @param string|null $account_type account_type
  553. *
  554. * @return self
  555. */
  556. public function setAccountType($account_type)
  557. {
  558. if (is_null($account_type)) {
  559. throw new \InvalidArgumentException('non-nullable account_type cannot be null');
  560. }
  561. $this->container['account_type'] = $account_type;
  562. return $this;
  563. }
  564. /**
  565. * Gets user
  566. *
  567. * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null
  568. */
  569. public function getUser()
  570. {
  571. return $this->container['user'];
  572. }
  573. /**
  574. * Sets user
  575. *
  576. * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null $user user
  577. *
  578. * @return self
  579. */
  580. public function setUser($user)
  581. {
  582. if (is_null($user)) {
  583. array_push($this->openAPINullablesSetToNull, 'user');
  584. } else {
  585. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  586. $index = array_search('user', $nullablesSetToNull);
  587. if ($index !== FALSE) {
  588. unset($nullablesSetToNull[$index]);
  589. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  590. }
  591. }
  592. $this->container['user'] = $user;
  593. return $this;
  594. }
  595. /**
  596. * Gets device_id
  597. *
  598. * @return string|null
  599. */
  600. public function getDeviceId()
  601. {
  602. return $this->container['device_id'];
  603. }
  604. /**
  605. * Sets device_id
  606. *
  607. * @param string|null $device_id device_id
  608. *
  609. * @return self
  610. */
  611. public function setDeviceId($device_id)
  612. {
  613. if (is_null($device_id)) {
  614. array_push($this->openAPINullablesSetToNull, 'device_id');
  615. } else {
  616. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  617. $index = array_search('device_id', $nullablesSetToNull);
  618. if ($index !== FALSE) {
  619. unset($nullablesSetToNull[$index]);
  620. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  621. }
  622. }
  623. $this->container['device_id'] = $device_id;
  624. return $this;
  625. }
  626. /**
  627. * Gets client_ip
  628. *
  629. * @return string|null
  630. */
  631. public function getClientIp()
  632. {
  633. return $this->container['client_ip'];
  634. }
  635. /**
  636. * Sets client_ip
  637. *
  638. * @param string|null $client_ip client_ip
  639. *
  640. * @return self
  641. */
  642. public function setClientIp($client_ip)
  643. {
  644. if (is_null($client_ip)) {
  645. array_push($this->openAPINullablesSetToNull, 'client_ip');
  646. } else {
  647. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  648. $index = array_search('client_ip', $nullablesSetToNull);
  649. if ($index !== FALSE) {
  650. unset($nullablesSetToNull[$index]);
  651. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  652. }
  653. }
  654. $this->container['client_ip'] = $client_ip;
  655. return $this;
  656. }
  657. /**
  658. * Gets client
  659. *
  660. * @return string|null
  661. */
  662. public function getClient()
  663. {
  664. return $this->container['client'];
  665. }
  666. /**
  667. * Sets client
  668. *
  669. * @param string|null $client client
  670. *
  671. * @return self
  672. */
  673. public function setClient($client)
  674. {
  675. if (is_null($client)) {
  676. array_push($this->openAPINullablesSetToNull, 'client');
  677. } else {
  678. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  679. $index = array_search('client', $nullablesSetToNull);
  680. if ($index !== FALSE) {
  681. unset($nullablesSetToNull[$index]);
  682. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  683. }
  684. }
  685. $this->container['client'] = $client;
  686. return $this;
  687. }
  688. /**
  689. * Gets app_version
  690. *
  691. * @return string|null
  692. */
  693. public function getAppVersion()
  694. {
  695. return $this->container['app_version'];
  696. }
  697. /**
  698. * Sets app_version
  699. *
  700. * @param string|null $app_version app_version
  701. *
  702. * @return self
  703. */
  704. public function setAppVersion($app_version)
  705. {
  706. if (is_null($app_version)) {
  707. array_push($this->openAPINullablesSetToNull, 'app_version');
  708. } else {
  709. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  710. $index = array_search('app_version', $nullablesSetToNull);
  711. if ($index !== FALSE) {
  712. unset($nullablesSetToNull[$index]);
  713. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  714. }
  715. }
  716. $this->container['app_version'] = $app_version;
  717. return $this;
  718. }
  719. /**
  720. * Gets question
  721. *
  722. * @return string|null
  723. */
  724. public function getQuestion()
  725. {
  726. return $this->container['question'];
  727. }
  728. /**
  729. * Sets question
  730. *
  731. * @param string|null $question question
  732. *
  733. * @return self
  734. */
  735. public function setQuestion($question)
  736. {
  737. if (is_null($question)) {
  738. throw new \InvalidArgumentException('non-nullable question cannot be null');
  739. }
  740. $this->container['question'] = $question;
  741. return $this;
  742. }
  743. /**
  744. * Gets route
  745. *
  746. * @return string|null
  747. */
  748. public function getRoute()
  749. {
  750. return $this->container['route'];
  751. }
  752. /**
  753. * Sets route
  754. *
  755. * @param string|null $route route
  756. *
  757. * @return self
  758. */
  759. public function setRoute($route)
  760. {
  761. if (is_null($route)) {
  762. array_push($this->openAPINullablesSetToNull, 'route');
  763. } else {
  764. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  765. $index = array_search('route', $nullablesSetToNull);
  766. if ($index !== FALSE) {
  767. unset($nullablesSetToNull[$index]);
  768. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  769. }
  770. }
  771. $this->container['route'] = $route;
  772. return $this;
  773. }
  774. /**
  775. * Gets deep
  776. *
  777. * @return bool|null
  778. */
  779. public function getDeep()
  780. {
  781. return $this->container['deep'];
  782. }
  783. /**
  784. * Sets deep
  785. *
  786. * @param bool|null $deep deep
  787. *
  788. * @return self
  789. */
  790. public function setDeep($deep)
  791. {
  792. if (is_null($deep)) {
  793. throw new \InvalidArgumentException('non-nullable deep cannot be null');
  794. }
  795. $this->container['deep'] = $deep;
  796. return $this;
  797. }
  798. /**
  799. * Gets improve
  800. *
  801. * @return bool|null
  802. */
  803. public function getImprove()
  804. {
  805. return $this->container['improve'];
  806. }
  807. /**
  808. * Sets improve
  809. *
  810. * @param bool|null $improve improve
  811. *
  812. * @return self
  813. */
  814. public function setImprove($improve)
  815. {
  816. if (is_null($improve)) {
  817. throw new \InvalidArgumentException('non-nullable improve cannot be null');
  818. }
  819. $this->container['improve'] = $improve;
  820. return $this;
  821. }
  822. /**
  823. * Gets status
  824. *
  825. * @return string|null
  826. */
  827. public function getStatus()
  828. {
  829. return $this->container['status'];
  830. }
  831. /**
  832. * Sets status
  833. *
  834. * @param string|null $status status
  835. *
  836. * @return self
  837. */
  838. public function setStatus($status)
  839. {
  840. if (is_null($status)) {
  841. throw new \InvalidArgumentException('non-nullable status cannot be null');
  842. }
  843. $this->container['status'] = $status;
  844. return $this;
  845. }
  846. /**
  847. * Gets latency_ms
  848. *
  849. * @return int|null
  850. */
  851. public function getLatencyMs()
  852. {
  853. return $this->container['latency_ms'];
  854. }
  855. /**
  856. * Sets latency_ms
  857. *
  858. * @param int|null $latency_ms latency_ms
  859. *
  860. * @return self
  861. */
  862. public function setLatencyMs($latency_ms)
  863. {
  864. if (is_null($latency_ms)) {
  865. array_push($this->openAPINullablesSetToNull, 'latency_ms');
  866. } else {
  867. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  868. $index = array_search('latency_ms', $nullablesSetToNull);
  869. if ($index !== FALSE) {
  870. unset($nullablesSetToNull[$index]);
  871. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  872. }
  873. }
  874. $this->container['latency_ms'] = $latency_ms;
  875. return $this;
  876. }
  877. /**
  878. * Gets tokens_in
  879. *
  880. * @return int|null
  881. */
  882. public function getTokensIn()
  883. {
  884. return $this->container['tokens_in'];
  885. }
  886. /**
  887. * Sets tokens_in
  888. *
  889. * @param int|null $tokens_in tokens_in
  890. *
  891. * @return self
  892. */
  893. public function setTokensIn($tokens_in)
  894. {
  895. if (is_null($tokens_in)) {
  896. array_push($this->openAPINullablesSetToNull, 'tokens_in');
  897. } else {
  898. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  899. $index = array_search('tokens_in', $nullablesSetToNull);
  900. if ($index !== FALSE) {
  901. unset($nullablesSetToNull[$index]);
  902. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  903. }
  904. }
  905. $this->container['tokens_in'] = $tokens_in;
  906. return $this;
  907. }
  908. /**
  909. * Gets tokens_out
  910. *
  911. * @return int|null
  912. */
  913. public function getTokensOut()
  914. {
  915. return $this->container['tokens_out'];
  916. }
  917. /**
  918. * Sets tokens_out
  919. *
  920. * @param int|null $tokens_out tokens_out
  921. *
  922. * @return self
  923. */
  924. public function setTokensOut($tokens_out)
  925. {
  926. if (is_null($tokens_out)) {
  927. array_push($this->openAPINullablesSetToNull, 'tokens_out');
  928. } else {
  929. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  930. $index = array_search('tokens_out', $nullablesSetToNull);
  931. if ($index !== FALSE) {
  932. unset($nullablesSetToNull[$index]);
  933. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  934. }
  935. }
  936. $this->container['tokens_out'] = $tokens_out;
  937. return $this;
  938. }
  939. /**
  940. * Gets llm_calls
  941. *
  942. * @return int|null
  943. */
  944. public function getLlmCalls()
  945. {
  946. return $this->container['llm_calls'];
  947. }
  948. /**
  949. * Sets llm_calls
  950. *
  951. * @param int|null $llm_calls llm_calls
  952. *
  953. * @return self
  954. */
  955. public function setLlmCalls($llm_calls)
  956. {
  957. if (is_null($llm_calls)) {
  958. throw new \InvalidArgumentException('non-nullable llm_calls cannot be null');
  959. }
  960. $this->container['llm_calls'] = $llm_calls;
  961. return $this;
  962. }
  963. /**
  964. * Gets tool_calls
  965. *
  966. * @return int|null
  967. */
  968. public function getToolCalls()
  969. {
  970. return $this->container['tool_calls'];
  971. }
  972. /**
  973. * Sets tool_calls
  974. *
  975. * @param int|null $tool_calls tool_calls
  976. *
  977. * @return self
  978. */
  979. public function setToolCalls($tool_calls)
  980. {
  981. if (is_null($tool_calls)) {
  982. throw new \InvalidArgumentException('non-nullable tool_calls cannot be null');
  983. }
  984. $this->container['tool_calls'] = $tool_calls;
  985. return $this;
  986. }
  987. /**
  988. * Gets started_at
  989. *
  990. * @return string|null
  991. */
  992. public function getStartedAt()
  993. {
  994. return $this->container['started_at'];
  995. }
  996. /**
  997. * Sets started_at
  998. *
  999. * @param string|null $started_at started_at
  1000. *
  1001. * @return self
  1002. */
  1003. public function setStartedAt($started_at)
  1004. {
  1005. if (is_null($started_at)) {
  1006. array_push($this->openAPINullablesSetToNull, 'started_at');
  1007. } else {
  1008. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1009. $index = array_search('started_at', $nullablesSetToNull);
  1010. if ($index !== FALSE) {
  1011. unset($nullablesSetToNull[$index]);
  1012. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1013. }
  1014. }
  1015. $this->container['started_at'] = $started_at;
  1016. return $this;
  1017. }
  1018. /**
  1019. * Gets answer
  1020. *
  1021. * @return string|null
  1022. */
  1023. public function getAnswer()
  1024. {
  1025. return $this->container['answer'];
  1026. }
  1027. /**
  1028. * Sets answer
  1029. *
  1030. * @param string|null $answer 仅在部分查询口径下返回。
  1031. *
  1032. * @return self
  1033. */
  1034. public function setAnswer($answer)
  1035. {
  1036. if (is_null($answer)) {
  1037. array_push($this->openAPINullablesSetToNull, 'answer');
  1038. } else {
  1039. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1040. $index = array_search('answer', $nullablesSetToNull);
  1041. if ($index !== FALSE) {
  1042. unset($nullablesSetToNull[$index]);
  1043. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1044. }
  1045. }
  1046. $this->container['answer'] = $answer;
  1047. return $this;
  1048. }
  1049. /**
  1050. * Gets evidence
  1051. *
  1052. * @return string|null
  1053. */
  1054. public function getEvidence()
  1055. {
  1056. return $this->container['evidence'];
  1057. }
  1058. /**
  1059. * Sets evidence
  1060. *
  1061. * @param string|null $evidence 仅在部分查询口径下返回。
  1062. *
  1063. * @return self
  1064. */
  1065. public function setEvidence($evidence)
  1066. {
  1067. if (is_null($evidence)) {
  1068. array_push($this->openAPINullablesSetToNull, 'evidence');
  1069. } else {
  1070. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1071. $index = array_search('evidence', $nullablesSetToNull);
  1072. if ($index !== FALSE) {
  1073. unset($nullablesSetToNull[$index]);
  1074. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1075. }
  1076. }
  1077. $this->container['evidence'] = $evidence;
  1078. return $this;
  1079. }
  1080. /**
  1081. * Gets plan
  1082. *
  1083. * @return object|null
  1084. */
  1085. public function getPlan()
  1086. {
  1087. return $this->container['plan'];
  1088. }
  1089. /**
  1090. * Sets plan
  1091. *
  1092. * @param object|null $plan 仅在部分查询口径下返回。
  1093. *
  1094. * @return self
  1095. */
  1096. public function setPlan($plan)
  1097. {
  1098. if (is_null($plan)) {
  1099. array_push($this->openAPINullablesSetToNull, 'plan');
  1100. } else {
  1101. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1102. $index = array_search('plan', $nullablesSetToNull);
  1103. if ($index !== FALSE) {
  1104. unset($nullablesSetToNull[$index]);
  1105. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1106. }
  1107. }
  1108. $this->container['plan'] = $plan;
  1109. return $this;
  1110. }
  1111. /**
  1112. * Gets passage
  1113. *
  1114. * @return object|null
  1115. */
  1116. public function getPassage()
  1117. {
  1118. return $this->container['passage'];
  1119. }
  1120. /**
  1121. * Sets passage
  1122. *
  1123. * @param object|null $passage 仅在部分查询口径下返回。
  1124. *
  1125. * @return self
  1126. */
  1127. public function setPassage($passage)
  1128. {
  1129. if (is_null($passage)) {
  1130. array_push($this->openAPINullablesSetToNull, 'passage');
  1131. } else {
  1132. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1133. $index = array_search('passage', $nullablesSetToNull);
  1134. if ($index !== FALSE) {
  1135. unset($nullablesSetToNull[$index]);
  1136. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1137. }
  1138. }
  1139. $this->container['passage'] = $passage;
  1140. return $this;
  1141. }
  1142. /**
  1143. * Gets citations
  1144. *
  1145. * @return object[]|null
  1146. */
  1147. public function getCitations()
  1148. {
  1149. return $this->container['citations'];
  1150. }
  1151. /**
  1152. * Sets citations
  1153. *
  1154. * @param object[]|null $citations 仅在部分查询口径下返回。
  1155. *
  1156. * @return self
  1157. */
  1158. public function setCitations($citations)
  1159. {
  1160. if (is_null($citations)) {
  1161. array_push($this->openAPINullablesSetToNull, 'citations');
  1162. } else {
  1163. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1164. $index = array_search('citations', $nullablesSetToNull);
  1165. if ($index !== FALSE) {
  1166. unset($nullablesSetToNull[$index]);
  1167. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1168. }
  1169. }
  1170. $this->container['citations'] = $citations;
  1171. return $this;
  1172. }
  1173. /**
  1174. * Gets error
  1175. *
  1176. * @return string|null
  1177. */
  1178. public function getError()
  1179. {
  1180. return $this->container['error'];
  1181. }
  1182. /**
  1183. * Sets error
  1184. *
  1185. * @param string|null $error 仅在部分查询口径下返回。
  1186. *
  1187. * @return self
  1188. */
  1189. public function setError($error)
  1190. {
  1191. if (is_null($error)) {
  1192. array_push($this->openAPINullablesSetToNull, 'error');
  1193. } else {
  1194. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1195. $index = array_search('error', $nullablesSetToNull);
  1196. if ($index !== FALSE) {
  1197. unset($nullablesSetToNull[$index]);
  1198. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1199. }
  1200. }
  1201. $this->container['error'] = $error;
  1202. return $this;
  1203. }
  1204. /**
  1205. * Gets model
  1206. *
  1207. * @return string|null
  1208. */
  1209. public function getModel()
  1210. {
  1211. return $this->container['model'];
  1212. }
  1213. /**
  1214. * Sets model
  1215. *
  1216. * @param string|null $model 仅在部分查询口径下返回。
  1217. *
  1218. * @return self
  1219. */
  1220. public function setModel($model)
  1221. {
  1222. if (is_null($model)) {
  1223. array_push($this->openAPINullablesSetToNull, 'model');
  1224. } else {
  1225. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1226. $index = array_search('model', $nullablesSetToNull);
  1227. if ($index !== FALSE) {
  1228. unset($nullablesSetToNull[$index]);
  1229. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1230. }
  1231. }
  1232. $this->container['model'] = $model;
  1233. return $this;
  1234. }
  1235. /**
  1236. * Gets prompt_version
  1237. *
  1238. * @return string|null
  1239. */
  1240. public function getPromptVersion()
  1241. {
  1242. return $this->container['prompt_version'];
  1243. }
  1244. /**
  1245. * Sets prompt_version
  1246. *
  1247. * @param string|null $prompt_version 仅在部分查询口径下返回。
  1248. *
  1249. * @return self
  1250. */
  1251. public function setPromptVersion($prompt_version)
  1252. {
  1253. if (is_null($prompt_version)) {
  1254. array_push($this->openAPINullablesSetToNull, 'prompt_version');
  1255. } else {
  1256. $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
  1257. $index = array_search('prompt_version', $nullablesSetToNull);
  1258. if ($index !== FALSE) {
  1259. unset($nullablesSetToNull[$index]);
  1260. $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
  1261. }
  1262. }
  1263. $this->container['prompt_version'] = $prompt_version;
  1264. return $this;
  1265. }
  1266. /**
  1267. * Gets steps
  1268. *
  1269. * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]|null
  1270. */
  1271. public function getSteps()
  1272. {
  1273. return $this->container['steps'];
  1274. }
  1275. /**
  1276. * Sets steps
  1277. *
  1278. * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]|null $steps 仅在部分查询口径下返回。
  1279. *
  1280. * @return self
  1281. */
  1282. public function setSteps($steps)
  1283. {
  1284. if (is_null($steps)) {
  1285. throw new \InvalidArgumentException('non-nullable steps cannot be null');
  1286. }
  1287. $this->container['steps'] = $steps;
  1288. return $this;
  1289. }
  1290. /**
  1291. * Returns true if offset exists. False otherwise.
  1292. *
  1293. * @param integer|string $offset Offset
  1294. *
  1295. * @return boolean
  1296. */
  1297. public function offsetExists(mixed $offset): bool
  1298. {
  1299. return isset($this->container[$offset]);
  1300. }
  1301. /**
  1302. * Gets offset.
  1303. *
  1304. * @param integer|string $offset Offset
  1305. *
  1306. * @return mixed|null
  1307. */
  1308. #[\ReturnTypeWillChange]
  1309. public function offsetGet(mixed $offset)
  1310. {
  1311. return $this->container[$offset] ?? null;
  1312. }
  1313. /**
  1314. * Sets value based on offset.
  1315. *
  1316. * @param int|null $offset Offset
  1317. * @param mixed $value Value to be set
  1318. *
  1319. * @return void
  1320. */
  1321. public function offsetSet($offset, $value): void
  1322. {
  1323. if (is_null($offset)) {
  1324. $this->container[] = $value;
  1325. } else {
  1326. $this->container[$offset] = $value;
  1327. }
  1328. }
  1329. /**
  1330. * Unsets offset.
  1331. *
  1332. * @param integer|string $offset Offset
  1333. *
  1334. * @return void
  1335. */
  1336. public function offsetUnset(mixed $offset): void
  1337. {
  1338. unset($this->container[$offset]);
  1339. }
  1340. /**
  1341. * Serializes the object to a value that can be serialized natively by json_encode().
  1342. * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
  1343. *
  1344. * @return mixed Returns data which can be serialized by json_encode(), which is a value
  1345. * of any type other than a resource.
  1346. */
  1347. #[\ReturnTypeWillChange]
  1348. public function jsonSerialize()
  1349. {
  1350. return ObjectSerializer::sanitizeForSerialization($this);
  1351. }
  1352. /**
  1353. * Gets the string presentation of the object
  1354. *
  1355. * @return string
  1356. */
  1357. public function __toString()
  1358. {
  1359. return json_encode(
  1360. ObjectSerializer::sanitizeForSerialization($this),
  1361. JSON_PRETTY_PRINT
  1362. );
  1363. }
  1364. /**
  1365. * Gets a header-safe presentation of the object
  1366. *
  1367. * @return string
  1368. */
  1369. public function toHeaderValue()
  1370. {
  1371. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  1372. }
  1373. }