142 lines
No EOL
2.5 KiB
PHP
142 lines
No EOL
2.5 KiB
PHP
<?php
|
|
|
|
namespace DigiComp\HetznerDnsApi\Model;
|
|
|
|
class BaseRecord
|
|
{
|
|
/**
|
|
* ID of zone this record is associated with
|
|
*
|
|
* @var string|null
|
|
*/
|
|
protected $zoneId;
|
|
/**
|
|
* Type of the record
|
|
*
|
|
* @var string|null
|
|
*/
|
|
protected $type;
|
|
/**
|
|
* Name of record
|
|
*
|
|
* @var string|null
|
|
*/
|
|
protected $name;
|
|
/**
|
|
* Value of record (e.g. 127.0.0.1, 1.1.1.1)
|
|
*
|
|
* @var string|null
|
|
*/
|
|
protected $value;
|
|
/**
|
|
* TTL of record
|
|
*
|
|
* @var int|null
|
|
*/
|
|
protected $ttl;
|
|
/**
|
|
* ID of zone this record is associated with
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getZoneId() : ?string
|
|
{
|
|
return $this->zoneId;
|
|
}
|
|
/**
|
|
* ID of zone this record is associated with
|
|
*
|
|
* @param string|null $zoneId
|
|
*
|
|
* @return self
|
|
*/
|
|
public function setZoneId(?string $zoneId) : self
|
|
{
|
|
$this->zoneId = $zoneId;
|
|
return $this;
|
|
}
|
|
/**
|
|
* Type of the record
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getType() : ?string
|
|
{
|
|
return $this->type;
|
|
}
|
|
/**
|
|
* Type of the record
|
|
*
|
|
* @param string|null $type
|
|
*
|
|
* @return self
|
|
*/
|
|
public function setType(?string $type) : self
|
|
{
|
|
$this->type = $type;
|
|
return $this;
|
|
}
|
|
/**
|
|
* Name of record
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getName() : ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
/**
|
|
* Name of record
|
|
*
|
|
* @param string|null $name
|
|
*
|
|
* @return self
|
|
*/
|
|
public function setName(?string $name) : self
|
|
{
|
|
$this->name = $name;
|
|
return $this;
|
|
}
|
|
/**
|
|
* Value of record (e.g. 127.0.0.1, 1.1.1.1)
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getValue() : ?string
|
|
{
|
|
return $this->value;
|
|
}
|
|
/**
|
|
* Value of record (e.g. 127.0.0.1, 1.1.1.1)
|
|
*
|
|
* @param string|null $value
|
|
*
|
|
* @return self
|
|
*/
|
|
public function setValue(?string $value) : self
|
|
{
|
|
$this->value = $value;
|
|
return $this;
|
|
}
|
|
/**
|
|
* TTL of record
|
|
*
|
|
* @return int|null
|
|
*/
|
|
public function getTtl() : ?int
|
|
{
|
|
return $this->ttl;
|
|
}
|
|
/**
|
|
* TTL of record
|
|
*
|
|
* @param int|null $ttl
|
|
*
|
|
* @return self
|
|
*/
|
|
public function setTtl(?int $ttl) : self
|
|
{
|
|
$this->ttl = $ttl;
|
|
return $this;
|
|
}
|
|
} |