Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/Models/Images/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ class Image extends Model implements Resource
*/
public $labels;

/**
* @var array
*/
public $architecture;

/**
* Image constructor.
*
Expand All @@ -156,6 +161,7 @@ class Image extends Model implements Resource
* @param bool $rapidDeploy
* @param Protection $protection
* @param array $labels
* @param array $architecture
*/
public function __construct(
int $id,
Expand All @@ -172,7 +178,8 @@ public function __construct(
string $osVersion = null,
bool $rapidDeploy = null,
Protection $protection = null,
array $labels = []
array $labels = [],
string $architecture = null
) {
$this->id = $id;
$this->type = $type;
Expand All @@ -196,6 +203,7 @@ public function __construct(
$this->rapidDeploy = $rapidDeploy;
$this->protection = $protection;
$this->labels = $labels;
$this->architecture = $architecture;
parent::__construct();
}

Expand Down Expand Up @@ -276,7 +284,7 @@ public static function parse($input): ?Image
return null;
}

return new self($input->id, $input->type, property_exists($input, 'status') ? $input->status : null, $input->name, $input->description, $input->image_size, $input->disk_size, $input->created, $input->created_from, $input->bound_to, $input->os_flavor, $input->os_version, $input->rapid_deploy, Protection::parse($input->protection), get_object_vars($input->labels));
return new self($input->id, $input->type, property_exists($input, 'status') ? $input->status : null, $input->name, $input->description, $input->image_size, $input->disk_size, $input->created, $input->created_from, $input->bound_to, $input->os_flavor, $input->os_version, $input->rapid_deploy, Protection::parse($input->protection), get_object_vars($input->labels), $input->architecture);
}

public function reload()
Expand Down