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 * Represents the verification information about the user this object is
11 * attached to.
12 *
13 * Lexicon: app.bsky.actor.defs.verificationState
14 * Type: object
15 *
16 * @property array $verifications All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.
17 * @property string $verifiedStatus The user's status as a verified account.
18 * @property string $trustedVerifierStatus The user's status as a trusted verifier.
19 *
20 * Constraints:
21 * - Required: verifications, verifiedStatus, trustedVerifierStatus
22 */
23class VerificationState extends Data
24{
25 /**
26 * @param array $verifications All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.
27 * @param string $verifiedStatus The user's status as a verified account.
28 * @param string $trustedVerifierStatus The user's status as a trusted verifier.
29 */
30 public function __construct(
31 public readonly array $verifications,
32 public readonly string $verifiedStatus,
33 public readonly string $trustedVerifierStatus
34 ) {
35 }
36
37 /**
38 * Get the lexicon NSID for this data type.
39 *
40 * @return string
41 */
42 public static function getLexicon(): string
43 {
44 return 'app.bsky.actor.defs.verificationState';
45 }
46
47
48 /**
49 * Create an instance from an array.
50 *
51 * @param array $data The data array
52 * @return static
53 */
54 public static function fromArray(array $data): static
55 {
56 return new static(
57 verifications: $data['verifications'] ?? [],
58 verifiedStatus: $data['verifiedStatus'],
59 trustedVerifierStatus: $data['trustedVerifierStatus']
60 );
61 }
62
63}