| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501 |
- <?php
- /**
- * GetApiV3AdminAgentRuns200ResponseDataInner
- *
- * PHP version 8.1
- *
- * @category Class
- * @package WikipaliApi
- * @author OpenAPI Generator team
- * @link https://openapi-generator.tech
- */
- /**
- * MINT API
- *
- * International Academy Of Pali Tipitaka(国际巴利三藏学院) 由 `php openapi/scripts/generate.php` 依据 api-v13 的路由与控制器源码生成。 响应统一封装为 `{ok, message, data}`;`ok=false` 时 `message` 为错误信息。
- *
- * The version of the OpenAPI document: 2026.11.12
- * Generated by: https://openapi-generator.tech
- * Generator version: 7.25.0
- */
- /**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
- namespace WikipaliApi\Model;
- use \ArrayAccess;
- use \WikipaliApi\ObjectSerializer;
- /**
- * GetApiV3AdminAgentRuns200ResponseDataInner Class Doc Comment
- *
- * @category Class
- * @package WikipaliApi
- * @author OpenAPI Generator team
- * @link https://openapi-generator.tech
- * @implements \ArrayAccess<string, mixed>
- */
- class GetApiV3AdminAgentRuns200ResponseDataInner implements ModelInterface, ArrayAccess, \JsonSerializable
- {
- public const DISCRIMINATOR = null;
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'get_api_v3_admin_agent_runs_200_response_data_inner';
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'run_id' => 'string',
- 'thread_id' => 'string',
- 'thread_title' => 'string',
- 'account_type' => 'string',
- 'user' => '\WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser',
- 'device_id' => 'string',
- 'client_ip' => 'string',
- 'client' => 'string',
- 'app_version' => 'string',
- 'question' => 'string',
- 'route' => 'string',
- 'deep' => 'bool',
- 'improve' => 'bool',
- 'status' => 'string',
- 'latency_ms' => 'int',
- 'tokens_in' => 'int',
- 'tokens_out' => 'int',
- 'llm_calls' => 'int',
- 'tool_calls' => 'int',
- 'started_at' => 'string',
- 'answer' => 'string',
- 'evidence' => 'string',
- 'plan' => 'object',
- 'passage' => 'object',
- 'citations' => 'object[]',
- 'error' => 'string',
- 'model' => 'string',
- 'prompt_version' => 'string',
- 'steps' => '\WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]'
- ];
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array<string, string|null>
- * @psalm-var array<string, string|null>
- */
- protected static $openAPIFormats = [
- 'run_id' => null,
- 'thread_id' => null,
- 'thread_title' => null,
- 'account_type' => null,
- 'user' => null,
- 'device_id' => null,
- 'client_ip' => null,
- 'client' => null,
- 'app_version' => null,
- 'question' => null,
- 'route' => null,
- 'deep' => null,
- 'improve' => null,
- 'status' => null,
- 'latency_ms' => null,
- 'tokens_in' => null,
- 'tokens_out' => null,
- 'llm_calls' => null,
- 'tool_calls' => null,
- 'started_at' => null,
- 'answer' => null,
- 'evidence' => null,
- 'plan' => null,
- 'passage' => null,
- 'citations' => null,
- 'error' => null,
- 'model' => null,
- 'prompt_version' => null,
- 'steps' => null
- ];
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static array $openAPINullables = [
- 'run_id' => false,
- 'thread_id' => true,
- 'thread_title' => true,
- 'account_type' => false,
- 'user' => true,
- 'device_id' => true,
- 'client_ip' => true,
- 'client' => true,
- 'app_version' => true,
- 'question' => false,
- 'route' => true,
- 'deep' => false,
- 'improve' => false,
- 'status' => false,
- 'latency_ms' => true,
- 'tokens_in' => true,
- 'tokens_out' => true,
- 'llm_calls' => false,
- 'tool_calls' => false,
- 'started_at' => true,
- 'answer' => true,
- 'evidence' => true,
- 'plan' => true,
- 'passage' => true,
- 'citations' => true,
- 'error' => true,
- 'model' => true,
- 'prompt_version' => true,
- 'steps' => false
- ];
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected array $openAPINullablesSetToNull = [];
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @return array
- */
- public static function openAPITypes()
- {
- return self::$openAPITypes;
- }
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @return array
- */
- public static function openAPIFormats()
- {
- return self::$openAPIFormats;
- }
- /**
- * Array of nullable properties
- *
- * @return array
- */
- protected static function openAPINullables(): array
- {
- return self::$openAPINullables;
- }
- /**
- * Array of nullable field names deliberately set to null
- *
- * @return boolean[]
- */
- private function getOpenAPINullablesSetToNull(): array
- {
- return $this->openAPINullablesSetToNull;
- }
- /**
- * Setter - Array of nullable field names deliberately set to null
- *
- * @param boolean[] $openAPINullablesSetToNull
- */
- private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
- {
- $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
- }
- /**
- * Checks if a property is nullable
- *
- * @param string $property
- * @return bool
- */
- public static function isNullable(string $property): bool
- {
- return self::openAPINullables()[$property] ?? false;
- }
- /**
- * Checks if a nullable property is set to null.
- *
- * @param string $property
- * @return bool
- */
- public function isNullableSetToNull(string $property): bool
- {
- return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
- }
- /**
- * Array of attributes where the key is the local name,
- * and the value is the original name
- *
- * @var string[]
- */
- protected static $attributeMap = [
- 'run_id' => 'run_id',
- 'thread_id' => 'thread_id',
- 'thread_title' => 'thread_title',
- 'account_type' => 'account_type',
- 'user' => 'user',
- 'device_id' => 'device_id',
- 'client_ip' => 'client_ip',
- 'client' => 'client',
- 'app_version' => 'app_version',
- 'question' => 'question',
- 'route' => 'route',
- 'deep' => 'deep',
- 'improve' => 'improve',
- 'status' => 'status',
- 'latency_ms' => 'latency_ms',
- 'tokens_in' => 'tokens_in',
- 'tokens_out' => 'tokens_out',
- 'llm_calls' => 'llm_calls',
- 'tool_calls' => 'tool_calls',
- 'started_at' => 'started_at',
- 'answer' => 'answer',
- 'evidence' => 'evidence',
- 'plan' => 'plan',
- 'passage' => 'passage',
- 'citations' => 'citations',
- 'error' => 'error',
- 'model' => 'model',
- 'prompt_version' => 'prompt_version',
- 'steps' => 'steps'
- ];
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'run_id' => 'setRunId',
- 'thread_id' => 'setThreadId',
- 'thread_title' => 'setThreadTitle',
- 'account_type' => 'setAccountType',
- 'user' => 'setUser',
- 'device_id' => 'setDeviceId',
- 'client_ip' => 'setClientIp',
- 'client' => 'setClient',
- 'app_version' => 'setAppVersion',
- 'question' => 'setQuestion',
- 'route' => 'setRoute',
- 'deep' => 'setDeep',
- 'improve' => 'setImprove',
- 'status' => 'setStatus',
- 'latency_ms' => 'setLatencyMs',
- 'tokens_in' => 'setTokensIn',
- 'tokens_out' => 'setTokensOut',
- 'llm_calls' => 'setLlmCalls',
- 'tool_calls' => 'setToolCalls',
- 'started_at' => 'setStartedAt',
- 'answer' => 'setAnswer',
- 'evidence' => 'setEvidence',
- 'plan' => 'setPlan',
- 'passage' => 'setPassage',
- 'citations' => 'setCitations',
- 'error' => 'setError',
- 'model' => 'setModel',
- 'prompt_version' => 'setPromptVersion',
- 'steps' => 'setSteps'
- ];
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'run_id' => 'getRunId',
- 'thread_id' => 'getThreadId',
- 'thread_title' => 'getThreadTitle',
- 'account_type' => 'getAccountType',
- 'user' => 'getUser',
- 'device_id' => 'getDeviceId',
- 'client_ip' => 'getClientIp',
- 'client' => 'getClient',
- 'app_version' => 'getAppVersion',
- 'question' => 'getQuestion',
- 'route' => 'getRoute',
- 'deep' => 'getDeep',
- 'improve' => 'getImprove',
- 'status' => 'getStatus',
- 'latency_ms' => 'getLatencyMs',
- 'tokens_in' => 'getTokensIn',
- 'tokens_out' => 'getTokensOut',
- 'llm_calls' => 'getLlmCalls',
- 'tool_calls' => 'getToolCalls',
- 'started_at' => 'getStartedAt',
- 'answer' => 'getAnswer',
- 'evidence' => 'getEvidence',
- 'plan' => 'getPlan',
- 'passage' => 'getPassage',
- 'citations' => 'getCitations',
- 'error' => 'getError',
- 'model' => 'getModel',
- 'prompt_version' => 'getPromptVersion',
- 'steps' => 'getSteps'
- ];
- /**
- * Array of attributes where the key is the local name,
- * and the value is the original name
- *
- * @return array
- */
- public static function attributeMap()
- {
- return self::$attributeMap;
- }
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @return array
- */
- public static function setters()
- {
- return self::$setters;
- }
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @return array
- */
- public static function getters()
- {
- return self::$getters;
- }
- /**
- * The original name of the model.
- *
- * @return string
- */
- public function getModelName()
- {
- return self::$openAPIModelName;
- }
- /**
- * Associative array for storing property values
- *
- * @var mixed[]
- */
- protected $container = [];
- /**
- * Constructor
- *
- * @param mixed[]|null $data Associated array of property values
- * initializing the model
- */
- public function __construct(?array $data = null)
- {
- $this->setIfExists('run_id', $data ?? [], null);
- $this->setIfExists('thread_id', $data ?? [], null);
- $this->setIfExists('thread_title', $data ?? [], null);
- $this->setIfExists('account_type', $data ?? [], null);
- $this->setIfExists('user', $data ?? [], null);
- $this->setIfExists('device_id', $data ?? [], null);
- $this->setIfExists('client_ip', $data ?? [], null);
- $this->setIfExists('client', $data ?? [], null);
- $this->setIfExists('app_version', $data ?? [], null);
- $this->setIfExists('question', $data ?? [], null);
- $this->setIfExists('route', $data ?? [], null);
- $this->setIfExists('deep', $data ?? [], null);
- $this->setIfExists('improve', $data ?? [], null);
- $this->setIfExists('status', $data ?? [], null);
- $this->setIfExists('latency_ms', $data ?? [], null);
- $this->setIfExists('tokens_in', $data ?? [], null);
- $this->setIfExists('tokens_out', $data ?? [], null);
- $this->setIfExists('llm_calls', $data ?? [], null);
- $this->setIfExists('tool_calls', $data ?? [], null);
- $this->setIfExists('started_at', $data ?? [], null);
- $this->setIfExists('answer', $data ?? [], null);
- $this->setIfExists('evidence', $data ?? [], null);
- $this->setIfExists('plan', $data ?? [], null);
- $this->setIfExists('passage', $data ?? [], null);
- $this->setIfExists('citations', $data ?? [], null);
- $this->setIfExists('error', $data ?? [], null);
- $this->setIfExists('model', $data ?? [], null);
- $this->setIfExists('prompt_version', $data ?? [], null);
- $this->setIfExists('steps', $data ?? [], null);
- }
- /**
- * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
- * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
- * $this->openAPINullablesSetToNull array
- *
- * @param string $variableName
- * @param array $fields
- * @param mixed $defaultValue
- */
- private function setIfExists(string $variableName, array $fields, $defaultValue): void
- {
- if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
- $this->openAPINullablesSetToNull[] = $variableName;
- }
- $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
- }
- /**
- * Show all the invalid properties with reasons.
- *
- * @return array invalid properties with reasons
- */
- public function listInvalidProperties()
- {
- $invalidProperties = [];
- return $invalidProperties;
- }
- /**
- * Validate all the properties in the model
- * return true if all passed
- *
- * @return bool True if all properties are valid
- */
- public function valid()
- {
- return count($this->listInvalidProperties()) === 0;
- }
- /**
- * Gets run_id
- *
- * @return string|null
- */
- public function getRunId()
- {
- return $this->container['run_id'];
- }
- /**
- * Sets run_id
- *
- * @param string|null $run_id run_id
- *
- * @return self
- */
- public function setRunId($run_id)
- {
- if (is_null($run_id)) {
- throw new \InvalidArgumentException('non-nullable run_id cannot be null');
- }
- $this->container['run_id'] = $run_id;
- return $this;
- }
- /**
- * Gets thread_id
- *
- * @return string|null
- */
- public function getThreadId()
- {
- return $this->container['thread_id'];
- }
- /**
- * Sets thread_id
- *
- * @param string|null $thread_id thread_id
- *
- * @return self
- */
- public function setThreadId($thread_id)
- {
- if (is_null($thread_id)) {
- array_push($this->openAPINullablesSetToNull, 'thread_id');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('thread_id', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['thread_id'] = $thread_id;
- return $this;
- }
- /**
- * Gets thread_title
- *
- * @return string|null
- */
- public function getThreadTitle()
- {
- return $this->container['thread_title'];
- }
- /**
- * Sets thread_title
- *
- * @param string|null $thread_title thread_title
- *
- * @return self
- */
- public function setThreadTitle($thread_title)
- {
- if (is_null($thread_title)) {
- array_push($this->openAPINullablesSetToNull, 'thread_title');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('thread_title', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['thread_title'] = $thread_title;
- return $this;
- }
- /**
- * Gets account_type
- *
- * @return string|null
- */
- public function getAccountType()
- {
- return $this->container['account_type'];
- }
- /**
- * Sets account_type
- *
- * @param string|null $account_type account_type
- *
- * @return self
- */
- public function setAccountType($account_type)
- {
- if (is_null($account_type)) {
- throw new \InvalidArgumentException('non-nullable account_type cannot be null');
- }
- $this->container['account_type'] = $account_type;
- return $this;
- }
- /**
- * Gets user
- *
- * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null
- */
- public function getUser()
- {
- return $this->container['user'];
- }
- /**
- * Sets user
- *
- * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerUser|null $user user
- *
- * @return self
- */
- public function setUser($user)
- {
- if (is_null($user)) {
- array_push($this->openAPINullablesSetToNull, 'user');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('user', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['user'] = $user;
- return $this;
- }
- /**
- * Gets device_id
- *
- * @return string|null
- */
- public function getDeviceId()
- {
- return $this->container['device_id'];
- }
- /**
- * Sets device_id
- *
- * @param string|null $device_id device_id
- *
- * @return self
- */
- public function setDeviceId($device_id)
- {
- if (is_null($device_id)) {
- array_push($this->openAPINullablesSetToNull, 'device_id');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('device_id', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['device_id'] = $device_id;
- return $this;
- }
- /**
- * Gets client_ip
- *
- * @return string|null
- */
- public function getClientIp()
- {
- return $this->container['client_ip'];
- }
- /**
- * Sets client_ip
- *
- * @param string|null $client_ip client_ip
- *
- * @return self
- */
- public function setClientIp($client_ip)
- {
- if (is_null($client_ip)) {
- array_push($this->openAPINullablesSetToNull, 'client_ip');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('client_ip', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['client_ip'] = $client_ip;
- return $this;
- }
- /**
- * Gets client
- *
- * @return string|null
- */
- public function getClient()
- {
- return $this->container['client'];
- }
- /**
- * Sets client
- *
- * @param string|null $client client
- *
- * @return self
- */
- public function setClient($client)
- {
- if (is_null($client)) {
- array_push($this->openAPINullablesSetToNull, 'client');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('client', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['client'] = $client;
- return $this;
- }
- /**
- * Gets app_version
- *
- * @return string|null
- */
- public function getAppVersion()
- {
- return $this->container['app_version'];
- }
- /**
- * Sets app_version
- *
- * @param string|null $app_version app_version
- *
- * @return self
- */
- public function setAppVersion($app_version)
- {
- if (is_null($app_version)) {
- array_push($this->openAPINullablesSetToNull, 'app_version');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('app_version', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['app_version'] = $app_version;
- return $this;
- }
- /**
- * Gets question
- *
- * @return string|null
- */
- public function getQuestion()
- {
- return $this->container['question'];
- }
- /**
- * Sets question
- *
- * @param string|null $question question
- *
- * @return self
- */
- public function setQuestion($question)
- {
- if (is_null($question)) {
- throw new \InvalidArgumentException('non-nullable question cannot be null');
- }
- $this->container['question'] = $question;
- return $this;
- }
- /**
- * Gets route
- *
- * @return string|null
- */
- public function getRoute()
- {
- return $this->container['route'];
- }
- /**
- * Sets route
- *
- * @param string|null $route route
- *
- * @return self
- */
- public function setRoute($route)
- {
- if (is_null($route)) {
- array_push($this->openAPINullablesSetToNull, 'route');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('route', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['route'] = $route;
- return $this;
- }
- /**
- * Gets deep
- *
- * @return bool|null
- */
- public function getDeep()
- {
- return $this->container['deep'];
- }
- /**
- * Sets deep
- *
- * @param bool|null $deep deep
- *
- * @return self
- */
- public function setDeep($deep)
- {
- if (is_null($deep)) {
- throw new \InvalidArgumentException('non-nullable deep cannot be null');
- }
- $this->container['deep'] = $deep;
- return $this;
- }
- /**
- * Gets improve
- *
- * @return bool|null
- */
- public function getImprove()
- {
- return $this->container['improve'];
- }
- /**
- * Sets improve
- *
- * @param bool|null $improve improve
- *
- * @return self
- */
- public function setImprove($improve)
- {
- if (is_null($improve)) {
- throw new \InvalidArgumentException('non-nullable improve cannot be null');
- }
- $this->container['improve'] = $improve;
- return $this;
- }
- /**
- * Gets status
- *
- * @return string|null
- */
- public function getStatus()
- {
- return $this->container['status'];
- }
- /**
- * Sets status
- *
- * @param string|null $status status
- *
- * @return self
- */
- public function setStatus($status)
- {
- if (is_null($status)) {
- throw new \InvalidArgumentException('non-nullable status cannot be null');
- }
- $this->container['status'] = $status;
- return $this;
- }
- /**
- * Gets latency_ms
- *
- * @return int|null
- */
- public function getLatencyMs()
- {
- return $this->container['latency_ms'];
- }
- /**
- * Sets latency_ms
- *
- * @param int|null $latency_ms latency_ms
- *
- * @return self
- */
- public function setLatencyMs($latency_ms)
- {
- if (is_null($latency_ms)) {
- array_push($this->openAPINullablesSetToNull, 'latency_ms');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('latency_ms', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['latency_ms'] = $latency_ms;
- return $this;
- }
- /**
- * Gets tokens_in
- *
- * @return int|null
- */
- public function getTokensIn()
- {
- return $this->container['tokens_in'];
- }
- /**
- * Sets tokens_in
- *
- * @param int|null $tokens_in tokens_in
- *
- * @return self
- */
- public function setTokensIn($tokens_in)
- {
- if (is_null($tokens_in)) {
- array_push($this->openAPINullablesSetToNull, 'tokens_in');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('tokens_in', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['tokens_in'] = $tokens_in;
- return $this;
- }
- /**
- * Gets tokens_out
- *
- * @return int|null
- */
- public function getTokensOut()
- {
- return $this->container['tokens_out'];
- }
- /**
- * Sets tokens_out
- *
- * @param int|null $tokens_out tokens_out
- *
- * @return self
- */
- public function setTokensOut($tokens_out)
- {
- if (is_null($tokens_out)) {
- array_push($this->openAPINullablesSetToNull, 'tokens_out');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('tokens_out', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['tokens_out'] = $tokens_out;
- return $this;
- }
- /**
- * Gets llm_calls
- *
- * @return int|null
- */
- public function getLlmCalls()
- {
- return $this->container['llm_calls'];
- }
- /**
- * Sets llm_calls
- *
- * @param int|null $llm_calls llm_calls
- *
- * @return self
- */
- public function setLlmCalls($llm_calls)
- {
- if (is_null($llm_calls)) {
- throw new \InvalidArgumentException('non-nullable llm_calls cannot be null');
- }
- $this->container['llm_calls'] = $llm_calls;
- return $this;
- }
- /**
- * Gets tool_calls
- *
- * @return int|null
- */
- public function getToolCalls()
- {
- return $this->container['tool_calls'];
- }
- /**
- * Sets tool_calls
- *
- * @param int|null $tool_calls tool_calls
- *
- * @return self
- */
- public function setToolCalls($tool_calls)
- {
- if (is_null($tool_calls)) {
- throw new \InvalidArgumentException('non-nullable tool_calls cannot be null');
- }
- $this->container['tool_calls'] = $tool_calls;
- return $this;
- }
- /**
- * Gets started_at
- *
- * @return string|null
- */
- public function getStartedAt()
- {
- return $this->container['started_at'];
- }
- /**
- * Sets started_at
- *
- * @param string|null $started_at started_at
- *
- * @return self
- */
- public function setStartedAt($started_at)
- {
- if (is_null($started_at)) {
- array_push($this->openAPINullablesSetToNull, 'started_at');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('started_at', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['started_at'] = $started_at;
- return $this;
- }
- /**
- * Gets answer
- *
- * @return string|null
- */
- public function getAnswer()
- {
- return $this->container['answer'];
- }
- /**
- * Sets answer
- *
- * @param string|null $answer 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setAnswer($answer)
- {
- if (is_null($answer)) {
- array_push($this->openAPINullablesSetToNull, 'answer');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('answer', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['answer'] = $answer;
- return $this;
- }
- /**
- * Gets evidence
- *
- * @return string|null
- */
- public function getEvidence()
- {
- return $this->container['evidence'];
- }
- /**
- * Sets evidence
- *
- * @param string|null $evidence 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setEvidence($evidence)
- {
- if (is_null($evidence)) {
- array_push($this->openAPINullablesSetToNull, 'evidence');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('evidence', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['evidence'] = $evidence;
- return $this;
- }
- /**
- * Gets plan
- *
- * @return object|null
- */
- public function getPlan()
- {
- return $this->container['plan'];
- }
- /**
- * Sets plan
- *
- * @param object|null $plan 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setPlan($plan)
- {
- if (is_null($plan)) {
- array_push($this->openAPINullablesSetToNull, 'plan');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('plan', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['plan'] = $plan;
- return $this;
- }
- /**
- * Gets passage
- *
- * @return object|null
- */
- public function getPassage()
- {
- return $this->container['passage'];
- }
- /**
- * Sets passage
- *
- * @param object|null $passage 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setPassage($passage)
- {
- if (is_null($passage)) {
- array_push($this->openAPINullablesSetToNull, 'passage');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('passage', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['passage'] = $passage;
- return $this;
- }
- /**
- * Gets citations
- *
- * @return object[]|null
- */
- public function getCitations()
- {
- return $this->container['citations'];
- }
- /**
- * Sets citations
- *
- * @param object[]|null $citations 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setCitations($citations)
- {
- if (is_null($citations)) {
- array_push($this->openAPINullablesSetToNull, 'citations');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('citations', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['citations'] = $citations;
- return $this;
- }
- /**
- * Gets error
- *
- * @return string|null
- */
- public function getError()
- {
- return $this->container['error'];
- }
- /**
- * Sets error
- *
- * @param string|null $error 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setError($error)
- {
- if (is_null($error)) {
- array_push($this->openAPINullablesSetToNull, 'error');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('error', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['error'] = $error;
- return $this;
- }
- /**
- * Gets model
- *
- * @return string|null
- */
- public function getModel()
- {
- return $this->container['model'];
- }
- /**
- * Sets model
- *
- * @param string|null $model 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setModel($model)
- {
- if (is_null($model)) {
- array_push($this->openAPINullablesSetToNull, 'model');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('model', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['model'] = $model;
- return $this;
- }
- /**
- * Gets prompt_version
- *
- * @return string|null
- */
- public function getPromptVersion()
- {
- return $this->container['prompt_version'];
- }
- /**
- * Sets prompt_version
- *
- * @param string|null $prompt_version 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setPromptVersion($prompt_version)
- {
- if (is_null($prompt_version)) {
- array_push($this->openAPINullablesSetToNull, 'prompt_version');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('prompt_version', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
- $this->container['prompt_version'] = $prompt_version;
- return $this;
- }
- /**
- * Gets steps
- *
- * @return \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]|null
- */
- public function getSteps()
- {
- return $this->container['steps'];
- }
- /**
- * Sets steps
- *
- * @param \WikipaliApi\Model\GetApiV3AdminAgentRuns200ResponseDataInnerStepsInner[]|null $steps 仅在部分查询口径下返回。
- *
- * @return self
- */
- public function setSteps($steps)
- {
- if (is_null($steps)) {
- throw new \InvalidArgumentException('non-nullable steps cannot be null');
- }
- $this->container['steps'] = $steps;
- return $this;
- }
- /**
- * Returns true if offset exists. False otherwise.
- *
- * @param integer|string $offset Offset
- *
- * @return boolean
- */
- public function offsetExists(mixed $offset): bool
- {
- return isset($this->container[$offset]);
- }
- /**
- * Gets offset.
- *
- * @param integer|string $offset Offset
- *
- * @return mixed|null
- */
- #[\ReturnTypeWillChange]
- public function offsetGet(mixed $offset)
- {
- return $this->container[$offset] ?? null;
- }
- /**
- * Sets value based on offset.
- *
- * @param int|null $offset Offset
- * @param mixed $value Value to be set
- *
- * @return void
- */
- public function offsetSet($offset, $value): void
- {
- if (is_null($offset)) {
- $this->container[] = $value;
- } else {
- $this->container[$offset] = $value;
- }
- }
- /**
- * Unsets offset.
- *
- * @param integer|string $offset Offset
- *
- * @return void
- */
- public function offsetUnset(mixed $offset): void
- {
- unset($this->container[$offset]);
- }
- /**
- * Serializes the object to a value that can be serialized natively by json_encode().
- * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
- *
- * @return mixed Returns data which can be serialized by json_encode(), which is a value
- * of any type other than a resource.
- */
- #[\ReturnTypeWillChange]
- public function jsonSerialize()
- {
- return ObjectSerializer::sanitizeForSerialization($this);
- }
- /**
- * Gets the string presentation of the object
- *
- * @return string
- */
- public function __toString()
- {
- return json_encode(
- ObjectSerializer::sanitizeForSerialization($this),
- JSON_PRETTY_PRINT
- );
- }
- /**
- * Gets a header-safe presentation of the object
- *
- * @return string
- */
- public function toHeaderValue()
- {
- return json_encode(ObjectSerializer::sanitizeForSerialization($this));
- }
- }
|