Skip to content

Commit

Permalink
Add architecture to model
Browse files Browse the repository at this point in the history
  • Loading branch information
jappi00 committed Sep 10, 2023
1 parent a646838 commit a78a321
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 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 string
*/
public $architecture;

/**
* Image constructor.
*
Expand All @@ -155,6 +160,7 @@ class Image extends Model implements Resource
* @param string $osVersion
* @param bool $rapidDeploy
* @param Protection $protection
* @param string $architecture
* @param array $labels
*/
public function __construct(
Expand All @@ -172,6 +178,7 @@ public function __construct(
string $osVersion = null,
bool $rapidDeploy = null,
Protection $protection = null,
string $architecture = null,
array $labels = []
) {
$this->id = $id;
Expand All @@ -195,6 +202,7 @@ public function __construct(
$this->rapid_deploy = $rapidDeploy;
$this->rapidDeploy = $rapidDeploy;
$this->protection = $protection;
$this->architecture = $architecture;
$this->labels = $labels;
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), $input->architecture, get_object_vars($input->labels));
}

public function reload()
Expand Down

0 comments on commit a78a321

Please sign in to comment.