Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at main 50 lines 930 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.repoViewNotFound 11 * Type: object 12 * 13 * @property string $did 14 * 15 * Constraints: 16 * - Required: did 17 * - did: Format: did 18 */ 19class RepoViewNotFound extends Data 20{ 21 public function __construct( 22 public readonly string $did 23 ) { 24 } 25 26 /** 27 * Get the lexicon NSID for this data type. 28 * 29 * @return string 30 */ 31 public static function getLexicon(): string 32 { 33 return 'tools.ozone.moderation.defs.repoViewNotFound'; 34 } 35 36 37 /** 38 * Create an instance from an array. 39 * 40 * @param array $data The data array 41 * @return static 42 */ 43 public static function fromArray(array $data): static 44 { 45 return new static( 46 did: $data['did'] 47 ); 48 } 49 50}