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
OpenFGA\Models
UsersetUserInterface
JsonSerializable
ModelInterface
- UsersetUserInterface (interface)
Name | Value | Description |
---|---|---|
OPENAPI_MODEL |
UsersetUser |
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."
string
— The object identifier
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."
string
— The relation name
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."
string
— The object type
public function jsonSerialize(): array
array
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.
SchemaInterface
— The schema definition containing validation rules and property specifications for this model