Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061<?php
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\External;
use SocialDept\AtpSchema\Data\Data;
/** * GENERATED CODE - DO NOT EDIT * * Lexicon: app.bsky.embed.external.viewExternal * Type: object * * @property string $uri * @property string $title * @property string $description * @property string|null $thumb * * Constraints: * - Required: uri, title, description * - uri: Format: uri * - thumb: Format: uri */class ViewExternal extends Data{ public function __construct( public readonly string $uri, public readonly string $title, public readonly string $description, public readonly ?string $thumb = null ) { }
/** * Get the lexicon NSID for this data type. * * @return string */ public static function getLexicon(): string { return 'app.bsky.embed.external.viewExternal'; }
/** * Create an instance from an array. * * @param array $data The data array * @return static */ public static function fromArray(array $data): static { return new static( uri: $data['uri'], title: $data['title'], description: $data['description'], thumb: $data['thumb'] ?? null ); }
}