Files

95 lines
1.7 KiB
PHP
Raw Permalink 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-12 00:09:41 -04:00
/** @var list<int> */
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
/**
2026-10-12 00:09:41 -04:00
* Individual ports and "start-end" port ranges; entries that are neither are ignored.
2026-10-05 18:10:18 -04:00
*
2026-10-12 00:09:41 -04:00
* @var list<int|string>
2026-10-05 18:10:18 -04:00
*/
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
/**
2026-10-12 00:09:41 -04:00
* The deploy tags this deployment declares. A node's reservations are matched
2026-10-12 01:13:53 -04:00
* against these exactly (see NodeBuilder::forDeployTags()).
2026-10-05 18:10:18 -04:00
*
* @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
/**
2026-10-12 00:09:41 -04:00
* @return list<int>
2026-10-05 18:10:18 -04:00
*/
2018-01-28 17:14:14 -06:00
public function getLocations(): array
{
return $this->locations;
}
2026-10-05 18:10:18 -04:00
/**
2026-10-12 00:09:41 -04:00
* @param list<int> $locations
2026-10-05 18:10:18 -04:00
*/
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
/**
2026-10-12 00:09:41 -04:00
* @return list<int|string>
2026-10-05 18:10:18 -04:00
*/
2018-01-28 17:14:14 -06:00
public function getPorts(): array
{
return $this->ports;
}
2026-10-05 18:10:18 -04:00
/**
2026-10-12 00:09:41 -04:00
* @param list<int|string> $ports
2026-10-05 18:10:18 -04:00
*/
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
}