Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at main 51 lines 1.2 kB view raw
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 * Preferences for how verified accounts appear in the app. 11 * 12 * Lexicon: app.bsky.actor.defs.verificationPrefs 13 * Type: object 14 * 15 * @property bool|null $hideBadges Hide the blue check badges for verified accounts and trusted verifiers. 16 */ 17class VerificationPrefs extends Data 18{ 19 /** 20 * @param bool|null $hideBadges Hide the blue check badges for verified accounts and trusted verifiers. 21 */ 22 public function __construct( 23 public readonly ?bool $hideBadges = null 24 ) { 25 } 26 27 /** 28 * Get the lexicon NSID for this data type. 29 * 30 * @return string 31 */ 32 public static function getLexicon(): string 33 { 34 return 'app.bsky.actor.defs.verificationPrefs'; 35 } 36 37 38 /** 39 * Create an instance from an array. 40 * 41 * @param array $data The data array 42 * @return static 43 */ 44 public static function fromArray(array $data): static 45 { 46 return new static( 47 hideBadges: $data['hideBadges'] ?? null 48 ); 49 } 50 51}