Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at main 52 lines 1.4 kB 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.modEventAcknowledge 11 * Type: object 12 * 13 * @property string|null $comment 14 * @property bool|null $acknowledgeAccountSubjects If true, all other reports on content authored by this account will be resolved (acknowledged). 15 */ 16class ModEventAcknowledge extends Data 17{ 18 /** 19 * @param bool|null $acknowledgeAccountSubjects If true, all other reports on content authored by this account will be resolved (acknowledged). 20 */ 21 public function __construct( 22 public readonly ?string $comment = null, 23 public readonly ?bool $acknowledgeAccountSubjects = null 24 ) { 25 } 26 27 /** 28 * Get the lexicon NSID for this data type. 29 * 30 * @return string 31 */ 32 public static function getLexicon(): string 33 { 34 return 'tools.ozone.moderation.defs.modEventAcknowledge'; 35 } 36 37 38 /** 39 * Create an instance from an array. 40 * 41 * @param array $data The data array 42 * @return static 43 */ 44 public static function fromArray(array $data): static 45 { 46 return new static( 47 comment: $data['comment'] ?? null, 48 acknowledgeAccountSubjects: $data['acknowledgeAccountSubjects'] ?? null 49 ); 50 } 51 52}