| Total Complexity | 6 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class WriteGeneratedFilePart extends TdFunction |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'writeGeneratedFilePart'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The identifier of the generation process. |
||
| 20 | */ |
||
| 21 | protected string $generationId; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The offset from which to write the data to the file. |
||
| 25 | */ |
||
| 26 | protected int $offset; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The data to write. |
||
| 30 | */ |
||
| 31 | protected string $data; |
||
| 32 | |||
| 33 | public function __construct(string $generationId, int $offset, string $data) |
||
| 38 | } |
||
| 39 | |||
| 40 | public static function fromArray(array $array): WriteGeneratedFilePart |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function typeSerialize(): array |
||
| 50 | { |
||
| 51 | return [ |
||
| 52 | '@type' => static::TYPE_NAME, |
||
| 53 | 'generation_id' => $this->generationId, |
||
| 54 | 'offset' => $this->offset, |
||
| 55 | 'data' => $this->data, |
||
| 56 | ]; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function getGenerationId(): string |
||
| 60 | { |
||
| 61 | return $this->generationId; |
||
| 62 | } |
||
| 63 | |||
| 64 | public function getOffset(): int |
||
| 67 | } |
||
| 68 | |||
| 69 | public function getData(): string |
||
| 74 |