The number of the first page is 1 * } */ public function __construct(array $queryParameters = array()) { $this->queryParameters = $queryParameters; } use \DigiComp\HetznerDnsApi\Runtime\Client\EndpointTrait; public function getMethod() : string { return 'GET'; } public function getUri() : string { return '/zones'; } 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')); } protected function getQueryOptionsResolver() : \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); $optionsResolver->setDefined(array('name', 'search_name', 'per_page', 'page')); $optionsResolver->setRequired(array()); $optionsResolver->setDefaults(array('per_page' => 100.0, 'page' => 1)); $optionsResolver->setAllowedTypes('name', array('string')); $optionsResolver->setAllowedTypes('search_name', array('string')); $optionsResolver->setAllowedTypes('per_page', array('float')); $optionsResolver->setAllowedTypes('page', array('int')); return $optionsResolver; } /** * {@inheritdoc} * * @throws \DigiComp\HetznerDnsApi\Exception\GetZonesBadRequestException * @throws \DigiComp\HetznerDnsApi\Exception\GetZonesUnauthorizedException * @throws \DigiComp\HetznerDnsApi\Exception\GetZonesNotAcceptableException * * @return null|\DigiComp\HetznerDnsApi\Model\ZonesGetResponse200 */ 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\\ZonesGetResponse200', 'json'); } if (400 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetZonesBadRequestException(); } if (401 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetZonesUnauthorizedException(); } if (406 === $status) { throw new \DigiComp\HetznerDnsApi\Exception\GetZonesNotAcceptableException(); } } public function getAuthenticationScopes() : array { return array('Auth-API-Token'); } }