Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
26 / 26 |
|
100.00% |
26 / 26 |
CRAP | |
100.00% |
1 / 1 |
| LoadBalancer | |
100.00% |
26 / 26 |
|
100.00% |
26 / 26 |
26 | |
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 | |||
| getLabel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setLabel | |
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 | |||
| getIpv4 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setIpv4 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getIpv6 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setIpv6 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getGenericInfo | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setGenericInfo | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getHealthCheck | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setHealthCheck | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getHasSsl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setHasSsl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getForwardingRules | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setForwardingRules | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getFirewallRules | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setFirewallRules | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getInstances | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setInstances | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Vultr\VultrPhp\Services\LoadBalancers; |
| 6 | |
| 7 | use Vultr\VultrPhp\Util\Model; |
| 8 | |
| 9 | /** |
| 10 | * Holds load balancer information. |
| 11 | */ |
| 12 | class LoadBalancer extends Model |
| 13 | { |
| 14 | protected string $id; |
| 15 | protected string $dateCreated; |
| 16 | protected string $region; |
| 17 | protected string $label; |
| 18 | protected string $status; |
| 19 | protected string $ipv4; |
| 20 | protected string $ipv6; |
| 21 | protected LBInfo $genericInfo; |
| 22 | protected LBHealth $healthCheck; |
| 23 | protected bool $hasSsl; |
| 24 | protected array $forwardingRules; |
| 25 | protected array $firewallRules; |
| 26 | protected array $instances; |
| 27 | |
| 28 | public function getId() : string |
| 29 | { |
| 30 | return $this->id; |
| 31 | } |
| 32 | |
| 33 | public function setId(string $id) : void |
| 34 | { |
| 35 | $this->id = $id; |
| 36 | } |
| 37 | |
| 38 | public function getDateCreated() : string |
| 39 | { |
| 40 | return $this->dateCreated; |
| 41 | } |
| 42 | |
| 43 | public function setDateCreated(string $date_created) : void |
| 44 | { |
| 45 | $this->dateCreated = $date_created; |
| 46 | } |
| 47 | |
| 48 | public function getRegion() : string |
| 49 | { |
| 50 | return $this->region; |
| 51 | } |
| 52 | |
| 53 | public function setRegion(string $region) : void |
| 54 | { |
| 55 | $this->region = $region; |
| 56 | } |
| 57 | |
| 58 | public function getLabel() : string |
| 59 | { |
| 60 | return $this->label; |
| 61 | } |
| 62 | |
| 63 | public function setLabel(string $label) : void |
| 64 | { |
| 65 | $this->label = $label; |
| 66 | } |
| 67 | |
| 68 | public function getStatus() : string |
| 69 | { |
| 70 | return $this->status; |
| 71 | } |
| 72 | |
| 73 | public function setStatus(string $status) : void |
| 74 | { |
| 75 | $this->status = $status; |
| 76 | } |
| 77 | |
| 78 | public function getIpv4() : string |
| 79 | { |
| 80 | return $this->ipv4; |
| 81 | } |
| 82 | |
| 83 | public function setIpv4(string $ipv4) : void |
| 84 | { |
| 85 | $this->ipv4 = $ipv4; |
| 86 | } |
| 87 | |
| 88 | public function getIpv6() : string |
| 89 | { |
| 90 | return $this->ipv6; |
| 91 | } |
| 92 | |
| 93 | public function setIpv6(string $ipv6) : void |
| 94 | { |
| 95 | $this->ipv6 = $ipv6; |
| 96 | } |
| 97 | |
| 98 | public function getGenericInfo() : LBInfo |
| 99 | { |
| 100 | return $this->genericInfo; |
| 101 | } |
| 102 | |
| 103 | public function setGenericInfo(LBInfo $generic_info) : void |
| 104 | { |
| 105 | $this->genericInfo = $generic_info; |
| 106 | } |
| 107 | |
| 108 | public function getHealthCheck() : LBHealth |
| 109 | { |
| 110 | return $this->healthCheck; |
| 111 | } |
| 112 | |
| 113 | public function setHealthCheck(LBHealth $health_check) : void |
| 114 | { |
| 115 | $this->healthCheck = $health_check; |
| 116 | } |
| 117 | |
| 118 | public function getHasSsl() : bool |
| 119 | { |
| 120 | return $this->hasSsl; |
| 121 | } |
| 122 | |
| 123 | public function setHasSsl(bool $has_ssl) : void |
| 124 | { |
| 125 | $this->hasSsl = $has_ssl; |
| 126 | } |
| 127 | |
| 128 | public function getForwardingRules() : array |
| 129 | { |
| 130 | return $this->forwardingRules; |
| 131 | } |
| 132 | |
| 133 | public function setForwardingRules(array $forwarding_rules) : void |
| 134 | { |
| 135 | $this->forwardingRules = $forwarding_rules; |
| 136 | } |
| 137 | |
| 138 | public function getFirewallRules() : array |
| 139 | { |
| 140 | return $this->firewallRules; |
| 141 | } |
| 142 | |
| 143 | public function setFirewallRules(array $firewall_rules) : void |
| 144 | { |
| 145 | $this->firewallRules = $firewall_rules; |
| 146 | } |
| 147 | |
| 148 | public function getInstances() : array |
| 149 | { |
| 150 | return $this->instances; |
| 151 | } |
| 152 | |
| 153 | public function setInstances(array $instances) : void |
| 154 | { |
| 155 | $this->instances = $instances; |
| 156 | } |
| 157 | } |