Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
58 / 58 |
|
100.00% |
58 / 58 |
CRAP | |
100.00% |
1 / 1 |
Instance | |
100.00% |
58 / 58 |
|
100.00% |
58 / 58 |
58 | |
100.00% |
1 / 1 |
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getOs | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setOs | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getRam | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setRam | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDisk | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDisk | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getMainIp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setMainIp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getInternalIp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setInternalIp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getVcpuCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setVcpuCount | |
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 | |||
getDefaultPassword | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDefaultPassword | |
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 | |||
getStatus | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setStatus | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getPowerStatus | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setPowerStatus | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getServerStatus | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setServerStatus | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAllowedBandwidth | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setAllowedBandwidth | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getNetmaskV4 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setNetmaskV4 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getGatewayV4 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setGatewayV4 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getV6Network | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setV6Network | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getV6MainIp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setV6MainIp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getV6NetworkSize | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setV6NetworkSize | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getHostname | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setHostname | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLabel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setLabel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getKvm | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setKvm | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getOsId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setOsId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAppId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setAppId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getImageId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setImageId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFirewallGroupId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setFirewallGroupId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFeatures | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setFeatures | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getPlan | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setPlan | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getTags | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setTags | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Vultr\VultrPhp\Services\Instances; |
6 | |
7 | use Vultr\VultrPhp\Util\Model; |
8 | |
9 | /** |
10 | * Holds vps instance information. |
11 | */ |
12 | class Instance extends Model |
13 | { |
14 | protected string $id; |
15 | protected string $os; |
16 | protected int $ram; |
17 | protected int $disk; |
18 | protected string $mainIp; |
19 | protected string $internalIp; |
20 | protected int $vcpuCount; |
21 | protected string $region; |
22 | protected ?string $defaultPassword = null; |
23 | protected string $dateCreated; |
24 | protected string $status; |
25 | protected string $powerStatus; |
26 | protected string $serverStatus; |
27 | protected int $allowedBandwidth; |
28 | protected string $netmaskV4; |
29 | protected string $gatewayV4; |
30 | protected string $v6Network; |
31 | protected string $v6MainIp; |
32 | protected int $v6NetworkSize; |
33 | protected string $hostname; |
34 | protected string $label; |
35 | protected string $kvm; |
36 | protected int $osId; |
37 | protected int $appId; |
38 | protected string $imageId; |
39 | protected string $firewallGroupId; |
40 | protected array $features; |
41 | protected string $plan; |
42 | protected array $tags; |
43 | |
44 | public function getId() : string |
45 | { |
46 | return $this->id; |
47 | } |
48 | |
49 | public function setId(string $id) : void |
50 | { |
51 | $this->id = $id; |
52 | } |
53 | |
54 | public function getOs() : string |
55 | { |
56 | return $this->os; |
57 | } |
58 | |
59 | public function setOs(string $os) : void |
60 | { |
61 | $this->os = $os; |
62 | } |
63 | |
64 | public function getRam() : int |
65 | { |
66 | return $this->ram; |
67 | } |
68 | |
69 | public function setRam(int $ram) : void |
70 | { |
71 | $this->ram = $ram; |
72 | } |
73 | |
74 | public function getDisk() : int |
75 | { |
76 | return $this->disk; |
77 | } |
78 | |
79 | public function setDisk(int $disk) : void |
80 | { |
81 | $this->disk = $disk; |
82 | } |
83 | |
84 | public function getMainIp() : string |
85 | { |
86 | return $this->mainIp; |
87 | } |
88 | |
89 | public function setMainIp(string $main_ip) : void |
90 | { |
91 | $this->mainIp = $main_ip; |
92 | } |
93 | |
94 | public function getInternalIp() : string |
95 | { |
96 | return $this->internalIp; |
97 | } |
98 | |
99 | public function setInternalIp(string $internal_ip) : void |
100 | { |
101 | $this->internalIp = $internal_ip; |
102 | } |
103 | |
104 | public function getVcpuCount() : int |
105 | { |
106 | return $this->vcpuCount; |
107 | } |
108 | |
109 | public function setVcpuCount(int $vcpu_count) : void |
110 | { |
111 | $this->vcpuCount = $vcpu_count; |
112 | } |
113 | |
114 | public function getRegion() : string |
115 | { |
116 | return $this->region; |
117 | } |
118 | |
119 | public function setRegion(string $region) : void |
120 | { |
121 | $this->region = $region; |
122 | } |
123 | |
124 | public function getDefaultPassword() : ?string |
125 | { |
126 | return $this->defaultPassword; |
127 | } |
128 | |
129 | public function setDefaultPassword(string $default_password) : void |
130 | { |
131 | $this->defaultPassword = $default_password; |
132 | } |
133 | |
134 | public function getDateCreated() : string |
135 | { |
136 | return $this->dateCreated; |
137 | } |
138 | |
139 | public function setDateCreated(string $date_created) : void |
140 | { |
141 | $this->dateCreated = $date_created; |
142 | } |
143 | |
144 | public function getStatus() : string |
145 | { |
146 | return $this->status; |
147 | } |
148 | |
149 | public function setStatus(string $status) : void |
150 | { |
151 | $this->status = $status; |
152 | } |
153 | |
154 | public function getPowerStatus() : string |
155 | { |
156 | return $this->powerStatus; |
157 | } |
158 | |
159 | public function setPowerStatus(string $power_status) : void |
160 | { |
161 | $this->powerStatus = $power_status; |
162 | } |
163 | |
164 | public function getServerStatus() : string |
165 | { |
166 | return $this->serverStatus; |
167 | } |
168 | |
169 | public function setServerStatus(string $server_status) : void |
170 | { |
171 | $this->serverStatus = $server_status; |
172 | } |
173 | |
174 | public function getAllowedBandwidth() : int |
175 | { |
176 | return $this->allowedBandwidth; |
177 | } |
178 | |
179 | public function setAllowedBandwidth(int $allowed_bandwidth) : void |
180 | { |
181 | $this->allowedBandwidth = $allowed_bandwidth; |
182 | } |
183 | |
184 | public function getNetmaskV4() : string |
185 | { |
186 | return $this->netmaskV4; |
187 | } |
188 | |
189 | public function setNetmaskV4(string $netmask_v4) : void |
190 | { |
191 | $this->netmaskV4 = $netmask_v4; |
192 | } |
193 | |
194 | public function getGatewayV4() : string |
195 | { |
196 | return $this->gatewayV4; |
197 | } |
198 | |
199 | public function setGatewayV4(string $gateway_v4) : void |
200 | { |
201 | $this->gatewayV4 = $gateway_v4; |
202 | } |
203 | |
204 | public function getV6Network() : string |
205 | { |
206 | return $this->v6Network; |
207 | } |
208 | |
209 | public function setV6Network(string $v6_network) : void |
210 | { |
211 | $this->v6Network = $v6_network; |
212 | } |
213 | |
214 | public function getV6MainIp() : string |
215 | { |
216 | return $this->v6MainIp; |
217 | } |
218 | |
219 | public function setV6MainIp(string $v6_main_ip) : void |
220 | { |
221 | $this->v6MainIp = $v6_main_ip; |
222 | } |
223 | |
224 | public function getV6NetworkSize() : int |
225 | { |
226 | return $this->v6NetworkSize; |
227 | } |
228 | |
229 | public function setV6NetworkSize(int $v6_network_size) : void |
230 | { |
231 | $this->v6NetworkSize = $v6_network_size; |
232 | } |
233 | |
234 | public function getHostname() : string |
235 | { |
236 | return $this->hostname; |
237 | } |
238 | |
239 | public function setHostname(string $hostname) : void |
240 | { |
241 | $this->hostname = $hostname; |
242 | } |
243 | |
244 | public function getLabel() : string |
245 | { |
246 | return $this->label; |
247 | } |
248 | |
249 | public function setLabel(string $label) : void |
250 | { |
251 | $this->label = $label; |
252 | } |
253 | |
254 | public function getKvm() : string |
255 | { |
256 | return $this->kvm; |
257 | } |
258 | |
259 | public function setKvm(string $kvm) : void |
260 | { |
261 | $this->kvm = $kvm; |
262 | } |
263 | |
264 | public function getOsId() : int |
265 | { |
266 | return $this->osId; |
267 | } |
268 | |
269 | public function setOsId(int $os_id) : void |
270 | { |
271 | $this->osId = $os_id; |
272 | } |
273 | |
274 | public function getAppId() : int |
275 | { |
276 | return $this->appId; |
277 | } |
278 | |
279 | public function setAppId(int $app_id) : void |
280 | { |
281 | $this->appId = $app_id; |
282 | } |
283 | |
284 | public function getImageId() : string |
285 | { |
286 | return $this->imageId; |
287 | } |
288 | |
289 | public function setImageId(string $image_id) : void |
290 | { |
291 | $this->imageId = $image_id; |
292 | } |
293 | |
294 | public function getFirewallGroupId() : string |
295 | { |
296 | return $this->firewallGroupId; |
297 | } |
298 | |
299 | public function setFirewallGroupId(string $firewall_group_id) : void |
300 | { |
301 | $this->firewallGroupId = $firewall_group_id; |
302 | } |
303 | |
304 | public function getFeatures() : array |
305 | { |
306 | return $this->features; |
307 | } |
308 | |
309 | public function setFeatures(array $features) : void |
310 | { |
311 | $this->features = $features; |
312 | } |
313 | |
314 | public function getPlan() : string |
315 | { |
316 | return $this->plan; |
317 | } |
318 | |
319 | public function setPlan(string $plan) : void |
320 | { |
321 | $this->plan = $plan; |
322 | } |
323 | |
324 | public function getTags() : array |
325 | { |
326 | return $this->tags; |
327 | } |
328 | |
329 | public function setTags(array $tags) : void |
330 | { |
331 | $this->tags = $tags; |
332 | } |
333 | } |