/
home
/
clp
/
htdocs
/
app
/
files
/
src
/
Aws
/
up file
home
<?php namespace App\Aws; use App\Aws\Regions; class Instance { const STATE_RUNNING = "\x72\165\x6e\156\151\x6e\147"; const STATE_STOPPED = "\163\x74\x6f\160\160\x65\144"; const STATE_PENDING = "\x70\145\156\144\x69\156\147"; private ?string $instanceId = null; private ?string $instanceType = null; private ?string $region = null; private ?string $publicIpAddress = null; private ?string $privateIpAddress = null; private array $securityGroups = []; private ?string $state = null; private array $tags = []; public function setInstanceId(string $instanceId) : void { $this->instanceId = $instanceId; } public function getInstanceId() : ?string { return $this->instanceId; } public function setInstanceType(string $instanceType) : void { $this->instanceType = $instanceType; } public function getInstanceType() : ?string { return $this->instanceType; } public function setRegion(string $region) { $this->region = $region; } public function getRegion() : ?string { return $this->region; } public function setPublicIpAddress(string $publicIpAddress) : void { $this->publicIpAddress = $publicIpAddress; } public function getPublicIpAddress() : ?string { return $this->publicIpAddress; } public function setPrivateIpAddress(string $privateIpAddress) : void { $this->privateIpAddress = $privateIpAddress; } public function getPrivateIpAddress() : ?string { return $this->privateIpAddress; } public function setSecurityGroups(array $securityGroups) : void { $this->securityGroups = $securityGroups; } public function getSecurityGroups() : ?string { return $this->securityGroups; } public function setState(string $state) : void { $this->state = $state; } public function getState() : ?string { return $this->state; } public function setTags(array $tags) : void { $this->tags = $tags; } public function getTags() : array { return $this->tags; } public function getInstanceName() : ?string { $instanceName = $this->getTagValue("\x4e\141\155\x65"); return $instanceName; } private function getTagValue(string $key) : ?string { goto B718a; a5114: if (!count($tags)) { goto ecb50; } goto Da237; a26e6: $tags = $this->getTags(); goto a5114; Ae72a: f11b6: goto C7175; Da237: foreach ($tags as $tag) { goto Db9e4; B23cf: B49e0: goto E7b4a; b5164: goto f11b6; goto B23cf; Db9e4: if (!(true === isset($tag["\x4b\145\x79"]) && $tag["\x4b\x65\x79"] == $key && true === isset($tag["\126\141\x6c\x75\x65"]))) { goto B49e0; } goto E1997; E1997: $value = $tag["\x56\141\x6c\x75\x65"]; goto b5164; E7b4a: C5b59: goto a6efd; a6efd: } goto Ae72a; B718a: $value = ''; goto a26e6; C7175: ecb50: goto d4c3c; d4c3c: return $value; goto Fac3d; Fac3d: } public function getRegionName() : ?string { goto E7b40; E7b40: $region = $this->getRegion(); goto A3493; A3493: $regionName = Regions::getRegionName($region); goto Eeac1; Eeac1: return $regionName; goto Ddb7b; Ddb7b: } }