diff --git a/freebox/api/v3/models/Freeplug/FreeplugNetwork.php b/freebox/api/v3/models/Freeplug/FreeplugNetwork.php index 427e163..467cad3 100644 --- a/freebox/api/v3/models/Freeplug/FreeplugNetwork.php +++ b/freebox/api/v3/models/Freeplug/FreeplugNetwork.php @@ -18,7 +18,7 @@ class FreeplugNetwork extends Model { * FreeplugNetwork constructor. * @param array $properties_x */ - public function __construct(array $properties_x){ + public function __construct( array $properties_x){ parent::__construct( $properties_x); $this->initPropertyArray( 'members', Freeplug::class); } diff --git a/freebox/api/v3/models/Storage/DiskPartition.php b/freebox/api/v3/models/Storage/DiskPartition.php new file mode 100644 index 0000000..018e8c5 --- /dev/null +++ b/freebox/api/v3/models/Storage/DiskPartition.php @@ -0,0 +1,159 @@ +initProperty( 'operation_pct', OperationProgress::class); + } + + /** + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * @return int + */ + public function getDiskId() { + return $this->disk_id; + } + + /** + * @return string + * @see symbols\Storage\DiskPartition\State + */ + public function getState() { + return $this->state; + } + + /** + * @param string $state + * @see symbols\Storage\DiskPartition\State + */ + public function setState( $state) { + $this->state = $state; + } + + /** + * @return string + * @see symbols\Storage\DiskPartition\FsType + */ + public function getFstype() { + return $this->fstype; + } + + /** + * @return string + */ + public function getLabel() { + return $this->label; + } + + /** + * @param string $label + */ + public function setLabel( $label) { + $this->label = $label; + } + + /** + * @return string + */ + public function getPath() { + return $this->path; + } + + /** + * @return int + */ + public function getTotalBytes() { + return $this->total_bytes; + } + + /** + * @return int + */ + public function getUsedBytes() { + return $this->used_bytes; + } + + /** + * @return int + */ + public function getFreeBytes() { + return $this->free_bytes; + } + + /** + * @return string + * @see symbols\Storage\DiskPartition\FsckResult + */ + public function getFsckResult() { + return $this->fsck_result; + } + + /** + * @return \alphayax\freebox\api\v3\models\Storage\OperationProgress + */ + public function getOperationPct() { + return $this->operation_pct; + } + +} diff --git a/freebox/api/v3/models/Storage/OperationProgress.php b/freebox/api/v3/models/Storage/OperationProgress.php new file mode 100644 index 0000000..3d11fd1 --- /dev/null +++ b/freebox/api/v3/models/Storage/OperationProgress.php @@ -0,0 +1,41 @@ +done_steps; + } + + /** + * @return int + */ + public function getMaxSteps() { + return $this->max_steps; + } + + /** + * @return int + */ + public function getPercent() { + return $this->percent; + } + +} diff --git a/freebox/api/v3/models/Storage/StorageDisk.php b/freebox/api/v3/models/Storage/StorageDisk.php new file mode 100644 index 0000000..05ff8cf --- /dev/null +++ b/freebox/api/v3/models/Storage/StorageDisk.php @@ -0,0 +1,213 @@ +initPropertyArray( 'partitions', DiskPartition::class); + } + + /** + * @return int + */ + public function getId() { + return $this->id; + } + + /** + * @return string + * @see symbols\Storage\StorageDisk\Type + */ + public function getType() { + return $this->type; + } + + /** + * @return string + * @see symbols\Storage\StorageDisk\State + */ + public function getState() { + return $this->state; + } + + /** + * @param string $state + * @see symbols\Storage\StorageDisk\State + */ + public function setState( $state) { + $this->state = $state; + } + + /** + * @return int + */ + public function getConnector() { + return $this->connector; + } + + /** + * @return int + */ + public function getTotalBytes() { + return $this->total_bytes; + } + + /** + * @return int + * @see symbols\Storage\StorageDisk\TableType + */ + public function getTableType() { + return $this->table_type; + } + + /** + * @return string + */ + public function getModel() { + return $this->model; + } + + /** + * @return string + */ + public function getSerial() { + return $this->serial; + } + + /** + * @return string + */ + public function getFirmware() { + return $this->firmware; + } + + /** + * @return int + */ + public function getTemp() { + return $this->temp; + } + + /** + * @return \alphayax\freebox\api\v3\models\Storage\OperationProgress + */ + public function getOperationPct() { + return $this->operation_pct; + } + + /** + * @return \alphayax\freebox\api\v3\models\Storage\DiskPartition[] (Read-only) + */ + public function getPartitions() { + return $this->partitions; + } + + /** + * @return boolean + */ + public function isIdle() { + return $this->idle; + } + + /** + * @return int + */ + public function getIdleDuration() { + return $this->idle_duration; + } + + /** + * @return boolean + */ + public function isSpinning() { + return $this->spinning; + } + + /** + * @return int + */ + public function getActiveDuration() { + return $this->active_duration; + } + + /** + * @return int + */ + public function getTimeBeforeSpindown() { + return $this->time_before_spindown; + } + +} diff --git a/freebox/api/v3/symbols/Storage/DiskPartition/FsType.php b/freebox/api/v3/symbols/Storage/DiskPartition/FsType.php new file mode 100644 index 0000000..ed657a0 --- /dev/null +++ b/freebox/api/v3/symbols/Storage/DiskPartition/FsType.php @@ -0,0 +1,21 @@ +