Files
pterodactyl-panel/app/Models/Objects/DeploymentObject.php
T

101 lines
1.9 KiB
PHP
Raw Normal View History

2018-01-28 17:14:14 -06:00
<?php
2026-10-05 18:10:18 -04:00
declare(strict_types=1);
2018-01-28 17:14:14 -06:00
namespace Pterodactyl\Models\Objects;
class DeploymentObject
{
2022-10-14 10:59:20 -06:00
private bool $dedicated = false;
2018-01-28 17:14:14 -06:00
2026-10-05 18:10:18 -04:00
/**
* Location IDs exactly as they arrived from the request; FindViableNodesService
* is what rejects anything that is not an integer or an integer-like string.
*
* @var list<int|string>
*/
2022-10-14 10:59:20 -06:00
private array $locations = [];
2018-01-28 17:14:14 -06:00
2026-10-05 18:10:18 -04:00
/**
* Individual ports and port ranges exactly as they arrived from the request;
* AllocationSelectionService discards the entries it cannot use.
*
* @var list<ApiScalar>
*/
2022-10-14 10:59:20 -06:00
private array $ports = [];
2018-01-28 17:14:14 -06:00
2026-10-05 18:10:18 -04:00
/**
* The deploy tags (D) this deployment declares. A node's reservations are
* matched against these exactly - see NodeTagGate.
*
* @var array<string>
*/
private array $tags = [];
2018-01-28 17:14:14 -06:00
public function isDedicated(): bool
{
return $this->dedicated;
}
2022-10-14 10:59:20 -06:00
public function setDedicated(bool $dedicated): self
2018-01-28 17:14:14 -06:00
{
$this->dedicated = $dedicated;
return $this;
}
2026-10-05 18:10:18 -04:00
/**
* @return list<int|string>
*/
2018-01-28 17:14:14 -06:00
public function getLocations(): array
{
return $this->locations;
}
2026-10-05 18:10:18 -04:00
/**
* @param list<int|string> $locations
*/
2022-10-14 10:59:20 -06:00
public function setLocations(array $locations): self
2018-01-28 17:14:14 -06:00
{
$this->locations = $locations;
return $this;
}
2026-10-05 18:10:18 -04:00
/**
* @return list<ApiScalar>
*/
2018-01-28 17:14:14 -06:00
public function getPorts(): array
{
return $this->ports;
}
2026-10-05 18:10:18 -04:00
/**
* @param list<ApiScalar> $ports
*/
2022-10-14 10:59:20 -06:00
public function setPorts(array $ports): self
2018-01-28 17:14:14 -06:00
{
$this->ports = $ports;
return $this;
}
2026-10-05 18:10:18 -04:00
/**
* @return array<string>
*/
public function getTags(): array
{
return $this->tags;
}
/**
* @param array<string> $tags
*/
public function setTags(array $tags): self
{
$this->tags = $tags;
return $this;
}
2018-01-28 17:14:14 -06:00
}