|
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\Databases; |
|
13
|
|
|
|
|
14
|
|
|
use Linode\Entity; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* Managed Database plan type object. |
|
18
|
|
|
* |
|
19
|
|
|
* @property string $id The ID representing the Managed Database node plan type. |
|
20
|
|
|
* @property string $label A human-readable string that describes each plan type. For display purposes only. |
|
21
|
|
|
* @property int $memory The amount of RAM allocated to Database created of this plan type. The value is |
|
22
|
|
|
* represented in megabytes. |
|
23
|
|
|
* @property int $disk The amount of disk space set aside for Databases of this plan type. The value is |
|
24
|
|
|
* represented in megabytes. |
|
25
|
|
|
* @property int $vcpus The integer of number CPUs allocated to databases of this plan type. |
|
26
|
|
|
* @property bool $deprecated Whether this Database plan type has been deprecated and is no longer available. |
|
27
|
|
|
* @property string $class The compute class category. |
|
28
|
|
|
* @property DatabaseEngines[] $engines |
|
29
|
|
|
*/ |
|
30
|
|
|
class DatabaseType extends Entity |
|
31
|
|
|
{ |
|
32
|
|
|
// Available fields. |
|
33
|
|
|
public const FIELD_ID = 'id'; |
|
34
|
|
|
public const FIELD_LABEL = 'label'; |
|
35
|
|
|
public const FIELD_MEMORY = 'memory'; |
|
36
|
|
|
public const FIELD_DISK = 'disk'; |
|
37
|
|
|
public const FIELD_VCPUS = 'vcpus'; |
|
38
|
|
|
public const FIELD_DEPRECATED = 'deprecated'; |
|
39
|
|
|
public const FIELD_CLASS = 'class'; |
|
40
|
|
|
public const FIELD_ENGINES = 'engines'; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* @codeCoverageIgnore This method was autogenerated. |
|
44
|
|
|
*/ |
|
45
|
|
|
public function __get(string $name): mixed |
|
46
|
|
|
{ |
|
47
|
|
|
return match ($name) { |
|
48
|
|
|
self::FIELD_ENGINES => new DatabaseEngines($this->client, $this->data[$name]), |
|
49
|
|
|
default => parent::__get($name), |
|
50
|
|
|
}; |
|
51
|
|
|
} |
|
52
|
|
|
} |
|
53
|
|
|
|