-
Notifications
You must be signed in to change notification settings - Fork 155
Expand file tree
/
Copy pathQuotaSet.php
More file actions
87 lines (69 loc) · 1.93 KB
/
Copy pathQuotaSet.php
File metadata and controls
87 lines (69 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
declare(strict_types=1);
namespace OpenStack\BlockStorage\v2\Models;
use OpenStack\Common\Resource\Deletable;
use OpenStack\Common\Resource\OperatorResource;
use OpenStack\Common\Resource\Retrievable;
use OpenStack\Common\Resource\Updateable;
/**
* Represents a BlockStorage v2 Quota Set.
*
* @property \OpenStack\BlockStorage\v2\Api $api
*/
class QuotaSet extends OperatorResource implements Retrievable, Updateable, Deletable
{
/** @var string */
public $tenantId;
/** @var int */
public $backupGigabytes;
/** @var int */
public $backups;
/** @var int */
public $gigabytes;
/** @var int */
public $gigabytesIscsi;
/** @var int */
public $perVolumeGigabytes;
/** @var int */
public $snapshots;
/** @var int */
public $snapshotsIscsi;
/** @var int */
public $volumes;
/** @var int */
public $volumesIscsi;
protected $aliases = [
'backup_gigabytes' => 'backupGigabytes',
'gigabytes' => 'gigabytes',
'gigabytes_iscsi' => 'gigabytesIscsi',
'per_volume_gigabytes' => 'perVolumeGigabytes',
'snapshots_iscsi' => 'snapshotsIscsi',
'volumes_iscsi' => 'volumesIscsi',
'id' => 'tenantId',
];
protected $resourceKey = 'quota_set';
/**
* {@inheritdoc}
*/
public function retrieve()
{
$response = $this->execute($this->api->getQuotaSet(), ['tenantId' => (string) $this->tenantId]);
$this->populateFromResponse($response);
}
/**
* {@inheritdoc}
*/
public function update()
{
$response = $this->executeWithState($this->api->putQuotaSet());
$this->populateFromResponse($response);
}
/**
* {@inheritdoc}
*/
public function delete()
{
$response = $this->executeWithState($this->api->deleteQuotaSet());
$this->populateFromResponse($response);
}
}