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.

LoadBalancerListener   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 132
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 132
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
A retrieve() 0 5 1
A update() 0 5 1
A delete() 0 4 1
A getAliases() 0 7 1
1
<?php declare(strict_types=1);
2
3
namespace OpenStack\Networking\v2\Models;
4
5
use OpenStack\Common\Resource\Alias;
6
use OpenStack\Common\Resource\Creatable;
7
use OpenStack\Common\Resource\Deletable;
8
use OpenStack\Common\Resource\OperatorResource;
9
use OpenStack\Common\Resource\Retrievable;
10
use OpenStack\Common\Resource\Updateable;
11
use OpenStack\Networking\v2\Api;
12
13
/**
14
 * Represents a Neutron v2 LoadBalancer Listener
15
 *
16
 * @property Api $api
17
 */
18
class LoadBalancerListener extends OperatorResource implements Creatable, Retrievable, Updateable, Deletable
19
{
20
    /**
21
     * @var string
22
     */
23
    public $name;
24
25
    /**
26
     * @var string
27
     */
28
    public $description;
29
30
    /**
31
     * @var string
32
     */
33
    public $id;
34
35
    /**
36
     * @var string
37
     */
38
    public $tenantId;
39
40
    /**
41
     * @var string
42
     */
43
    public $protocol;
44
45
    /**
46
     * @var integer
47
     */
48
    public $protocolPort;
49
50
    /**
51
     * @var integer
52
     */
53
    public $connectionLimit;
54
55
    /**
56
     * @var string
57
     */
58
    public $defaultPoolId;
59
60
    /**
61
     * @var boolean
62
     */
63
    public $adminStateUp;
64
65
    /**
66
     * @var LoadBalancer[]
67
     */
68
    public $loadbalancers;
69
70
    /**
71
     * @var string
72
     */
73
    public $loadbalancerId;
74
75
    /**
76
     * @var string
77
     */
78
    public $operatingStatus;
79
80
    /**
81
     * @var string
82
     */
83
    public $provisioningStatus;
84
85
    /**
86
     * @var LoadBalancerPool[]
87
     */
88
    public $pools;
89
90
    protected $resourcesKey = 'listeners';
91
    protected $resourceKey = 'listener';
92
93
    protected $aliases = [
94
        'tenant_id'           => 'tenantId',
95
        'admin_state_up'      => 'adminStateUp',
96
        'protocol_port'       => 'protocolPort',
97
        'connection_limit'    => 'connectionLimit',
98
        'default_pool_id'     => 'defaultPoolId',
99
        'loadbalancer_id'     => 'loadbalancerId',
100
        'operating_status'    => 'operatingStatus',
101
        'provisioning_status' => 'provisioningStatus',
102
    ];
103
104
    /**
105
     * @inheritdoc
106
     */
107
    protected function getAliases(): array
108
    {
109
        return parent::getAliases() + [
110
            'pools'         => new Alias('pools', LoadBalancerPool::class, true),
111
            'loadbalancers' => new Alias('loadbalancers', LoadBalancerPool::class, true)
112
        ];
113
    }
114
115
    /**
116
     * {@inheritDoc}
117
     */
118
    public function create(array $userOptions): Creatable
119
    {
120
        $response = $this->execute($this->api->postLoadBalancerListener(), $userOptions);
121
        return $this->populateFromResponse($response);
122
    }
123
124
    /**
125
     * {@inheritDoc}
126
     */
127
    public function retrieve()
128
    {
129
        $response = $this->execute($this->api->getLoadBalancerListener(), ['id' => (string)$this->id]);
130
        $this->populateFromResponse($response);
131
    }
132
133
    /**
134
     * {@inheritDoc}
135
     */
136
    public function update()
137
    {
138
        $response = $this->executeWithState($this->api->putLoadBalancerListener());
139
        $this->populateFromResponse($response);
140
    }
141
142
    /**
143
     * {@inheritDoc}
144
     */
145
    public function delete()
146
    {
147
        $this->executeWithState($this->api->deleteLoadBalancerListener());
148
    }
149
}
150