API Models BatchCheckSingleResult - evansims/openfga-php GitHub Wiki

Represents the result of a single check within a batch check response. Each result contains whether the check was allowed and any error information if the check failed to complete successfully.

Table of Contents


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Constants

Name Value Description
OPENAPI_MODEL BatchCheckSingleResult


Methods

getAllowed

public function getAllowed(): ?bool

Get whether this check was allowed. Returns true if the user has the specified relationship with the object, false if they don't, or null if the check encountered an error.

View source


Returns

bool | null


getError

public function getError(): ?object

Get any error that occurred during this check. Returns error information if the check failed to complete successfully, or null if the check completed without errors.

View source


Returns

object | null


jsonSerialize

public function jsonSerialize(): array<string, mixed>

View source


Returns

array&lt;string, mixed&gt;


schema

Implements Models\BatchCheckSingleResultInterface

public function schema(): SchemaInterface

Get the schema definition for this model. This method returns the schema that defines the structure, validation rules, and serialization behavior for this model class. The schema is used for data validation, transformation, and ensuring consistency across API operations with the OpenFGA service. Each model's schema defines: - Required and optional properties - Data types and format constraints - Nested object relationships - Validation rules and business logic constraints The schema system enables the SDK to automatically validate incoming data, transform between different representations, and ensure compliance with the OpenFGA API specification.

View source


Returns

SchemaInterface — The schema definition containing validation rules and property specifications for this model


toArray

public function toArray(): array<string, mixed>

View source


Returns

array&lt;string, mixed&gt;

⚠️ **GitHub.com Fallback** ⚠️