Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
1.0 kB · 52 lines
PHP
at dev
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253<?php
namespace SocialDept\AtpSchema\Generated\Com\Atproto\Label\SubscribeLabels;
use SocialDept\AtpSchema\Data\Data;
/** * GENERATED CODE - DO NOT EDIT * * Lexicon: com.atproto.label.subscribeLabels.info * Type: object * * @property string $name * @property string|null $message * * Constraints: * - Required: name */class Info extends Data{ public function __construct( public readonly string $name, public readonly ?string $message = null ) { }
/** * Get the lexicon NSID for this data type. * * @return string */ public static function getLexicon(): string { return 'com.atproto.label.subscribeLabels.info'; }
/** * Create an instance from an array. * * @param array $data The data array * @return static */ public static function fromArray(array $data): static { return new static( name: $data['name'], message: $data['message'] ?? null ); }
}