*/ 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 * @psalm-var array */ 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)); } }