Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1<?php
2
3namespace SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs;
4
5use SocialDept\AtpSchema\Data\Data;
6
7/**
8 * GENERATED CODE - DO NOT EDIT
9 *
10 * indicates that a handle or DID could not be resolved
11 *
12 * Lexicon: app.bsky.graph.defs.notFoundActor
13 * Type: object
14 *
15 * @property string $actor
16 * @property bool $notFound
17 *
18 * Constraints:
19 * - Required: actor, notFound
20 * - actor: Format: at-identifier
21 * - notFound: Const: true
22 */
23class NotFoundActor extends Data
24{
25 public function __construct(
26 public readonly string $actor,
27 public readonly bool $notFound
28 ) {
29 }
30
31 /**
32 * Get the lexicon NSID for this data type.
33 *
34 * @return string
35 */
36 public static function getLexicon(): string
37 {
38 return 'app.bsky.graph.defs.notFoundActor';
39 }
40
41
42 /**
43 * Create an instance from an array.
44 *
45 * @param array $data The data array
46 * @return static
47 */
48 public static function fromArray(array $data): static
49 {
50 return new static(
51 actor: $data['actor'],
52 notFound: $data['notFound']
53 );
54 }
55
56}