1 | <?php declare(strict_types=1); |
||
20 | class Snapshot extends OperatorResource implements Listable, Creatable, Updateable, Deletable, Retrievable, HasMetadata |
||
21 | { |
||
22 | use HasWaiterTrait; |
||
23 | |||
24 | /** @var string */ |
||
25 | public $id; |
||
26 | |||
27 | /** @var string */ |
||
28 | public $name; |
||
29 | |||
30 | /** @var string */ |
||
31 | public $status; |
||
32 | |||
33 | /** @var string */ |
||
34 | public $description; |
||
35 | |||
36 | /** @var \DateTimeImmutable */ |
||
37 | public $createdAt; |
||
38 | |||
39 | /** @var array */ |
||
40 | public $metadata = []; |
||
41 | |||
42 | /** @var string */ |
||
43 | public $volumeId; |
||
44 | |||
45 | /** @var int */ |
||
46 | public $size; |
||
47 | |||
48 | protected $resourceKey = 'snapshot'; |
||
49 | protected $resourcesKey = 'snapshots'; |
||
50 | protected $markerKey = 'id'; |
||
51 | |||
52 | /** |
||
53 | * @inheritdoc |
||
54 | */ |
||
55 | protected static function getAlias(): Alias |
||
67 | |||
68 | public function populateFromResponse(ResponseInterface $response): self |
||
74 | 1 | ||
75 | public function retrieve() |
||
80 | 1 | ||
81 | /** |
||
82 | 1 | * @param array $userOptions {@see \OpenStack\BlockStorage\v2\Api::postSnapshots} |
|
83 | 1 | * |
|
84 | * @return Creatable |
||
85 | 1 | */ |
|
86 | public function create(array $userOptions): Creatable |
||
91 | |||
92 | 2 | public function update() |
|
96 | |||
97 | 1 | public function delete() |
|
101 | 1 | ||
102 | 1 | public function getMetadata(): array |
|
108 | 1 | ||
109 | public function mergeMetadata(array $metadata) |
||
115 | |||
116 | public function resetMetadata(array $metadata) |
||
121 | |||
122 | public function parseMetadata(ResponseInterface $response): array |
||
127 | } |
||
128 |