1 | <?php declare(strict_types=1); |
||
17 | class Subnet extends OperatorResource implements Listable, Retrievable, Creatable, Deletable, Updateable |
||
18 | { |
||
19 | /** @var string */ |
||
20 | public $id; |
||
21 | |||
22 | /** @var string */ |
||
23 | public $name; |
||
24 | |||
25 | /** @var bool */ |
||
26 | public $enableDhcp; |
||
27 | |||
28 | /** @var string */ |
||
29 | public $networkId; |
||
30 | |||
31 | /** @var array */ |
||
32 | public $dnsNameservers; |
||
33 | |||
34 | /** @var array */ |
||
35 | public $allocationPools; |
||
36 | |||
37 | /** @var array */ |
||
38 | public $hostRoutes; |
||
39 | |||
40 | /** @var int */ |
||
41 | public $ipVersion; |
||
42 | |||
43 | /** @var string */ |
||
44 | public $gatewayIp; |
||
45 | |||
46 | /** @var string */ |
||
47 | public $cidr; |
||
48 | |||
49 | /** @var string */ |
||
50 | public $tenantId; |
||
51 | |||
52 | /** @var array */ |
||
53 | public $links; |
||
54 | |||
55 | protected $aliases = [ |
||
56 | 'enable_dhcp' => 'enableDhcp', |
||
57 | 'network_id' => 'networkId', |
||
58 | 'dns_nameservers' => 'dnsNameservers', |
||
59 | 'allocation_pools' => 'allocationPools', |
||
60 | 'host_routes' => 'hostRoutes', |
||
61 | 'ip_version' => 'ipVersion', |
||
62 | 'gateway_ip' => 'gatewayIp', |
||
63 | 'tenant_id' => 'tenantId' |
||
64 | ]; |
||
65 | |||
66 | protected $resourceKey = 'subnet'; |
||
67 | protected $resourcesKey = 'subnets'; |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | 1 | public function retrieve() |
|
77 | |||
78 | /** |
||
79 | * Creates multiple subnets in a single request. |
||
80 | * |
||
81 | * @param array $data {@see \OpenStack\Networking\v2\Api::postSubnets} |
||
82 | * |
||
83 | * @return Subnet[] |
||
84 | */ |
||
85 | 2 | public function bulkCreate(array $data): array |
|
90 | |||
91 | /** |
||
92 | * {@inheritDoc} |
||
93 | * |
||
94 | * @param array $data {@see \OpenStack\Networking\v2\Api::postSubnet} |
||
95 | */ |
||
96 | 2 | public function create(array $data): Creatable |
|
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | 1 | public function update() |
|
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | 1 | public function delete() |
|
118 | |||
119 | /** |
||
120 | * {@inheritDoc} |
||
121 | */ |
||
122 | protected function getAttrs(array $keys) |
||
132 | } |
||
133 |