ZoneID = $zoneID; } use \DigiComp\HetznerDnsApi\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; } public function getUri() : string { return str_replace(array('{ZoneID}'), array($this->ZoneID), '/zones/{ZoneID}'); } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null) : array { return array(array(), null); } public function getExtraHeaders() : array { return array('Accept' => array('application/json')); } /** * {@inheritdoc} * * @throws \DigiComp\HetznerDnsApi\Exception\GetZoneUnauthorizedException * @throws \DigiComp\HetznerDnsApi\Exception\GetZoneForbiddenException * @throws \DigiComp\HetznerDnsApi\Exception\GetZoneNotFoundException * @throws \DigiComp\HetznerDnsApi\Exception\GetZoneNotAcceptableException * * @return null|\DigiComp\HetznerDnsApi\Model\ZonesZoneIDGetResponse200 */ protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return $serializer->deserialize($body, 'DigiComp\\HetznerDnsApi\\Model\\ZonesZoneIDGetResponse200', 'json'); } if (401 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetZoneUnauthorizedException(); } if (403 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetZoneForbiddenException(); } if (404 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetZoneNotFoundException(); } if (406 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetZoneNotAcceptableException(); } } public function getAuthenticationScopes() : array { return array('Auth-API-Token'); } }