Parse and validate AT Protocol Lexicons with DTO generation for Laravel
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 * Account credentials revocation by moderators. Only works on DID subjects.
11 *
12 * Lexicon: tools.ozone.moderation.defs.revokeAccountCredentialsEvent
13 * Type: object
14 *
15 * @property string $comment Comment describing the reason for the revocation.
16 *
17 * Constraints:
18 * - Required: comment
19 */
20class RevokeAccountCredentialsEvent extends Data
21{
22 /**
23 * @param string $comment Comment describing the reason for the revocation.
24 */
25 public function __construct(
26 public readonly string $comment
27 ) {
28 }
29
30 /**
31 * Get the lexicon NSID for this data type.
32 *
33 * @return string
34 */
35 public static function getLexicon(): string
36 {
37 return 'tools.ozone.moderation.defs.revokeAccountCredentialsEvent';
38 }
39
40
41 /**
42 * Create an instance from an array.
43 *
44 * @param array $data The data array
45 * @return static
46 */
47 public static function fromArray(array $data): static
48 {
49 return new static(
50 comment: $data['comment']
51 );
52 }
53
54}