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 * Age assurance status override by moderators. Only works on DID subjects.
11 *
12 * Lexicon: tools.ozone.moderation.defs.ageAssuranceOverrideEvent
13 * Type: object
14 *
15 * @property string $status The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.
16 * @property string $comment Comment describing the reason for the override.
17 *
18 * Constraints:
19 * - Required: comment, status
20 */
21class AgeAssuranceOverrideEvent extends Data
22{
23 /**
24 * @param string $status The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.
25 * @param string $comment Comment describing the reason for the override.
26 */
27 public function __construct(
28 public readonly string $status,
29 public readonly string $comment
30 ) {
31 }
32
33 /**
34 * Get the lexicon NSID for this data type.
35 *
36 * @return string
37 */
38 public static function getLexicon(): string
39 {
40 return 'tools.ozone.moderation.defs.ageAssuranceOverrideEvent';
41 }
42
43
44 /**
45 * Create an instance from an array.
46 *
47 * @param array $data The data array
48 * @return static
49 */
50 public static function fromArray(array $data): static
51 {
52 return new static(
53 status: $data['status'],
54 comment: $data['comment']
55 );
56 }
57
58}