|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
// --------------------------------------------------------------------- |
|
4
|
|
|
// |
|
5
|
|
|
// Copyright (C) 2018-2024 Artem Rodygin |
|
6
|
|
|
// |
|
7
|
|
|
// You should have received a copy of the MIT License along with |
|
8
|
|
|
// this file. If not, see <https://opensource.org/licenses/MIT>. |
|
9
|
|
|
// |
|
10
|
|
|
// --------------------------------------------------------------------- |
|
11
|
|
|
|
|
12
|
|
|
namespace Linode\Networking; |
|
13
|
|
|
|
|
14
|
|
|
use Linode\Entity; |
|
15
|
|
|
use Linode\Linode\LinodeEntity; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Associates a Firewall with a Linode or NodeBalancer service. A Firewall can be |
|
19
|
|
|
* assigned to a single entity at a time. Additional disabled Firewalls can be |
|
20
|
|
|
* assigned to a service, but they cannot be enabled if another active Firewall is |
|
21
|
|
|
* already assigned to the same service. |
|
22
|
|
|
* |
|
23
|
|
|
* @property int $id The Device's unique ID |
|
24
|
|
|
* @property string $created When this Device was created. |
|
25
|
|
|
* @property string $updated When this Device was last updated. |
|
26
|
|
|
* @property LinodeEntity $entity The compute service that this Firewall has been applied to. |
|
27
|
|
|
*/ |
|
28
|
|
|
class FirewallDevices extends Entity |
|
29
|
|
|
{ |
|
30
|
|
|
// Available fields. |
|
31
|
|
|
public const FIELD_ID = 'id'; |
|
32
|
|
|
public const FIELD_CREATED = 'created'; |
|
33
|
|
|
public const FIELD_UPDATED = 'updated'; |
|
34
|
|
|
public const FIELD_ENTITY = 'entity'; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @codeCoverageIgnore This method was autogenerated. |
|
38
|
|
|
*/ |
|
39
|
|
|
public function __get(string $name): mixed |
|
40
|
|
|
{ |
|
41
|
|
|
return match ($name) { |
|
42
|
|
|
self::FIELD_ENTITY => new LinodeEntity($this->client, $this->data[$name]), |
|
43
|
|
|
default => parent::__get($name), |
|
44
|
|
|
}; |
|
45
|
|
|
} |
|
46
|
|
|
} |
|
47
|
|
|
|