From 9430137c38ea938b4d4faa9e1b72ecc91cfafb84 Mon Sep 17 00:00:00 2001 From: Jan-Phillip Oesterling Date: Sun, 10 Sep 2023 23:21:58 +0200 Subject: [PATCH] Add architecture to model --- src/Models/Images/Image.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Models/Images/Image.php b/src/Models/Images/Image.php index a18a9ad..1119883 100644 --- a/src/Models/Images/Image.php +++ b/src/Models/Images/Image.php @@ -138,6 +138,11 @@ class Image extends Model implements Resource */ public $labels; + /** + * @var string + */ + public $architecture; + /** * Image constructor. * @@ -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( @@ -172,6 +178,7 @@ public function __construct( string $osVersion = null, bool $rapidDeploy = null, Protection $protection = null, + string $architecture = null, array $labels = [] ) { $this->id = $id; @@ -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(); } @@ -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()