@@ -135,7 +135,7 @@ class Image extends Model implements Resource
135135 public $ protection ;
136136
137137 /**
138- * @var array
138+ * @var \stdClass|null
139139 */
140140 public $ labels ;
141141
@@ -158,21 +158,21 @@ class Image extends Model implements Resource
158158 * Image constructor.
159159 *
160160 * @param int $id
161- * @param string $type
162- * @param string $status
163- * @param string $name
164- * @param string $description
165- * @param float $imageSize
166- * @param int $diskSize
167- * @param string $created
168- * @param \LKDev\HetznerCloud\Models\Servers\Server $createdFrom
169- * @param int $boundTo
170- * @param string $osFlavor
171- * @param string $osVersion
161+ * @param string|null $type
162+ * @param string|null $status
163+ * @param string|null $name
164+ * @param string|null $description
165+ * @param float|null $imageSize
166+ * @param int|null $diskSize
167+ * @param string|null $created
168+ * @param null $createdFrom
169+ * @param int|null $boundTo
170+ * @param string|null $osFlavor
171+ * @param string|null $osVersion
172172 * @param bool $rapidDeploy
173- * @param Protection $protection
174- * @param string $architecture
175- * @param array $labels
173+ * @param Protection|null $protection
174+ * @param string|null $architecture
175+ * @param \stdClass $labels
176176 * @param string|null $deleted
177177 * @param string|null $deprecated
178178 */
@@ -192,7 +192,7 @@ public function __construct(
192192 ?bool $ rapidDeploy = null ,
193193 ?Protection $ protection = null ,
194194 ?string $ architecture = null ,
195- array $ labels = [] ,
195+ \ stdClass $ labels = new \ stdClass () ,
196196 ?string $ deleted = null ,
197197 ?string $ deprecated = null
198198 ) {
@@ -293,15 +293,15 @@ public function delete(): bool
293293
294294 /**
295295 * @param $input
296- * @return \LKDev\HetznerCloud\Models\Images\Image|static
296+ * @return \LKDev\HetznerCloud\Models\Images\Image|static|null
297297 */
298298 public static function parse ($ input ): ?Image
299299 {
300300 if ($ input == null ) {
301301 return null ;
302302 }
303303
304- return new self ($ input ->id , $ input ->type , $ input ->status , $ 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 ?? null , get_object_vars ( $ input ->labels ) , $ input ->deleted ?? null , $ input ->deprecated ?? null );
304+ return new self ($ input ->id , $ input ->type , $ input ->status , $ 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 ?? null , $ input ->labels , $ input ->deleted ?? null , $ input ->deprecated ?? null );
305305 }
306306
307307 public function reload ()
0 commit comments