API Models UsersetUser - evansims/openfga-php GitHub Wiki

Represents a user reference through a userset relationship. UsersetUser defines a user specification in the format "object#relation" where users are identified through their relationship to an object rather than direct user identifiers. This enables dynamic user groups based on relationships. Use this when you need to reference users through relationship-based groups rather than explicit user lists.

Table of Contents


Namespace

OpenFGA\Models


Source

View source code


Implements


Related Classes


Constants

Name Value Description
OPENAPI_MODEL UsersetUser


Methods

getId

public function getId(): string

Get the object identifier in the userset reference. This represents the specific object instance that the userset refers to. For example, in "group:eng#member," this would return "eng."

View source


Returns

string — The object identifier


getRelation

public function getRelation(): string

Get the relation name in the userset reference. This represents the specific relation on the referenced object that defines the userset. For example, in "group:eng#member," this would return "member."

View source


Returns

string — The relation name


getType

public function getType(): string

Get the object type in the userset reference. This represents the type of object that the userset refers to. For example, in "group:eng#member," this would return "group."

View source


Returns

string — The object type


jsonSerialize

public function jsonSerialize(): array

View source


Returns

array


schema

Implements Models\UsersetUserInterface

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

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