GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 835a4f...30eaeb )
by Ha
11s
created

QuotaSet::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace OpenStack\BlockStorage\v2\Models;
4
5
use OpenStack\Common\Resource\Deletable;
6
use OpenStack\Common\Resource\OperatorResource;
7
use OpenStack\Common\Resource\Retrievable;
8
use OpenStack\Common\Resource\Updateable;
9
10
/**
11
 * Represents a BlockStorage v2 Quota Set
12
 *
13
 * @property \OpenStack\BlockStorage\v2\Api $api
14
 */
15
class QuotaSet extends OperatorResource implements Retrievable, Updateable, Deletable
16
{
17
    /** @var string */
18
    public $tenantId;
19
20
    /** @var int */
21
    public $backupGigabytes;
22
23
    /** @var int */
24
    public $backups;
25
26
    /** @var int */
27
    public $gigabytes;
28
29
    /** @var int */
30
    public $gigabytesIscsi;
31
32
    /** @var int */
33
    public $perVolumeGigabytes;
34
35
    /** @var int */
36
    public $snapshots;
37
38
    /** @var int */
39
    public $snapshotsIscsi;
40
41
    /** @var int */
42
    public $volumes;
43
44
    /** @var int */
45
    public $volumesIscsi;
46
47
    protected $aliases = [
48
        'backup_gigabytes'     => 'backupGigabytes',
49
        'gigabytes'            => 'gigabytes',
50
        'gigabytes_iscsi'      => 'gigabytesIscsi',
51
        'per_volume_gigabytes' => 'perVolumeGigabytes',
52
        'snapshots_iscsi'      => 'snapshotsIscsi',
53
        'volumes_iscsi'        => 'volumesIscsi',
54
        'id'                   => 'tenantId'
55
    ];
56
57
    protected $resourceKey = 'quota_set';
58
59
    /**
60
     * @inheritdoc
61
     */
62
    public function retrieve()
63
    {
64
        $response = $this->execute($this->api->getQuotaSet(), ['tenantId' => (string)$this->tenantId]);
65
        $this->populateFromResponse($response);
66
    }
67
68
    /**
69
     * @inheritdoc
70
     */
71
    public function update()
72
    {
73
        $response = $this->executeWithState($this->api->putQuotaSet());
74
        $this->populateFromResponse($response);
75
    }
76
77
    /**
78
     * @inheritdoc
79
     */
80
    public function delete()
81
    {
82
        $response = $this->executeWithState($this->api->deleteQuotaSet());
83
        $this->populateFromResponse($response);
84
    }
85
}
86