Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
15 / 15 |
|
100.00% |
15 / 15 |
CRAP | |
100.00% |
1 / 1 |
VirtualPrivateCloud | |
100.00% |
15 / 15 |
|
100.00% |
15 / 15 |
15 | |
100.00% |
1 / 1 |
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDateCreated | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDateCreated | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getRegion | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setRegion | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getV4Subnet | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setV4Subnet | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getV4SubnetMask | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setV4SubnetMask | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getResponseName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getModelExceptionClass | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getUpdateParams | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Vultr\VultrPhp\Services\VPC; |
6 | |
7 | use Vultr\VultrPhp\Util\Model; |
8 | |
9 | /** |
10 | * Holds virtual private cloud information. |
11 | */ |
12 | class VirtualPrivateCloud extends Model |
13 | { |
14 | protected string $id; |
15 | protected string $dateCreated; |
16 | protected string $region; |
17 | protected string $description; |
18 | protected string $v4Subnet; |
19 | protected int $v4SubnetMask; |
20 | |
21 | public function getId() : string |
22 | { |
23 | return $this->id; |
24 | } |
25 | |
26 | public function setId(string $id) : void |
27 | { |
28 | $this->id = $id; |
29 | } |
30 | |
31 | public function getDateCreated() : string |
32 | { |
33 | return $this->dateCreated; |
34 | } |
35 | |
36 | public function setDateCreated(string $date_created) : void |
37 | { |
38 | $this->dateCreated = $date_created; |
39 | } |
40 | |
41 | public function getRegion() : string |
42 | { |
43 | return $this->region; |
44 | } |
45 | |
46 | public function setRegion(string $region) : void |
47 | { |
48 | $this->region = $region; |
49 | } |
50 | |
51 | public function getDescription() : string |
52 | { |
53 | return $this->description; |
54 | } |
55 | |
56 | public function setDescription(string $description) : void |
57 | { |
58 | $this->description = $description; |
59 | } |
60 | |
61 | public function getV4Subnet() : string |
62 | { |
63 | return $this->v4Subnet; |
64 | } |
65 | |
66 | public function setV4Subnet(string $v4_subnet) : void |
67 | { |
68 | $this->v4Subnet = $v4_subnet; |
69 | } |
70 | |
71 | public function getV4SubnetMask() : int |
72 | { |
73 | return $this->v4SubnetMask; |
74 | } |
75 | |
76 | public function setV4SubnetMask(int $v4_subnet_mask) : void |
77 | { |
78 | $this->v4SubnetMask = $v4_subnet_mask; |
79 | } |
80 | |
81 | public function getResponseName() : string |
82 | { |
83 | return 'vpc'; |
84 | } |
85 | |
86 | public function getModelExceptionClass() : string |
87 | { |
88 | return str_replace('VirtualPrivateCloudException', 'VPCException', parent::getModelExceptionClass()); |
89 | } |
90 | |
91 | public function getUpdateParams() : array |
92 | { |
93 | return ['description']; |
94 | } |
95 | } |