PrimaryServerID = $primaryServerID; } use \DigiComp\HetznerDnsApi\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; } public function getUri() : string { return str_replace(array('{PrimaryServerID}'), array($this->PrimaryServerID), '/primary_servers/{PrimaryServerID}'); } 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\GetPrimaryServerUnauthorizedException * @throws \DigiComp\HetznerDnsApi\Exception\GetPrimaryServerForbiddenException * @throws \DigiComp\HetznerDnsApi\Exception\GetPrimaryServerNotFoundException * @throws \DigiComp\HetznerDnsApi\Exception\GetPrimaryServerNotAcceptableException * * @return null|\DigiComp\HetznerDnsApi\Model\PrimaryServersPrimaryServerIDGetResponse200 */ 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\\PrimaryServersPrimaryServerIDGetResponse200', 'json'); } if (401 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetPrimaryServerUnauthorizedException(); } if (403 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetPrimaryServerForbiddenException(); } if (404 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetPrimaryServerNotFoundException(); } if (406 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetPrimaryServerNotAcceptableException(); } } public function getAuthenticationScopes() : array { return array('Auth-API-Token'); } }