id = $id; $this->queryParameters = $queryParameters; $this->accept = $accept; } public function getMethod(): string { return 'DELETE'; } public function getUri(): string { return str_replace(['{id}'], [$this->id], '/nodes/{id}'); } public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array { return [[], null]; } public function getExtraHeaders(): array { if (empty($this->accept)) { return ['Accept' => ['application/json', 'text/plain']]; } return $this->accept; } protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); $optionsResolver->setDefined(['force']); $optionsResolver->setRequired([]); $optionsResolver->setDefaults(['force' => false]); $optionsResolver->addAllowedTypes('force', ['bool']); return $optionsResolver; } /** * @throws \Docker\API\Exception\NodeDeleteNotFoundException * @throws \Docker\API\Exception\NodeDeleteInternalServerErrorException * @throws \Docker\API\Exception\NodeDeleteServiceUnavailableException * * @return null */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { } if ((null === $contentType) === false && (404 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \Docker\API\Exception\NodeDeleteNotFoundException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response); } if ((null === $contentType) === false && (500 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \Docker\API\Exception\NodeDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response); } if ((null === $contentType) === false && (503 === $status && false !== mb_strpos($contentType, 'application/json'))) { throw new \Docker\API\Exception\NodeDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\\API\\Model\\ErrorResponse', 'json'), $response); } } public function getAuthenticationScopes(): array { return []; } }