Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
1.7 kB · 71 lines
PHP
at dev
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172<?php
namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs;
use Carbon\Carbon;use SocialDept\AtpSchema\Data\Data;
/** * GENERATED CODE - DO NOT EDIT * * Lexicon: tools.ozone.moderation.defs.recordView * Type: object * * @property string $uri * @property string $cid * @property mixed $value * @property array<string> $blobCids * @property Carbon $indexedAt * @property mixed $moderation * @property mixed $repo * * Constraints: * - Required: uri, cid, value, blobCids, indexedAt, moderation, repo * - uri: Format: at-uri * - cid: Format: cid * - indexedAt: Format: datetime */class RecordView extends Data{ public function __construct( public readonly string $uri, public readonly string $cid, public readonly mixed $value, public readonly array $blobCids, public readonly Carbon $indexedAt, public readonly mixed $moderation, public readonly mixed $repo ) { }
/** * Get the lexicon NSID for this data type. * * @return string */ public static function getLexicon(): string { return 'tools.ozone.moderation.defs.recordView'; }
/** * 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'], cid: $data['cid'], value: $data['value'], blobCids: $data['blobCids'], indexedAt: Carbon::parse($data['indexedAt']), moderation: $data['moderation'], repo: $data['repo'] ); }
}