Parse and validate AT Protocol Lexicons with DTO generation for Laravel
1<?php
2
3namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\External;
4
5use SocialDept\AtpSchema\Data\Data;
6
7/**
8 * GENERATED CODE - DO NOT EDIT
9 *
10 * Lexicon: app.bsky.embed.external.view
11 * Type: object
12 *
13 * @property mixed $external
14 *
15 * Constraints:
16 * - Required: external
17 */
18class View extends Data
19{
20 public function __construct(
21 public readonly mixed $external
22 ) {
23 }
24
25 /**
26 * Get the lexicon NSID for this data type.
27 *
28 * @return string
29 */
30 public static function getLexicon(): string
31 {
32 return 'app.bsky.embed.external.view';
33 }
34
35
36 /**
37 * Create an instance from an array.
38 *
39 * @param array $data The data array
40 * @return static
41 */
42 public static function fromArray(array $data): static
43 {
44 return new static(
45 external: $data['external']
46 );
47 }
48
49}