Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at main 79 lines 3.2 kB view raw
1<?php 2 3namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs; 4 5use SocialDept\AtpSchema\Data\Data; 6 7/** 8 * GENERATED CODE - DO NOT EDIT 9 * 10 * Statistics about a set of record subject items 11 * 12 * Lexicon: tools.ozone.moderation.defs.recordsStats 13 * Type: object 14 * 15 * @property int|null $totalReports Cumulative sum of the number of reports on the items in the set 16 * @property int|null $reportedCount Number of items that were reported at least once 17 * @property int|null $escalatedCount Number of items that were escalated at least once 18 * @property int|null $appealedCount Number of items that were appealed at least once 19 * @property int|null $subjectCount Total number of item in the set 20 * @property int|null $pendingCount Number of item currently in "reviewOpen" or "reviewEscalated" state 21 * @property int|null $processedCount Number of item currently in "reviewNone" or "reviewClosed" state 22 * @property int|null $takendownCount Number of item currently taken down 23 */ 24class RecordsStats extends Data 25{ 26 /** 27 * @param int|null $totalReports Cumulative sum of the number of reports on the items in the set 28 * @param int|null $reportedCount Number of items that were reported at least once 29 * @param int|null $escalatedCount Number of items that were escalated at least once 30 * @param int|null $appealedCount Number of items that were appealed at least once 31 * @param int|null $subjectCount Total number of item in the set 32 * @param int|null $pendingCount Number of item currently in "reviewOpen" or "reviewEscalated" state 33 * @param int|null $processedCount Number of item currently in "reviewNone" or "reviewClosed" state 34 * @param int|null $takendownCount Number of item currently taken down 35 */ 36 public function __construct( 37 public readonly ?int $totalReports = null, 38 public readonly ?int $reportedCount = null, 39 public readonly ?int $escalatedCount = null, 40 public readonly ?int $appealedCount = null, 41 public readonly ?int $subjectCount = null, 42 public readonly ?int $pendingCount = null, 43 public readonly ?int $processedCount = null, 44 public readonly ?int $takendownCount = null 45 ) { 46 } 47 48 /** 49 * Get the lexicon NSID for this data type. 50 * 51 * @return string 52 */ 53 public static function getLexicon(): string 54 { 55 return 'tools.ozone.moderation.defs.recordsStats'; 56 } 57 58 59 /** 60 * Create an instance from an array. 61 * 62 * @param array $data The data array 63 * @return static 64 */ 65 public static function fromArray(array $data): static 66 { 67 return new static( 68 totalReports: $data['totalReports'] ?? null, 69 reportedCount: $data['reportedCount'] ?? null, 70 escalatedCount: $data['escalatedCount'] ?? null, 71 appealedCount: $data['appealedCount'] ?? null, 72 subjectCount: $data['subjectCount'] ?? null, 73 pendingCount: $data['pendingCount'] ?? null, 74 processedCount: $data['processedCount'] ?? null, 75 takendownCount: $data['takendownCount'] ?? null 76 ); 77 } 78 79}