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