| 1 |
<?php |
| 2 |
|
| 3 |
namespace Watchful\Model; |
| 4 |
|
| 5 |
use JsonSerializable; |
| 6 |
|
| 7 |
/** |
| 8 |
* @property bool $completed |
| 9 |
* @property mixed $resume_data |
| 10 |
*/ |
| 11 |
class UploadStep implements JsonSerializable |
| 12 |
{ |
| 13 |
/** @var bool */ |
| 14 |
public $completed = false; |
| 15 |
|
| 16 |
/** @var int */ |
| 17 |
public $current_offset = 0; |
| 18 |
|
| 19 |
/** @var int */ |
| 20 |
public $part_number = 0; |
| 21 |
|
| 22 |
/** @var int */ |
| 23 |
public $total_size = 0; |
| 24 |
|
| 25 |
/** @var int */ |
| 26 |
public $total_parts = 0; |
| 27 |
|
| 28 |
/** @var UploadPart[] */ |
| 29 |
public $parts = []; |
| 30 |
|
| 31 |
public function jsonSerialize(): array |
| 32 |
{ |
| 33 |
return [ |
| 34 |
'completed' => $this->completed, |
| 35 |
'current_offset' => $this->current_offset, |
| 36 |
'part_number' => $this->part_number, |
| 37 |
'total_size' => $this->total_size, |
| 38 |
'total_parts' => $this->total_parts, |
| 39 |
'parts' => $this->parts, |
| 40 |
]; |
| 41 |
} |
| 42 |
} |
| 43 |
|
| 44 |
|