AIMessageResult
in package
implements
ModelInterface, ArrayAccess, JsonSerializable
AIMessageResult Class Doc Comment
Tags
Interfaces, Classes, Traits and Enums
- ModelInterface
- Interface abstracting model access.
- ArrayAccess
- JsonSerializable
Table of Contents
- ASSERTION_STATUS_FAIL = 'FAIL'
- ASSERTION_STATUS_INCONCLUSIVE = 'INCONCLUSIVE'
- ASSERTION_STATUS_PASS = 'PASS'
- DISCRIMINATOR = null
- STATUS_CANDIDATE_LIMIT = 'CANDIDATE_LIMIT'
- STATUS_EXTRACTED = 'EXTRACTED'
- STATUS_FAIL = 'FAIL'
- STATUS_INCONCLUSIVE = 'INCONCLUSIVE'
- STATUS_INVALID_OUTPUT = 'INVALID_OUTPUT'
- STATUS_MATCHED = 'MATCHED'
- STATUS_PASS = 'PASS'
- STATUS_PROVIDER_ERROR = 'PROVIDER_ERROR'
- STATUS_PROVIDER_TIMEOUT = 'PROVIDER_TIMEOUT'
- STATUS_TIMED_OUT = 'TIMED_OUT'
- STATUS_TOKEN_LIMIT = 'TOKEN_LIMIT'
- $attributeMap : array<string|int, string>
- Array of attributes where the key is the local name, and the value is the original name
- $container : array<string|int, mixed>
- Associative array for storing property values
- $getters : array<string|int, string>
- Array of attributes to getter functions (for serialization of requests)
- $openAPIFormats : array<string|int, string>
- Array of property to format mappings. Used for (de)serialization
- $openAPIModelName : string
- The original name of the model.
- $openAPINullables : array<string|int, mixed>
- Array of nullable properties. Used for (de)serialization
- $openAPINullablesSetToNull : array<string|int, mixed>
- If a nullable field gets set to null, insert it here
- $openAPITypes : array<string|int, string>
- Array of property to type mappings. Used for (de)serialization
- $setters : array<string|int, string>
- Array of attributes to setter functions (for deserialization of responses)
- __construct() : mixed
- Constructor
- __toString() : string
- Gets the string presentation of the object
- attributeMap() : array<string|int, mixed>
- Array of attributes where the key is the local name, and the value is the original name
- getAssertions() : array<string|int, AIMessageAssertionResult>
- Gets assertions
- getAssertionStatus() : string|null
- Gets assertion_status
- getAssertionStatusAllowableValues() : array<string|int, string>
- Gets allowable values of the enum
- getCandidates() : array<string|int, AIMessageCandidateResult>
- Gets candidates
- getData() : object|null
- Gets data
- getElapsedMs() : int
- Gets elapsed_ms
- getEmail() : AIMessageResultEmail|null
- Gets email
- getEvaluationId() : string
- Gets evaluation_id
- getExtractionEvidence() : array<string, array<string|int, AIMessageEvidence>>
- Gets extraction_evidence
- getExtractionReason() : string|null
- Gets extraction_reason
- getFailedAssertionIds() : array<string|int, string>
- Gets failed_assertion_ids
- getMatch() : AIMessageResultMatch|null
- Gets match
- getMessage() : AIMessageResultMessage|null
- Gets message
- getModel() : AIMessageModelDto
- Gets model
- getModelName() : string
- The original name of the model.
- getSms() : AIMessageResultSms|null
- Gets sms
- getStatus() : string
- Gets status
- getStatusAllowableValues() : array<string|int, string>
- Gets allowable values of the enum
- getSuccessful() : bool
- Gets successful
- getSummary() : string
- Gets summary
- getters() : array<string|int, mixed>
- Array of attributes to getter functions (for serialization of requests)
- getUsage() : AIMessageUsage
- Gets usage
- isNullable() : bool
- Checks if a property is nullable
- isNullableSetToNull() : bool
- Checks if a nullable property is set to null.
- jsonSerialize() : mixed
- Serializes the object to a value that can be serialized natively by json_encode().
- listInvalidProperties() : array<string|int, mixed>
- Show all the invalid properties with reasons.
- offsetExists() : bool
- Returns true if offset exists. False otherwise.
- offsetGet() : mixed|null
- Gets offset.
- offsetSet() : void
- Sets value based on offset.
- offsetUnset() : void
- Unsets offset.
- openAPIFormats() : array<string|int, mixed>
- Array of property to format mappings. Used for (de)serialization
- openAPITypes() : array<string|int, mixed>
- Array of property to type mappings. Used for (de)serialization
- setAssertions() : self
- Sets assertions
- setAssertionStatus() : self
- Sets assertion_status
- setCandidates() : self
- Sets candidates
- setData() : self
- Sets data
- setElapsedMs() : self
- Sets elapsed_ms
- setEmail() : self
- Sets email
- setEvaluationId() : self
- Sets evaluation_id
- setExtractionEvidence() : self
- Sets extraction_evidence
- setExtractionReason() : self
- Sets extraction_reason
- setFailedAssertionIds() : self
- Sets failed_assertion_ids
- setMatch() : self
- Sets match
- setMessage() : self
- Sets message
- setModel() : self
- Sets model
- setSms() : self
- Sets sms
- setStatus() : self
- Sets status
- setSuccessful() : self
- Sets successful
- setSummary() : self
- Sets summary
- setters() : array<string|int, mixed>
- Array of attributes to setter functions (for deserialization of responses)
- setUsage() : self
- Sets usage
- toHeaderValue() : string
- Gets a header-safe presentation of the object
- valid() : bool
- Validate all the properties in the model return true if all passed
- openAPINullables() : array<string|int, mixed>
- Array of nullable properties
- getOpenAPINullablesSetToNull() : array<string|int, bool>
- Array of nullable field names deliberately set to null
- setIfExists() : void
- 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
- setOpenAPINullablesSetToNull() : void
- Setter - Array of nullable field names deliberately set to null
Constants
ASSERTION_STATUS_FAIL
public
mixed
ASSERTION_STATUS_FAIL
= 'FAIL'
ASSERTION_STATUS_INCONCLUSIVE
public
mixed
ASSERTION_STATUS_INCONCLUSIVE
= 'INCONCLUSIVE'
ASSERTION_STATUS_PASS
public
mixed
ASSERTION_STATUS_PASS
= 'PASS'
DISCRIMINATOR
public
mixed
DISCRIMINATOR
= null
STATUS_CANDIDATE_LIMIT
public
mixed
STATUS_CANDIDATE_LIMIT
= 'CANDIDATE_LIMIT'
STATUS_EXTRACTED
public
mixed
STATUS_EXTRACTED
= 'EXTRACTED'
STATUS_FAIL
public
mixed
STATUS_FAIL
= 'FAIL'
STATUS_INCONCLUSIVE
public
mixed
STATUS_INCONCLUSIVE
= 'INCONCLUSIVE'
STATUS_INVALID_OUTPUT
public
mixed
STATUS_INVALID_OUTPUT
= 'INVALID_OUTPUT'
STATUS_MATCHED
public
mixed
STATUS_MATCHED
= 'MATCHED'
STATUS_PASS
public
mixed
STATUS_PASS
= 'PASS'
STATUS_PROVIDER_ERROR
public
mixed
STATUS_PROVIDER_ERROR
= 'PROVIDER_ERROR'
STATUS_PROVIDER_TIMEOUT
public
mixed
STATUS_PROVIDER_TIMEOUT
= 'PROVIDER_TIMEOUT'
STATUS_TIMED_OUT
public
mixed
STATUS_TIMED_OUT
= 'TIMED_OUT'
STATUS_TOKEN_LIMIT
public
mixed
STATUS_TOKEN_LIMIT
= 'TOKEN_LIMIT'
Properties
$attributeMap
Array of attributes where the key is the local name, and the value is the original name
protected
static array<string|int, string>
$attributeMap
= ['evaluation_id' => 'evaluationId', 'status' => 'status', 'summary' => 'summary', 'model' => 'model', 'usage' => 'usage', 'elapsed_ms' => 'elapsedMs', 'message' => 'message', 'email' => 'email', 'sms' => 'sms', 'match' => 'match', 'assertion_status' => 'assertionStatus', 'assertions' => 'assertions', 'data' => 'data', 'extraction_evidence' => 'extractionEvidence', 'candidates' => 'candidates', 'extraction_reason' => 'extractionReason', 'successful' => 'successful', 'failed_assertion_ids' => 'failedAssertionIds']
$container
Associative array for storing property values
protected
array<string|int, mixed>
$container
= []
$getters
Array of attributes to getter functions (for serialization of requests)
protected
static array<string|int, string>
$getters
= ['evaluation_id' => 'getEvaluationId', 'status' => 'getStatus', 'summary' => 'getSummary', 'model' => 'getModel', 'usage' => 'getUsage', 'elapsed_ms' => 'getElapsedMs', 'message' => 'getMessage', 'email' => 'getEmail', 'sms' => 'getSms', 'match' => 'getMatch', 'assertion_status' => 'getAssertionStatus', 'assertions' => 'getAssertions', 'data' => 'getData', 'extraction_evidence' => 'getExtractionEvidence', 'candidates' => 'getCandidates', 'extraction_reason' => 'getExtractionReason', 'successful' => 'getSuccessful', 'failed_assertion_ids' => 'getFailedAssertionIds']
$openAPIFormats
Array of property to format mappings. Used for (de)serialization
protected
static array<string|int, string>
$openAPIFormats
= ['evaluation_id' => 'uuid', 'status' => null, 'summary' => null, 'model' => null, 'usage' => null, 'elapsed_ms' => 'int64', 'message' => null, 'email' => null, 'sms' => null, 'match' => null, 'assertion_status' => null, 'assertions' => null, 'data' => null, 'extraction_evidence' => null, 'candidates' => null, 'extraction_reason' => null, 'successful' => null, 'failed_assertion_ids' => null]
Tags
$openAPIModelName
The original name of the model.
protected
static string
$openAPIModelName
= 'AIMessageResult'
$openAPINullables
Array of nullable properties. Used for (de)serialization
protected
static array<string|int, mixed>
$openAPINullables
= ['evaluation_id' => false, 'status' => false, 'summary' => false, 'model' => false, 'usage' => false, 'elapsed_ms' => false, 'message' => true, 'email' => true, 'sms' => true, 'match' => true, 'assertion_status' => true, 'assertions' => false, 'data' => true, 'extraction_evidence' => false, 'candidates' => false, 'extraction_reason' => true, 'successful' => false, 'failed_assertion_ids' => false]
$openAPINullablesSetToNull
If a nullable field gets set to null, insert it here
protected
array<string|int, mixed>
$openAPINullablesSetToNull
= []
$openAPITypes
Array of property to type mappings. Used for (de)serialization
protected
static array<string|int, string>
$openAPITypes
= ['evaluation_id' => 'string', 'status' => 'string', 'summary' => 'string', 'model' => '\\MailSlurp\\Models\\AIMessageModelDto', 'usage' => '\\MailSlurp\\Models\\AIMessageUsage', 'elapsed_ms' => 'int', 'message' => '\\MailSlurp\\Models\\AIMessageResultMessage', 'email' => '\\MailSlurp\\Models\\AIMessageResultEmail', 'sms' => '\\MailSlurp\\Models\\AIMessageResultSms', 'match' => '\\MailSlurp\\Models\\AIMessageResultMatch', 'assertion_status' => 'string', 'assertions' => '\\MailSlurp\\Models\\AIMessageAssertionResult[]', 'data' => 'object', 'extraction_evidence' => 'array<string,\\MailSlurp\\Models\\AIMessageEvidence[]>', 'candidates' => '\\MailSlurp\\Models\\AIMessageCandidateResult[]', 'extraction_reason' => 'string', 'successful' => 'bool', 'failed_assertion_ids' => 'string[]']
$setters
Array of attributes to setter functions (for deserialization of responses)
protected
static array<string|int, string>
$setters
= ['evaluation_id' => 'setEvaluationId', 'status' => 'setStatus', 'summary' => 'setSummary', 'model' => 'setModel', 'usage' => 'setUsage', 'elapsed_ms' => 'setElapsedMs', 'message' => 'setMessage', 'email' => 'setEmail', 'sms' => 'setSms', 'match' => 'setMatch', 'assertion_status' => 'setAssertionStatus', 'assertions' => 'setAssertions', 'data' => 'setData', 'extraction_evidence' => 'setExtractionEvidence', 'candidates' => 'setCandidates', 'extraction_reason' => 'setExtractionReason', 'successful' => 'setSuccessful', 'failed_assertion_ids' => 'setFailedAssertionIds']
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $data = null ]) : mixed
Parameters
- $data : array<string|int, mixed> = null
-
Associated array of property values initializing the model
Return values
mixed —__toString()
Gets the string presentation of the object
public
__toString() : string
Return values
string —attributeMap()
Array of attributes where the key is the local name, and the value is the original name
public
static attributeMap() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAssertions()
Gets assertions
public
getAssertions() : array<string|int, AIMessageAssertionResult>
Return values
array<string|int, AIMessageAssertionResult> —getAssertionStatus()
Gets assertion_status
public
getAssertionStatus() : string|null
Return values
string|null —getAssertionStatusAllowableValues()
Gets allowable values of the enum
public
getAssertionStatusAllowableValues() : array<string|int, string>
Return values
array<string|int, string> —getCandidates()
Gets candidates
public
getCandidates() : array<string|int, AIMessageCandidateResult>
Return values
array<string|int, AIMessageCandidateResult> —getData()
Gets data
public
getData() : object|null
Return values
object|null —getElapsedMs()
Gets elapsed_ms
public
getElapsedMs() : int
Return values
int —getEmail()
Gets email
public
getEmail() : AIMessageResultEmail|null
Return values
AIMessageResultEmail|null —getEvaluationId()
Gets evaluation_id
public
getEvaluationId() : string
Return values
string —getExtractionEvidence()
Gets extraction_evidence
public
getExtractionEvidence() : array<string, array<string|int, AIMessageEvidence>>
Return values
array<string, array<string|int, AIMessageEvidence>> —getExtractionReason()
Gets extraction_reason
public
getExtractionReason() : string|null
Return values
string|null —getFailedAssertionIds()
Gets failed_assertion_ids
public
getFailedAssertionIds() : array<string|int, string>
Return values
array<string|int, string> —getMatch()
Gets match
public
getMatch() : AIMessageResultMatch|null
Return values
AIMessageResultMatch|null —getMessage()
Gets message
public
getMessage() : AIMessageResultMessage|null
Return values
AIMessageResultMessage|null —getModel()
Gets model
public
getModel() : AIMessageModelDto
Return values
AIMessageModelDto —getModelName()
The original name of the model.
public
getModelName() : string
Return values
string —getSms()
Gets sms
public
getSms() : AIMessageResultSms|null
Return values
AIMessageResultSms|null —getStatus()
Gets status
public
getStatus() : string
Return values
string —getStatusAllowableValues()
Gets allowable values of the enum
public
getStatusAllowableValues() : array<string|int, string>
Return values
array<string|int, string> —getSuccessful()
Gets successful
public
getSuccessful() : bool
Return values
bool —getSummary()
Gets summary
public
getSummary() : string
Return values
string —getters()
Array of attributes to getter functions (for serialization of requests)
public
static getters() : array<string|int, mixed>
Return values
array<string|int, mixed> —getUsage()
Gets usage
public
getUsage() : AIMessageUsage
Return values
AIMessageUsage —isNullable()
Checks if a property is nullable
public
static isNullable(string $property) : bool
Parameters
- $property : string
Return values
bool —isNullableSetToNull()
Checks if a nullable property is set to null.
public
isNullableSetToNull(string $property) : bool
Parameters
- $property : string
Return values
bool —jsonSerialize()
Serializes the object to a value that can be serialized natively by json_encode().
public
jsonSerialize() : mixed
Tags
Return values
mixed —Returns data which can be serialized by json_encode(), which is a value of any type other than a resource.
listInvalidProperties()
Show all the invalid properties with reasons.
public
listInvalidProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —invalid properties with reasons
offsetExists()
Returns true if offset exists. False otherwise.
public
offsetExists(int $offset) : bool
Parameters
- $offset : int
-
Offset
Return values
bool —offsetGet()
Gets offset.
public
offsetGet(int $offset) : mixed|null
Parameters
- $offset : int
-
Offset
Return values
mixed|null —offsetSet()
Sets value based on offset.
public
offsetSet(int|null $offset, mixed $value) : void
Parameters
- $offset : int|null
-
Offset
- $value : mixed
-
Value to be set
Return values
void —offsetUnset()
Unsets offset.
public
offsetUnset(int $offset) : void
Parameters
- $offset : int
-
Offset
Return values
void —openAPIFormats()
Array of property to format mappings. Used for (de)serialization
public
static openAPIFormats() : array<string|int, mixed>
Return values
array<string|int, mixed> —openAPITypes()
Array of property to type mappings. Used for (de)serialization
public
static openAPITypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —setAssertions()
Sets assertions
public
setAssertions(array<string|int, AIMessageAssertionResult> $assertions) : self
Parameters
- $assertions : array<string|int, AIMessageAssertionResult>
-
assertions
Return values
self —setAssertionStatus()
Sets assertion_status
public
setAssertionStatus(string|null $assertion_status) : self
Parameters
- $assertion_status : string|null
-
assertion_status
Return values
self —setCandidates()
Sets candidates
public
setCandidates(array<string|int, AIMessageCandidateResult> $candidates) : self
Parameters
- $candidates : array<string|int, AIMessageCandidateResult>
-
candidates
Return values
self —setData()
Sets data
public
setData(object|null $data) : self
Parameters
- $data : object|null
-
Extracted JSON value conforming to the requested schema or extraction preset. Null when extraction is inconclusive or unavailable.
Return values
self —setElapsedMs()
Sets elapsed_ms
public
setElapsedMs(int $elapsed_ms) : self
Parameters
- $elapsed_ms : int
-
elapsed_ms
Return values
self —setEmail()
Sets email
public
setEmail(AIMessageResultEmail|null $email) : self
Parameters
- $email : AIMessageResultEmail|null
-
email
Return values
self —setEvaluationId()
Sets evaluation_id
public
setEvaluationId(string $evaluation_id) : self
Parameters
- $evaluation_id : string
-
evaluation_id
Return values
self —setExtractionEvidence()
Sets extraction_evidence
public
setExtractionEvidence(array<string, array<string|int, AIMessageEvidence>> $extraction_evidence) : self
Parameters
- $extraction_evidence : array<string, array<string|int, AIMessageEvidence>>
-
extraction_evidence
Return values
self —setExtractionReason()
Sets extraction_reason
public
setExtractionReason(string|null $extraction_reason) : self
Parameters
- $extraction_reason : string|null
-
Explanation when extraction is inconclusive. May contain a model-reported explanation of missing or ambiguous fields, or a server evidence-validation failure. Diagnostic text, not a stable machine-readable status.
Return values
self —setFailedAssertionIds()
Sets failed_assertion_ids
public
setFailedAssertionIds(array<string|int, string> $failed_assertion_ids) : self
Parameters
- $failed_assertion_ids : array<string|int, string>
-
failed_assertion_ids
Return values
self —setMatch()
Sets match
public
setMatch(AIMessageResultMatch|null $match) : self
Parameters
- $match : AIMessageResultMatch|null
-
match
Return values
self —setMessage()
Sets message
public
setMessage(AIMessageResultMessage|null $message) : self
Parameters
- $message : AIMessageResultMessage|null
-
message
Return values
self —setModel()
Sets model
public
setModel(AIMessageModelDto $model) : self
Parameters
- $model : AIMessageModelDto
-
model
Return values
self —setSms()
Sets sms
public
setSms(AIMessageResultSms|null $sms) : self
Parameters
- $sms : AIMessageResultSms|null
-
sms
Return values
self —setStatus()
Sets status
public
setStatus(string $status) : self
Parameters
- $status : string
-
status
Return values
self —setSuccessful()
Sets successful
public
setSuccessful(bool $successful) : self
Parameters
- $successful : bool
-
True only when all requested work succeeded. Assert this in tests and use summary as the assertion failure message.
Return values
self —setSummary()
Sets summary
public
setSummary(string $summary) : self
Parameters
- $summary : string
-
summary
Return values
self —setters()
Array of attributes to setter functions (for deserialization of responses)
public
static setters() : array<string|int, mixed>
Return values
array<string|int, mixed> —setUsage()
Sets usage
public
setUsage(AIMessageUsage $usage) : self
Parameters
- $usage : AIMessageUsage
-
usage
Return values
self —toHeaderValue()
Gets a header-safe presentation of the object
public
toHeaderValue() : string
Return values
string —valid()
Validate all the properties in the model return true if all passed
public
valid() : bool
Return values
bool —True if all properties are valid
openAPINullables()
Array of nullable properties
protected
static openAPINullables() : array<string|int, mixed>
Return values
array<string|int, mixed> —getOpenAPINullablesSetToNull()
Array of nullable field names deliberately set to null
private
getOpenAPINullablesSetToNull() : array<string|int, bool>
Return values
array<string|int, bool> —setIfExists()
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
private
setIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
- $variableName : string
- $fields : array<string|int, mixed>
- $defaultValue : mixed
Return values
void —setOpenAPINullablesSetToNull()
Setter - Array of nullable field names deliberately set to null
private
setOpenAPINullablesSetToNull(array<string|int, bool> $openAPINullablesSetToNull) : void
Parameters
- $openAPINullablesSetToNull : array<string|int, bool>