API Models UsersListUser - evansims/openfga-php GitHub Wiki
Represents a user entry in a users list response. UsersListUser provides a simple wrapper around user identifiers returned from list operations. It ensures consistent representation of users in lists while providing convenient access to the user identifier string. Use this when working with user lists returned from OpenFGA queries or when you need a structured representation of user identifiers.
Table of Contents
OpenFGA\Models
UsersListUserInterface
Stringable
JsonSerializable
ModelInterface
- UsersListUserInterface (interface)
Name | Value | Description |
---|---|---|
OPENAPI_MODEL |
UsersListUser |
public function getUser(): string
Get the user identifier string. This returns the user identifier in the format expected by OpenFGA, typically "type:id" where type describes the kind of user and id is the unique identifier for that user.
string
— The user identifier string
public function jsonSerialize(): string
Serialize the user to its JSON representation. Returns the user identifier as a string for API serialization. This differs from most models which serialize to arrays.
string
— The user identifier string
Implements Models\UsersListUserInterface
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.
SchemaInterface
— The schema definition containing validation rules and property specifications for this model