Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at main 61 lines 1.6 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 * Lexicon: app.bsky.actor.defs.profileAssociated 11 * Type: object 12 * 13 * @property int|null $lists 14 * @property int|null $feedgens 15 * @property int|null $starterPacks 16 * @property bool|null $labeler 17 * @property mixed $chat 18 * @property mixed $activitySubscription 19 */ 20class ProfileAssociated extends Data 21{ 22 public function __construct( 23 public readonly ?int $lists = null, 24 public readonly ?int $feedgens = null, 25 public readonly ?int $starterPacks = null, 26 public readonly ?bool $labeler = null, 27 public readonly mixed $chat = null, 28 public readonly mixed $activitySubscription = null 29 ) { 30 } 31 32 /** 33 * Get the lexicon NSID for this data type. 34 * 35 * @return string 36 */ 37 public static function getLexicon(): string 38 { 39 return 'app.bsky.actor.defs.profileAssociated'; 40 } 41 42 43 /** 44 * Create an instance from an array. 45 * 46 * @param array $data The data array 47 * @return static 48 */ 49 public static function fromArray(array $data): static 50 { 51 return new static( 52 lists: $data['lists'] ?? null, 53 feedgens: $data['feedgens'] ?? null, 54 starterPacks: $data['starterPacks'] ?? null, 55 labeler: $data['labeler'] ?? null, 56 chat: $data['chat'] ?? null, 57 activitySubscription: $data['activitySubscription'] ?? null 58 ); 59 } 60 61}