1 | <?php declare(strict_types=1); |
||
19 | class Flavor extends OperatorResource implements Listable, Retrievable, Creatable, Deletable, HasExtraSpecs |
||
20 | { |
||
21 | /** @var int */ |
||
22 | public $disk; |
||
23 | |||
24 | /** @var string */ |
||
25 | public $id; |
||
26 | |||
27 | /** @var string */ |
||
28 | public $name; |
||
29 | |||
30 | /** @var int */ |
||
31 | public $ram; |
||
32 | |||
33 | /** @var int */ |
||
34 | public $swap; |
||
35 | |||
36 | /** @var int */ |
||
37 | public $vcpus; |
||
38 | |||
39 | /** @var array */ |
||
40 | 1 | public $links; |
|
41 | |||
42 | 1 | /** @var array */ |
|
43 | 1 | public $extraSpecs = []; |
|
44 | 1 | ||
45 | protected $resourceKey = 'flavor'; |
||
46 | protected $resourcesKey = 'flavors'; |
||
47 | |||
48 | public function populateFromResponse(ResponseInterface $response): self |
||
54 | |||
55 | /** |
||
56 | * {@inheritDoc} |
||
57 | */ |
||
58 | public function retrieve() |
||
63 | |||
64 | /** |
||
65 | * {@inheritDoc} |
||
66 | */ |
||
67 | public function create(array $userOptions): Creatable |
||
72 | |||
73 | /** |
||
74 | * {@inheritDoc} |
||
75 | */ |
||
76 | public function delete() |
||
80 | |||
81 | public function getExtraSpecs(): array |
||
87 | |||
88 | public function mergeExtraSpecs(array $extraSpecs) |
||
92 | |||
93 | public function deleteExtraSpec($key) |
||
97 | |||
98 | public function parseExtraSpecs(ResponseInterface $response): array |
||
103 | } |
||
104 |