Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1<?php
2
3namespace SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\CreateReport;
4
5use SocialDept\AtpSchema\Data\Data;
6
7/**
8 * GENERATED CODE - DO NOT EDIT
9 *
10 * Moderation tool information for tracing the source of the action
11 *
12 * Lexicon: com.atproto.moderation.createReport.modTool
13 * Type: object
14 *
15 * @property string $name Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')
16 * @property mixed $meta Additional arbitrary metadata about the source
17 *
18 * Constraints:
19 * - Required: name
20 */
21class ModTool extends Data
22{
23 /**
24 * @param string $name Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')
25 * @param mixed $meta Additional arbitrary metadata about the source
26 */
27 public function __construct(
28 public readonly string $name,
29 public readonly mixed $meta = null
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 'com.atproto.moderation.createReport.modTool';
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 name: $data['name'],
54 meta: $data['meta'] ?? null
55 );
56 }
57
58}