Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at main 46 lines 905 B view raw
1<?php 2 3namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs; 4 5use SocialDept\AtpSchema\Data\Data; 6 7/** 8 * GENERATED CODE - DO NOT EDIT 9 * 10 * Lexicon: tools.ozone.moderation.defs.moderation 11 * Type: object 12 * 13 * @property mixed $subjectStatus 14 */ 15class Moderation extends Data 16{ 17 public function __construct( 18 public readonly mixed $subjectStatus = null 19 ) { 20 } 21 22 /** 23 * Get the lexicon NSID for this data type. 24 * 25 * @return string 26 */ 27 public static function getLexicon(): string 28 { 29 return 'tools.ozone.moderation.defs.moderation'; 30 } 31 32 33 /** 34 * Create an instance from an array. 35 * 36 * @param array $data The data array 37 * @return static 38 */ 39 public static function fromArray(array $data): static 40 { 41 return new static( 42 subjectStatus: $data['subjectStatus'] ?? null 43 ); 44 } 45 46}